ExOkex v0.4.0 ExOkex.Futures.Private View Source
Futures account client.
Link to this section Summary
Functions
Cancelling an unfilled order.
Place multiple orders for specific trading pairs (up to 4 trading pairs, maximum 4 orders each)
Place a new order.
Get the futures account info of all token.
Retrieve the information on all your positions in the futures account.
Retrieve information on your positions of a single contract.
Link to this section Types
Link to this section Functions
cancel_orders(instrument_id, order_ids \\ [], params \\ %{}, config \\ nil)
View SourceCancelling an unfilled order.
https://www.okex.com/docs/en/#futures-repeal
Example
iex> ExOkex.Futures.cancel_orders("BTC-USD-180309", [1600593327162368,1600593327162369])
Place multiple orders for specific trading pairs (up to 4 trading pairs, maximum 4 orders each)
https://www.okex.com/docs/en/#futures-batch
Examples
iex> ExOkex.Futures.create_bulk_orders([ %{"instrument_id":"BTC-USD-180213",
"type":"1",
"price":"432.11",
"size":"2",
"match_price":"0",
"leverage":"10" },
])
Place a new order.
Examples
iex> ExOkex.Futures.create_order(%{ instrument_id: "BTC-USD-180213", leverage: "10", orders_data: [%{
type: "1",
price: "432.11",
size: "2",
match_price: "0"
}] }) {:ok, %{"order_info" => [%{"error_code" => 0, "error_message" => "", "order_id" => "2653481276189696"}], "result" => true}}
Get the futures account info of all token.
https://www.okex.com/docs/en/#futures-singleness
Examples
iex> ExOkex.Futures.list_accounts()
Retrieve the information on all your positions in the futures account.
https://www.okex.com/docs/en/#futures-hold_information
Examples
iex> ExOkex.Futures.Private.list_positions()
Retrieve information on your positions of a single contract.
https://www.okex.com/docs/en/#futures-hold_information
Examples
iex> ExOkex.Futures.Private.position("BTC-USD-190329")