Skip to content

Commit

Permalink
add clientOrderId parameter to GateIoSocketClientSpotApi.EditOrderAsy…
Browse files Browse the repository at this point in the history
…nc()
  • Loading branch information
alokym86 committed Oct 2, 2024
1 parent 747fc3b commit 3248f6e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions GateIo.Net/Clients/SpotApi/GateIoSocketClientSpotApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,8 @@ public async Task<CallResult<IEnumerable<GateIoOrder>>> PlaceMultipleOrdersAsync

/// <inheritdoc />
public async Task<CallResult<GateIoOrder>> EditOrderAsync(string symbol,
long orderId,
long? orderId = null,
string? clientOrderId = null,
decimal? price = null,
decimal? quantity = null,
string? amendText = null,
Expand All @@ -290,7 +291,7 @@ public async Task<CallResult<GateIoOrder>> EditOrderAsync(string symbol,
Quantity = quantity,
Price = price,
AmendText = amendText,
OrderId = orderId.ToString()
OrderId = orderId?.ToString() ?? clientOrderId!
}, true);

return await QueryAsync(BaseAddress.AppendPath("ws/v4/") + "/", query, ct).ConfigureAwait(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,15 +254,17 @@ Task<CallResult<GateIoOrder>> PlaceOrderAsync(string symbol,
/// <para><a href="https://www.gate.io/docs/developers/apiv4/ws/en/#order-amend" /></para>
/// </summary>
/// <param name="symbol">Symbol, for example `ETH_USDT`</param>
/// <param name="orderId">Order id</param>
/// <param name="orderId">Order id, either orderId or clientOrderId required</param>
/// <param name="clientOrderId">user custom ID(i.e., t-123c456f), either `orderId` or `clientOrderId` required</param>
/// <param name="price">New price</param>
/// <param name="quantity">New quantity</param>
/// <param name="amendText">Custom info during amending order</param>
/// <param name="accountType">Specify operation account. Default to spot ,portfolio and margin account if not specified. Set to cross_margin to operate against margin account. Portfolio margin account must set to cross_margin only</param>
/// <param name="ct">Cancellation token</param>
/// <returns></returns>
Task<CallResult<GateIoOrder>> EditOrderAsync(string symbol,
long orderId,
long? orderId = null,
string? clientOrderId = null,
decimal? price = null,
decimal? quantity = null,
string? amendText = null,
Expand Down

0 comments on commit 3248f6e

Please sign in to comment.