Developers

API Reference

Comprehensive documentation for the rlx-search HTTP API. Manage datasets, compute pattern matches, run ANN searches, and train RL agents.

Introduction

The rlx-search service exposes JSON endpoints to manage historical datasets, compute pattern matches, and run ANN searches. All responses are UTF-8 JSON. Errors return an HTTP 4xx/5xx along with { "error": "CODE" }.

Base URL (production): https://aipricepatterns.com
Base URL (local dev): http://localhost:3000 (requires PATTERNS_RUST_BASE pointing to the rlx-search service, e.g. http://localhost:8787)

Quick Testing With curl

Set the base URL once per shell:

export BASE_URL="https://aipricepatterns.com"

Local dev example:

export BASE_URL="http://localhost:3000"

Send requests with curl (use -G for query params, -d for JSON bodies) and pipe to jq for readability:

curl -s -G "$BASE_URL/api/patterns" \
--data-urlencode "symbol=BTCUSDT" \
--data-urlencode "interval=1h" \
--data-urlencode "q=60" \
--data-urlencode "f=30" | jq

Unless otherwise stated, endpoints are synchronous and return 200 OK when work completes.

Common Concepts

ParamTypeDefaultDescription
symbolstringBTCUSDTTrading pair to analyse.
intervalstring1hCandle interval.
qinteger40Query window length (10–400).
finteger30Forecast horizon (5–300).
startintegerlatestOptional explicit start offset (0 = first bar).
cursorinteger0Match pagination cursor.
limitinteger32Number of matches (5–128).
filtersJSONnoneSerialized PatternFilters object.
sortstringsimilaritysimilarity, recent, historic, corr, or rmse.
forceboolfalseForce-refresh candles from Binance.

Note: Dataset mutations automatically clear the in-memory cache and ANN index; the next analytics request will rebuild state transparently.