| restAPItrade {okxAPI} | R Documentation |
restAPItrade Class
Description
Wrapper for REST API TRADE.
Super class
okxAPI::restAPI -> restAPItrade
Methods
Public methods
Inherited methods
Method order()
See Place order for more information.
Usage
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",
...
)Arguments
instIdInstrument ID, e.g. BTC-USD-190927-5000-C.
tdModeTrade mode. Margin mode:
crossorisolated.Non-Margin mode:cash.sideOrder side,
buyorsell.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.
Method cancel_order()
See Cancel order for more information.
Usage
restAPItrade$cancel_order(instId, ordId, clOrdId, process = "identity", ...)
Arguments
instIdInstrument ID, e.g. BTC-USD-190927.
ordIdOrder ID, Either
ordIdorclOrdIdis required. If both are passed,ordIdwill 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.
Method clone()
The objects of this class are cloneable with this method.
Usage
restAPItrade$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.