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

Method prepare_account_request_with_currency_code

python/ccxt/coinbase.py:2840–2854  ·  view source on GitHub ↗
(self, code: Str = None, limit: Int = None, params={})

Source from the content-addressed store, hash-verified

2838 return request
2839
2840 def prepare_account_request_with_currency_code(self, code: Str = None, limit: Int = None, params={}):
2841 accountId = self.safe_string_2(params, 'account_id', 'accountId')
2842 params = self.omit(params, ['account_id', 'accountId'])
2843 if accountId is None:
2844 if code is None:
2845 raise ArgumentsRequired(self.id + ' prepareAccountRequestWithCurrencyCode() method requires an account_id(or accountId) parameter OR a currency code argument')
2846 accountId = self.find_account_id(code, params)
2847 if accountId is None:
2848 raise ExchangeError(self.id + ' prepareAccountRequestWithCurrencyCode() could not find account id for ' + code + '. You might try to generate the deposit address in the website for that coin first.')
2849 request = {
2850 'account_id': accountId,
2851 }
2852 if limit is not None:
2853 request['limit'] = limit
2854 return [request, params]
2855
2856 def create_market_buy_order_with_cost(self, symbol: str, cost: float, params={}):
2857 """

Callers 3

fetch_ledgerMethod · 0.95

Calls 5

find_account_idMethod · 0.95
ArgumentsRequiredClass · 0.90
ExchangeErrorClass · 0.90
safe_string_2Method · 0.80
omitMethod · 0.45

Tested by

no test coverage detected