fetch the history of changes, actions done by the user or operations that altered the balance of the user https://developers.binance.com/docs/derivatives/option/account/Account-Funding-Flow :param str id: the identification number of the ledger entry :param str cod
(self, id: str, code: Str = None, params={})
| 11268 | return result |
| 11269 | |
| 11270 | def fetch_ledger_entry(self, id: str, code: Str = None, params={}) -> LedgerEntry: |
| 11271 | """ |
| 11272 | fetch the history of changes, actions done by the user or operations that altered the balance of the user |
| 11273 | |
| 11274 | https://developers.binance.com/docs/derivatives/option/account/Account-Funding-Flow |
| 11275 | |
| 11276 | :param str id: the identification number of the ledger entry |
| 11277 | :param str code: unified currency code |
| 11278 | :param dict [params]: extra parameters specific to the exchange API endpoint |
| 11279 | :returns dict: a `ledger structure <https://docs.ccxt.com/?id=ledger-entry-structure>` |
| 11280 | """ |
| 11281 | self.load_markets() |
| 11282 | type = None |
| 11283 | type, params = self.handle_market_type_and_params('fetchLedgerEntry', None, params) |
| 11284 | if type != 'option': |
| 11285 | raise BadRequest(self.id + ' fetchLedgerEntry() can only be used for type option') |
| 11286 | self.check_required_argument('fetchLedgerEntry', code, 'code') |
| 11287 | currency = self.currency(code) |
| 11288 | request = { |
| 11289 | 'recordId': id, |
| 11290 | 'currency': currency['id'], |
| 11291 | } |
| 11292 | response = self.eapiPrivateGetBill(self.extend(request, params)) |
| 11293 | # |
| 11294 | # [ |
| 11295 | # { |
| 11296 | # "id": "1125899906845701870", |
| 11297 | # "asset": "USDT", |
| 11298 | # "amount": "-0.16518203", |
| 11299 | # "type": "FEE", |
| 11300 | # "createDate": 1676621042489 |
| 11301 | # } |
| 11302 | # ] |
| 11303 | # |
| 11304 | first = self.safe_dict(response, 0, response) |
| 11305 | return self.parse_ledger_entry(first, currency) |
| 11306 | |
| 11307 | def fetch_ledger(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[LedgerEntry]: |
| 11308 | """ |
nothing calls this directly
no test coverage detected