Skip to content

Commit

Permalink
[Feature] Add XLM and add test case for websocket feed (#192)
Browse files Browse the repository at this point in the history
  • Loading branch information
dougdellolio authored Mar 16, 2019
1 parent 2e4ed4f commit c96b0f9
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
15 changes: 14 additions & 1 deletion CoinbasePro.Specs/WebSocket/WebSocketSpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,20 @@ class when_calling_start_and_not_providing_product_types
exception.ShouldBeOfExactType<ArgumentException>();
}

class when_calling_stop
{
class before_calling_start
{
Because of = () =>
Subject.Stop();

It should_not_have_attempted_to_close_the_feed = () =>
The<IWebSocketFeed>().
WasNotToldTo(p =>
p.Close());
}
}

class when_setting_the_auto_send_ping_interval
{
class when_the_websocket_closes_and_restarts
Expand Down Expand Up @@ -252,7 +266,6 @@ class when_response_type_is_heartbeat
It should_have_invoked_heartbeat_response = () =>
The<IWebSocketFeed>().
WasToldTo(p => p.Invoke(Param.IsAny<EventHandler<WebfeedEventArgs<Heartbeat>>>(), Param.IsAny<object>(), Param.IsAny<WebfeedEventArgs<Heartbeat>>()));

}

class when_response_type_is_received
Expand Down
1 change: 0 additions & 1 deletion CoinbasePro/Services/Products/ProductsService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ public async Task<IList<Candle>> GetHistoricRatesAsync(
if (previousBatchEnd == batchEnd) {
break;
}

} while (batchStart > start);

return candleList;
Expand Down
1 change: 1 addition & 0 deletions CoinbasePro/Shared/Types/Currency.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public enum Currency
USD,
USDC,
Unknown,
XLM,
XRP,
ZEC,
ZIL,
Expand Down
8 changes: 7 additions & 1 deletion CoinbasePro/Shared/Types/ProductType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ public enum ProductType
[EnumMember(Value = "XRP-BTC")]
XrpBtc,
[EnumMember(Value = "XRP-USD")]
XrpUsd
XrpUsd,
[EnumMember(Value = "XLM-USD")]
XlmUsd,
[EnumMember(Value = "XLM-BTC")]
XlmBtc,
[EnumMember(Value = "XLM-EUR")]
XlmEur
}
}

0 comments on commit c96b0f9

Please sign in to comment.