-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added FuturesApi.Trading.PlaceMultipleOrdersAsync, PlaceMultipleStopO…
…rdersAsync, CancelOrdersAsync and CancelStopOrdersAsync batch endpoints
- Loading branch information
Showing
5 changed files
with
389 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
CoinEx.Net/Objects/Models/V2/CoinExFuturesPlaceOrderRequest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
using CoinEx.Net.Enums; | ||
using CryptoExchange.Net.Converters.SystemTextJson; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace CoinEx.Net.Objects.Models.V2 | ||
{ | ||
/// <summary> | ||
/// Place order request | ||
/// </summary> | ||
public record CoinExFuturesPlaceOrderRequest | ||
{ | ||
/// <summary> | ||
/// The symbol, for example `ETHUSDT` | ||
/// </summary> | ||
[JsonPropertyName("market")] | ||
public string Symbol { get; set; } = string.Empty; | ||
/// <summary> | ||
/// The account type | ||
/// </summary> | ||
[JsonPropertyName("market_type")] | ||
public AccountType AccountType { get; set; } | ||
/// <summary> | ||
/// The side | ||
/// </summary> | ||
[JsonPropertyName("side")] | ||
public OrderSide Side { get; set; } | ||
/// <summary> | ||
/// The order type | ||
/// </summary> | ||
[JsonPropertyName("type")] | ||
public OrderTypeV2 OrderType { get; set; } | ||
/// <summary> | ||
/// The quantity | ||
/// </summary> | ||
[JsonPropertyName("amount"), JsonConverter(typeof(CryptoExchange.Net.Converters.SystemTextJson.DecimalStringWriterConverter))] | ||
public decimal Quantity { get; set; } | ||
/// <summary> | ||
/// The limit price | ||
/// </summary> | ||
[JsonPropertyName("price"), JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault), JsonConverter(typeof(CryptoExchange.Net.Converters.SystemTextJson.DecimalStringWriterConverter))] | ||
public decimal? Price { get; set; } | ||
/// <summary> | ||
/// The client order id | ||
/// </summary> | ||
[JsonPropertyName("client_id"), JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] | ||
public string? ClientOrderId { get; set; } | ||
/// <summary> | ||
/// Whether to hide the order | ||
/// </summary> | ||
[JsonPropertyName("is_hide"), JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] | ||
public bool? Hide { get; set; } | ||
/// <summary> | ||
/// Self trade prevention mode | ||
/// </summary> | ||
[JsonPropertyName("stp_mode"), JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] | ||
public SelfTradePreventionMode? StpMode { get; set; } | ||
} | ||
} |
Oops, something went wrong.