| 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",
...
)instIdInstrument ID, e.g. BTC-USD-190927-5000-C.
tdModeTrade mode. Margin mode: cross or isolated. Non-Margin mode: cash.
sideOrder side, buy or sell.
szQuantity to buy or sell.
ordTypeOrder 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).
processA 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", ...)
instIdInstrument ID, e.g. BTC-USD-190927.
ordIdOrder ID, Either ordId or clOrdId is required. If both are passed, ordId will be used.
clOrdIdClient Order ID as assigned by the client.
processA 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)
deepWhether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.