get_copy_trade_historical_subpos: Get historical copy trading subpositions

View source: R/wrappers_get_copy_trade.R

get_copy_trade_historical_subposR Documentation

Get historical copy trading subpositions

Description

Retrieve your historical copy trading subpositions.

Usage

get_copy_trade_historical_subpos(
  inst_type = NULL,
  inst_id = NULL,
  after = NULL,
  before = NULL,
  limit = NULL,
  config,
  tz = .okx_default_tz
)

Arguments

inst_type

Character or 'NULL'. Instrument type filter.

inst_id

Character or 'NULL'. Instrument ID filter.

after

Character or 'NULL'. Pagination cursor for earlier records.

before

Character or 'NULL'. Pagination cursor for newer records.

limit

Integer or 'NULL'. Number of rows to request.

config

List. API credentials/config, typically containing 'api_key', 'secret_key', and 'passphrase'.

tz

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

Details

Wraps '/api/v5/copytrading/subpositions-history'. Returns one row per closed or historical subposition.

Value

A 'data.frame' with fields like 'instId' and 'uniqueCode'.

Note

Since okxr 0.1.2

See Also

[get_copy_trade_current_subpos()]

Examples

## Not run: 
cfg <- list(api_key = "xxx", secret_key = "xxx", passphrase = "xxx")
hist <- get_copy_trade_historical_subpos(config = cfg)
head(hist)

## End(Not run)


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