Back to Ccxt

Binance Universal Transfer

wiki/examples/js/binance-universal-transfer.md

4.5.52687 B
Original Source
javascript
import ccxt from '../../js/ccxt.js';

(async () => {

   // apiKey must have universal transfer permissions
   const binance = new ccxt.binance ({
       "apiKey": "",
       "secret": "",
   })

   console.log (await binance.transfer ('USDT', 1, 'spot', 'future'))
   const transfers = await binance.fetchTransfers ();
   console.log ('got ', transfers.length, ' transfers')
   console.log (await binance.transfer ('USDT', 1, 'spot', 'cross')) // For transfer to cross margin wallet
   console.log (await binance.transfer ('USDT', 1, 'spot', 'ADA/USDT')) // For transfer to an isolated margin wallet
}) ()