This commit is contained in:
discountry
2025-10-03 15:28:16 +08:00
parent d5c4b04746
commit fcb83bd16b
925 changed files with 165721 additions and 4 deletions
@@ -0,0 +1,33 @@
- [Binance Universal Transfer](./examples/py/)
```python
# -*- coding: utf-8 -*-
import os
import sys
from pprint import pprint
import ccxt # noqa: E402
def main():
# apiKey must have universal transfer permissions
binance = ccxt.binance({
"apiKey": "YOUR_API_KEY",
"secret": "YOUR_SECRET",
})
binance.load_markets()
pprint(binance.transfer('USDT', 0.1, 'spot', 'future'))
transfers = binance.fetch_transfers()
pprint('there is ' + str(len(transfers)) + ' transfers')
pprint(binance.transfer('USDT', 0.1, 'spot', 'cross')) # For transfer to cross margin wallet
pprint(binance.transfer('USDT', 0.1, 'spot', 'ADA/USDT')) # For transfer to an isolated margin wallet
main()
```