burakoner / OKX.Api

Up-to-date, most-complete, well-organized, well-documented, easy-to-use, multi-task and multi-thread compatible OKX Cryptocurrency Exchange Rest and Websocket Api Wrapper
MIT License
39 stars 15 forks source link

Multiple subscription at once, Instument null issue #30

Closed kayahasa closed 1 year ago

kayahasa commented 1 year ago
        var result = await client.SubscribeToCandlesticksAsync(update =>
        {
            if (update == null)
            {
                return;
            }
            _futuresCandleService.UpdateSymbol(**update.Instrument**, MapToKlineData(update, interval));
            _priceTickerService.UpdateSymbol(**update.Instrument**, update.Close);

        }, symbolList, interval);

        It is good to see multiple subscription at once method support with new release. However,
        in this code, **update.Instrument** is null. 
        Instrument should be set.
kayahasa commented 1 year ago

Most probably it is coming as InstrumentId but on the update model it is Instrument.

So mapping fails.

kayahasa commented 1 year ago

Sir,

I have created pull request.

Thanks

burakoner commented 1 year ago

Thank you very much for your feedback and pull request. I've merged your request and will release new version in a few hours