The goal of
bitmexr is to provide an API wrapper for cryptocurrency derivatives exchange, BitMEX.
bitmexr now provides support for all API endpoints for both the Testnet (www.testnet.bitmex.com) and the live exchange (www.bitmex.com). For more information about the API, check https://www.bitmex.com/app/apiOverview.
The development version of
bitmexr can be installed from github:
# install.packages("devtools") devtools::install_github("hfshr/bitmexr")
Or the released version from CRAN:
The package contains dedicated wrappers for the majority of API endpoints.
map_trades()return individual trade data for a specified symbol/time period
map_bucket_trades()return bucketed trade data (open, high, low, close) for either 1-minute, 5-minute, 1-hour or 1-day time frames for a specified symbol.
cancel_order()can be used to manage trades on the exchange.
to get the latest trollbox messages.
All functions in the package also work with BitMEX’s Testnet API. Simply use the “tn_” prefix to access the Testnet version of the function. For example
tn_place_order() will place an order on the Testnet exchange.
Accessing private API endpoints, such as those to manage trades, requires an API key and secret.
bitmexr reads these from your ~/.Renviron file - see vignette Authentication for more information.
This software is in no way affiliated, endorsed, or approved by the BitMEX cryptocurrency exchange or any of its affiliates.
If you spot any issues, or would like additional features added, please feel free to raise an issue, or submit a pull request.
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.