Skip to content

Commit

Permalink
Renamed SpotApi.SubscribeToBestOfferUpdatesAsync to SubscribeToBookTi…
Browse files Browse the repository at this point in the history
…ckerUpdatesAsync , Xml comments
  • Loading branch information
JKorf committed Aug 7, 2024
1 parent 192882d commit 7003514
Show file tree
Hide file tree
Showing 13 changed files with 297 additions and 297 deletions.
2 changes: 1 addition & 1 deletion Kucoin.Net.UnitTests/SocketSubscriptionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public async Task ValidateSpotSubscriptions()
await tester.ValidateAsync<KucoinStreamTick>((client, handler) => client.SpotApi.SubscribeToTickerUpdatesAsync("BTC-USDT", handler), "Ticker");
await tester.ValidateAsync<KucoinStreamTick>((client, handler) => client.SpotApi.SubscribeToAllTickerUpdatesAsync(handler), "Tickers");
await tester.ValidateAsync<KucoinStreamSnapshot>((client, handler) => client.SpotApi.SubscribeToSnapshotUpdatesAsync("BTC", handler), "Snapshot", "data.data");
await tester.ValidateAsync<KucoinStreamBestOffers>((client, handler) => client.SpotApi.SubscribeToBestOfferUpdatesAsync("ETH-USDT", handler), "BestOffers", "data");
await tester.ValidateAsync<KucoinStreamBestOffers>((client, handler) => client.SpotApi.SubscribeToBookTickerUpdatesAsync("ETH-USDT", handler), "BestOffers", "data");
await tester.ValidateAsync<KucoinStreamOrderBook>((client, handler) => client.SpotApi.SubscribeToAggregatedOrderBookUpdatesAsync("BTC-USDT", handler), "AggBook", "data");
await tester.ValidateAsync<KucoinStreamMatch>((client, handler) => client.SpotApi.SubscribeToTradeUpdatesAsync("BTC-USDT", handler), "Trades", "data");
await tester.ValidateAsync<KucoinStreamCandle>((client, handler) => client.SpotApi.SubscribeToKlineUpdatesAsync("BTC-USDT", Enums.KlineInterval.EightHours, handler), "Klines", "data");
Expand Down
4 changes: 2 additions & 2 deletions Kucoin.Net/Clients/SpotApi/KucoinSocketClientSpotApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,10 @@ public async Task<CallResult<UpdateSubscription>> SubscribeToSnapshotUpdatesAsyn
}

/// <inheritdoc />
public Task<CallResult<UpdateSubscription>> SubscribeToBestOfferUpdatesAsync(string symbol, Action<DataEvent<KucoinStreamBestOffers>> onData, CancellationToken ct = default) => SubscribeToBestOfferUpdatesAsync(new[] { symbol }, onData, ct);
public Task<CallResult<UpdateSubscription>> SubscribeToBookTickerUpdatesAsync(string symbol, Action<DataEvent<KucoinStreamBestOffers>> onData, CancellationToken ct = default) => SubscribeToBookTickerUpdatesAsync(new[] { symbol }, onData, ct);

