pub struct EndpointDescriptor {
pub method: HttpMethod,
pub path: String,
pub params: HashMap<String, String>,
pub request_body: Option<Value>,
pub response_root: Option<String>,
pub interval_map: HashMap<String, String>,
pub max_limit: Option<u32>,
pub response: ResponseMapping,
}Expand description
Describes a single API endpoint (order_book, ticker, or trades).
Fields§
§method: HttpMethodHTTP method. Defaults to GET.
path: StringURL path appended to base_url (e.g., /api/v3/depth).
params: HashMap<String, String>Query parameters for GET, or ignored for POST.
Values may contain {pair}, {limit}, {base}, {quote} placeholders.
request_body: Option<Value>JSON body template for POST requests. Values may contain placeholders.
response_root: Option<String>Dot-path to navigate from the JSON root to the data before field mapping.
Special values:
""or omitted: root is the data."result":json["result"]."data.0":json["data"][0]."result.*": first value underjson["result"]regardless of key.
interval_map: HashMap<String, String>Maps canonical interval names (e.g., 1m, 5m, 1h, 1d) to the
venue-specific strings (e.g., 1min, 5min, hour, day).
Only used by the OHLC capability; omit when the venue accepts canonical names.
max_limit: Option<u32>The most items the venue returns in one request ({limit} is never
above it). For a venue that errors on a bigger limit (Biconomy’s
trades: 100); omit when the venue caps or accepts any limit.
response: ResponseMappingField mappings for parsing the response.