generate_pair_for_binance#

API documentation for tradingstrategy.binance.utils.generate_pair_for_binance Python function.

generate_pair_for_binance(symbol, fee=0.0005, base_token_decimals=18, quote_token_decimals=18)[source]#

Generate a trading pair identifier for Binance data.

Binance data is not on-chain, so we need to generate the identifiers for the trading pairs.

Note

Internal exchange id is hardcoded to 129875571 and internal id to 134093847

Parameters:
  • symbol (str) – E.g. ETHUSDT

  • fee (float) –

  • base_token_decimals (int) –

  • quote_token_decimals (int) –

Returns:

Trading pair identifier

Return type:

DEXPair