/// <inheritdoc />
public async Task<CallResult<UpdateSubscription>> SubscribeToBestOfferUpdatesAsync(IEnumerable<string> symbols, Action<DataEvent<KucoinStreamBestOffers>> onData, CancellationToken ct = default)
public async Task<CallResult<UpdateSubscription>> SubscribeToBookTickerUpdatesAsync(IEnumerable<string> symbols, Action<DataEvent<KucoinStreamBestOffers>> onData, CancellationToken ct = default)
{
symbols.ValidateNotNull(nameof(symbols));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public interface IKucoinRestClientFuturesApiAccount
/// Gets account overview
/// <para><a href="https://www.kucoin.com/docs/rest/funding/funding-overview/get-account-detail-futures" /></para>
/// </summary>
/// <param name="asset">Get the accounts for a specific asset</param>
/// <param name="asset">Get the accounts for a specific asset, for example `USDT`</param>
/// <param name="ct">Cancellation token</param>
/// <returns>List of accounts</returns>
Task<WebCallResult<KucoinAccountOverview>> GetAccountOverviewAsync(string? asset = null, CancellationToken ct = default);
Expand All @@ -28,7 +28,7 @@ public interface IKucoinRestClientFuturesApiAccount
/// Get transaction history
/// <para><a href="https://www.kucoin.com/docs/rest/account/basic-info/get-account-ledgers-futures" /></para>
/// </summary>
/// <param name="asset">Filter by asset</param>
/// <param name="asset">Filter by asset, for example `USDT`</param>
/// <param name="type">Filter by type</param>
/// <param name="startTime">Filter by start time</param>
/// <param name="endTime">Filter by end time</param>
Expand All @@ -43,7 +43,7 @@ public interface IKucoinRestClientFuturesApiAccount
/// Transfer funds from futures to main account
/// <para><a href="https://www.kucoin.com/docs/rest/funding/transfer/transfer-to-main-or-trade-account" /></para>
/// </summary>
/// <param name="asset">Asset to transfer</param>
/// <param name="asset">Asset to transfer, for example `USDT`</param>
/// <param name="quantity">Quantity to transfer</param>
/// <param name="receiveAccountType">Receiving account type</param>
/// <param name="ct">Cancellation token</param>
Expand All @@ -54,7 +54,7 @@ public interface IKucoinRestClientFuturesApiAccount
/// Transfer funds from main or trade account to futures
/// <para><a href="https://www.kucoin.com/docs/rest/funding/transfer/transfer-to-futures-account" /></para>
/// </summary>
/// <param name="asset">Asset to transfer</param>
/// <param name="asset">Asset to transfer, for example `USDT`</param>
/// <param name="quantity">Quantity to transfer</param>
/// <param name="payAccountType">Account to move funds from</param>
/// <param name="ct">Cancellation token</param>
Expand All @@ -65,7 +65,7 @@ public interface IKucoinRestClientFuturesApiAccount
/// Get transfer to main account history
/// <para><a href="https://www.kucoin.com/docs/rest/funding/transfer/get-futures-transfer-out-request-records" /></para>
/// </summary>
/// <param name="asset">Filter by asset</param>
/// <param name="asset">Filter by asset, for example `USDT`</param>
/// <param name="startTime">Filter by start time</param>
/// <param name="endTime">Filter by end time</param>
/// <param name="status">Filter by status</param>
Expand All @@ -79,7 +79,7 @@ public interface IKucoinRestClientFuturesApiAccount
/// Get the total value of active orders
/// <para><a href="https://www.kucoin.com/docs/rest/futures-trading/fills/get-active-order-value-calculation" /></para>
/// </summary>
/// <param name="symbol">Symbol</param>
/// <param name="symbol">Symbol, for example `XBTUSDM`</param>
/// <param name="ct">Cancellation token</param>
/// <returns></returns>
Task<WebCallResult<KucoinOrderValuation>> GetOpenOrderValueAsync(string symbol, CancellationToken ct = default);
Expand All @@ -88,7 +88,7 @@ public interface IKucoinRestClientFuturesApiAccount
/// Get details on a position
/// <para><a href="https://www.kucoin.com/docs/rest/futures-trading/positions/get-position-details" /></para>
/// </summary>
/// <param name="symbol">Contract symbol</param>
/// <param name="symbol">Contract symbol, for example `XBTUSDM`</param>
/// <param name="ct">Cancellation token</param>
/// <returns>Position info</returns>
Task<WebCallResult<KucoinPosition>> GetPositionAsync(string symbol, CancellationToken ct = default);
Expand All @@ -97,7 +97,7 @@ public interface IKucoinRestClientFuturesApiAccount
/// Get list of positions
/// <para><a href="https://www.kucoin.com/docs/rest/futures-trading/positions/get-position-list" /></para>
/// </summary>
/// <param name="asset">Filter by asset</param>
/// <param name="asset">Filter by asset, for example `USDT`</param>
/// <param name="ct">Cancellation token</param>
/// <returns>Position info</returns>
Task<WebCallResult<IEnumerable<KucoinPosition>>> GetPositionsAsync(string? asset = null, CancellationToken ct = default);
Expand All @@ -106,7 +106,7 @@ public interface IKucoinRestClientFuturesApiAccount
/// Get position closure history
/// <para><a href="https://www.kucoin.com/docs/rest/futures-trading/positions/get-positions-history" /></para>
/// </summary>
/// <param name="symbol">Filter by symbol</param>
/// <param name="symbol">Filter by symbol, for example `XBTUSDM`</param>
/// <param name="startTime">Filter by start time</param>
/// <param name="endTime">Filter by end time</param>
/// <param name="limit">Max number of results</param>
Expand All @@ -119,7 +119,7 @@ public interface IKucoinRestClientFuturesApiAccount
/// Enable/disable auto deposit margin
/// <para><a href="https://www.kucoin.com/docs/rest/futures-trading/positions/modify-auto-deposit-margin-status" /></para>
/// </summary>
/// <param name="symbol">Symbol to change for</param>
/// <param name="symbol">Symbol to change for, for example `XBTUSDM`</param>
/// <param name="enabled">Enable or disable</param>
/// <param name="ct">Cancellation token</param>
/// <returns>Position info</returns>
Expand All @@ -129,7 +129,7 @@ public interface IKucoinRestClientFuturesApiAccount
/// Manually add margin to a position
/// <para><a href="https://www.kucoin.com/docs/rest/futures-trading/positions/add-margin-manually" /></para>
/// </summary>
/// <param name="symbol">Symbol</param>
/// <param name="symbol">Symbol, for example `XBTUSDM`</param>
/// <param name="quantity">Quantity to add</param>
/// <param name="clientId">A unique ID generated by the user, to ensure the operation is processed by the system only once</param>
/// <param name="ct">Cancellation token</param>
Expand All @@ -140,7 +140,7 @@ public interface IKucoinRestClientFuturesApiAccount
/// Manually remove margin from a position
/// <para><a href="https://www.kucoin.com/docs/rest/futures-trading/positions/remove-margin-manually" /></para>
/// </summary>
/// <param name="symbol">Symbol</param>
/// <param name="symbol">Symbol, for example `XBTUSDM`</param>
/// <param name="quantity">Quantity to remove</param>
/// <param name="ct">Cancellation token</param>
/// <returns></returns>
Expand All @@ -150,7 +150,7 @@ public interface IKucoinRestClientFuturesApiAccount
/// Get funding history
/// <para><a href="https://www.kucoin.com/docs/rest/futures-trading/funding-fees/get-private-funding-history" /></para>
/// </summary>
/// <param name="symbol">Symbol</param>
/// <param name="symbol">Symbol, for example `XBTUSDM`</param>
/// <param name="startTime">Filter by start time</param>
/// <param name="endTime">Filter by end time</param>
/// <param name="offset">Result offset</param>
Expand All @@ -164,7 +164,7 @@ public interface IKucoinRestClientFuturesApiAccount
/// Get risk limit level
/// <para><a href="https://www.kucoin.com/docs/rest/futures-trading/risk-limit/get-futures-risk-limit-level" /></para>
/// </summary>
/// <param name="symbol">Symbol</param>
/// <param name="symbol">Symbol, for example `XBTUSDM`</param>
/// <param name="ct">Cancellation token</param>
/// <returns></returns>
Task<WebCallResult<IEnumerable<Objects.Models.Futures.KucoinRiskLimit>>> GetRiskLimitLevelAsync(string symbol, CancellationToken ct = default);
Expand All @@ -173,7 +173,7 @@ public interface IKucoinRestClientFuturesApiAccount
/// Set risk limit level
/// <para><a href="https://www.kucoin.com/docs/rest/futures-trading/risk-limit/modify-risk-limit-level" /></para>
/// </summary>
/// <param name="symbol">Symbol</param>
/// <param name="symbol">Symbol, for example `XBTUSDM`</param>
/// <param name="level">Risk limit level</param>
/// <param name="ct">Cancellation token</param>
/// <returns></returns>
Expand All @@ -183,7 +183,7 @@ public interface IKucoinRestClientFuturesApiAccount
/// Get the maximum amount of margin that the current position supports withdrawal.
/// <para><a href="https://www.kucoin.com/docs/rest/futures-trading/positions/get-max-withdraw-margin" /></para>
/// </summary>
/// <param name="symbol">The symbol</param>
/// <param name="symbol">The symbol, for example `XBTUSDM`</param>
/// <param name="ct">Cancellation token</param>
/// <returns></returns>
Task<WebCallResult<decimal>> GetMaxWithdrawMarginAsync(string symbol, CancellationToken ct = default);
Expand All @@ -192,7 +192,7 @@ public interface IKucoinRestClientFuturesApiAccount
/// Get trading fee for a symbol
/// <para><a href="https://www.kucoin.com/docs/rest/funding/trade-fee/trading-pair-actual-fee-futures" /></para>
/// </summary>
/// <param name="symbol">The symbol</param>
/// <param name="symbol">The symbol, for example `XBTUSDM`</param>
/// <param name="ct">Cancellation token</param>
/// <returns></returns>
Task<WebCallResult<KucoinTradeFee>> GetTradingFeeAsync(string symbol, CancellationToken ct = default);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public interface IKucoinRestClientFuturesApiExchangeData
/// Get a contract
/// <para><a href="https://www.kucoin.com/docs/rest/futures-trading/market-data/get-symbol-detail" /></para>
/// </summary>
/// <param name="symbol">Symbol of the contract</param>
/// <param name="symbol">Symbol of the contract, for example `XBTUSDM`</param>
/// <param name="ct">Cancellation token</param>
/// <returns></returns>
Task<WebCallResult<KucoinContract>> GetContractAsync(string symbol, CancellationToken ct = default);
Expand All @@ -35,7 +35,7 @@ public interface IKucoinRestClientFuturesApiExchangeData
/// Get the ticker for a contract
/// <para><a href="https://www.kucoin.com/docs/rest/futures-trading/market-data/get-ticker" /></para>
/// </summary>
/// <param name="symbol">Symbol of the contract</param>
/// <param name="symbol">Symbol of the contract, for example `XBTUSDM`</param>
/// <param name="ct">Cancellation token</param>
/// <returns></returns>
Task<WebCallResult<KucoinFuturesTick>> GetTickerAsync(string symbol, CancellationToken ct = default);
Expand All @@ -44,7 +44,7 @@ public interface IKucoinRestClientFuturesApiExchangeData
/// Get the full order book, aggregated by price
/// <para><a href="https://www.kucoin.com/docs/rest/futures-trading/market-data/get-full-order-book-level-2" /></para>
/// </summary>
/// <param name="symbol">Symbol of the contract</param>
/// <param name="symbol">Symbol of the contract, for example `XBTUSDM`</param>
/// <param name="ct">Cancellation token</param>
/// <returns></returns>
Task<WebCallResult<KucoinOrderBook>> GetAggregatedFullOrderBookAsync(string symbol, CancellationToken ct = default);
Expand All @@ -53,7 +53,7 @@ public interface IKucoinRestClientFuturesApiExchangeData
/// Get the partial order book, aggregated by price
/// <para><a href="https://www.kucoin.com/docs/rest/futures-trading/market-data/get-part-order-book-level-2" /></para>
/// </summary>
/// <param name="symbol">Symbol of the contract</param>
/// <param name="symbol">Symbol of the contract, for example `XBTUSDM`</param>
/// <param name="depth">Amount of rows in the book, either 20 or 100</param>
/// <param name="ct">Cancellation token</param>
/// <returns></returns>
Expand All @@ -63,7 +63,7 @@ public interface IKucoinRestClientFuturesApiExchangeData
/// Get interest rate list
/// <para><a href="https://www.kucoin.com/docs/rest/futures-trading/market-data/get-interest-rate-list" /></para>
/// </summary>
/// <param name="symbol">Symbol</param>
/// <param name="symbol">Symbol, for example `XBTUSDM`</param>
/// <param name="startTime">Filter by start time</param>
/// <param name="endTime">Filter by end time</param>
/// <param name="offset">Result offset</param>
Expand All @@ -77,7 +77,7 @@ public interface IKucoinRestClientFuturesApiExchangeData
/// Get index list
/// <para><a href="https://www.kucoin.com/docs/rest/futures-trading/market-data/get-index-list" /></para>
/// </summary>
/// <param name="symbol">Symbol</param>
/// <param name="symbol">Symbol, for example `XBTUSDM`</param>
/// <param name="startTime">Filter by start time</param>
/// <param name="endTime">Filter by end time</param>
/// <param name="offset">Result offset</param>
Expand All @@ -91,7 +91,7 @@ public interface IKucoinRestClientFuturesApiExchangeData
/// Get the current mark price
/// <para><a href="https://www.kucoin.com/docs/rest/futures-trading/market-data/get-current-mark-price" /></para>
/// </summary>
/// <param name="symbol">Symbol of the contract</param>
/// <param name="symbol">Symbol of the contract, for example `XBTUSDM`</param>
/// <param name="ct">Cancellation token</param>
/// <returns></returns>
Task<WebCallResult<KucoinMarkPrice>> GetCurrentMarkPriceAsync(string symbol, CancellationToken ct = default);
Expand All @@ -100,7 +100,7 @@ public interface IKucoinRestClientFuturesApiExchangeData
/// Get premium index
/// <para><a href="https://www.kucoin.com/docs/rest/futures-trading/market-data/get-premium-index" /></para>
/// </summary>
/// <param name="symbol">Symbol</param>
/// <param name="symbol">Symbol, for example `XBTUSDM`</param>
/// <param name="startTime">Filter by start time</param>
/// <param name="endTime">Filter by end time</param>
/// <param name="offset">Result offset</param>
Expand All @@ -114,7 +114,7 @@ public interface IKucoinRestClientFuturesApiExchangeData
/// Get the current funding rate
/// <para><a href="https://www.kucoin.com/docs/rest/futures-trading/funding-fees/get-current-funding-rate" /></para>
/// </summary>
/// <param name="symbol">Symbol of the contract</param>
/// <param name="symbol">Symbol of the contract, for example `XBTUSDM`</param>
/// <param name="ct">Cancellation token</param>
/// <returns></returns>
Task<WebCallResult<KucoinFundingRate>> GetCurrentFundingRateAsync(string symbol, CancellationToken ct = default);
Expand All @@ -123,7 +123,7 @@ public interface IKucoinRestClientFuturesApiExchangeData
/// Get the most recent trades
/// <para><a href="https://www.kucoin.com/docs/rest/futures-trading/market-data/get-transaction-history" /></para>
/// </summary>
/// <param name="symbol">Symbol of the contract</param>
/// <param name="symbol">Symbol of the contract, for example `XBTUSDM`</param>
/// <param name="ct">Cancellation token</param>
/// <returns></returns>
Task<WebCallResult<IEnumerable<KucoinFuturesTrade>>> GetTradeHistoryAsync(string symbol, CancellationToken ct = default);
Expand All @@ -148,7 +148,7 @@ public interface IKucoinRestClientFuturesApiExchangeData
/// Get kline data
/// <para><a href="https://www.kucoin.com/docs/rest/futures-trading/market-data/get-klines" /></para>
/// </summary>
/// <param name="symbol">Symbol</param>
/// <param name="symbol">Symbol, for example `XBTUSDM`</param>
/// <param name="interval">Interval of the klines</param>
/// <param name="startTime">Start time to retrieve klines from</param>
/// <param name="endTime">End time to retrieve klines for</param>
Expand All @@ -168,7 +168,7 @@ public interface IKucoinRestClientFuturesApiExchangeData
/// Get funding rate history for a symbol
/// <para><a href="https://www.kucoin.com/docs/rest/futures-trading/funding-fees/get-public-funding-history" /></para>
/// </summary>
/// <param name="symbol">Symbol name</param>
/// <param name="symbol">Symbol name, for example `XBTUSDM`</param>
/// <param name="startTime">Start time</param>
/// <param name="endTime">End time</param>
/// <param name="ct">Cancellation token</param>
Expand Down
Loading

0 comments on commit 7003514

Please sign in to comment.