module Binance::Spot::Margin
def margin_oco_order(symbol:, side:, quantity:, price:, stopPrice:, **kwargs)
- See: https://binance-docs.github.io/apidocs/spot/en/#margin-account-new-oco-trade -
Options Hash:
(**kwargs)-
:recvWindow(Integer) -- The value cannot be greater than 60000 -
:sideEffectType(String) -- NO_SIDE_EFFECT, MARGIN_BUY, AUTO_REPAY; default NO_SIDE_EFFECT. -
:newOrderRespType(String) -- -
:stopLimitTimeInForce(String) -- Valid values are GTC/FOK/IOC -
:stopIcebergQty(Float) -- -
:stopLimitPrice(Float) -- If provided, stopLimitTimeInForce is required. -
:stopClientOrderId(String) -- -
:limitIcebergQty(Float) -- -
:limitClientOrderId(String) -- -
:listClientOrderId(String) -- -
:isIsolated(String) -- for isolated margin or not, "TRUE", "FALSE", default "FALSE"
Parameters:
-
kwargs(Hash) -- -
stopPrice(Float) -- -
price(Float) -- -
quantity(Float) -- -
side(String) -- -
symbol(String) --
def margin_oco_order(symbol:, side:, quantity:, price:, stopPrice:, **kwargs) Binance::Utils::Validation.require_param('symbol', symbol) Binance::Utils::Validation.require_param('side', side) Binance::Utils::Validation.require_param('quantity', quantity) Binance::Utils::Validation.require_param('price', price) Binance::Utils::Validation.require_param('stopPrice', stopPrice) @session.sign_request(:post, '/sapi/v1/margin/order/oco', params: kwargs.merge( symbol: symbol, side: side, quantity: quantity, price: price, stopPrice: stopPrice )) end