Skip to content

Commit

Permalink
Fixed CancelAfter parameter on SpotApi.HfTrading.PlaceMultipleOrdersA…
Browse files Browse the repository at this point in the history
…sync endpoint, removed symbol base parameter as not needed
  • Loading branch information
JKorf committed Jun 26, 2024
1 parent 058ed6b commit d33908d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ public async Task<WebCallResult<KucoinOrderId>> PlaceTestOrderAsync(
}

/// <inheritdoc />
public async Task<WebCallResult<IEnumerable<KucoinBulkMinimalResponseEntry>>> PlaceMultipleOrdersAsync(string symbol, IEnumerable<KucoinHfBulkOrderRequestEntry> orders, CancellationToken ct = default)
public async Task<WebCallResult<IEnumerable<KucoinBulkMinimalResponseEntry>>> PlaceMultipleOrdersAsync(IEnumerable<KucoinHfBulkOrderRequestEntry> orders, CancellationToken ct = default)
{
var orderList = orders.ToList();
if (!orderList.Any())
Expand All @@ -206,7 +206,6 @@ public async Task<WebCallResult<IEnumerable<KucoinBulkMinimalResponseEntry>>> Pl

var parameters = new ParameterCollection
{
{ "symbol", symbol },
{ "orderList", orderList }
};

Expand All @@ -223,7 +222,7 @@ public async Task<WebCallResult<IEnumerable<KucoinBulkMinimalResponseEntry>>> Pl
}

