post_account_set_leverage: Set Account Leverage

View source: R/wrappers_post_configure.R

post_account_set_leverageR Documentation

Set Account Leverage

Description

Sets the leverage level for a specific trading instrument and margin mode.

Usage

post_account_set_leverage(
  inst_id,
  lever,
  mgn_mode,
  pos_side = NULL,
  tz = .okx_default_tz,
  config
)

Arguments

inst_id

Instrument ID (e.g., "BTC-USDT").

lever

Leverage level to apply (as a string or numeric, e.g., "10").

mgn_mode

Margin mode: "cross" or "isolated".

pos_side

Optional. Position side: "long" or "short". Required for isolated mode.

tz

Timezone used for any timestamp parsing (default: "Asia/Hong_Kong").

config

API credential list with keys 'api_key', 'secret_key', and 'passphrase'.

Value

A data.frame with leverage update confirmation (including instrument ID and leverage settings).


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