fetch all deposits made to an account https://developers.binance.com/docs/wallet/capital/deposite-history https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Deposit-Withdraw-History :param str code: unified currency code :param int [since]: the earl
(self, code: Str = None, since: Int = None, limit: Int = None, params={})
| 8123 | } |
| 8124 | |
| 8125 | def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]: |
| 8126 | """ |
| 8127 | fetch all deposits made to an account |
| 8128 | |
| 8129 | https://developers.binance.com/docs/wallet/capital/deposite-history |
| 8130 | https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Deposit-Withdraw-History |
| 8131 | |
| 8132 | :param str code: unified currency code |
| 8133 | :param int [since]: the earliest time in ms to fetch deposits for |
| 8134 | :param int [limit]: the maximum number of deposits structures to retrieve |
| 8135 | :param dict [params]: extra parameters specific to the exchange API endpoint |
| 8136 | :param bool [params.fiat]: if True, only fiat deposits will be returned |
| 8137 | :param int [params.until]: the latest time in ms to fetch entries for |
| 8138 | :param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params) |
| 8139 | :returns dict[]: a list of `transaction structures <https://docs.ccxt.com/?id=transaction-structure>` |
| 8140 | """ |
| 8141 | self.load_markets() |
| 8142 | paginate = False |
| 8143 | paginate, params = self.handle_option_and_params(params, 'fetchDeposits', 'paginate') |
| 8144 | if paginate: |
| 8145 | return self.fetch_paginated_call_dynamic('fetchDeposits', code, since, limit, params) |
| 8146 | currency = None |
| 8147 | response = None |
| 8148 | request = {} |
| 8149 | legalMoney = self.safe_dict(self.options, 'legalMoney', {}) |
| 8150 | fiatOnly = self.safe_bool(params, 'fiat', False) |
| 8151 | params = self.omit(params, 'fiatOnly') |
| 8152 | until = self.safe_integer(params, 'until') |
| 8153 | params = self.omit(params, 'until') |
| 8154 | if fiatOnly or (code in legalMoney): |
| 8155 | if code is not None: |
| 8156 | currency = self.currency(code) |
| 8157 | request['transactionType'] = 0 |
| 8158 | if since is not None: |
| 8159 | request['beginTime'] = since |
| 8160 | if until is not None: |
| 8161 | request['endTime'] = until |
| 8162 | raw = self.sapiGetFiatOrders(self.extend(request, params)) |
| 8163 | response = self.safe_list(raw, 'data', []) |
| 8164 | # { |
| 8165 | # "code": "000000", |
| 8166 | # "message": "success", |
| 8167 | # "data": [ |
| 8168 | # { |
| 8169 | # "orderNo": "25ced37075c1470ba8939d0df2316e23", |
| 8170 | # "fiatCurrency": "EUR", |
| 8171 | # "indicatedAmount": "15.00", |
| 8172 | # "amount": "15.00", |
| 8173 | # "totalFee": "0.00", |
| 8174 | # "method": "card", |
| 8175 | # "status": "Failed", |
| 8176 | # "createTime": 1627501026000, |
| 8177 | # "updateTime": 1627501027000 |
| 8178 | # } |
| 8179 | # ], |
| 8180 | # "total": 1, |
| 8181 | # "success": True |
| 8182 | # } |
nothing calls this directly
no test coverage detected