6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'lib/binance/api/margin/order.rb', line 6
def create!(symbol: nil, isIsolated: false, side: nil, type: nil, quantity: nil,
quoteOrderQty: nil, price: nil, stopPrice: nil, newClientOrderId: nil,
icebergQty: nil, newOrderRespType: nil, sideEffectType: nil, timeInForce: nil,
recvWindow: nil)
timestamp = Configuration.timestamp
params = {
symbol: symbol, isIsolated: isIsolated, side: side, type: type,
quantity: quantity, quoteOrderQty: quoteOrderQty, price: price,
stopPrice: stopPrice, newClientOrderId: newClientOrderId, icebergQty: icebergQty,
newOrderRespType: newOrderRespType, sideEffectType: sideEffectType,
timeInForce: timeInForce, recvWindow: recvWindow, timestamp: timestamp,
}.delete_if { |_, value| value.nil? }
ensure_required_create_keys!(params: params)
path = "/sapi/v1/margin/order"
Request.send!(api_key_type: :trading, method: :post, path: path,
params: params, security_type: :trade, tld: Configuration.tld)
end
|