dot-make_get_function: Create a GET request function from an API spec

.make_get_functionR Documentation

Create a GET request function from an API spec

Description

Converts a single entry from .api_GET_specs into a ready-to-use function that executes the HTTP GET request, parses the response, and returns a typed data frame.

Usage

.make_get_function(api)

Arguments

api

A list containing API spec fields: okx_path, query (string or function), schema (data.frame), and optional mode ("named" or "positional").

Value

A function with signature (tz = "Asia/Hong_Kong", config, ...) that:

  • builds the query string using api$query (if a function),

  • signs and sends the GET request,

  • parses and returns the data using the schema-aware parser.


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