how to get coins in binance

Solutions on MaxInterview for how to get coins in binance by the best coders in the world

showing results for - "how to get coins in binance"
Leny
04 Sep 2016
1pip install python-binance
2
3import binance
4
5binance_api_client = binance.Client()
6coins_exchange = binance_api_client.get_exchange_info()
7
8usdt_coins = []
9for symbol in coins_exchange["symbols"]:
10    if( "USDT" == symbol["symbol"][-4:] and
11        "BULLUSDT" != symbol["symbol"][-8:] and
12        "BEARUSDT" != symbol["symbol"][-8:] and
13        "GBPUSDT" != symbol["symbol"][-7:] and
14        "UPUSDT" != symbol["symbol"][-6:] and 
15        "DOWNUSDT" != symbol["symbol"][-8:] and 
16        "SPOT" in symbol["permissions"]
17        ):
18        usdt_coins.append(symbol["symbol"][0:-4])
19print("coins number: ", len(usdt_coins))
20print(",".join(usdt_coins))
21
22with open('coins.txt', 'w') as f:
23    f.write(",".join(usdt_coins))