set_config
method:
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
aggregated | bool | No | False | Whether to aggregate orderbooks across exchanges |
exchanges | List[str] | Yes | - | List of exchange IDs to connect to |
sandbox_mode | Dict[str, bool] | No | {} | Dictionary of exchange IDs to sandbox mode flags |
symbols | List[str] | Yes | - | List of symbols to monitor |
depth | int | Yes | - | Number of price levels to include |
fees_bps | Dict[str, Union[float, Dict[str, float]]] | No | None | Exchange fee rates in basis points |
weighting | Dict[str, Dict[str, float]] | No | None | VWAP weighting configuration |
group | Dict[str, str] | No | None | Symbol grouping configuration |
fees_bps
parameter allows you to account for exchange fees in orderbook prices. This is essential for accurate cross-exchange price comparisons and arbitrage detection.
Fees are specified in basis points (1 bp = 0.01%). You can set:
"binance": 9.8
"okx": {"BTC/USDT": 7, "ETH/USDT": 8}
adjusted_price = original_price / (1 + fee)
adjusted_price = original_price * (1 + fee)
fees_bps
parameter is omitted, no fee adjustments will be applied.
group
parameter allows you to treat different but related symbols as equivalent. This is useful for stablecoins or similar assets where you want to combine liquidity.
weighting
parameter enables Volume Weighted Average Price (VWAP) calculations. This calculates what price you would pay/receive when executing a specific order size, accounting for slippage.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
exchanges | List[str] | Yes | - | List of exchange IDs to connect to |
sandbox_mode | Dict[str, bool] | No | {} | Dictionary of exchange IDs to sandbox mode flags |
symbols | List[str] | Yes | - | List of symbols to monitor |
fees_bps | Dict[str, Union[float, Dict[str, float]]] | No | None | Exchange fee rates in basis points |
size | Dict[str, Dict[str, float]] | No | None | Minimum trade size filters |
size
parameter allows you to filter trades by minimum size. This is particularly useful for:
"BTC/USDT": {"BTC": 0.1}
(only trades ≥ 0.1 BTC)"ETH/USDT": {"USDT": 10000}
(only trades with value ≥ $10,000)set_config()
aggregated=True
and contain only one symbolset_config()
for each type