get_market_books: Get order book

View source: R/wrappers_get_market.R

get_market_booksR Documentation

Get order book

Description

Retrieve the current order book for an instrument.

Usage

get_market_books(
  inst_id,
  sz = NULL,
  config = NULL,
  tz = .okx_default_tz
)

Arguments

inst_id

Character. Instrument ID, e.g. '"BTC-USDT"'.

sz

Integer or 'NULL'. Order book depth. If 'NULL', OKX uses its endpoint default.

config

Optional list. Public endpoint request options, such as 'timeout'; credentials are not required.

tz

Character. Time zone for parsing timestamps. Default '"Asia/Hong_Kong"'.

Value

A 'data.frame' with JSON-encoded 'asks' and 'bids' columns plus 'ts'.


okxr documentation built on May 8, 2026, 5:09 p.m.