From 4dea2c52654aaf61b91bab228077335250efaa05 Mon Sep 17 00:00:00 2001 From: JKorf Date: Sat, 30 Sep 2023 10:02:53 +0200 Subject: [PATCH] Fix for Symbol deserialization --- OKX.Net/Converters/InstrumentStateConverter.cs | 1 + OKX.Net/Enums/OKXInstrumentState.cs | 1 + OKX.Net/Objects/Public/OKXInstrument.cs | 12 ++++++------ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/OKX.Net/Converters/InstrumentStateConverter.cs b/OKX.Net/Converters/InstrumentStateConverter.cs index 51215ee..db87ba3 100644 --- a/OKX.Net/Converters/InstrumentStateConverter.cs +++ b/OKX.Net/Converters/InstrumentStateConverter.cs @@ -12,5 +12,6 @@ public InstrumentStateConverter(bool quotes) : base(quotes) { } new KeyValuePair(OKXInstrumentState.Live, "live"), new KeyValuePair(OKXInstrumentState.Suspend, "suspend"), new KeyValuePair(OKXInstrumentState.PreOpen, "preopen"), + new KeyValuePair(OKXInstrumentState.Test, "test"), }; } \ No newline at end of file diff --git a/OKX.Net/Enums/OKXInstrumentState.cs b/OKX.Net/Enums/OKXInstrumentState.cs index 4d3527a..3f35925 100644 --- a/OKX.Net/Enums/OKXInstrumentState.cs +++ b/OKX.Net/Enums/OKXInstrumentState.cs @@ -6,4 +6,5 @@ public enum OKXInstrumentState Live, Suspend, PreOpen, + Test, } \ No newline at end of file diff --git a/OKX.Net/Objects/Public/OKXInstrument.cs b/OKX.Net/Objects/Public/OKXInstrument.cs index db6bd38..75211d5 100644 --- a/OKX.Net/Objects/Public/OKXInstrument.cs +++ b/OKX.Net/Objects/Public/OKXInstrument.cs @@ -144,30 +144,30 @@ public class OKXInstrument /// The maximum order quantity of the contract or spot limit order. /// [JsonProperty("maxLmtSz")] - public decimal MaxLimitQuantity { get; set; } + public decimal? MaxLimitQuantity { get; set; } /// /// The maximum order quantity of the contract or spot market order. /// [JsonProperty("maxMktSz")] - public decimal MaxMarketQuantity { get; set; } + public decimal? MaxMarketQuantity { get; set; } /// /// The maximum order quantity of the contract or spot twap order. /// [JsonProperty("maxTwapSz")] - public decimal MaxTwapQuantity { get; set; } + public decimal? MaxTwapQuantity { get; set; } /// /// The maximum order quantity of the contract or spot iceBerg order. /// [JsonProperty("maxIcebergSz")] - public decimal MaxIcebergQuantity { get; set; } + public decimal? MaxIcebergQuantity { get; set; } /// /// The maximum order quantity of the contract or spot trigger order. /// [JsonProperty("maxTriggerSz")] - public decimal MaxTriggerQuantity { get; set; } + public decimal? MaxTriggerQuantity { get; set; } /// /// The maximum order quantity of the contract or spot stop market order. /// [JsonProperty("maxStopSz")] - public decimal MaxStopQuantity { get; set; } + public decimal? MaxStopQuantity { get; set; } }