MyNixOS website logo
Description

'Binance' REST API Client.

Client for the 'Binance' <https://www.binance.com/> Spot, Futures, and Options REST APIs. Provides helper functions for signed and unsigned requests, market data retrieval, account access, and order management with 'data.table' output by default.

binxr

Documentation

An R client for the Binance REST API (Spot, Futures, and Options).

Documentation site: https://oliverlds.github.io/binxr/

Overview

binxr provides lightweight helpers for:

  • Public market data (ticker prices, klines, exchange info)
  • Authenticated endpoints (account info, positions, and order management)
  • Spot, USD-M futures, and options product areas
  • Data returned as data.table for easy downstream analysis

Installation

# From GitHub (using remotes or devtools)
remotes::install_github("OliverLDS/binxr")

Quick Start

library(binxr)

# Create a public config without credentials.
cfg <- config_futures(api_key = NULL, secret_key = NULL)

# Prepare values using local helper logic, without making a network request.
exchange_info <- list(
  symbols = list(
    ETHUSDT = list(
      filters = list(
        list(filterType = "PRICE_FILTER", tickSize = "0.01"),
        list(filterType = "LOT_SIZE", stepSize = "0.001")
      )
    )
  )
)

round_price_qty(exchange_info, "ETHUSDT", price = 1800.123, quantity = 0.12345)

Live API requests require network access. Authenticated trading endpoints also require Binance API credentials supplied explicitly or via BINX_API_KEY and BINX_SECRET_KEY.

library(binxr)

cfg <- config_futures()

# Public futures market data.
futures_get_server_time(config = cfg)
futures_get_mark_price(symbol = "ETHUSDT", config = cfg)

# Public spot and options market data.
spot_get_ticker_price(symbol = "BTCUSDT", config = config_spot())
options_get_mark_price(config = config_options())

Order-management helpers such as futures_place_order() and spot_place_order() are intentionally not shown as copy-paste quick-start code: review Binance permissions, testnet settings, and order parameters before using them with real credentials.

Requirements

  • R >= 4.1.0
  • Packages: httr2, jsonlite, digest, data.table, rlang

License

MIT License (see LICENSE file).


Developed by Oliver Zhou, 2025.

Metadata

Version

0.1.1

License

Unknown

Platforms (80)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arc-linux
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • 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-linux
  • 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
  • sh4-linux
  • 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-uefi
  • x86_64-windows