1010from ccxt .base .errors import ExchangeError
1111from ccxt .base .errors import AuthenticationError
1212from ccxt .base .errors import PermissionDenied
13+ from ccxt .base .errors import OBOrderUncancellableError
1314from ccxt .base .errors import OrderImmediatelyFillable
1415from ccxt .base .errors import NotSupported
15- from ccxt .base .errors import OBOrderUncancellableError
1616
1717
1818class ob_binance (binance , ImplicitAPI ):
@@ -91,6 +91,16 @@ def describe(self) -> Any:
9191 })
9292
9393 def create_order_request (self , symbol : str , type : OrderType , side : OrderSide , amount : float , price : Num = None , params = {}):
94+ """
95+ Spot market sells keep base quantity; strip reference price before delegating(OctoBot Binance parity).
96+ @param symbol Symbol passed through.
97+ @param type Order type passed through.
98+ @param side Order side passed through.
99+ @param amount Amount passed through.
100+ @param price Optional limit/reference price(cleared for spot market sells).
101+ @param params Extra parameters passed through.
102+ :returns: Result of parent `createOrderRequest`.
103+ """
94104 market = self .market (symbol )
95105 effectivePrice = price
96106 if self .safe_bool (market , 'spot' , False ) and type .upper () == 'MARKET' and side .upper () == 'SELL' :
@@ -101,6 +111,8 @@ def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, am
101111 def uses_demo_trading_instead_of_sandbox (self , exchangeType : Str ) -> Bool :
102112 """
103113 Binance futures use demo trading instead of classic sandbox(OctoBot binance tentacle); accept `futures` spelling too.
114+ @param exchangeType Exchange subtype string from options or caller.
115+ :returns: Whether demo-trading semantics apply(`future` / `futures`).
104116 """
105117 normalized = str (exchangeType or '' ).lower ()
106118 return (normalized == 'future' ) or (normalized == 'futures' )
0 commit comments