/// <inheritdoc />
public async Task<WebCallResult<IEnumerable<KucoinHfBulkOrderResponse>>> PlaceMultipleOrdersWaitAsync(string symbol, IEnumerable<KucoinHfBulkOrderRequestEntry> orders, CancellationToken ct = default)
public async Task<WebCallResult<IEnumerable<KucoinHfBulkOrderResponse>>> PlaceMultipleOrdersWaitAsync(IEnumerable<KucoinHfBulkOrderRequestEntry> orders, CancellationToken ct = default)
{
var orderList = orders.ToList();
if (!orderList.Any())
Expand All @@ -235,7 +234,6 @@ public async Task<WebCallResult<IEnumerable<KucoinHfBulkOrderResponse>>> PlaceMu

var parameters = new ParameterCollection
{
{ "symbol", symbol },
{ "orderList", orderList }
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,21 +154,19 @@ Task<WebCallResult<KucoinModifiedOrder>> EditOrderAsync(
/// Place multiple orders and only wait for confirmation. This is the faster version of <see cref="PlaceMultipleOrdersWaitAsync" />
/// <para><a href="https://www.kucoin.com/docs/rest/spot-trading/spot-hf-trade-pro-account/place-multiple-orders" /></para>
/// </summary>
/// <param name="symbol">Symbol</param>
/// <param name="orders">Orders to place</param>
/// <param name="ct">Cancellation token</param>
/// <returns></returns>
Task<WebCallResult<IEnumerable<KucoinBulkMinimalResponseEntry>>> PlaceMultipleOrdersAsync(string symbol, IEnumerable<KucoinHfBulkOrderRequestEntry> orders, CancellationToken ct = default);
Task<WebCallResult<IEnumerable<KucoinBulkMinimalResponseEntry>>> PlaceMultipleOrdersAsync(IEnumerable<KucoinHfBulkOrderRequestEntry> orders, CancellationToken ct = default);

/// <summary>
/// Place multiple orders and wait for and return the full order results. This is the slower version of <see cref="PlaceMultipleOrdersAsync" />
/// <para><a href="https://www.kucoin.com/docs/rest/spot-trading/spot-hf-trade-pro-account/sync-place-multiple-hf-orders" /></para>
/// </summary>
/// <param name="symbol">Symbol</param>
/// <param name="orders">Orders to place</param>
/// <param name="ct">Cancellation token</param>
/// <returns></returns>
Task<WebCallResult<IEnumerable<KucoinHfBulkOrderResponse>>> PlaceMultipleOrdersWaitAsync(string symbol, IEnumerable<KucoinHfBulkOrderRequestEntry> orders, CancellationToken ct = default);
Task<WebCallResult<IEnumerable<KucoinHfBulkOrderResponse>>> PlaceMultipleOrdersWaitAsync(IEnumerable<KucoinHfBulkOrderRequestEntry> orders, CancellationToken ct = default);

/// <summary>
/// Cancel an order and only wait for confirmation. This is the faster version of <see cref="CancelOrderWaitAsync" />
Expand Down
16 changes: 7 additions & 9 deletions Kucoin.Net/Kucoin.Net.xml
Original file line number Diff line number Diff line change
Expand Up @@ -556,10 +556,10 @@
<member name="M:Kucoin.Net.Clients.SpotApi.KucoinRestClientSpotApiHfTrading.PlaceTestOrderAsync(System.String,Kucoin.Net.Enums.OrderSide,Kucoin.Net.Enums.NewOrderType,System.Nullable{System.Decimal},System.Nullable{System.Decimal},System.Nullable{System.Decimal},System.Nullable{Kucoin.Net.Enums.TimeInForce},System.Nullable{System.TimeSpan},System.Nullable{System.Boolean},System.Nullable{System.Boolean},System.Nullable{System.Boolean},System.Nullable{System.Decimal},System.String,System.String,System.Nullable{Kucoin.Net.Enums.SelfTradePrevention},System.Threading.CancellationToken)">
<inheritdoc />
</member>
<member name="M:Kucoin.Net.Clients.SpotApi.KucoinRestClientSpotApiHfTrading.PlaceMultipleOrdersAsync(System.String,System.Collections.Generic.IEnumerable{Kucoin.Net.Objects.Models.Spot.KucoinHfBulkOrderRequestEntry},System.Threading.CancellationToken)">
<member name="M:Kucoin.Net.Clients.SpotApi.KucoinRestClientSpotApiHfTrading.PlaceMultipleOrdersAsync(System.Collections.Generic.IEnumerable{Kucoin.Net.Objects.Models.Spot.KucoinHfBulkOrderRequestEntry},System.Threading.CancellationToken)">
<inheritdoc />
</member>
<member name="M:Kucoin.Net.Clients.SpotApi.KucoinRestClientSpotApiHfTrading.PlaceMultipleOrdersWaitAsync(System.String,System.Collections.Generic.IEnumerable{Kucoin.Net.Objects.Models.Spot.KucoinHfBulkOrderRequestEntry},System.Threading.CancellationToken)">
<member name="M:Kucoin.Net.Clients.SpotApi.KucoinRestClientSpotApiHfTrading.PlaceMultipleOrdersWaitAsync(System.Collections.Generic.IEnumerable{Kucoin.Net.Objects.Models.Spot.KucoinHfBulkOrderRequestEntry},System.Threading.CancellationToken)">
<inheritdoc />
</member>
<member name="M:Kucoin.Net.Clients.SpotApi.KucoinRestClientSpotApiHfTrading.EditOrderAsync(System.String,System.String,System.String,System.Nullable{System.Decimal},System.Nullable{System.Decimal},System.Threading.CancellationToken)">
Expand Down Expand Up @@ -3593,22 +3593,20 @@
<param name="ct">Cancellation token</param>
<returns>The id of the modified order</returns>
</member>
<member name="M:Kucoin.Net.Interfaces.Clients.SpotApi.IKucoinRestClientSpotApiHfTrading.PlaceMultipleOrdersAsync(System.String,System.Collections.Generic.IEnumerable{Kucoin.Net.Objects.Models.Spot.KucoinHfBulkOrderRequestEntry},System.Threading.CancellationToken)">
<member name="M:Kucoin.Net.Interfaces.Clients.SpotApi.IKucoinRestClientSpotApiHfTrading.PlaceMultipleOrdersAsync(System.Collections.Generic.IEnumerable{Kucoin.Net.Objects.Models.Spot.KucoinHfBulkOrderRequestEntry},System.Threading.CancellationToken)">
<summary>
Place multiple orders and only wait for confirmation. This is the faster version of <see cref="M:Kucoin.Net.Interfaces.Clients.SpotApi.IKucoinRestClientSpotApiHfTrading.PlaceMultipleOrdersWaitAsync(System.String,System.Collections.Generic.IEnumerable{Kucoin.Net.Objects.Models.Spot.KucoinHfBulkOrderRequestEntry},System.Threading.CancellationToken)" />
Place multiple orders and only wait for confirmation. This is the faster version of <see cref="M:Kucoin.Net.Interfaces.Clients.SpotApi.IKucoinRestClientSpotApiHfTrading.PlaceMultipleOrdersWaitAsync(System.Collections.Generic.IEnumerable{Kucoin.Net.Objects.Models.Spot.KucoinHfBulkOrderRequestEntry},System.Threading.CancellationToken)" />
<para><a href="https://www.kucoin.com/docs/rest/spot-trading/spot-hf-trade-pro-account/place-multiple-orders" /></para>
</summary>
<param name="symbol">Symbol</param>
<param name="orders">Orders to place</param>
<param name="ct">Cancellation token</param>
<returns></returns>
</member>
<member name="M:Kucoin.Net.Interfaces.Clients.SpotApi.IKucoinRestClientSpotApiHfTrading.PlaceMultipleOrdersWaitAsync(System.String,System.Collections.Generic.IEnumerable{Kucoin.Net.Objects.Models.Spot.KucoinHfBulkOrderRequestEntry},System.Threading.CancellationToken)">
<member name="M:Kucoin.Net.Interfaces.Clients.SpotApi.IKucoinRestClientSpotApiHfTrading.PlaceMultipleOrdersWaitAsync(System.Collections.Generic.IEnumerable{Kucoin.Net.Objects.Models.Spot.KucoinHfBulkOrderRequestEntry},System.Threading.CancellationToken)">
<summary>
Place multiple orders and wait for and return the full order results. This is the slower version of <see cref="M:Kucoin.Net.Interfaces.Clients.SpotApi.IKucoinRestClientSpotApiHfTrading.PlaceMultipleOrdersAsync(System.String,System.Collections.Generic.IEnumerable{Kucoin.Net.Objects.Models.Spot.KucoinHfBulkOrderRequestEntry},System.Threading.CancellationToken)" />
Place multiple orders and wait for and return the full order results. This is the slower version of <see cref="M:Kucoin.Net.Interfaces.Clients.SpotApi.IKucoinRestClientSpotApiHfTrading.PlaceMultipleOrdersAsync(System.Collections.Generic.IEnumerable{Kucoin.Net.Objects.Models.Spot.KucoinHfBulkOrderRequestEntry},System.Threading.CancellationToken)" />
<para><a href="https://www.kucoin.com/docs/rest/spot-trading/spot-hf-trade-pro-account/sync-place-multiple-hf-orders" /></para>
</summary>
<param name="symbol">Symbol</param>
<param name="orders">Orders to place</param>
<param name="ct">Cancellation token</param>
<returns></returns>
Expand Down Expand Up @@ -8546,7 +8544,7 @@
</member>
<member name="P:Kucoin.Net.Objects.Models.Spot.KucoinHfBulkOrderRequestEntry.CancelAfter">
<summary>
Time after which the order is canceled
Timespan in seconds after which the order is canceled
</summary>
</member>
<member name="P:Kucoin.Net.Objects.Models.Spot.KucoinHfBulkOrderRequestEntry.PostOnly">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,10 @@ public record KucoinHfBulkOrderRequestEntry
[JsonProperty("timeInForce")]
public TimeInForce? TimeInForce { get; set; }
/// <summary>
/// Time after which the order is canceled
/// Timespan in seconds after which the order is canceled
/// </summary>
[JsonConverter(typeof(DateTimeConverter))]
[JsonProperty("cancelAfter")]
public DateTime? CancelAfter { get; set; }
public int? CancelAfter { get; set; }
/// <summary>
/// Whether the order is post only
/// </summary>
Expand Down

0 comments on commit d33908d

Please sign in to comment.