adshao / go-binance

A Go SDK for Binance API
MIT License
1.54k stars 676 forks source link

Missing quoteQty on Trade struct #382

Closed GeorgeGkinis closed 2 years ago

GeorgeGkinis commented 2 years ago

While using NewHistoricalTradesService() I stumbled on the issue that the quoteQty value of the returned trades is missing.

As mentioned at https://binance-docs.github.io/apidocs/spot/en/#old-trade-lookup-market_data the returned JSON is :

[
  {
    "id": 28457,
    "price": "4.00000100",
    "qty": "12.00000000",
    "quoteQty": "48.000012",
    "time": 1499865549590, // Trade executed timestamp, as same as `T` in the stream
    "isBuyerMaker": true,
    "isBestMatch": true
  }
]

It is relatively easy to add it on the struct as I saw.

Should I make a PR or will you do it?

adshao commented 2 years ago

Yes, really appreciated if you can submit a PR for it.