Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BinanceExchange.API.Converter.KlineCandleSticksConverter.WriteJson System.NotImplementedException: The method or operation is not implemented #190

Open
tuncaybas opened this issue Feb 24, 2023 · 0 comments

Comments

@tuncaybas
Copy link

Issue Overview

When the GetKlinesCandlesticks method is called, it throws a JSON error.

Package Version: 4.12.0.0

Repro Steps

Other Information

I wanted to do a simple test.

        var istek = new CreateOrderRequest()
        {
            Price = 0.412115m,
            Quantity = 22.31m,
            Side = OrderSide.Buy,
            Symbol = "AKROUSDT",
            Type = OrderType.Limit,
        };

var KlineCandleSticks = await client.GetKlinesCandlesticks(new GetKlinesCandlesticksRequest { Symbol = request.Symbol, Limit = 500, Interval = KlineInterval.FifteenMinutes });

I want to get candles with these codes, but it says that Writejson method should be written in JsonConvert implementation.

In the examples and source code, only an exception is thrown.

     public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
     {
         throw new NotImplementedException();
     }

The Error :

Unhandled Exception: System.NotImplementedException: The method or operation is not implemented.
at BinanceExchange.API.Converter.KlineCandleSticksConverter.WriteJson(JsonWriter writer, Object value, JsonSerializer serializer)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeConvertable(JsonWriter writer, JsonConverter converter, Object value, JsonContract contract, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeList(JsonWriter writer, IEnumerable values, JsonArrayContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)
at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType)
at Newtonsoft.Json.JsonConvert.SerializeObjectInternal(Object value, Type type, JsonSerializer jsonSerializer)
at Newtonsoft.Json.JsonConvert.SerializeObject(Object value)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant