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

Missing side (buy|sell) in output of "fetchConvertTradeHistory" - binance #22337

Closed
egabosh opened this issue Apr 30, 2024 · 1 comment
Closed
Assignees

Comments

@egabosh
Copy link

egabosh commented Apr 30, 2024

Operating System

Debian 12

Programming Languages

Python

CCXT Version

4.3.11

Description

Moin,

missing side (buy|sell) in output of "fetchConvertTradeHistory"

I can only find this in the info section, which as far as I understand comes directly from the exchange and is not part of the CCXT standardized output.

As far as I can tell, it would make sense to evaluate the “side” here as well. Is there a reason why this is not done?

Thanks & regards

Code

    "info": {
      "quoteId": "XXXXXXXXXXXXXXXXX",
      "orderId": "XXXXXXXXXXXXXXXXXX",
      "orderStatus": "SUCCESS",
      "fromAsset": "USDT",
      "fromAmount": "10.5",
      "toAsset": "VET",
      "toAmount": "614.8369418",
      "ratio": "58.5558945291228",
      "inverseRatio": "0.0170777000000000",
      "createTime": "1687401968917",
      "orderType": "MARKET",
      "side": "BUY"
    },
    "timestamp": 1687401968917,
    "datetime": "2023-06-22T02:46:08.917Z",
    "id": "XXXXXXXXXXXXXXXXX",
    "fromCurrency": "USDT",
    "fromAmount": 10.5,
    "toCurrency": "VET",
    "toAmount": 614.8369418,
    "price": null,
    "fee": null
  }
    "info": {
      "quoteId": "XXXXXXXXXXXXXXXXXXXX",
      "orderId": "XXXXXXXXXXXXXXXXXXXXX",
      "orderStatus": "SUCCESS",
      "fromAsset": "TRX",
      "fromAmount": "145.55973406",
      "toAsset": "USDT",
      "toAmount": "10.49709368",
      "ratio": "0.0721154000000000",
      "inverseRatio": "13.8666637084451",
      "createTime": "1687385751913",
      "orderType": "MARKET",
      "side": "SELL"
    },
    "timestamp": 1687385751913,
    "datetime": "2023-06-21T22:15:51.913Z",
    "id": "XXXXXXXXXXXXXX",
    "fromCurrency": "TRX",
    "fromAmount": 145.55973406,
    "toCurrency": "USDT",
    "toAmount": 10.49709368,
    "price": null,
    "fee": null
  },

@carlosmiei
Copy link
Collaborator

Hello @egabosh,

Since convert is different from spot trading, the returned structure is also slightly different, and in this case you could infer the side from the fromCurrency/toCurrency fields. Nonetheless, we will take your suggestion into consideration!

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

No branches or pull requests

3 participants