dot-build_request: Build a full OKX request object

.build_requestR Documentation

Build a full OKX request object

Description

Assemble URL, headers, and body for an OKX API call.

Usage

.build_request(
  httr_method,
  base_url,
  api_path,
  query_string,
  config = NULL,
  body_json = "",
  auth = TRUE
)

Arguments

httr_method

HTTP method ("GET" or "POST").

base_url

Base URL of the OKX API.

api_path

API path (e.g., "/api/v5/account/balance").

query_string

Query string starting with "?" or empty.

config

List with API credentials.

body_json

Optional JSON string for POST body.

auth

Logical. Whether to sign the request with OKX credentials.

Value

A list with elements: 'method', 'url', 'full_path', 'headers', and 'body_json'.


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