This vignette gives a brief overview of the main functions within the
bitmexr package. The package supports both the testnet and
live API endpoints, simply use the
tn_ prefix to any of the
functions in the package (e.g.,
trade data from the live API whereas
accesses trade data from the testnet API). This is useful is you want to
test out placing/managing orders in a risk free environment.
To access trades that have been executed on the exchange you can use either:
trades(): to get individual trades that have been executed.
bucket_trades(): to get bucketed trade data in 1-minute, 5-minute, 1-hour or 1-day buckets
bucket_trades() is typically more useful when wanting
data over an extended period of time due to the sheer volume of trades
that are executed on the exchange each day. These functions also have
map_* variants to help overcome the 1000 row per request limit.
Please see the Trade data vignette for more details on these functions.
bitmexr also supports placing and managing orders on the
exchange. These functions require an API key and secret to work. Please
read the vignette Authentication for
information on how to set this up in
The following functions are available:
place_order()for placing orders
edit_order()for editing orders
cancel_all_orders()to cancel orders
Please see the vignette Placing and managing order with bitmexr for more information.