MyNixOS website logo
Description

R Client for BitMEX.

A client for cryptocurrency exchange BitMEX <https://www.bitmex.com/> including the ability to obtain historic trade data and place, edit and cancel orders. BitMEX's Testnet and live API are both supported.

bitmexr - R Client for the bitmex exchange

R build status CRAN status

Overview

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.

Installation

The development version of bitmexr can be installed from github:

# install.packages("devtools")
devtools::install_github("hfshr/bitmexr")

Or the released version from CRAN:

install.packages("bitmexr")

Package contents

The package contains dedicated wrappers for the majority of API endpoints.

  • trades() and map_trades() return individual trade data for a specified symbol/time period.
  • bucket_trades() and 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.
  • place_order(), edit_order() and cancel_order() can be used to manage trades on the exchange.

Additional API endpoints that do not have a dedicated wrapper can be accessed using get_bitmex() for GET requests and post_bitmex() for POST requests. For example use:

get_bitmex(path = "/chat", args = list(reverse = "false"))

to get the latest trollbox messages.

Testnet API

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.

Authentication

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.

Disclaimer

This software is in no way affiliated, endorsed, or approved by the BitMEX cryptocurrency exchange or any of its affiliates.

Contribution

If you spot any issues, or would like additional features added, please feel free to raise an issue, or submit a pull request.

Code of Conduct

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.

Metadata

Version

0.3.3

License

Unknown

Platforms (77)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows