module Binance::Spot::Trade
def account(**kwargs)
- See: https://binance-docs.github.io/apidocs/spot/en/#account-information-user_data -
Options Hash:
(**kwargs)
-
:recvWindow
(Integer
) -- The value cannot be greater than 60000
Parameters:
-
kwargs
(Hash
) --
def account(**kwargs) @session.sign_request(:get, '/api/v3/account', params: kwargs) end
def all_order_list(**kwargs)
- See: https://binance-docs.github.io/apidocs/spot/en/#query-all-oco-user_data -
Options Hash:
(**kwargs)
-
:recvWindow
(Integer
) -- The value cannot be greater than 60000 -
:limit
(String
) -- Default 500; max 1000. -
:endTime
(String
) -- -
:startTime
(String
) -- -
:fromId
(Integer
) --
Parameters:
-
kwargs
(Hash
) --
def all_order_list(**kwargs) @session.sign_request(:get, '/api/v3/allOrderList', params: kwargs) end
def all_orders(symbol:, **kwargs)
- See: https://binance-docs.github.io/apidocs/spot/en/#all-orders-user_data -
Options Hash:
(**kwargs)
-
:recvWindow
(Integer
) -- The value cannot be greater than 60000 -
:limit
(String
) -- Default 500; max 1000. -
:endTime
(String
) -- -
:startTime
(String
) -- -
:orderId
(String
) --
Parameters:
-
kwargs
(Hash
) -- -
symbol
(String
) -- the symbol
def all_orders(symbol:, **kwargs) Binance::Utils::Validation.require_param('symbol', symbol) @session.sign_request(:get, '/api/v3/allOrders', params: kwargs.merge(symbol: symbol)) end
def cancel_open_orders(symbol:, **kwargs)
- See: https://binance-docs.github.io/apidocs/spot/en/#cancel-all-open-orders-on-a-symbol-trade -
Options Hash:
(**kwargs)
-
:recvWindow
(Integer
) -- The value cannot be greater than 60000
Parameters:
-
kwargs
(Hash
) -- -
symbol
(String
) -- the symbol
def cancel_open_orders(symbol:, **kwargs) Binance::Utils::Validation.require_param('symbol', symbol) @session.sign_request(:delete, '/api/v3/openOrders', params: kwargs.merge(symbol: symbol)) end
def cancel_order(symbol:, **kwargs)
- See: https://binance-docs.github.io/apidocs/spot/en/#cancel-order-trade -
Options Hash:
(**kwargs)
-
:recvWindow
(Integer
) -- The value cannot be greater than 60000 -
:newClientOrderId
(String
) -- -
:origClientOrderId
(String
) -- -
:orderId
(Integer
) --
Parameters:
-
kwargs
(Hash
) -- -
symbol
(String
) -- the symbol
def cancel_order(symbol:, **kwargs) Binance::Utils::Validation.require_param('symbol', symbol) @session.sign_request(:delete, '/api/v3/order', params: kwargs.merge(symbol: symbol)) end
def cancel_order_list(symbol:, **kwargs)
- See: https://binance-docs.github.io/apidocs/spot/en/#cancel-oco-trade -
Options Hash:
(**kwargs)
-
:recvWindow
(Integer
) -- The value cannot be greater than 60000 -
:newClientOrderId
(String
) -- -
:listClientOrderId
(String
) -- -
:orderListId
(Integer
) --
Parameters:
-
kwargs
(Hash
) -- -
symbol
(String
) -- the symbol
def cancel_order_list(symbol:, **kwargs) Binance::Utils::Validation.require_param('symbol', symbol) @session.sign_request(:delete, '/api/v3/orderList', params: kwargs.merge(symbol: symbol)) end
def cancel_replace(symbol:, side:, type:, cancelReplaceMode:, **kwargs)
- 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
def get_order(symbol:, **kwargs)
- See: https://binance-docs.github.io/apidocs/spot/en/#query-order-user_data -
Options Hash:
(**kwargs)
-
:recvWindow
(Integer
) -- The value cannot be greater than 60000 -
:origClientOrderId
(String
) -- -
:orderId
(Integer
) --
Parameters:
-
kwargs
(Hash
) -- -
symbol
(String
) -- the symbol
def get_order(symbol:, **kwargs) Binance::Utils::Validation.require_param('symbol', symbol) @session.sign_request(:get, '/api/v3/order', params: kwargs.merge(symbol: symbol)) end
def get_order_rate_limit(**kwargs)
- See: https://binance-docs.github.io/apidocs/spot/en/#query-current-order-count-usage-trade -
Options Hash:
(**kwargs)
-
:recvWindow
(Integer
) -- The value cannot be greater than 60000
Parameters:
-
kwargs
(Hash
) --
def get_order_rate_limit(**kwargs) @session.sign_request(:get, '/api/v3/rateLimit/order', params: kwargs) end
def my_trades(symbol:, **kwargs)
- See: https://binance-docs.github.io/apidocs/spot/en/#account-trade-list-user_data -
Options Hash:
(**kwargs)
-
:recvWindow
(Integer
) -- The value cannot be greater than 60000 -
:limit
(Integer
) -- Default 500; max 1000. -
:fromId
(Integer
) -- TradeId to fetch from. Default gets most recent trades. -
:endTime
(Integer
) -- -
:startTime
(Integer
) -- -
:orderId
(Integer
) --
Parameters:
-
kwargs
(Hash
) -- -
symbol
(String
) -- the symbol
def my_trades(symbol:, **kwargs) @session.sign_request(:get, '/api/v3/myTrades', params: kwargs.merge(symbol: symbol)) end
def new_oco_order(symbol:, side:, quantity:, price:, stopPrice:, **kwargs)
- See: https://binance-docs.github.io/apidocs/spot/en/#new-oco-trade -
Options Hash:
(**kwargs)
-
:recvWindow
(Integer
) -- The value cannot be greater than 60000 -
:newOrderRespType
(String
) -- -
:stopLimitTimeInForce
(Float
) -- GTC/ FOK/ IOC -
:stopIcebergQty
(Float
) -- -
:stopLimitPrice
(Float
) -- -
:stopClientOrderId
(String
) -- -
:limitIcebergQty
(Float
) -- -
:limitClientOrderId
(String
) -- -
:listClientOrderId
(String
) --
Parameters:
-
kwargs
(Hash
) -- -
stopPrice
(Float
) -- -
price
(Float
) -- -
quantity
(Float
) -- -
side
(String
) -- -
symbol
(String
) -- the symbol
def new_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, '/api/v3/order/oco', params: kwargs.merge( symbol: symbol, side: side, quantity: quantity, price: price, stopPrice: stopPrice )) end
def new_order(symbol:, side:, type:, **kwargs)
- See: https://binance-docs.github.io/apidocs/spot/en/#new-order-trade -
Options Hash:
(**kwargs)
-
:recvWindow
(Integer
) -- The value cannot be greater than 60000 -
:newOrderRespType
(String
) -- Set the response JSON. ACK, RESULT, or FULL. -
:icebergeQty
(Float
) -- -
:stopPrice
(Float
) -- -
:newClientOrderId
(String
) -- -
:price
(Float
) -- -
:quoteOrderQty
(Float
) -- -
:quantity
(Float
) -- -
:timeInForce
(String
) --
Parameters:
-
kwargs
(Hash
) -- -
type
(String
) -- -
side
(String
) -- -
symbol
(String
) -- the symbol
def 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, '/api/v3/order', params: kwargs.merge( symbol: symbol, side: side, type: type )) end
def new_order_test(symbol:, side:, type:, **kwargs)
- See: https://binance-docs.github.io/apidocs/spot/en/#test-new-order-trade -
Options Hash:
(**kwargs)
-
:recvWindow
(Integer
) -- The value cannot be greater than 60000 -
:newOrderRespType
(String
) -- Set the response JSON. ACK, RESULT, or FULL. -
:icebergeQty
(Float
) -- -
:stopPrice
(Float
) -- -
:newClientOrderId
(String
) -- -
:price
(Float
) -- -
:quoteOrderQty
(Float
) -- -
:quantity
(Float
) -- -
:timeInForce
(String
) --
Parameters:
-
kwargs
(Hash
) -- -
type
(String
) -- -
side
(String
) -- -
symbol
(String
) -- the symbol
def new_order_test(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, '/api/v3/order/test', params: kwargs.merge( symbol: symbol, side: side, type: type )) end
def open_order_list(**kwargs)
- See: https://binance-docs.github.io/apidocs/spot/en/#query-open-oco-user_data -
Options Hash:
(**kwargs)
-
:recvWindow
(Integer
) -- The value cannot be greater than 60000
Parameters:
-
kwargs
(Hash
) --
def open_order_list(**kwargs) @session.sign_request(:get, '/api/v3/openOrderList', params: kwargs) end
def open_orders(**kwargs)
- See: https://binance-docs.github.io/apidocs/spot/en/#current-open-orders-user_data -
Options Hash:
(**kwargs)
-
:recvWindow
(Integer
) -- The value cannot be greater than 60000 -
:symbol
(String
) -- the symbol
Parameters:
-
kwargs
(Hash
) --
def open_orders(**kwargs) @session.sign_request(:get, '/api/v3/openOrders', params: kwargs) end
def order_list(**kwargs)
- See: https://binance-docs.github.io/apidocs/spot/en/#query-oco-user_data -
Options Hash:
(**kwargs)
-
:recvWindow
(Integer
) -- The value cannot be greater than 60000 -
:orgClientOrderId
(String
) -- -
:orderListId
(Integer
) --
Parameters:
-
kwargs
(Hash
) --
def order_list(**kwargs) @session.sign_request(:get, '/api/v3/orderList', params: kwargs) end