Stocks · Reference and fundamentals
Stocks conditions
Trade and quote condition codes.
GET
/v1/stocks/conditionsstocksConditionsDecodes the condition codes on trades and quotes: name, kind, the data types a code applies to and whether trades carrying it update the consolidated high/low, open/close and volume. Reference data, cached for 24 hours.
Example request
curl -sS "https://api.ordermap.si/v1/stocks/conditions" \
-H "Authorization: Bearer $ORDERMAP_API_KEY"const res = await fetch("https://api.ordermap.si/v1/stocks/conditions", {
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);
// Paginated: repeat with cursor_id set to pagination.next_cursor_id until it is null.Set ORDERMAP_API_KEY to your key. Replace the dates with a recent trading date.
Parameters
3 parameters, none required.
| Parameter | Type and limits | Description |
|---|---|---|
data_queryoptional | stringtradebbonbbo | Only codes used on this data type: trade, bbo or nbbo. |
limitqueryoptional | integerdefault 100min 1max 200 | Maximum rows to return. |
cursor_queryoptional | stringat most 1024 characters | Opaque cursor returned as pagination.next_cursor_id; resumes the same query on the next page. |
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>required12 fields insideabbreviationstring | nullrequiredCommon abbreviation.consolidated_rulesobject | nullrequiredWhich consolidated aggregates a trade with this condition updates.3 fields insideupdates_high_lowbooleanrequiredUpdates the consolidated high and low.updates_open_closebooleanrequiredUpdates the consolidated open and close.updates_volumebooleanrequiredCounts toward consolidated volume.
data_typesarray<string>requiredData types the code applies to.tradebbonbbodescriptionstring | nullrequiredWhat the condition means.exchangeinteger | nullrequiredWhen set, only this exchange id sends the code.idintegerrequiredCondition code as it appears in conditions arrays.legacybooleanrequiredThe code belongs to an outdated specification and is no longer sent.namestringrequiredCondition name.typestringrequiredKind of condition, for example sale_condition, quote_condition, sip_generated_flag.
metaobjectrequiredMeta objectpaginationobjectrequiredPagination object
Example response
{
"data": [
{
"abbreviation": "I",
"consolidated_rules": {
"updates_high_low": false,
"updates_open_close": false,
"updates_volume": true
},
"data_types": [
"trade"
],
"description": "A trade of fewer than 100 shares.",
"exchange": null,
"id": 37,
"legacy": false,
"name": "Odd Lot Trade",
"type": "sale_condition"
}
],
"meta": {
"as_of": 1760659200123,
"coverage": {
"complete": true
},
"delay_ms": 0,
"delayed": false,
"request_id": "0199f0c2-5a1e-7c3b-9d4e-2b6f8a1c3d5e",
"source": "sip"
},
"pagination": {
"count": 1,
"has_more": false,
"limit": 100,
"next_cursor_id": null,
"next_url": null
}
}Values are illustrative. Missing values are null, never 0.