module Binance::Spot::Trade

def cancel_replace(symbol:, side:, type:, cancelReplaceMode:, **kwargs)

Other tags:
    See: https://binance-docs.github.io/apidocs/spot/en/#cancel-an-existing-order-and-send-a-new-order-trade -

Options Hash: (**kwargs)
  • :recvWindow (Integer) -- The value cannot be greater than 60000
  • :newOrderRespType (String) --
  • :icebergQty (Float) --
  • :trailingDelta (Integer) --
  • :stopPrice (Float) --
  • :newClientOrderId (String) --
  • :cancelOrderId (Integer) --
  • :cancelOrigClientOrderId (String) --
  • :cancelNewClientOrderId (String) --
  • :price (Float) --
  • :quoteOrderQty (Float) --
  • :quantity (Float) --
  • :timeInForce (String) --

Parameters:
  • kwargs (Hash) --
  • cancelReplaceMode (String) -- STOP_ON_FAILURE or ALLOW_FAILURE
  • type (String) --
  • side (String) --
  • symbol (String) -- the symbol
def cancel_replace(symbol:, side:, type:, cancelReplaceMode:, **kwargs)
  Binance::Utils::Validation.require_param('symbol', symbol)
  Binance::Utils::Validation.require_param('side', side)
  Binance::Utils::Validation.require_param('type', type)
  Binance::Utils::Validation.require_param('cancelReplaceMode', cancelReplaceMode)
  @session.sign_request(:post, '/api/v3/order/cancelReplace',
                        params: kwargs.merge(
                          symbol: symbol,
                          side: side,
                          type: type,
                          cancelReplaceMode: cancelReplaceMode
                        ))
end