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
| Param | Type | Default | Description |
|---|---|---|---|
| symbol | string | BTCUSDT | Trading pair to analyse. |
| interval | string | 1h | Candle interval. |
| q | integer | 40 | Query window length (10–400). |
| f | integer | 30 | Forecast horizon (5–300). |
| start | integer | latest | Optional explicit start offset (0 = first bar). |
| cursor | integer | 0 | Match pagination cursor. |
| limit | integer | 32 | Number of matches (5–128). |
| filters | JSON | none | Serialized PatternFilters object. |
| sort | string | similarity | similarity, recent, historic, corr, or rmse. |
| force | bool | false | Force-refresh candles from Binance. |
Note: Dataset mutations automatically clear the in-memory cache and ANN index; the next analytics request will rebuild state transparently.