Making transaction with ccxt and python

Cheers mates,

I have tried to search how to transfer crypto from exchange to another by using python. I haven't found anything usable.

I have found lots and lots of ccxt examples but any of those does not include how to do transfer.

Does anybody have any working example how to accomplish this ?

Thank you in advance


Something like this should work

import ccxt
import sys

print('python', sys.version)
print('CCXT Version:', ccxt.__version__)

binance = ccxt.binance({
    "apiKey": 'YOUR_BINANCE_API_KEY',
    "secret": 'YOUR_BINANCE_SECRET',
    'options': {
        'fetchCurrencies': True,
    },
})
binance.verbose = True

kucoin = ccxt.kucoin({
    'apiKey': 'YOUR_KUCOIN_API_KEY',
    'secret': 'YOUR_KUCOIN_SECRET',
    'password': 'YOUR_KUCOIN_API_PASSWORD',
})
kucoin.verbose = True

binance.load_markets()
kucoin.load_markets()

code = 'USDT'
amount = 40

deposit = binance.fetchDepositAddress(code, {'network': 'TRX'})

print('-----------------------------------------------------------')
print(deposit)
print('-----------------------------------------------------------')

withdrawal = kucoin.withdraw(
    code, amount, deposit['address'], deposit['tag'], {'chain': 'TRC20'})

print('-----------------------------------------------------------')

print(withdrawal)

Also a heads up, there's an examples folder inside ccxt/examples. I couldn't find this one for python, but there was a javascript one