Skip to content

Stocks · Prices, tape and indicators

Stocks bars

OHLCV bars from 1 second to 1 month.
On this page

Aggregate bars for one stock, oldest first, covering pre-market, regular and after-hours trading (04:00 to 20:00 ET). Bars align to the interval; bars with no trades are absent. Prices are split adjusted unless adjusted=false. Without start_time the window reaches back 3 days for second and minute intervals, 30 days for hourly and one year for daily and longer (never further than your plan's history); without end_time it ends now. Page forward with cursor_id.

Example request

curl -sS --get "https://api.ordermap.si/v1/stocks/bars" \
  -H "Authorization: Bearer $ORDERMAP_API_KEY" \
  --data-urlencode symbol=AAPL

Set ORDERMAP_API_KEY to your key. Replace the dates with a recent trading date.

Parameters

7 parameters, 1 required.

ParameterType and limitsDescription
symbolqueryrequiredstringat most 11 characterspattern ^[A-Za-z]{1,6}(\.[A-Za-z0-9]{1,4})?$Ticker symbol, for example AAPL.
intervalqueryoptionalstring1s5s10s15s30s1m2m3m5m10m15m30m1h2h4h1d1w1modefault 1dBar size: 1s 5s 10s 15s 30s 1m 2m 3m 5m 10m 15m 30m 1h 2h 4h 1d 1w 1mo.
adjustedqueryoptionalbooleandefault trueAdjust prices for splits (default true).
start_timequeryoptionalintegerunix-msmin 946684800000max 4102444800000Inclusive start of the window.
end_timequeryoptionalintegerunix-msmin 946684800000max 4102444800000Exclusive end of the window.
limitqueryoptionalintegerdefault 1000min 1max 5000Maximum rows to return.
cursor_idqueryoptionalstringat most 1024 charactersOpaque cursor returned as pagination.next_cursor_id; resumes the same query on the next page.

Response

StatusMeaningBody
200Successful response.Schema below
400Invalid, unknown or repeated parameters, or an invalid cursor.Error object
401Missing or invalid API key.Error object
403The plan, dataset release or account state does not allow this request.Error object
422The request is valid but no data exists for it.Error object
429Rate limit, burst limit or cooldown; wait Retry-After seconds.Retry-AfterError object
500Internal error.Error object
503Data temporarily unavailable; retry after Retry-After seconds.Retry-AfterError object
504The 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>required8 fields inside
    • closenumberrequiredClose.
    • highnumberrequiredHigh.
    • lownumberrequiredLow.
    • opennumberrequiredOpen.
    • start_timeintegerunix-msrequiredStart of the bar's window. Unix epoch milliseconds (UTC).
    • tradesinteger | nullrequiredNumber of trades.
    • volumenumberrequiredVolume in shares.
    • vwapnumber | nullrequiredVolume weighted average price.
  • metaobjectrequiredMeta object
  • paginationobjectrequiredPagination object

Example response

{
  "data": [
    {
      "close": 231.42,
      "high": 231.5,
      "low": 231.2,
      "open": 231.3,
      "start_time": 1760659140000,
      "trades": 2110,
      "volume": 120000,
      "vwap": 231.38
    }
  ],
  "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": 1000,
    "next_cursor_id": null,
    "next_url": null
  }
}

Values are illustrative. Missing values are null, never 0.