restAPItrade | R Documentation |
Wrapper for REST API TRADE.
okxAPI::restAPI
-> restAPItrade
order()
See Place order for more information.
restAPItrade$order( instId, tdMode = c("isolated", "cross", "cash"), side = c("buy", "sell"), sz, ordType = c("market", "limit", "post_only", "fok", "ioc", "optimal_limit_ioc"), process = "identity", ... )
instId
Instrument ID, e.g. BTC-USD-190927-5000-C.
tdMode
Trade mode. Margin mode: cross
or isolated.
Non-Margin mode: cash
.
side
Order side, buy
or sell
.
sz
Quantity to buy or sell.
ordType
Order type. market
: Market order, limit
: Limit order, post_only
: Post-only order,
fok
: Fill-or-kill order, ioc
: Immediate-or-cancel order,
optimal_limit_ioc
: Market order with immediate-or-cancel order (applicable only to Futures and Perpetual swap).
process
A function to process the data received from the API. Default to identity
.
...
Other request parameters.
cancel_order()
See Cancel order for more information.
restAPItrade$cancel_order(instId, ordId, clOrdId, process = "identity", ...)
instId
Instrument ID, e.g. BTC-USD-190927.
ordId
Order ID, Either ordId
or clOrdId
is required. If both are passed, ordId
will be used.
clOrdId
Client Order ID as assigned by the client.
process
A function to process the data received from the API. Default to identity
.
...
Other request parameters.
clone()
The objects of this class are cloneable with this method.
restAPItrade$clone(deep = FALSE)
deep
Whether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.