Files
ritmex-bot/docs/ccxt/wiki/examples/py/kucoin-withdraw-chain.md
T
2025-10-03 15:28:16 +08:00

40 lines
780 B
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
- [Kucoin Withdraw Chain](./examples/py/)
```python
# -*- coding: utf-8 -*-
import os
import sys
from pprint import pprint
import ccxt # noqa: E402
print('CCXT Version:', ccxt.__version__)
exchange = ccxt.kucoin({
    'apiKey': 'YOUR_API_KEY',
    'secret': 'YOUR_SECRET',
'password': 'YOUR_API_PASSWORD',
})
markets = exchange.load_markets()
# exchange.verbose = True # uncomment for debugging purposes
try:
code = 'USDT'
amount = 123
address = '0x3010c3486f1c16cb608ba3e53e3597c9a3b01f41'
tag = None
params = {
'chain': 'TRC20', # 'ERC20', 'TRC20', default is ERC20
}
response = exchange.withdraw(code, amount, address, tag, params)
pprint(response)
except Exception as e:
print(type(e).__name__, str(e))
```