1 year ago
#362050
euphrates85
Transfer USDT between spot and futures in Binance with ccxt python
import time
start = time.time()
exchange.sapi_post_futures_transfer({
'asset': 'USDT',
'amount': '10',
'type': 2,
})
end = time.time()
I want to take a long position in the spot market and a short position in the future market. To do that, I have to make a USDT transfer between spot and future wallets. My question is:
Execution time of the above transfer code is around 1 second. Except for USDT transfer between wallets, my entire code, including creating orders, takes milliseconds. Since USDT transfer takes 1 second, is there a risk that the execution of order code runs before USDT transfer so the order can not be implemented due to lack of funds? If so, what would be the best solution?
Thank you
python
algorithmic-trading
binance
ccxt
0 Answers
Your Answer