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
|
from binance.cm_futures import CMFutures
|
||||||
|
|
||||||
cm = CMFutures()
|
cm = CMFutures()
|
||||||
|
spot = Spot()
|
||||||
|
|
||||||
# Get klines
|
# Get klines
|
||||||
def klines(symbol, interval, limit=1000):
|
def klines(symbol, interval, limit=1000):
|
||||||
lines = cm.klines(symbol,interval, limit=limit)
|
lines = spot.klines(symbol,interval, limit=limit)
|
||||||
return lines
|
return lines
|
||||||
|
|
||||||
def ticker_price(symbol):
|
def ticker_price(symbol):
|
||||||
@ -17,11 +18,11 @@ def ticker_price(symbol):
|
|||||||
|
|
||||||
# Get Symbols
|
# Get Symbols
|
||||||
def symbols():
|
def symbols():
|
||||||
info = cm.exchange_info()
|
info = spot.exchange_info()
|
||||||
|
|
||||||
symbols = []
|
symbols = []
|
||||||
for s in info['symbols']:
|
for s in info['symbols']:
|
||||||
if s['symbol'].endswith('_PERP'):
|
if s['symbol'].endswith('USDT'):
|
||||||
symbols.append(s['symbol'])
|
symbols.append(s['symbol'])
|
||||||
|
|
||||||
return symbols
|
return symbols
|
||||||
2
test.py
2
test.py
@ -7,7 +7,7 @@ from binance.spot import Spot
|
|||||||
import signals.ema_arrangement as maa
|
import signals.ema_arrangement as maa
|
||||||
from binance.cm_futures import CMFutures
|
from binance.cm_futures import CMFutures
|
||||||
|
|
||||||
maa.run('MANAUSD_PERP', '1h')
|
maa.run('BTCUSDT', '1h')
|
||||||
|
|
||||||
# print(len(bn.symbols()))
|
# print(len(bn.symbols()))
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user