malkhut: ExchangeProfile gains available_order_types per venue

Each exchange now declares which normalized order types it supports:
- binance: limit, market, stop_market, stop_limit, post_only, ioc, fok, trailing_stop, reduce_only
- bingx: limit, market, stop_market, stop_limit, post_only, ioc, fok, trailing_stop, reduce_only
- bybit: limit, market, stop_market, stop_limit, post_only, ioc, fok, trailing_stop, reduce_only

Backward compatible: new field has default=('limit', 'market').
Enables: agents/adversaries check is_type_available() before placing orders.
This commit is contained in:
Codex
2026-07-14 12:14:54 +02:00
parent 53e02c84ec
commit 369d9b41ad

View File

@@ -140,8 +140,9 @@ class ExchangeProfile:
api_base_url: str # REST API root
ws_base_url: str # WebSocket root ("" if not applicable)
default_taker_fee_bps: float
default_maker_fee_bps: float
default_maker_fee_bps: float # UNVERIFIED — no maker fills on record as of 2026-07-13
typical_latency_ms: float
available_order_types: tuple[str, ...] = ("limit", "market") # normalized types this venue supports
EXCHANGE_PROFILES: Dict[str, ExchangeProfile] = {}
@@ -153,6 +154,9 @@ BINANCE = ExchangeProfile(
ws_base_url="wss://stream.binance.com:9443",
default_taker_fee_bps=4.5, default_maker_fee_bps=-0.2, # UNVERIFIED — no maker fills on record as of 2026-07-13
typical_latency_ms=40,
available_order_types=("limit", "market", "stop_market", "stop_limit",
"post_only", "ioc", "fok", "trailing_stop",
"reduce_only"),
)
EXCHANGE_PROFILES["binance"] = BINANCE
@@ -163,6 +167,9 @@ BINGX = ExchangeProfile(
ws_base_url="wss://open-api.bingx.com/swapMarket",
default_taker_fee_bps=5.0, default_maker_fee_bps=2.0, # BingX maker is POSITIVE
typical_latency_ms=100,
available_order_types=("limit", "market", "stop_market", "stop_limit",
"post_only", "ioc", "fok", "trailing_stop",
"reduce_only"),
)
EXCHANGE_PROFILES["bingx"] = BINGX
@@ -173,6 +180,9 @@ BYBIT = ExchangeProfile(
ws_base_url="wss://stream.bybit.com/v5/public/linear",
default_taker_fee_bps=5.5, default_maker_fee_bps=-0.1, # UNVERIFIED — no maker fills on record as of 2026-07-13
typical_latency_ms=50,
available_order_types=("limit", "market", "stop_market", "stop_limit",
"post_only", "ioc", "fok", "trailing_stop",
"reduce_only"),
)
EXCHANGE_PROFILES["bybit"] = BYBIT