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

Method fetch_withdrawals

python/ccxt/coinbase.py:899–918  ·  view source on GitHub ↗

Fetch all withdrawals made from an account. Won't return crypto withdrawals. Use fetchLedger for those. https://docs.cdp.coinbase.com/coinbase-app/transfer-apis/withdraw-fiat https://docs.cdp.coinbase.com/coinbase-app/track-apis/transactions :param str code: unifie

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

Source from the content-addressed store, hash-verified

897 return self.parse_transactions(response['data'], None, since, limit)
898
899 def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
900 """
901 Fetch all withdrawals made from an account. Won't return crypto withdrawals. Use fetchLedger for those.
902
903 https://docs.cdp.coinbase.com/coinbase-app/transfer-apis/withdraw-fiat
904 https://docs.cdp.coinbase.com/coinbase-app/track-apis/transactions
905
906 :param str code: unified currency code
907 :param int [since]: the earliest time in ms to fetch withdrawals for
908 :param int [limit]: the maximum number of withdrawals structures to retrieve
909 :param dict [params]: extra parameters specific to the exchange API endpoint
910 :param str [params.currencyType]: "fiat" or "crypto"
911 :returns dict[]: a list of `transaction structures <https://docs.ccxt.com/?id=transaction-structure>`
912 """
913 currencyType = None
914 currencyType, params = self.handle_option_and_params(params, 'fetchWithdrawals', 'currencyType')
915 if currencyType == 'crypto':
916 results = self.fetch_transactions_with_method('v2PrivateGetAccountsAccountIdTransactions', code, since, limit, params)
917 return self.filter_by_array(results, 'type', 'withdrawal', False)
918 return self.fetch_transactions_with_method('v2PrivateGetAccountsAccountIdWithdrawals', code, since, limit, params)
919
920 def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
921 """

Callers

nothing calls this directly

Calls 3

filter_by_arrayMethod · 0.80

Tested by

no test coverage detected