From 369d9b41ad482eaa8e46dffbbe711475d69393ad Mon Sep 17 00:00:00 2001 From: Codex Date: Tue, 14 Jul 2026 12:14:54 +0200 Subject: [PATCH] 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. --- MALKHUT/malkhut/training/asset_classification.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/MALKHUT/malkhut/training/asset_classification.py b/MALKHUT/malkhut/training/asset_classification.py index 66e8564..e708c83 100644 --- a/MALKHUT/malkhut/training/asset_classification.py +++ b/MALKHUT/malkhut/training/asset_classification.py @@ -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