brighter-trading/tests/test_BinanceFutures.py

22 lines
1.1 KiB
Python

from binance.enums import HistoricalKlinesType
from BinanceFutures import BinanceFuturesExchange
def test_binancefuturesexchange():
bfe = BinanceFuturesExchange('bfe')
print(f'\nTesting name assignment: {bfe.name}')
print(f'\nTesting get_client(): {bfe.get_client()}')
# print(f'\nTesting get_exchange_info(): {bfe.get_exchange_info()}')
print(f'\nTesting get_symbols(): {bfe.get_symbols()}')
print(f'\nTesting get_balances(): {bfe.get_balances()}')
print(f'\nTesting get_avail_intervals(): {bfe.get_avail_intervals()}')
print(f'\nTesting get_historical_klines(): {bfe.get_historical_klines(symbol="BTCUSDT",interval="15m",start_str="1 hour ago UTC", klines_type=HistoricalKlinesType.SPOT)}')
print(f'\nTesting get_symbol_precision_rule(): {bfe.get_symbol_precision_rule("ETHUSDT")}')
print(f'\nTesting get_min_qty(): {bfe.get_min_qty("ETHUSDT")}')
print(f'\nTesting get_min_notional_qty(): {bfe.get_min_notional_qty("BTCUSDT")}')
print(f'\nTesting get_price(): {bfe.get_price("BTCUSDT")}')
# bse.get_order()
assert True