module Binance::Spot::Margin

def margin_new_order(symbol:, side:, type:, **kwargs)

Other tags:
    See: https://binance-docs.github.io/apidocs/spot/en/#margin-account-new-order-trade -

Options Hash: (**kwargs)
  • :recvWindow (Integer) -- The value cannot be greater than 60000
  • :timeInForce (String) -- GTC,IOC,FOK
  • :sideEffectType (String) -- NO_SIDE_EFFECT, MARGIN_BUY, AUTO_REPAY; default NO_SIDE_EFFECT.
  • :newOrderRespType (String) --
  • :icebergQty (Float) -- Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order.
  • :newClientOrderId (String) --
  • :stopPrice (Float) -- Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders.
  • :price (Float) --
  • :quoteOrderQty (Float) --
  • :quantity (Float) --
  • :isIsolated (String) -- for isolated margin or not, "TRUE", "FALSE", default "FALSE"

Parameters:
  • kwargs (Hash) --
  • type (String) --
  • side (String) --
  • symbol (String) --
def margin_new_order(symbol:, side:, type:, **kwargs)
  Binance::Utils::Validation.require_param('symbol', symbol)
  Binance::Utils::Validation.require_param('side', side)
  Binance::Utils::Validation.require_param('type', type)
  @session.sign_request(:post, '/sapi/v1/margin/order', params: kwargs.merge(
    symbol: symbol,
    side: side,
    type: type
  ))
end