Repository navigation
bytx 0.2.4
bytx 0.2.4
BingX: the configured margin_mode is now applied to the symbol. On BingX the margin mode is a per-symbol exchange setting (isolated by default) and is not part of the order, so a client created with margin_mode='cross' could still open isolated positions. An opening order now reads the symbol's margin mode once per symbol (Query Margin Type) and switches it if it differs (Change Margin Type). If the exchange refuses the switch (a position or an order is open on the symbol, code 104103), the order is not sent and ConfigError is raised. Closing orders are not checked; paper exchanges are not affected. bytx.testing emulates both requests.