| orderADD | R Documentation |
This function is used to submit buy and sell orders on the Nobitex website
orderADD(typ, src, dst, amnt, prc, stp = NULL, stpL = NULL, exe = "limit", token)
typ |
|
src |
Cryptocurrency sources are defined by lowercase names in the function (e.g., "btc", "eth", "bnb", "paxg"). |
dst |
For the Rials or USD system, the destination currency must be set to either |
amnt |
Amount of cryptocurrency to trade |
prc |
Price of cryptocurrency to trade. The trade price ("prc") depends on the exe's option. |
stp |
If using stop-loss or OCO, define the stop price here. Default is NULL.
When the market price reaches "stp", "prc" is activated and recorded in the order list.
For a "buy" position, "stp" must be greater than "prc"; for a "sell"" position, "stp" must be less than |
stpL |
If using "oco" then stop limit price must be defined. Defualt is NULL. While "stp" is active, "stpl" is recorded as the trade price; otherwise, "prc" is used. |
exe |
Three common ways to configure a trade: regular trading, stop-loss trading, or One-Cancels-the-Other (OCO) trading. |
token |
The token is string value obtain from user ID settings in the NOBITEX. If you are not registered on the website, please use the provided link. |
Returns a list: "ok" if the order is recorded successfully on the website; otherwise, "failed".
## Not run:
tkn <- "CONTACT WITH AUTHOR"
x <- orderADD(typ = "sell", src = "usdt", dst = "rls", amnt = 5, prc = 1600000,
+ exe = "limit", token = tkn)
x <- orderADD(typ = "sell", src = "usdt", dst = "rls", amnt = 5, prc = 1400000,
+ stp = 1300000, exe = "stop_limit", token = tkn)
x <- orderADD(typ = "sell", src = "usdt", dst = "rls", amnt = 5, prc = 1400000,
+ stp = 1300000, stpL = 1350000, exe = "oco", token = tkn)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.