Description Usage Arguments Value Examples
Post a market order
1 2 | post_kucoin_market_order(symbol, side, base_size = NULL,
quote_size = NULL)
|
symbol |
A |
side |
A |
base_size, quote_size |
A |
If the transaction success, it will return
a character
vector which showing the order id
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | ## Not run:
# to run this example, make sure
# you already setup the API key
# in a proper .Renviron file
# import library
library(rucoin)
# post a market order: buy 1 KCS
order_id <- post_kucoin_market_order(
symbol = "KCS/BTC",
side = "buy",
base_size = 1
)
# quick check
order_id
# post a market order: sell 1 KCS
order_id <- post_kucoin_market_order(
symbol = "KCS/BTC",
side = "sell",
base_size = 1
)
# quick check
order_id
# post a market order: buy KCS worth 0.0001 BTC
order_id <- post_kucoin_market_order(
symbol = "KCS/BTC",
side = "buy",
quote_size = 0.0001
)
# quick check
order_id
# post a market order: sell KCS worth 0.0001 BTC
order_id <- post_kucoin_market_order(
symbol = "KCS/BTC",
side = "sell",
base_size = 0.0001
)
# quick check
order_id
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.