MCPcopy Create free account
hub / github.com/ccxt/ccxt / fetch_deposits

Method fetch_deposits

python/ccxt/bybit.py:5638–5702  ·  view source on GitHub ↗

fetch all deposits made to an account https://bybit-exchange.github.io/docs/v5/asset/deposit-record :param str code: unified currency code :param int [since]: the earliest time in ms to fetch deposits for, default = 30 days before the current time :param in

(self, code: Str = None, since: Int = None, limit: Int = None, params={})

Source from the content-addressed store, hash-verified

5636 return indexedAddresses[selectedNetworkCode]
5637
5638 def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
5639 """
5640 fetch all deposits made to an account
5641
5642 https://bybit-exchange.github.io/docs/v5/asset/deposit-record
5643
5644 :param str code: unified currency code
5645 :param int [since]: the earliest time in ms to fetch deposits for, default = 30 days before the current time
5646 :param int [limit]: the maximum number of deposits structures to retrieve, default = 50, max = 50
5647 :param dict [params]: extra parameters specific to the exchange API endpoint
5648 :param int [params.until]: the latest time in ms to fetch deposits for, default = 30 days after since
5649 EXCHANGE SPECIFIC PARAMETERS
5650 :param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
5651 :param str [params.cursor]: used for pagination
5652 :returns dict[]: a list of `transaction structures <https://docs.ccxt.com/?id=transaction-structure>`
5653 """
5654 self.load_markets()
5655 paginate = False
5656 paginate, params = self.handle_option_and_params(params, 'fetchDeposits', 'paginate')
5657 if paginate:
5658 return self.fetch_paginated_call_cursor('fetchDeposits', code, since, limit, params, 'nextPageCursor', 'cursor', None, 50)
5659 request = {
5660 # 'coin': currency['id'],
5661 # 'limit': 20, # max 50
5662 # 'cursor': '',
5663 }
5664 currency = None
5665 if code is not None:
5666 currency = self.currency(code)
5667 request['coin'] = currency['id']
5668 if since is not None:
5669 request['startTime'] = since
5670 if limit is not None:
5671 request['limit'] = limit
5672 request, params = self.handle_until_option('endTime', request, params)
5673 response = self.privateGetV5AssetDepositQueryRecord(self.extend(request, params))
5674 #
5675 # {
5676 # "retCode": 0,
5677 # "retMsg": "success",
5678 # "result": {
5679 # "rows": [
5680 # {
5681 # "coin": "USDT",
5682 # "chain": "ETH",
5683 # "amount": "10000",
5684 # "txID": "skip-notification-scene-test-amount-202212270944-533285-USDT",
5685 # "status": 3,
5686 # "toAddress": "test-amount-address",
5687 # "tag": "",
5688 # "depositFee": "",
5689 # "successAt": "1672134274000",
5690 # "confirmations": "10000",
5691 # "txIndex": "",
5692 # "blockHash": ""
5693 # }
5694 # ],
5695 # "nextPageCursor": "eyJtaW5JRCI6MTA0NjA0MywibWF4SUQiOjEwNDYwNDN9"

Callers

nothing calls this directly

Calls 9

handle_until_optionMethod · 0.80
parse_transactionsMethod · 0.80
load_marketsMethod · 0.45
currencyMethod · 0.45
extendMethod · 0.45

Tested by

no test coverage detected