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., bitmexr::trades()
accesses trade data from the live API whereas bitmexr::tn_trades()
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 bucketsbucket_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 bitmexr
.
The following functions are available:
place_order()
for placing ordersedit_order()
for editing orderscancel_order()
or cancel_all_orders()
to cancel ordersPlease see the vignette Placing and managing order with bitmexr for more information.
It is recommended to have a thorough understanding of the BitMEX API documentation prior to using the package. Please take some time to read both https://www.bitmex.com/app/apiOverview and https://www.bitmex.com/api/explorer/.