update
This commit is contained in:
parent
876eb90190
commit
c16615ee87
7
bn.py
7
bn.py
@ -2,10 +2,11 @@ from binance.spot import Spot
|
||||
from binance.cm_futures import CMFutures
|
||||
|
||||
cm = CMFutures()
|
||||
spot = Spot()
|
||||
|
||||
# Get klines
|
||||
def klines(symbol, interval, limit=1000):
|
||||
lines = cm.klines(symbol,interval, limit=limit)
|
||||
lines = spot.klines(symbol,interval, limit=limit)
|
||||
return lines
|
||||
|
||||
def ticker_price(symbol):
|
||||
@ -17,11 +18,11 @@ def ticker_price(symbol):
|
||||
|
||||
# Get Symbols
|
||||
def symbols():
|
||||
info = cm.exchange_info()
|
||||
info = spot.exchange_info()
|
||||
|
||||
symbols = []
|
||||
for s in info['symbols']:
|
||||
if s['symbol'].endswith('_PERP'):
|
||||
if s['symbol'].endswith('USDT'):
|
||||
symbols.append(s['symbol'])
|
||||
|
||||
return symbols
|
||||
Loading…
Reference in New Issue
Block a user