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

Method withdraw

python/ccxt/exmo.py:2173–2203  ·  view source on GitHub ↗

make a withdrawal https://documenter.getpostman.com/view/10287440/SzYXWKPi#3ab9c34d-ad58-4f87-9c57-2e2ea88a8325 :param str code: unified currency code :param float amount: the amount to withdraw :param str address: the address to withdraw to :param

(self, code: str, amount: float, address: str, tag: Str = None, params={})

Source from the content-addressed store, hash-verified

2171 return None
2172
2173 def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
2174 """
2175 make a withdrawal
2176
2177 https://documenter.getpostman.com/view/10287440/SzYXWKPi#3ab9c34d-ad58-4f87-9c57-2e2ea88a8325
2178
2179 :param str code: unified currency code
2180 :param float amount: the amount to withdraw
2181 :param str address: the address to withdraw to
2182 :param str tag:
2183 :param dict [params]: extra parameters specific to the exchange API endpoint
2184 :returns dict: a `transaction structure <https://docs.ccxt.com/?id=transaction-structure>`
2185 """
2186 tag, params = self.handle_withdraw_tag_and_params(tag, params)
2187 self.load_markets()
2188 currency = self.currency(code)
2189 request = {
2190 'amount': amount,
2191 'currency': currency['id'],
2192 'address': address,
2193 }
2194 if tag is not None:
2195 request['invoice'] = tag
2196 networks = self.safe_value(self.options, 'networks', {})
2197 network = self.safe_string_upper(params, 'network') # self line allows the user to specify either ERC20 or ETH
2198 network = self.safe_string(networks, network, network) # handle ERC20>ETH alias
2199 if network is not None:
2200 request['transport'] = network
2201 params = self.omit(params, 'network')
2202 response = self.privatePostWithdrawCrypt(self.extend(request, params))
2203 return self.parse_transaction(response, currency)
2204
2205 def parse_transaction_status(self, status: Str):
2206 statuses = {

Callers

nothing calls this directly

Calls 10

parse_transactionMethod · 0.95
safe_valueMethod · 0.80
safe_string_upperMethod · 0.80
safe_stringMethod · 0.80
load_marketsMethod · 0.45
currencyMethod · 0.45
omitMethod · 0.45
extendMethod · 0.45

Tested by

no test coverage detected