Data type mismatch between KlineSummary and Kline
siegfried opened this issue · comments
OHLC data in KlineSummary is convert to f64
while OHLC data in Kline remains in string. How about keep them all in string so they can be stored as arbitrary precision number in database?
And is there a need to serialize/deserialize KlineSummary model? It seems a little unnecessary since the API of Kline returns data in nested arrays, right? How about implement a From
trait for KlineSummary?
@siegfried Don't recall why there is this mismatch. Is Binance returning float for the Kline Summary? We could make them string indeed.
Binance returns string for Kline summary. https://binance-docs.github.io/apidocs/spot/en/#kline-candlestick-data
Please have a look at the the PR. Thanks. @wisespace-io