View source: R/private-interface.r
bt_sell | R Documentation |
The bt_sell()
function places a sell order on
https://bittrex.com. This function only works if you have set up
authentication.
bt_sell(market, quantity, rate, type = c("limit", "market"))
market |
the market to place the buy limit order on. |
quantity |
how much of the quote currency to sell. |
rate |
the price per unit of the quote currency that you wish to sell at. |
type |
either |
A named list with the following elements:
success: a boolean indicating whether the request is successful.
message: a string describing the error if the request was not successful, otherwise an empty string.
result: a named list, called "uuid" whose element is an integer
identifying the order. This value is used to query the status of of the
order with either the bt_getorder()
or bt_getopenorders()
function.
When the order is fulfilled it appears in the order history data.frame
returned by the bt_getorderhistory()
function.
https://bittrex.com/api/v1.1/market/selllimit
bt_authenticate()
, bt_buy()
, bt_getopenorders()
,
bt_getorderhistory()
## Not run: # Note you must authenticate first. # Sell half a bitcoin at 17000 USDT per bitcoin. bt_sell("usdt-btc", 0.5, 17000) # $success # [1] TRUE # # $message # [1] "" # # $result # $result$uuid # [1] "2d6l69e9-17fb-4f2a-8aff-37418b515624" # Sell 3.4 ETH at 0.063 BTC per ETH bt_sell("btc-eth", 3.4, 0.063) # Sell 2 LTC at 255 USDT per LTC bt_sell("usdt-ltc", 2, 255) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.