Futures · Statistics
Futures relative strength
/v1/futures/relative-strengthfuturesRelativeStrengthOne row per bar over the latest window bars the products share: base_performance_pct is the base product's move in percent since the first row, and for each product performance_pct is its own move and ratio_change_pct the move of its price ratio to the base, both since the first bar of the window. Only rows inside your plan's history window are returned; the moves are measured from the first bar of the longer window, so the first row returned can be older than 0 (it is 0 only when no row was withheld, and coverage says when rows were). No prices are returned. Complete bars are aligned on the times every product with data has. A product with no bars is named in coverage.missing and left out of the rows; with no base bars there are no rows. Reads 5-minute bars of five sessions, 30-minute bars of 11 or daily bars of 21 prior sessions (so at most 21 daily rows are available), one bar read per product, through a deferred history read, so a first request can answer 503 data_pending; retry.
Example request
curl -sS --get "https://api.ordermap.si/v1/futures/relative-strength" \
-H "Authorization: Bearer $ORDERMAP_API_KEY" \
--data-urlencode symbols=ES,NQconst params = new URLSearchParams({
symbols: "ES,NQ",
});
const res = await fetch(`https://api.ordermap.si/v1/futures/relative-strength?${params}`, {
headers: { Authorization: `Bearer ${process.env.ORDERMAP_API_KEY}` },
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const { data, meta } = await res.json();
console.log(data, meta.coverage);Set ORDERMAP_API_KEY to your key. Replace the dates with a recent trading date.
Parameters
4 parameters, 1 required.
| Parameter | Type and limits | Description |
|---|---|---|
symbolsqueryrequired | array<string>comma-separated in one parameter1 to 2 itemseach at most 128 characterspattern ^[A-Za-z0-9]{1,3}$ | One or two different futures product roots to measure, for example NQ. |
basequeryoptional | stringdefault ESat most 3 characterspattern ^[A-Za-z0-9]{1,3}$ | The base product root the others are measured against. |
intervalqueryoptional | string5m30m1ddefault 5m | Bar size. |
windowqueryoptional | integerdefault 78min 20max 500 | Bars to return, from the latest back. With interval=1d at most 21 rows are available (one daily read holds 22 sessions and only completed bars count); a larger window returns what is held. |
Response
| Status | Meaning | Body |
|---|---|---|
200 | Successful response. | Schema below |
400 | Invalid, unknown or repeated parameters, or an invalid cursor. | Error object |
401 | Missing or invalid API key. | Error object |
403 | The plan, dataset release or account state does not allow this request. | Error object |
422 | The request is valid but no data exists for it. | Error object |
429 | Rate limit, burst limit or cooldown; wait Retry-After seconds.Retry-After | Error object |
500 | Internal error. | Error object |
503 | Data temporarily unavailable; retry after Retry-After seconds.Retry-After | Error object |
504 | The request timed out. | Error object |
Authenticated responses carry the X-RateLimit-* headers (see rate limits); 429 and 503 add Retry-After.
200 response body
dataarray<object>required6 fields insidebar_timeintegerunix-msrequiredStart of the bar. Unix epoch milliseconds (UTC).base_performance_pctnumber | nullrequiredThe base product's move since the first bar of the window, in percent.symbolsarray<object>requiredOne entry per product with bars.3 fields insideperformance_pctnumber | nullrequiredThe product's move since the first bar of the window, in percent.ratio_change_pctnumber | nullrequiredThe move of the product-to-base price ratio since the first bar of the window, in percent.symbolstringrequiredProduct root.
metaobjectrequiredMeta object
Example response
{
"data": [
{
"bar_time": 1792159200000,
"base_performance_pct": 0.12,
"symbols": [
{
"performance_pct": 0.31,
"ratio_change_pct": 0.19,
"symbol": "NQ"
}
]
}
],
"meta": {
"as_of": 1760659200123,
"coverage": {
"complete": true
},
"delay_ms": 0,
"delayed": false,
"request_id": "0199f0c2-5a1e-7c3b-9d4e-2b6f8a1c3d5e",
"source": "cme"
}
}Values are illustrative. Missing values are null, never 0.
