Crypto backtesting
Loading...
Searching...
No Matches
binance Namespace Reference

Variables

 api_key = os.getenv('BINANCE_API_KEY')
 api_secret = os.getenv('BINANCE_API_SECRET')
 client = Client(api_key, api_secret)
 info = client.get_account()
int non_zero_balances = 0
 open_orders = client.get_open_orders()
 reader = csv.reader(file)
 date = row[0]
 dt = datetime.strptime(date, '%Y-%m-%d %H:%M:%S')
 exchange_and_symbol = row[1]
 tokens = exchange_and_symbol.split('-')
 symbol = tokens[1] + tokens[2]
 symbol_spot = client.get_symbol_ticker(symbol=symbol)
 price = float(symbol_spot['price'])
 eth_price = float(symbol_spot['price'])

Variable Documentation

◆ api_key

binance.api_key = os.getenv('BINANCE_API_KEY')

Definition at line 8 of file binance.py.

◆ api_secret

binance.api_secret = os.getenv('BINANCE_API_SECRET')

Definition at line 9 of file binance.py.

◆ client

binance.client = Client(api_key, api_secret)

Definition at line 14 of file binance.py.

◆ date

binance.date = row[0]

Definition at line 37 of file binance.py.

◆ dt

binance.dt = datetime.strptime(date, '%Y-%m-%d %H:%M:%S')

Definition at line 38 of file binance.py.

◆ eth_price

binance.eth_price = float(symbol_spot['price'])

Definition at line 57 of file binance.py.

◆ exchange_and_symbol

binance.exchange_and_symbol = row[1]

Definition at line 41 of file binance.py.

◆ info

binance.info = client.get_account()

Definition at line 17 of file binance.py.

◆ non_zero_balances

int binance.non_zero_balances = 0

Definition at line 20 of file binance.py.

◆ open_orders

binance.open_orders = client.get_open_orders()

Definition at line 28 of file binance.py.

◆ price

binance.price = float(symbol_spot['price'])

Definition at line 52 of file binance.py.

◆ reader

binance.reader = csv.reader(file)

Definition at line 33 of file binance.py.

◆ symbol

binance.symbol = tokens[1] + tokens[2]

Definition at line 47 of file binance.py.

◆ symbol_spot

binance.symbol_spot = client.get_symbol_ticker(symbol=symbol)

Definition at line 51 of file binance.py.

◆ tokens

binance.tokens = exchange_and_symbol.split('-')

Definition at line 44 of file binance.py.