bt_sell: Place a Sell Order

View source: R/private-interface.r

bt_sellR Documentation

Place a Sell Order

Description

The bt_sell() function places a sell order on https://bittrex.com. This function only works if you have set up authentication.

Usage

bt_sell(market, quantity, rate, type = c("limit", "market"))

Arguments

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 "market" or "limit". Note that market orders are disabled as of July 7, 2017 (default is limit).

Value

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.

References

https://bittrex.com/api/v1.1/market/selllimit

See Also

bt_authenticate(), bt_buy(), bt_getopenorders(), bt_getorderhistory()

Examples

## 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)

kaneplusplus/bittrex documentation built on July 6, 2022, 10:02 p.m.