API documentation
The OkamiStocks REST API returns US equity market data as JSON over HTTPS: the latest
bid/ask quote and the latest minute and daily OHLCV bars (open/high/low/close/volume)
on every plan, plus historical daily and intraday bars, technical indicators and corporate
actions on the Supreme plan.
Timestamps are UTC. Every successful response wraps its payload in a
data envelope.
Standard and Supreme also cover crypto pairs such as BTC/USD (the latest quote and the
latest minute and daily bars), and Supreme adds historical crypto daily and intraday bars.
https://okamistocks.io/api/v1
New here? The quickstart takes a new Free account to a successful first request.
Contents
- Overview
- Quickstart
- Authentication
- Base URL & versioning
- AI assistants (MCP)
- Real-time quote
- Latest minute bar
- Latest daily bar
- Real-time quotes, batch
- Latest minute bars, batch
- Latest daily bars, batch
- 52-week range and average volume
- Top movers
- Most active stocks
- Market status
- Trading days
- Historical bars
- Technical indicators
- Corporate actions
- News
- Crypto real-time quote
- Crypto minute bar
- Crypto daily bar
- Crypto real-time quotes, batch
- Crypto minute bars, batch
- Crypto daily bars, batch
- Historical crypto bars
- Crypto technical indicators
- Crypto top movers
- Crypto pair search
- Ticker search
- List symbols
- Symbols & plan access
- Timestamps & data behavior
- Rate limits
- Errors & recovery
- Troubleshooting
Quickstart
-
1. Create your Free account
Register for the Free plan, no credit card required.
-
2. Verify your email
A valid key on an unverified account receives
403until the address is verified: check your inbox for the verification link first. -
3. Copy your API key from the dashboard
Your key lives in the dashboard. Store it server-side as an environment variable; requests belong on your backend or in your terminal, never in a browser or mobile client.
-
4. Request a quote for SPY
SPY is on the Free plan's ticker list (the full list). Don't know a ticker? Find it by company name with ticker search, on every plan. Set
OKAMI_API_TOKENin your local shell first: the cURL example is a POSIX-shell command (not PowerShell); Python needspython -m pip install requestsonce; the Node.js example is server-side, so save it as a.mjsfile and run it on a currently supported Node release with built-infetch.
Request
cURL
export OKAMI_API_TOKEN='YOUR_API_TOKEN'
curl https://okamistocks.io/api/v1/quote/real-time \
-d token="$OKAMI_API_TOKEN" \
-d ticker=SPY
Python
import os
import requests
response = requests.post(
"https://okamistocks.io/api/v1/quote/real-time",
headers={"Accept": "application/json"},
json={"token": os.environ["OKAMI_API_TOKEN"], "ticker": "SPY"},
timeout=30,
)
print(response.status_code)
print(response.json())
response.raise_for_status()
Node.js
const token = process.env.OKAMI_API_TOKEN;
if (!token) throw new Error('Set OKAMI_API_TOKEN before running this example.');
const response = await fetch('https://okamistocks.io/api/v1/quote/real-time', {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({ token, ticker: 'SPY' }),
signal: AbortSignal.timeout(30000),
});
const body = await response.json();
console.log(response.status, body);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
Example response HTTP 200
{
"data": {
"ticker": "SPY",
"bid_price": 645.9,
"ask_price": 646,
"bid_size": 1,
"ask_size": 1,
"mid_price": 645.95,
"previous_close": 643.12,
"price_change": 2.83,
"percent_change": 0.44,
"daily_volume": 61254120,
"quote_timestamp": "2026-09-11T19:59:59.385930324Z"
}
}
- Every successful response wraps its payload in the
dataenvelope shown above. bid_price/ask_priceare quote values (what buyers and sellers are currently offering), not the last executed trade price.quote_timestampdescribes the source data, not the moment the HTTP response was produced.
If the first call fails
A 403 means an unverified email or a plan restriction, so verify your address or check
Errors & recovery.
A 401 means the token field is wrong, so re-copy your key.
A first request for a quiet ticker can also come back as a temporary
422 or 503 while data warms up, see
Timestamps & data behavior.
Authentication
Send your API key as token
in the request body of every call, as a form field or a JSON field: this API reads the key from the body, not from an
Authorization header.
Your account's email address must be verified before any request succeeds.
The MCP server for AI assistants is the one exception: it takes the
same key as an Authorization: Bearer header.
- An invalid or missing key returns
401with{"error":"Unauthenticated"}. - A valid key on an unverified account returns
403asking you to verify your email. - A valid, verified key without the required plan (historical data and corporate actions need Supreme) returns a different
403naming the required plan.
Manage your key from the dashboard, where you can also generate a replacement if a key is ever exposed.
Keep your key server-side
Store the key as an environment variable and make requests from your backend or terminal. A key shipped inside a browser app, mobile client, or public repository is public: anyone holding it can spend your quota.
Base URL & versioning
All requests go to one production base URL. It already includes the
/api/v1
version prefix: append only the endpoint path
(/quote/{endpoint}),
never a second /api/v1.
Base URL
https://okamistocks.io/api/v1
Versioning is by path. There is one environment and one API version today; a breaking change
would ship under a new version prefix rather than changing
v1 responses.
AI assistants (MCP)
Connect an AI assistant or agent (Claude, Cursor, VS Code, Codex CLI and others) to OkamiStocks
through the Model Context Protocol (MCP). The MCP server at
https://okamistocks.io/mcp
gives it nineteen tools, one for each kind of API request, authenticated with your API key sent as an
Authorization: Bearer header.
Tool calls count against your plan's rate limit like direct API calls.
Read the MCP guide: setup for each client, the tools and their plans, limits, errors and troubleshooting.
Real-time quote
All plans/api/v1/quote/real-time
Returns the latest bid/ask quote for a ticker: the prices buyers and sellers are currently offering, with their sizes, the source timestamp and the day's change from the previous close. A quote is not the last executed trade price, so the change is measured from the bid/ask midpoint.
Available on every plan. Free-plan requests are limited to the
Free ticker list;
paid plans accept any symbol in the
supported format.
Send the fields as a form body, as the cURL examples do, or as JSON with a
Content-Type: application/json header.
Request body
-
tokenstring Required - Your API key.
-
tickerstring Required - The US equity symbol to look up. Input is uppercased before validation. 1-10 characters total. Free plan: a symbol from the Free ticker list. Paid plans: a letters/digits run, optionally followed by up to two more letters/digits runs, each separated by one of '.', '/' or '-' (e.g. BRK.B, ABC.CV.CL).
Response fields (inside data)
-
tickerstring Required - The requested symbol, uppercased.
-
bid_pricenumber Required - Highest current buy offer, in USD, rounded to 2 decimal places. Null when no value is available.
-
ask_pricenumber Required - Lowest current sell offer, in USD, rounded to 2 decimal places. Null when no value is available.
-
bid_sizenumber Required - Size of the bid as reported by the upstream feed.
-
ask_sizenumber Required - Size of the ask as reported by the upstream feed.
-
mid_pricenumber Required - Midpoint of bid_price and ask_price, in USD, rounded half up to the cent. Null unless both are above zero and ask_price is at or above bid_price.
-
previous_closenumber Required - Close of the last regular trading session before the quote's own trading day (New York time), in USD, rounded to 2 decimal places. Null while the data feed hasn't supplied it, which is common outside regular trading hours and for about a minute after a ticker is first requested.
-
price_changenumber Required - mid_price minus previous_close, in USD, exact to the cent. Null when either is null.
-
percent_changenumber Required - price_change as a percent of previous_close, rounded half away from zero to 2 decimal places. Computed from the values in this response, so it always has the sign of price_change (or is 0.0). Prices are published to the cent, so for low-priced stocks it is approximate. Null when price_change is null.
-
daily_volumenumber Required - Volume traded so far in the quote's own trading day, including extended hours, as reported by the upstream feed. Null until the ticker's first regular-session trade of the day, and while not yet available.
-
quote_timestampstring Required - UTC timestamp of the source quote (RFC 3339, may carry sub-millisecond precision). Describes the data, not the HTTP response time.
Errors: 401, 403, 422, 429 and 503
all apply here: a temporary 422
or 503 on a cold ticker is
recoverable, not proof the symbol is invalid.
Request
cURL
export OKAMI_API_TOKEN='YOUR_API_TOKEN'
curl https://okamistocks.io/api/v1/quote/real-time \
-d token="$OKAMI_API_TOKEN" \
-d ticker=SPY
Python
import os
import requests
response = requests.post(
"https://okamistocks.io/api/v1/quote/real-time",
headers={"Accept": "application/json"},
json={"token": os.environ["OKAMI_API_TOKEN"], "ticker": "SPY"},
timeout=30,
)
print(response.status_code)
print(response.json())
response.raise_for_status()
Node.js
const token = process.env.OKAMI_API_TOKEN;
if (!token) throw new Error('Set OKAMI_API_TOKEN before running this example.');
const response = await fetch('https://okamistocks.io/api/v1/quote/real-time', {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({ token, ticker: 'SPY' }),
signal: AbortSignal.timeout(30000),
});
const body = await response.json();
console.log(response.status, body);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
Response Example ยท HTTP 200
HTTP 200
{
"data": {
"ticker": "SPY",
"bid_price": 645.9,
"ask_price": 646,
"bid_size": 1,
"ask_size": 1,
"mid_price": 645.95,
"previous_close": 643.12,
"price_change": 2.83,
"percent_change": 0.44,
"daily_volume": 61254120,
"quote_timestamp": "2026-09-11T19:59:59.385930324Z"
}
}
HTTP 422
{
"message": "Error fetching ticker data. Please check that the ticker symbol is valid. Some ticker data is unavailable after market hours.",
"errors": {
"ticker": [
"Error fetching ticker data. Please check that the ticker symbol is valid. Some ticker data is unavailable after market hours."
]
}
}
HTTP 503
{
"message": "Quote data is warming up right now. Please try again in a few seconds."
}
Build a request
Set OKAMI_API_TOKEN in your own shell: this builder never asks for your key and sends nothing anywhere.
Latest minute bar
All plans/api/v1/quote/minute
Returns the latest one-minute OHLCV snapshot for a ticker. This is a single latest bar: there is no range or interval parameter, and it is not a historical minute series.
Available on every plan. Free-plan requests are limited to the
Free ticker list;
paid plans accept any symbol in the
supported format.
Send the fields as a form body, as the cURL examples do, or as JSON with a
Content-Type: application/json header.
Request body
-
tokenstring Required - Your API key.
-
tickerstring Required - The US equity symbol to look up. Input is uppercased before validation. 1-10 characters total. Free plan: a symbol from the Free ticker list. Paid plans: a letters/digits run, optionally followed by up to two more letters/digits runs, each separated by one of '.', '/' or '-' (e.g. BRK.B, ABC.CV.CL).
Response fields (inside data)
-
tickerstring Required - The requested symbol, uppercased.
-
minute_open_pricenumber Required - Open price of the latest minute bar, in USD, rounded to 2 decimal places.
-
minute_high_pricenumber Required - High price of the bar.
-
minute_low_pricenumber Required - Low price of the bar.
-
minute_close_pricenumber Required - Close price of the bar.
-
minute_volumenumber Required - Volume traded during the bar, as reported by the upstream feed.
-
minute_volume_weighted_pricenumber Required - Volume-weighted average price (VWAP) over the bar.
-
quote_timestampstring Required - UTC timestamp of the source bar.
Errors: 401, 403, 422, 429 and 503
all apply here: a temporary 422
or 503 on a cold ticker is
recoverable, not proof the symbol is invalid.
Request
cURL
export OKAMI_API_TOKEN='YOUR_API_TOKEN'
curl https://okamistocks.io/api/v1/quote/minute \
-d token="$OKAMI_API_TOKEN" \
-d ticker=SPY
Python
import os
import requests
response = requests.post(
"https://okamistocks.io/api/v1/quote/minute",
headers={"Accept": "application/json"},
json={"token": os.environ["OKAMI_API_TOKEN"], "ticker": "SPY"},
timeout=30,
)
print(response.status_code)
print(response.json())
response.raise_for_status()
Node.js
const token = process.env.OKAMI_API_TOKEN;
if (!token) throw new Error('Set OKAMI_API_TOKEN before running this example.');
const response = await fetch('https://okamistocks.io/api/v1/quote/minute', {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({ token, ticker: 'SPY' }),
signal: AbortSignal.timeout(30000),
});
const body = await response.json();
console.log(response.status, body);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
Response Example ยท HTTP 200
HTTP 200
{
"data": {
"ticker": "SPY",
"minute_open_price": 645.72,
"minute_high_price": 646.05,
"minute_low_price": 645.61,
"minute_close_price": 645.9,
"minute_volume": 129312,
"minute_volume_weighted_price": 645.84,
"quote_timestamp": "2026-09-11T19:59:00Z"
}
}
HTTP 422
{
"message": "Error fetching ticker data. Please check that the ticker symbol is valid. Some ticker data is unavailable after market hours.",
"errors": {
"ticker": [
"Error fetching ticker data. Please check that the ticker symbol is valid. Some ticker data is unavailable after market hours."
]
}
}
HTTP 503
{
"message": "Quote data is warming up right now. Please try again in a few seconds."
}
Build a request
Set OKAMI_API_TOKEN in your own shell: this builder never asks for your key and sends nothing anywhere.
Latest daily bar
All plans/api/v1/quote/daily
Returns the latest daily OHLCV snapshot for a ticker: one latest bar, not a historical series. For bars over a date range, use Historical bars (Supreme plan).
Available on every plan. Free-plan requests are limited to the
Free ticker list;
paid plans accept any symbol in the
supported format.
Send the fields as a form body, as the cURL examples do, or as JSON with a
Content-Type: application/json header.
Request body
-
tokenstring Required - Your API key.
-
tickerstring Required - The US equity symbol to look up. Input is uppercased before validation. 1-10 characters total. Free plan: a symbol from the Free ticker list. Paid plans: a letters/digits run, optionally followed by up to two more letters/digits runs, each separated by one of '.', '/' or '-' (e.g. BRK.B, ABC.CV.CL).
Response fields (inside data)
-
tickerstring Required - The requested symbol, uppercased.
-
daily_open_pricenumber Required - Open price of the latest daily bar, in USD, rounded to 2 decimal places.
-
daily_high_pricenumber Required - High price of the bar.
-
daily_low_pricenumber Required - Low price of the bar.
-
daily_close_pricenumber Required - Close price of the bar.
-
daily_volumenumber Required - Volume traded during the bar, as reported by the upstream feed.
-
daily_volume_weighted_pricenumber Required - Volume-weighted average price (VWAP) over the bar.
-
quote_timestampstring Required - UTC timestamp of the source bar (marks the start of the bar).
Errors: 401, 403, 422, 429 and 503
all apply here: a temporary 422
or 503 on a cold ticker is
recoverable, not proof the symbol is invalid.
Request
cURL
export OKAMI_API_TOKEN='YOUR_API_TOKEN'
curl https://okamistocks.io/api/v1/quote/daily \
-d token="$OKAMI_API_TOKEN" \
-d ticker=SPY
Python
import os
import requests
response = requests.post(
"https://okamistocks.io/api/v1/quote/daily",
headers={"Accept": "application/json"},
json={"token": os.environ["OKAMI_API_TOKEN"], "ticker": "SPY"},
timeout=30,
)
print(response.status_code)
print(response.json())
response.raise_for_status()
Node.js
const token = process.env.OKAMI_API_TOKEN;
if (!token) throw new Error('Set OKAMI_API_TOKEN before running this example.');
const response = await fetch('https://okamistocks.io/api/v1/quote/daily', {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({ token, ticker: 'SPY' }),
signal: AbortSignal.timeout(30000),
});
const body = await response.json();
console.log(response.status, body);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
Response Example ยท HTTP 200
HTTP 200
{
"data": {
"ticker": "SPY",
"daily_open_price": 641.32,
"daily_high_price": 646.4,
"daily_low_price": 640.88,
"daily_close_price": 645.9,
"daily_volume": 61254120,
"daily_volume_weighted_price": 644.17,
"quote_timestamp": "2026-09-11T04:00:00Z"
}
}
HTTP 422
{
"message": "Error fetching ticker data. Please check that the ticker symbol is valid. Some ticker data is unavailable after market hours.",
"errors": {
"ticker": [
"Error fetching ticker data. Please check that the ticker symbol is valid. Some ticker data is unavailable after market hours."
]
}
}
HTTP 503
{
"message": "Quote data is warming up right now. Please try again in a few seconds."
}
Build a request
Set OKAMI_API_TOKEN in your own shell: this builder never asks for your key and sends nothing anywhere.
Real-time quotes, batch
Standard & Supreme/api/v1/quote/real-time/batch
Returns the latest bid/ask quote for up to 5 tickers in one call, each with its own status -- the batch variant of the real-time quote endpoint above.
Standard and Supreme plans only -- the Free plan receives a
403
naming the required plans. There is no per-ticker whitelist: every ticker failing the
supported format
comes back as not_permitted
instead of failing the whole request.
Send the fields as a form body, as the cURL examples do, or as JSON with a
Content-Type: application/json header.
Request body
-
tokenstring Required - Your API key.
-
tickersarray of strings Required - The tickers to look up, in any order. Values are uppercased before validation. 1-5 distinct tickers after uppercasing; each 1-10 characters.
Response fields (inside each data item)
-
tickerstring Required - The requested symbol, uppercased.
-
statusstring Required - One of ok, not_permitted, not_found, stale, pending, error. See the status table below.
-
quoteobject or null Required - Present only when status is ok -- the exact fields of the single-symbol endpoint's own response (see #realtime-response-fields above).
-
messagestring or null Required - Null when status is ok; otherwise a human-readable explanation of that status.
Per-ticker status values
| Status | Meaning |
|---|---|
| ok | A fresh quote was found; see quote. |
| not_permitted | You do not have access to this ticker or this ticker is invalid. |
| not_found | No quote data is currently available for this ticker. This does not by itself mean the ticker is invalid: data can be missing outside market hours or for thinly traded symbols. Retry later. |
| stale | Quote data is stale. The data pipeline may be delayed; please try again shortly. |
| pending | Quote data for this ticker is not available yet. It has been requested from the data feed; retry shortly. Retry that ticker shortly. |
| error | The stored data for this ticker is malformed. Only this item is affected -- the rest of the batch is unaffected. |
Tickers are looked up in the order you list them. If the request's time budget runs
out, the later ones come back as pending --
list the tickers you need most first.
A batch call always costs exactly one request against your plan quota, regardless of how many symbols it contains (up to the cap) -- see Batch requests.
Errors: 401, 403, 422 (malformed batch) and 429
all apply here -- capacity 503s don't,
because a ticker that can't be served within the request's own time budget comes back
as pending instead.
Request
cURL
export OKAMI_API_TOKEN='YOUR_API_TOKEN'
curl https://okamistocks.io/api/v1/quote/real-time/batch \
-d token="$OKAMI_API_TOKEN" \
-d 'tickers[]=SPY' \
-d 'tickers[]=QQQ' \
-d 'tickers[]=DIA'
Python
import os
import requests
response = requests.post(
"https://okamistocks.io/api/v1/quote/real-time/batch",
headers={"Accept": "application/json"},
json={"token": os.environ["OKAMI_API_TOKEN"], "tickers": ["SPY", "QQQ", "DIA"]},
timeout=30,
)
print(response.status_code)
print(response.json())
response.raise_for_status()
Node.js
const token = process.env.OKAMI_API_TOKEN;
if (!token) throw new Error('Set OKAMI_API_TOKEN before running this example.');
const response = await fetch('https://okamistocks.io/api/v1/quote/real-time/batch', {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({ token, tickers: ['SPY', 'QQQ', 'DIA'] }),
signal: AbortSignal.timeout(30000),
});
const body = await response.json();
console.log(response.status, body);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
Response Example ยท HTTP 200
HTTP 200
{
"data": [
{
"ticker": "SPY",
"status": "ok",
"quote": {
"ticker": "SPY",
"bid_price": 645.9,
"ask_price": 646,
"bid_size": 1,
"ask_size": 1,
"mid_price": 645.95,
"previous_close": 643.12,
"price_change": 2.83,
"percent_change": 0.44,
"daily_volume": 61254120,
"quote_timestamp": "2026-09-11T19:59:59.385930324Z"
},
"message": null
},
{
"ticker": "QQQ",
"status": "pending",
"quote": null,
"message": "Quote data for this ticker is not available yet. It has been requested from the data feed; retry shortly."
},
{
"ticker": "DIA",
"status": "pending",
"quote": null,
"message": "Quote data for this ticker is not available yet. It has been requested from the data feed; retry shortly."
}
]
}
HTTP 403
{
"message": "Batch requests need the Standard or Supreme plan."
}
HTTP 422
{
"message": "A batch request accepts at most 5 symbols.",
"errors": {
"tickers": [
"A batch request accepts at most 5 symbols."
]
}
}
Latest minute bars, batch
Standard & Supreme/api/v1/quote/minute/batch
Returns the latest one-minute OHLCV bar for up to 5 tickers in one call, each with its own status -- the batch variant of the minute bar endpoint above.
Standard and Supreme plans only -- the Free plan receives a
403
naming the required plans. There is no per-ticker whitelist: every ticker failing the
supported format
comes back as not_permitted
instead of failing the whole request.
Send the fields as a form body, as the cURL examples do, or as JSON with a
Content-Type: application/json header.
Request body
-
tokenstring Required - Your API key.
-
tickersarray of strings Required - The tickers to look up, in any order. Values are uppercased before validation. 1-5 distinct tickers after uppercasing; each 1-10 characters.
Response fields (inside each data item)
-
tickerstring Required - The requested symbol, uppercased.
-
statusstring Required - One of ok, not_permitted, not_found, stale, pending, error. See the status table below.
-
quoteobject or null Required - Present only when status is ok -- the exact fields of the single-symbol endpoint's own response (see #minute-response-fields above).
-
messagestring or null Required - Null when status is ok; otherwise a human-readable explanation of that status.
Per-ticker status values
| Status | Meaning |
|---|---|
| ok | A fresh quote was found; see quote. |
| not_permitted | You do not have access to this ticker or this ticker is invalid. |
| not_found | No quote data is currently available for this ticker. This does not by itself mean the ticker is invalid: data can be missing outside market hours or for thinly traded symbols. Retry later. |
| stale | Quote data is stale. The data pipeline may be delayed; please try again shortly. |
| pending | Quote data for this ticker is not available yet. It has been requested from the data feed; retry shortly. Retry that ticker shortly. |
| error | The stored data for this ticker is malformed. Only this item is affected -- the rest of the batch is unaffected. |
Tickers are looked up in the order you list them. If the request's time budget runs
out, the later ones come back as pending --
list the tickers you need most first.
A batch call always costs exactly one request against your plan quota, regardless of how many symbols it contains (up to the cap) -- see Batch requests.
Errors: 401, 403, 422 (malformed batch) and 429
all apply here -- capacity 503s don't,
because a ticker that can't be served within the request's own time budget comes back
as pending instead.
Request
cURL
export OKAMI_API_TOKEN='YOUR_API_TOKEN'
curl https://okamistocks.io/api/v1/quote/minute/batch \
-d token="$OKAMI_API_TOKEN" \
-d 'tickers[]=SPY' \
-d 'tickers[]=QQQ' \
-d 'tickers[]=DIA'
Python
import os
import requests
response = requests.post(
"https://okamistocks.io/api/v1/quote/minute/batch",
headers={"Accept": "application/json"},
json={"token": os.environ["OKAMI_API_TOKEN"], "tickers": ["SPY", "QQQ", "DIA"]},
timeout=30,
)
print(response.status_code)
print(response.json())
response.raise_for_status()
Node.js
const token = process.env.OKAMI_API_TOKEN;
if (!token) throw new Error('Set OKAMI_API_TOKEN before running this example.');
const response = await fetch('https://okamistocks.io/api/v1/quote/minute/batch', {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({ token, tickers: ['SPY', 'QQQ', 'DIA'] }),
signal: AbortSignal.timeout(30000),
});
const body = await response.json();
console.log(response.status, body);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
Response Example ยท HTTP 200
HTTP 200
{
"data": [
{
"ticker": "SPY",
"status": "ok",
"quote": {
"ticker": "SPY",
"minute_open_price": 645.72,
"minute_high_price": 646.05,
"minute_low_price": 645.61,
"minute_close_price": 645.9,
"minute_volume": 129312,
"minute_volume_weighted_price": 645.84,
"quote_timestamp": "2026-09-11T19:59:00Z"
},
"message": null
},
{
"ticker": "QQQ",
"status": "pending",
"quote": null,
"message": "Quote data for this ticker is not available yet. It has been requested from the data feed; retry shortly."
},
{
"ticker": "DIA",
"status": "pending",
"quote": null,
"message": "Quote data for this ticker is not available yet. It has been requested from the data feed; retry shortly."
}
]
}
HTTP 403
{
"message": "Batch requests need the Standard or Supreme plan."
}
HTTP 422
{
"message": "A batch request accepts at most 5 symbols.",
"errors": {
"tickers": [
"A batch request accepts at most 5 symbols."
]
}
}
Latest daily bars, batch
Standard & Supreme/api/v1/quote/daily/batch
Returns the latest daily OHLCV bar for up to 5 tickers in one call, each with its own status -- the batch variant of the daily bar endpoint above, not a historical series.
Standard and Supreme plans only -- the Free plan receives a
403
naming the required plans. There is no per-ticker whitelist: every ticker failing the
supported format
comes back as not_permitted
instead of failing the whole request.
Send the fields as a form body, as the cURL examples do, or as JSON with a
Content-Type: application/json header.
Request body
-
tokenstring Required - Your API key.
-
tickersarray of strings Required - The tickers to look up, in any order. Values are uppercased before validation. 1-5 distinct tickers after uppercasing; each 1-10 characters.
Response fields (inside each data item)
-
tickerstring Required - The requested symbol, uppercased.
-
statusstring Required - One of ok, not_permitted, not_found, stale, pending, error. See the status table below.
-
quoteobject or null Required - Present only when status is ok -- the exact fields of the single-symbol endpoint's own response (see #daily-response-fields above).
-
messagestring or null Required - Null when status is ok; otherwise a human-readable explanation of that status.
Per-ticker status values
| Status | Meaning |
|---|---|
| ok | A fresh quote was found; see quote. |
| not_permitted | You do not have access to this ticker or this ticker is invalid. |
| not_found | No quote data is currently available for this ticker. This does not by itself mean the ticker is invalid: data can be missing outside market hours or for thinly traded symbols. Retry later. |
| stale | Quote data is stale. The data pipeline may be delayed; please try again shortly. |
| pending | Quote data for this ticker is not available yet. It has been requested from the data feed; retry shortly. Retry that ticker shortly. |
| error | The stored data for this ticker is malformed. Only this item is affected -- the rest of the batch is unaffected. |
Tickers are looked up in the order you list them. If the request's time budget runs
out, the later ones come back as pending --
list the tickers you need most first.
A batch call always costs exactly one request against your plan quota, regardless of how many symbols it contains (up to the cap) -- see Batch requests.
Errors: 401, 403, 422 (malformed batch) and 429
all apply here -- capacity 503s don't,
because a ticker that can't be served within the request's own time budget comes back
as pending instead.
Request
cURL
export OKAMI_API_TOKEN='YOUR_API_TOKEN'
curl https://okamistocks.io/api/v1/quote/daily/batch \
-d token="$OKAMI_API_TOKEN" \
-d 'tickers[]=SPY' \
-d 'tickers[]=QQQ' \
-d 'tickers[]=DIA'
Python
import os
import requests
response = requests.post(
"https://okamistocks.io/api/v1/quote/daily/batch",
headers={"Accept": "application/json"},
json={"token": os.environ["OKAMI_API_TOKEN"], "tickers": ["SPY", "QQQ", "DIA"]},
timeout=30,
)
print(response.status_code)
print(response.json())
response.raise_for_status()
Node.js
const token = process.env.OKAMI_API_TOKEN;
if (!token) throw new Error('Set OKAMI_API_TOKEN before running this example.');
const response = await fetch('https://okamistocks.io/api/v1/quote/daily/batch', {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({ token, tickers: ['SPY', 'QQQ', 'DIA'] }),
signal: AbortSignal.timeout(30000),
});
const body = await response.json();
console.log(response.status, body);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
Response Example ยท HTTP 200
HTTP 200
{
"data": [
{
"ticker": "SPY",
"status": "ok",
"quote": {
"ticker": "SPY",
"daily_open_price": 641.32,
"daily_high_price": 646.4,
"daily_low_price": 640.88,
"daily_close_price": 645.9,
"daily_volume": 61254120,
"daily_volume_weighted_price": 644.17,
"quote_timestamp": "2026-09-11T04:00:00Z"
},
"message": null
},
{
"ticker": "QQQ",
"status": "pending",
"quote": null,
"message": "Quote data for this ticker is not available yet. It has been requested from the data feed; retry shortly."
},
{
"ticker": "DIA",
"status": "pending",
"quote": null,
"message": "Quote data for this ticker is not available yet. It has been requested from the data feed; retry shortly."
}
]
}
HTTP 403
{
"message": "Batch requests need the Standard or Supreme plan."
}
HTTP 422
{
"message": "A batch request accepts at most 5 symbols.",
"errors": {
"tickers": [
"A batch request accepts at most 5 symbols."
]
}
}
52-week range and average volume
Standard & Supreme/api/v1/quote/range-stats
Returns a ticker's 52-week high and low with the day each was set, its latest close and how far that close is from each, and its average daily volume over the last 10 and 50 trading days. The numbers cover the 52 weeks up to yesterday, New York time, so today's trading never counts, and the window moves forward once a day, at midnight New York time.
Requires the Standard or Supreme plan: the Free plan receives a
403
naming the plans. Each call counts as one request against your rate limit.
Request body
-
tokenstring Required - Your API key.
-
tickerstring Required - The US equity symbol. Input is uppercased before validation. 1-10 characters total: a letters/digits run, optionally followed by up to two more letters/digits runs, each separated by one of '.', '/' or '-' (e.g. BRK.B, ABC.CV.CL).
-
adjustmentstring Optional - How the daily bars are adjusted before anything is computed: raw (none), split (prices and volume adjusted for stock splits), dividend (prices adjusted for cash dividends), or all (splits, cash dividends and spin-offs). Defaults to split when omitted. One of raw, split, dividend, all (case-sensitive).
Response fields (inside data)
-
tickerstring Required - The requested symbol, uppercased.
-
adjustmentstring Required - The adjustment the prices and volumes reflect.
-
startstring Required - First day of the 52-week window, YYYY-MM-DD.
-
endstring Required - Last day of the window: the day before your request, New York time, YYYY-MM-DD.
-
as_ofstring or null Required - The last trading day counted, YYYY-MM-DD. Null when the window has no trading days for this ticker.
-
sessions_coveredinteger Required - How many trading days the window holds for this ticker: about 250 for a full year, fewer for a recent listing, 0 when there is no trading data.
-
high_52wnumber or null Required - Highest daily high in the window, USD, rounded to 2 decimal places.
-
high_52w_datestring or null Required - The trading day of that high, YYYY-MM-DD (the latest one if several days tie).
-
low_52wnumber or null Required - Lowest daily low in the window, USD, rounded to 2 decimal places.
-
low_52w_datestring or null Required - The trading day of that low, YYYY-MM-DD (the latest one if several days tie).
-
close_pricenumber or null Required - The closing price on as_of, rounded to 2 decimal places.
-
percent_from_high_52wnumber or null Required - How far close_price is from high_52w, as a percent of high_52w: zero or negative, 2 decimal places.
-
percent_from_low_52wnumber or null Required - How far close_price is from low_52w, as a percent of low_52w: zero or positive, 2 decimal places.
-
average_volume_10dinteger or null Required - Average daily volume over the last 10 trading days, in shares, rounded to a whole share. Null until there are 10.
-
average_volume_50dinteger or null Required - Average daily volume over the last 50 trading days, in shares, rounded to a whole share. Null until there are 50.
Errors: 401, 403, 422, 429 and 503.
A data 422 (“Error fetching data…”)
or a 503 (“Historical data is busy…”, with a
Retry-After header) comes only from a request that has to fetch the
ticker's year of daily bars because no result for that ticker and adjustment is stored yet that day. A failed request is
never stored, so a retry fetches again.
How the window, the highs and lows, the averages and the adjustment are defined: 52-week range and average volume.
Request
cURL
export OKAMI_API_TOKEN='YOUR_API_TOKEN'
curl https://okamistocks.io/api/v1/quote/range-stats \
-d token="$OKAMI_API_TOKEN" \
-d ticker=SPY \
-d adjustment=split
Python
import os
import requests
response = requests.post(
"https://okamistocks.io/api/v1/quote/range-stats",
headers={"Accept": "application/json"},
json={"token": os.environ["OKAMI_API_TOKEN"], "ticker": "SPY", "adjustment": "split"},
timeout=30,
)
print(response.status_code)
print(response.json())
response.raise_for_status()
Node.js
const token = process.env.OKAMI_API_TOKEN;
if (!token) throw new Error('Set OKAMI_API_TOKEN before running this example.');
const response = await fetch('https://okamistocks.io/api/v1/quote/range-stats', {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({ token, ticker: 'SPY', adjustment: 'split' }),
signal: AbortSignal.timeout(30000),
});
const body = await response.json();
console.log(response.status, body);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
Response Example ยท HTTP 200
HTTP 200
{
"data": {
"ticker": "SPY",
"adjustment": "split",
"start": "2025-10-31",
"end": "2026-10-29",
"as_of": "2026-10-29",
"sessions_covered": 250,
"high_52w": 689.7,
"high_52w_date": "2026-10-27",
"low_52w": 548.2,
"low_52w_date": "2025-11-20",
"close_price": 684.95,
"percent_from_high_52w": -0.69,
"percent_from_low_52w": 24.95,
"average_volume_10d": 58431207,
"average_volume_50d": 64118950
}
}
HTTP 403
{
"message": "52-week range statistics need the Standard or Supreme plan."
}
HTTP 422
{
"message": "This ticker is invalid.",
"errors": {
"ticker": [
"This ticker is invalid."
]
}
}
HTTP 503
{
"message": "Historical data is busy right now. Please try again in a few seconds."
}
Build a request
Set OKAMI_API_TOKEN in your own shell: this builder never asks for your key and sends nothing anywhere.
Top movers
Standard & Supreme/api/v1/quote/top-movers
Returns the US stocks with the largest percent gain and the largest percent loss since the previous close, as two ranked lists.
During the trading day the lists follow the current session; before the 9:30 a.m. New York open they still show the
previous trading session's movers, so check as_of. Each list comes from the 50 biggest movers on its
side. The API keeps a fetched list for up to a minute, and as_of says when it was computed.
Requires the Standard or Supreme plan: the Free plan receives a
403
naming the plans. Each call counts as one request against your rate limit.
Request body
-
tokenstring Required - Your API key.
-
limitinteger Optional - The most rows in each list. Defaults to 20. A whole number from 1 to 50.
-
min_pricenumber Optional - Leave out stocks whose last price, before rounding, is below this, in USD. It filters the 50 biggest movers on each side, so a list can come back shorter than limit. Omit for no filter. From 0 to 1,000,000; decimals allowed.
Response fields (inside data)
-
asset_classstring Required - stock.
-
as_ofstring Required - When our data provider last computed the lists: an RFC 3339 timestamp in UTC, ending in Z, with up to nanosecond precision.
-
limitinteger Required - The most rows each list holds: your limit, or 20.
-
min_pricenumber or null Required - The price filter applied, or null.
-
gainersarray Required - Largest percent_change first; only stocks that are up.
-
losersarray Required - Most negative percent_change first; only stocks that are down.
-
tickerstring Required - Each row: the stock symbol.
-
last_pricenumber Required - Each row: the last price, USD, rounded to 2 decimal places.
-
price_changenumber Required - Each row: the change since the previous close, USD, rounded to 2 decimal places.
-
percent_changenumber Required - Each row: that change as a percent of the previous close, rounded to 2 decimal places.
Errors: 401, 403, 422, 429 and 503.
A data 422 (“Error fetching data…”, under
errors.asset_class) or a busy 503
(“Historical data is busy…”, with a Retry-After header)
comes only from a request that has to fetch a fresh list; a failed fetch is never stored, so a retry fetches again.
Any request, one served from the stored list too, can also get a 503
(“Quote data is temporarily unavailable…”, with a Retry-After header)
while our data store is briefly unreachable; retry after the header's delay.
How the lists are built: Market movers and most active.
Request
cURL
export OKAMI_API_TOKEN='YOUR_API_TOKEN'
curl https://okamistocks.io/api/v1/quote/top-movers \
-d token="$OKAMI_API_TOKEN" \
-d limit=2 \
-d min_price=5
Python
import os
import requests
response = requests.post(
"https://okamistocks.io/api/v1/quote/top-movers",
headers={"Accept": "application/json"},
json={"token": os.environ["OKAMI_API_TOKEN"], "limit": "2", "min_price": "5"},
timeout=30,
)
print(response.status_code)
print(response.json())
response.raise_for_status()
Node.js
const token = process.env.OKAMI_API_TOKEN;
if (!token) throw new Error('Set OKAMI_API_TOKEN before running this example.');
const response = await fetch('https://okamistocks.io/api/v1/quote/top-movers', {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({ token, limit: '2', min_price: '5' }),
signal: AbortSignal.timeout(30000),
});
const body = await response.json();
console.log(response.status, body);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
Response Example ยท HTTP 200
HTTP 200
{
"data": {
"asset_class": "stock",
"as_of": "2026-11-02T20:59:58.312409541Z",
"limit": 2,
"min_price": 5,
"gainers": [
{
"ticker": "SMCI",
"last_price": 41.27,
"price_change": 4.98,
"percent_change": 13.72
},
{
"ticker": "TSLA",
"last_price": 251.44,
"price_change": 13.9,
"percent_change": 5.85
}
],
"losers": [
{
"ticker": "ENPH",
"last_price": 61.03,
"price_change": -9.51,
"percent_change": -13.48
},
{
"ticker": "PYPL",
"last_price": 71.2,
"price_change": -5.02,
"percent_change": -6.59
}
]
}
}
HTTP 403
{
"message": "Market movers and most-active rankings need the Standard or Supreme plan."
}
HTTP 422
{
"message": "The limit field must be between 1 and 50.",
"errors": {
"limit": [
"The limit field must be between 1 and 50."
]
}
}
HTTP 503
{
"message": "Historical data is busy right now. Please try again in a few seconds."
}
Most active stocks
Standard & Supreme/api/v1/quote/most-active
Returns the US stocks with the highest trading volume, or the most trades, so far in the current trading day, highest first.
Rows carry no price: get quotes for the tickers you show with the real-time batch endpoint. The API keeps a fetched
ranking for up to a minute, and as_of says when it was computed.
Requires the Standard or Supreme plan: the Free plan receives a
403
naming the plans. Each call counts as one request against your rate limit.
Request body
-
tokenstring Required - Your API key.
-
limitinteger Optional - The most rows in the list. Defaults to 20. A whole number from 1 to 100.
-
rank_bystring Optional - What the list is ranked by: volume (shares traded) or trade_count (number of trades). Defaults to volume. One of volume, trade_count (case-sensitive).
Response fields (inside data)
-
asset_classstring Required - Always stock.
-
rank_bystring Required - The metric the list is ranked by.
-
as_ofstring Required - When our data provider last computed the lists: an RFC 3339 timestamp in UTC, ending in Z, with up to nanosecond precision.
-
limitinteger Required - The most rows the list holds: your limit, or 20.
-
most_activearray Required - Highest first.
-
tickerstring Required - Each row: the stock symbol.
-
daily_volumeinteger Required - Each row: shares traded so far in the current trading day.
-
daily_trade_countinteger Required - Each row: trades so far in the current trading day.
Errors: 401, 403, 422, 429 and 503.
A data 422 (“Error fetching data…”, under
errors.asset_class) or a busy 503
(“Historical data is busy…”, with a Retry-After header)
comes only from a request that has to fetch a fresh list; a failed fetch is never stored, so a retry fetches again.
Any request, one served from the stored list too, can also get a 503
(“Quote data is temporarily unavailable…”, with a Retry-After header)
while our data store is briefly unreachable; retry after the header's delay.
How the lists are built: Market movers and most active.
Request
cURL
export OKAMI_API_TOKEN='YOUR_API_TOKEN'
curl https://okamistocks.io/api/v1/quote/most-active \
-d token="$OKAMI_API_TOKEN" \
-d rank_by=volume \
-d limit=2
Python
import os
import requests
response = requests.post(
"https://okamistocks.io/api/v1/quote/most-active",
headers={"Accept": "application/json"},
json={"token": os.environ["OKAMI_API_TOKEN"], "rank_by": "volume", "limit": "2"},
timeout=30,
)
print(response.status_code)
print(response.json())
response.raise_for_status()
Node.js
const token = process.env.OKAMI_API_TOKEN;
if (!token) throw new Error('Set OKAMI_API_TOKEN before running this example.');
const response = await fetch('https://okamistocks.io/api/v1/quote/most-active', {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({ token, rank_by: 'volume', limit: '2' }),
signal: AbortSignal.timeout(30000),
});
const body = await response.json();
console.log(response.status, body);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
Response Example ยท HTTP 200
HTTP 200
{
"data": {
"asset_class": "stock",
"rank_by": "volume",
"as_of": "2026-11-02T20:59:58.312409541Z",
"limit": 2,
"most_active": [
{
"ticker": "NVDA",
"daily_volume": 183522146,
"daily_trade_count": 1650225
},
{
"ticker": "TSLA",
"daily_volume": 96118022,
"daily_trade_count": 1402871
}
]
}
}
HTTP 403
{
"message": "Market movers and most-active rankings need the Standard or Supreme plan."
}
HTTP 422
{
"message": "The limit field must be between 1 and 100.",
"errors": {
"limit": [
"The limit field must be between 1 and 100."
]
}
}
HTTP 503
{
"message": "Historical data is busy right now. Please try again in a few seconds."
}
Market status
All plans/api/v1/quote/market-status
Whether the US stock market is open right now, which session it is in and when that session ends, from the New York Stock Exchange (NYSE) calendar. Works on every plan.
Session times come from the exchange calendar in each response; read them from there. On a typical full trading day they are 4:00 to 9:30 a.m. (pre-market), 9:30 a.m. to 4:00 p.m. (regular) and 4:00 to 8:00 p.m. (after hours), New York time, and a half day's regular session closes at 1:00 p.m. Extended-hours times can differ by day. All times are UTC: 9:30 a.m. New York is 14:30 UTC in winter and 13:30 UTC in summer.
Overnight trading sessions are not included. This is the scheduled calendar (holidays, half days and session times), not live trading halts. It is refreshed every hour, so a published change normally appears within about an hour; if a refresh fails, the last stored calendar is served for up to a day, and after that this endpoint answers 503 until a refresh succeeds.
Request body
-
tokenstring Required - Your API key. No other field.
Response fields (inside data)
-
marketstring Required - Always NYSE.
-
as_ofstring Required - The instant the status is for, in UTC, whole seconds, ending in Z.
-
market_datestring Required - The New York date at as_of, YYYY-MM-DD.
-
is_trading_dayboolean Required - Whether the market trades on market_date.
-
is_market_openboolean Required - True only during the regular session.
-
sessionstring Required - closed, pre_market, regular, after_hours or unknown. unknown: the calendar has no pre-market or after-hours times for that part of the day, so whether an extended session is running isn't known.
-
session_ends_atstring Required - When the current session ends, or when closed, when the next session of any kind starts (UTC).
-
early_closeboolean Required - Whether today is a trading day whose regular session closes early (a half day).
-
next_regular_openstring Required - The next regular-session open after as_of (UTC), today's included.
-
next_regular_closestring Required - The next regular-session close after as_of (UTC), today's included.
Errors: 401, 403, 429 and 503.
A 503 with “The market calendar is temporarily unavailable…” and a
Retry-After header means the calendar year the request needs isn't stored yet.
Any request can also get a 503 (“Quote data is temporarily unavailable…”, with a
Retry-After header) while our data store is briefly unreachable; retry after the header's delay.
Each call counts as one request against your rate limit, a 503 included.
In an AI assistant: the stock_market_status tool (MCP).
More: Market hours.
Request
cURL
export OKAMI_API_TOKEN='YOUR_API_TOKEN'
curl https://okamistocks.io/api/v1/quote/market-status \
-d token="$OKAMI_API_TOKEN"
Python
import os
import requests
response = requests.post(
"https://okamistocks.io/api/v1/quote/market-status",
headers={"Accept": "application/json"},
json={"token": os.environ["OKAMI_API_TOKEN"]},
timeout=30,
)
print(response.status_code)
print(response.json())
response.raise_for_status()
Node.js
const token = process.env.OKAMI_API_TOKEN;
if (!token) throw new Error('Set OKAMI_API_TOKEN before running this example.');
const response = await fetch('https://okamistocks.io/api/v1/quote/market-status', {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({ token }),
signal: AbortSignal.timeout(30000),
});
const body = await response.json();
console.log(response.status, body);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
Response Example ยท HTTP 200
HTTP 200
{
"data": {
"market": "NYSE",
"as_of": "2026-11-26T15:00:00Z",
"market_date": "2026-11-26",
"is_trading_day": false,
"is_market_open": false,
"session": "closed",
"session_ends_at": "2026-11-27T09:00:00Z",
"early_close": false,
"next_regular_open": "2026-11-27T14:30:00Z",
"next_regular_close": "2026-11-27T18:00:00Z"
}
}
HTTP 503
{
"message": "The market calendar is temporarily unavailable. Please try again in a few minutes."
}
Trading days
All plans/api/v1/quote/trading-days
The NYSE's trading days for a date range, each with its pre-market, regular and after-hours times and whether it closes early, plus the weekdays the market is closed. Works on every plan.
A session's two times are both null when the calendar has none for that day: not known, not closed. Extended hours, half days included, are whatever the exchange calendar publishes. Overnight trading sessions are not included.
Request body
-
tokenstring Required - Your API key.
-
startstring Optional - First day, a New York date. Defaults to today. YYYY-MM-DD, from January 1 of last year to December 31 of next year.
-
endstring Optional - Last day, a New York date. Defaults to 30 days after start (or December 31 of next year if sooner). YYYY-MM-DD, on or after start and at most 366 days after it, in the same window.
Response fields (inside data)
-
marketstring Required - Always NYSE.
-
startstring Required - The first day applied.
-
endstring Required - The last day applied.
-
trading_daysarray Required - Each trading day in the range, earliest first.
-
datestring Required - Each day: the New York date.
-
pre_market_open, pre_market_closestring or null Required - Each day: the pre-market session (UTC), or both null when not known.
-
regular_open, regular_closestring Required - Each day: the regular session (UTC).
-
after_hours_open, after_hours_closestring or null Required - Each day: the after-hours session (UTC), or both null when not known.
-
early_closeboolean Required - Each day: whether the regular session closes early.
-
closed_weekdaysarray Required - The weekdays in the range the market is closed: exchange holidays and any other full-day closure; holiday names aren't included.
Errors: 401, 403, 422, 429 and 503.
A 422 names the field under errors.start or errors.end.
The calendar 503 is the same as on market status: if any year in the range isn't stored, the whole request fails.
Each call counts as one request against your rate limit, a 503 included.
In an AI assistant: the stock_trading_days tool (MCP); ask for up to about six months per call.
Request
cURL
export OKAMI_API_TOKEN='YOUR_API_TOKEN'
curl https://okamistocks.io/api/v1/quote/trading-days \
-d token="$OKAMI_API_TOKEN" \
-d start=2026-11-25 \
-d end=2026-11-27
Python
import os
import requests
response = requests.post(
"https://okamistocks.io/api/v1/quote/trading-days",
headers={"Accept": "application/json"},
json={"token": os.environ["OKAMI_API_TOKEN"], "start": "2026-11-25", "end": "2026-11-27"},
timeout=30,
)
print(response.status_code)
print(response.json())
response.raise_for_status()
Node.js
const token = process.env.OKAMI_API_TOKEN;
if (!token) throw new Error('Set OKAMI_API_TOKEN before running this example.');
const response = await fetch('https://okamistocks.io/api/v1/quote/trading-days', {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({ token, start: '2026-11-25', end: '2026-11-27' }),
signal: AbortSignal.timeout(30000),
});
const body = await response.json();
console.log(response.status, body);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
Response Example ยท HTTP 200
HTTP 200
{
"data": {
"market": "NYSE",
"start": "2026-11-25",
"end": "2026-11-27",
"trading_days": [
{
"date": "2026-11-25",
"pre_market_open": "2026-11-25T09:00:00Z",
"pre_market_close": "2026-11-25T14:30:00Z",
"regular_open": "2026-11-25T14:30:00Z",
"regular_close": "2026-11-25T21:00:00Z",
"after_hours_open": "2026-11-25T21:00:00Z",
"after_hours_close": "2026-11-26T01:00:00Z",
"early_close": false
},
{
"date": "2026-11-27",
"pre_market_open": "2026-11-27T09:00:00Z",
"pre_market_close": "2026-11-27T14:30:00Z",
"regular_open": "2026-11-27T14:30:00Z",
"regular_close": "2026-11-27T18:00:00Z",
"after_hours_open": "2026-11-27T18:00:00Z",
"after_hours_close": "2026-11-27T22:00:00Z",
"early_close": true
}
],
"closed_weekdays": [
"2026-11-26"
]
}
}
HTTP 422
{
"message": "The end field must be a date on or after the start date.",
"errors": {
"end": [
"The end field must be a date on or after the start date."
]
}
}
HTTP 503
{
"message": "The market calendar is temporarily unavailable. Please try again in a few minutes."
}
Historical bars
Supreme plan/api/v1/quote/historical
Returns OHLCV bars for a ticker over a date range: daily by default, or intraday with
timeframe.
This is the series behind a backtest, with an explicit price-adjustment option.
Requires the Supreme plan: other plans receive a
403
naming the required plan. The examples send
adjustment
explicitly rather than relying on a default.
Request body
-
tokenstring Required - Your API key.
-
tickerstring Required - The US equity symbol. Input is uppercased before validation. 1-10 characters total: a letters/digits run, optionally followed by up to two more letters/digits runs, each separated by one of '.', '/' or '-' (e.g. BRK.B, ABC.CV.CL).
-
startstring Required - First day of the range. YYYY-MM-DD.
-
endstring Required - Last day of the range. YYYY-MM-DD, same day as start or later.
-
adjustmentstring Optional - How the bars are adjusted for corporate actions: raw (none), split (prices and volume adjusted for stock splits), dividend (prices adjusted for cash dividends), or all (splits, cash dividends and spin-offs). One of raw, split, dividend, all. Send it explicitly: the sample uses all.
-
timeframestring Optional - Bar size. Defaults to 1Day when omitted. One of 1Min, 5Min, 15Min, 1Hour, 1Day (case-sensitive). Intraday timeframes limit the range from start to end to at most 7 days for 1Min, 30 days for 5Min, 90 days for 15Min, 365 days for 1Hour.
-
formatstring Optional - Response format. Defaults to json when omitted. json or csv (case-sensitive). csv returns the bars as a CSV file instead of JSON; errors stay JSON.
Response fields (inside data)
-
tickerstring Required - The requested symbol, uppercased.
-
timeframestring Required - The bar size of the returned bars: the requested timeframe, or 1Day when omitted.
-
adjustmentstring Required - The adjustment the bars reflect.
-
startstring Required - The requested range start.
-
endstring Required - The requested range end.
-
barsarray Required - One object per bar (one per trading day for 1Day), each with ticker, open_price, high_price, low_price, close_price, volume, volume_weighted and timestamp (UTC, marks the start of the bar). Prices are USD, rounded to 2 decimal places.
Errors: 401, 403, 422, 429 and 503.
A 503 here means historical data is
temporarily at capacity: the body says “Historical data is busy…”, and the
Retry-After header tells you how
many seconds to wait before retrying.
CSV output: send "format": "csv"
to get the bars as a CSV file instead of JSON, with a header row and one row per bar. See
CSV output
for the columns and how errors work.
Request
cURL
export OKAMI_API_TOKEN='YOUR_API_TOKEN'
curl https://okamistocks.io/api/v1/quote/historical \
-d token="$OKAMI_API_TOKEN" \
-d ticker=SPY \
-d start=2024-01-02 \
-d end=2024-01-04 \
-d adjustment=all
Python
import os
import requests
response = requests.post(
"https://okamistocks.io/api/v1/quote/historical",
headers={"Accept": "application/json"},
json={"token": os.environ["OKAMI_API_TOKEN"], "ticker": "SPY", "start": "2024-01-02", "end": "2024-01-04", "adjustment": "all"},
timeout=30,
)
print(response.status_code)
print(response.json())
response.raise_for_status()
Node.js
const token = process.env.OKAMI_API_TOKEN;
if (!token) throw new Error('Set OKAMI_API_TOKEN before running this example.');
const response = await fetch('https://okamistocks.io/api/v1/quote/historical', {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({ token, ticker: 'SPY', start: '2024-01-02', end: '2024-01-04', adjustment: 'all' }),
signal: AbortSignal.timeout(30000),
});
const body = await response.json();
console.log(response.status, body);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
Response Example ยท HTTP 200
HTTP 200
{
"data": {
"ticker": "SPY",
"timeframe": "1Day",
"adjustment": "all",
"start": "2024-01-02",
"end": "2024-01-04",
"bars": [
{
"ticker": "SPY",
"open_price": 472.16,
"high_price": 473.67,
"low_price": 470.49,
"close_price": 472.65,
"volume": 123007193,
"volume_weighted": 472.08,
"timestamp": "2024-01-02T05:00:00Z"
},
{
"ticker": "SPY",
"open_price": 470.43,
"high_price": 471.19,
"low_price": 468.17,
"close_price": 468.79,
"volume": 102538854,
"volume_weighted": 469.63,
"timestamp": "2024-01-03T05:00:00Z"
}
]
}
}
HTTP 403
{
"message": "Historical data requires a Supreme subscription."
}
HTTP 422
{
"message": "The end field must be a date after or equal to start.",
"errors": {
"end": [
"The end field must be a date after or equal to start."
]
}
}
HTTP 503
{
"message": "Historical data is busy right now. Please try again in a few seconds."
}
CSV request
cURL
export OKAMI_API_TOKEN='YOUR_API_TOKEN'
csv_file='okamistocks-historical-bars_SPY_2024-01-02_to_2024-01-04.csv'
if [ -d "$csv_file" ] || ! tmp_file="$(mktemp "${csv_file}.XXXXXX")"; then
echo "Could not write $csv_file, nothing saved." >&2
false
elif http_code="$(curl --silent --show-error https://okamistocks.io/api/v1/quote/historical \
-d token="$OKAMI_API_TOKEN" \
-d ticker=SPY \
-d start=2024-01-02 \
-d end=2024-01-04 \
-d adjustment=all \
-d format=csv \
--output "$tmp_file" \
--write-out '%{http_code}')" && [ "$http_code" = '200' ]; then
if mv "$tmp_file" "$csv_file"; then
echo "Saved $csv_file"
else
rm -f "$tmp_file"
echo "Could not write $csv_file, nothing saved." >&2
false
fi
else
echo "Request failed (HTTP ${http_code:-none}), nothing saved:" >&2
cat "$tmp_file" >&2
echo >&2
rm -f "$tmp_file"
false
fi
Python
import os
import requests
response = requests.post(
"https://okamistocks.io/api/v1/quote/historical",
json={"token": os.environ["OKAMI_API_TOKEN"], "ticker": "SPY", "start": "2024-01-02", "end": "2024-01-04", "adjustment": "all", "format": "csv"},
timeout=30,
)
if response.status_code != 200:
raise SystemExit(f"Request failed (HTTP {response.status_code}), nothing saved: {response.text}")
with open("okamistocks-historical-bars_SPY_2024-01-02_to_2024-01-04.csv", "wb") as csv_file:
csv_file.write(response.content)
print("Saved okamistocks-historical-bars_SPY_2024-01-02_to_2024-01-04.csv")
Node.js
import { writeFile } from 'node:fs/promises';
const token = process.env.OKAMI_API_TOKEN;
if (!token) throw new Error('Set OKAMI_API_TOKEN before running this example.');
const response = await fetch('https://okamistocks.io/api/v1/quote/historical', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ token, ticker: 'SPY', start: '2024-01-02', end: '2024-01-04', adjustment: 'all', format: 'csv' }),
signal: AbortSignal.timeout(30000),
});
if (response.status !== 200) {
console.error(`Request failed (HTTP ${response.status}), nothing saved: ${await response.text()}`);
process.exitCode = 1;
} else {
await writeFile('okamistocks-historical-bars_SPY_2024-01-02_to_2024-01-04.csv', await response.text());
console.log('Saved okamistocks-historical-bars_SPY_2024-01-02_to_2024-01-04.csv');
}
CSV response Example ยท HTTP 200
timestamp,ticker,open_price,high_price,low_price,close_price,volume,volume_weighted
2024-01-02T05:00:00Z,SPY,472.16,473.67,470.49,472.65,123007193,472.08
2024-01-03T05:00:00Z,SPY,470.43,471.19,468.17,468.79,102538854,469.63
Build a request
YYYY-MM-DD
YYYY-MM-DD, same day or later
Intraday timeframes allow shorter date ranges; see the request body table.
Set OKAMI_API_TOKEN in your own shell: this builder never asks for your key and sends nothing anywhere.
Technical indicators
Supreme plan/api/v1/quote/indicators
Returns a daily series of one technical indicator for a ticker over a date range: a simple or exponential moving average, the relative strength index, or MACD. Rows come oldest first, one per trading day from start to end. Each day's value is computed from that day's bar and a fixed number of trading days before it, never from your start date, so for a ticker that traded through the five years before your start date a day has the same value whatever range you ask for. A recent listing, or a ticker with long stretches without trades, is the exception; How each indicator is computed explains it.
Requires the Supreme plan: other plans receive a
403
naming it. Each call counts as one request against your rate limit.
Request body
-
tokenstring Required - Your API key.
-
tickerstring Required - The US equity symbol. Input is uppercased before validation. 1-10 characters total: a letters/digits run, optionally followed by up to two more letters/digits runs, each separated by one of '.', '/' or '-' (e.g. BRK.B, ABC.CV.CL).
-
indicatorstring Required - The indicator: sma (simple moving average), ema (exponential moving average), rsi (relative strength index) or macd. One of sma, ema, rsi, macd (lowercase).
-
startstring Required - First day of the range. YYYY-MM-DD.
-
endstring Required - Last day of the range. YYYY-MM-DD, same day as start or later, at most 1825 days apart.
-
windowinteger Optional - Bars in the window. Required for sma and ema (2 to 200). For rsi, 2 to 100, default 14. Not used by macd. A whole number.
-
fast_windowinteger Optional - macd only: the fast EMA window. Defaults to 12. 2 to 99.
-
slow_windowinteger Optional - macd only: the slow EMA window. Defaults to 26. slow_window must be greater than fast_window. 3 to 100.
-
signal_windowinteger Optional - macd only: the signal line's EMA window. Defaults to 9. 2 to 50.
-
price_fieldstring Optional - The bar price the indicator is computed from. Defaults to close. One of close, open, high, low.
-
adjustmentstring Optional - How the daily bars are adjusted before anything is computed: raw (none), split (prices and volume adjusted for stock splits), dividend (prices adjusted for cash dividends), or all (splits, cash dividends and spin-offs). Defaults to split when omitted. One of raw, split, dividend, all (case-sensitive).
Response fields (inside data)
-
tickerstring Required - The requested symbol, uppercased.
-
indicatorstring Required - sma, ema, rsi or macd.
-
timeframestring Required - Always 1Day: the indicators are daily.
-
adjustmentstring Required - The adjustment applied to the bars.
-
price_fieldstring Required - The bar price the indicator was computed from.
-
windowinteger or null Required - The sma, ema or rsi window; null for macd.
-
fast_window, slow_window, signal_windowinteger or null Required - The macd windows; null for every other indicator.
-
startstring Required - The requested range start, YYYY-MM-DD.
-
endstring Required - The requested range end, YYYY-MM-DD.
-
valuesarray Required - Rows oldest first. Each has timestamp (the bar's start, UTC; daily bars start at midnight New York time) and value. MACD rows also have signal and histogram (value minus signal). Rounded to 4 decimal places.
Errors: 401, 403, 422, 429 and 503.
A data 422 (“Error fetching data…”)
or a 503 (“Historical data is busy…”, with a
Retry-After header) means the bars could not be fetched; a retry fetches again.
The formulas, the lookback and how bars are used: How each indicator is computed.
Request
cURL
export OKAMI_API_TOKEN='YOUR_API_TOKEN'
curl https://okamistocks.io/api/v1/quote/indicators \
-d token="$OKAMI_API_TOKEN" \
-d ticker=SPY \
-d indicator=rsi \
-d window=14 \
-d start=2024-01-02 \
-d end=2024-01-05
Python
import os
import requests
response = requests.post(
"https://okamistocks.io/api/v1/quote/indicators",
headers={"Accept": "application/json"},
json={"token": os.environ["OKAMI_API_TOKEN"], "ticker": "SPY", "indicator": "rsi", "window": "14", "start": "2024-01-02", "end": "2024-01-05"},
timeout=30,
)
print(response.status_code)
print(response.json())
response.raise_for_status()
Node.js
const token = process.env.OKAMI_API_TOKEN;
if (!token) throw new Error('Set OKAMI_API_TOKEN before running this example.');
const response = await fetch('https://okamistocks.io/api/v1/quote/indicators', {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({ token, ticker: 'SPY', indicator: 'rsi', window: '14', start: '2024-01-02', end: '2024-01-05' }),
signal: AbortSignal.timeout(30000),
});
const body = await response.json();
console.log(response.status, body);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
Response Example ยท HTTP 200
HTTP 200
{
"data": {
"ticker": "SPY",
"indicator": "rsi",
"timeframe": "1Day",
"adjustment": "split",
"price_field": "close",
"window": 14,
"fast_window": null,
"slow_window": null,
"signal_window": null,
"start": "2024-01-02",
"end": "2024-01-05",
"values": [
{
"timestamp": "2024-01-02T05:00:00Z",
"value": 61.0824
},
{
"timestamp": "2024-01-03T05:00:00Z",
"value": 52.3117
},
{
"timestamp": "2024-01-04T05:00:00Z",
"value": 48.9563
},
{
"timestamp": "2024-01-05T05:00:00Z",
"value": 50.1472
}
]
}
}
HTTP 403
{
"message": "Technical indicators require a Supreme subscription."
}
HTTP 422
{
"message": "The window field is not used by macd. Send fast_window, slow_window and signal_window instead.",
"errors": {
"window": [
"The window field is not used by macd. Send fast_window, slow_window and signal_window instead."
]
}
}
HTTP 503
{
"message": "Historical data is busy right now. Please try again in a few seconds."
}
Corporate actions
Supreme plan/api/v1/quote/corporate-actions
Returns corporate actions (dividends, splits and similar events) for a ticker over a
date range, grouped by action type
(cash_dividends,
forward_splits, …).
Each type's entries carry that action's own fields, so inspect the bucket you asked for
rather than assuming one shared event shape.
Requires the Supreme plan. An empty
corporate_actions
object is a successful response meaning no actions occurred in the range, not an error:
Empty result HTTP 200
{
"data": {
"ticker": "AAPL",
"start": "2024-07-01",
"end": "2024-07-02",
"corporate_actions": {}
}
}
Fields that name another ticker use the same naming as the rest of the API:
new_ticker, old_ticker,
source_ticker, acquirer_ticker,
acquiree_ticker and alternate_ticker,
plus ticker on each entry of a reorganization's
stock_movements. They replaced the earlier
new_symbol, old_symbol,
source_symbol, acquirer_symbol,
acquiree_symbol, alternate_symbol and
symbol, which were removed on October 29, 2026 and are no longer
returned, so update any integration that still reads them.
A name change inside corporate_actions (other fields omitted)
{
"name_changes": [
{
"new_ticker": "META",
"old_ticker": "FB"
}
]
}
Request body
-
tokenstring Required - Your API key.
-
tickerstring Required - The US equity symbol. Input is uppercased before validation. 1-10 characters total: a letters/digits run, optionally followed by up to two more letters/digits runs, each separated by one of '.', '/' or '-' (e.g. BRK.B, ABC.CV.CL).
-
startstring Required - First day of the range. YYYY-MM-DD.
-
endstring Required - Last day of the range. YYYY-MM-DD, same day as start or later.
-
typesstring Optional - Comma-separated action-type filter using the upstream's singular type names (e.g. cash_dividend, forward_split). Note that the RESPONSE groups results under plural bucket keys. Names pass through to the upstream data source rather than being checked against a local list; an unrecognized name is the upstream's to reject. Omit to receive every type. Up to 255 characters.
Response fields (inside data)
-
tickerstring Required - The requested symbol, uppercased.
-
startstring Required - The requested range start.
-
endstring Required - The requested range end.
-
corporate_actionsobject Required - Actions grouped by type: each key (e.g. cash_dividends) holds an array of that type's events with action-specific fields. Empty object when the range has no actions.
Errors: 401, 403, 422, 429 and 503,
the same plan-restriction 403
and capacity 503 behavior as historical bars.
Request
cURL
export OKAMI_API_TOKEN='YOUR_API_TOKEN'
curl https://okamistocks.io/api/v1/quote/corporate-actions \
-d token="$OKAMI_API_TOKEN" \
-d ticker=AAPL \
-d start=2024-01-01 \
-d end=2024-06-30
Python
import os
import requests
response = requests.post(
"https://okamistocks.io/api/v1/quote/corporate-actions",
headers={"Accept": "application/json"},
json={"token": os.environ["OKAMI_API_TOKEN"], "ticker": "AAPL", "start": "2024-01-01", "end": "2024-06-30"},
timeout=30,
)
print(response.status_code)
print(response.json())
response.raise_for_status()
Node.js
const token = process.env.OKAMI_API_TOKEN;
if (!token) throw new Error('Set OKAMI_API_TOKEN before running this example.');
const response = await fetch('https://okamistocks.io/api/v1/quote/corporate-actions', {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({ token, ticker: 'AAPL', start: '2024-01-01', end: '2024-06-30' }),
signal: AbortSignal.timeout(30000),
});
const body = await response.json();
console.log(response.status, body);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
Response Example ยท HTTP 200
HTTP 200
{
"data": {
"ticker": "AAPL",
"start": "2024-01-01",
"end": "2024-06-30",
"corporate_actions": {
"cash_dividends": [
{
"ticker": "AAPL",
"rate": 0.24,
"ex_date": "2024-02-09"
}
]
}
}
}
HTTP 403
{
"message": "Corporate actions data requires a Supreme subscription."
}
HTTP 422
{
"message": "The start field must match the format Y-m-d.",
"errors": {
"start": [
"The start field must match the format Y-m-d."
]
}
}
HTTP 503
{
"message": "Historical data is busy right now. Please try again in a few seconds."
}
Build a request
YYYY-MM-DD
YYYY-MM-DD, same day or later
Optional comma-separated action types; leave empty for all.
Set OKAMI_API_TOKEN in your own shell: this builder never asks for your key and sends nothing anywhere.
News
Supreme plan/api/v1/quote/news
Returns news articles for a ticker over a date range, one page per call. Each article is passed through as-is, so inspect its own fields rather than assuming a fixed set beyond what's documented below.
Requires the Supreme plan. Pagination is caller-driven: when
next_cursor
is not null,
send it back as cursor
on the next call to continue; null
means there is no further page.
cursor, with_content and next_cursor
replaced the earlier page_token, include_content and
next_page_token, which were removed on October 29, 2026. A request that still sends
an earlier name is treated as if that field were not there (no error), and responses no longer include
next_page_token, so update any integration that still uses them.
Request body
-
tokenstring Required - Your API key.
-
tickerstring Required - The US equity symbol. Input is uppercased before validation. 1-10 characters total: a letters/digits run, optionally followed by up to two more letters/digits runs, each separated by one of '.', '/' or '-' (e.g. BRK.B, ABC.CV.CL).
-
startstring Required - First day of the range. YYYY-MM-DD.
-
endstring Required - Last day of the range. YYYY-MM-DD, same day as start or later, no more than 3650 days after start.
-
limitinteger Optional - Maximum number of articles to return on this page. 1-50. Defaults to 50 when omitted.
-
with_contentstring Optional - Whether to include each article's full HTML content. Leave this off unless you need the full body: a true response can be large, and shares request capacity with historical bars and corporate actions. One of true, false, or empty. Defaults to false when omitted.
-
cursorstring Optional - The next_cursor from a previous response, to continue to the next page. Opaque: don't construct or decode it yourself.
Response fields (inside data)
-
tickerstring Required - The requested symbol, uppercased.
-
startstring Required - The requested range start.
-
endstring Required - The requested range end.
-
next_cursorstring|null Required - Pass this back as cursor to continue; null when there is no further page. An empty news list with a non-null cursor does not mean the series is done: keep paging.
-
newsarray Required - One object per article: id, headline, author, created_at, updated_at, summary, content (empty unless with_content was true), images, url, tickers (every symbol the article mentions, not just the one requested) and source.
Errors: 401, 403, 422, 429 and 503,
the same plan-restriction 403
and capacity 503 behavior as historical bars
and corporate actions (the three share the same request-capacity limiter), so a slow
with_content=true
call can delay the others.
Request
cURL
export OKAMI_API_TOKEN='YOUR_API_TOKEN'
curl https://okamistocks.io/api/v1/quote/news \
-d token="$OKAMI_API_TOKEN" \
-d ticker=AAPL \
-d start=2024-01-01 \
-d end=2024-01-31 \
-d limit=10 \
-d with_content=false
Python
import os
import requests
response = requests.post(
"https://okamistocks.io/api/v1/quote/news",
headers={"Accept": "application/json"},
json={"token": os.environ["OKAMI_API_TOKEN"], "ticker": "AAPL", "start": "2024-01-01", "end": "2024-01-31", "limit": "10", "with_content": "false"},
timeout=30,
)
print(response.status_code)
print(response.json())
response.raise_for_status()
Node.js
const token = process.env.OKAMI_API_TOKEN;
if (!token) throw new Error('Set OKAMI_API_TOKEN before running this example.');
const response = await fetch('https://okamistocks.io/api/v1/quote/news', {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({ token, ticker: 'AAPL', start: '2024-01-01', end: '2024-01-31', limit: '10', with_content: 'false' }),
signal: AbortSignal.timeout(30000),
});
const body = await response.json();
console.log(response.status, body);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
Response Example ยท HTTP 200
HTTP 200
{
"data": {
"ticker": "AAPL",
"start": "2024-01-01",
"end": "2024-01-31",
"next_cursor": "MTcwNDA2NzIwMDAwMDAwMDAwMA==",
"news": [
{
"id": 28298,
"headline": "Apple Reports First Quarter Results",
"author": "Staff Writer",
"created_at": "2024-01-04T21:35:00Z",
"updated_at": "2024-01-04T21:35:00Z",
"summary": "Apple today announced financial results for its fiscal 2024 first quarter.",
"content": "",
"images": [],
"url": "https://example.com/apple-q1-2024",
"tickers": [
"AAPL"
],
"source": "benzinga"
}
]
}
}
HTTP 403
{
"message": "News data requires a Supreme subscription."
}
HTTP 422
{
"message": "The end field must be a date after or equal to start.",
"errors": {
"end": [
"The end field must be a date after or equal to start."
]
}
}
HTTP 503
{
"message": "Historical data is busy right now. Please try again in a few seconds."
}
Build a request
YYYY-MM-DD
YYYY-MM-DD, same day or later
Set OKAMI_API_TOKEN in your own shell: this builder never asks for your key and sends nothing anywhere.
Crypto real-time quote
Standard & Supreme/api/v1/crypto/real-time
Returns the latest bid/ask quote for a crypto pair, with the mid price, spread, the last trade seen and the rolling 24-hour change. Crypto trades around the clock, so there are no market hours. A quote is not the last executed trade price.
Standard and Supreme plans only: the Free plan receives a
403
naming the required plans. Pairs use the
crypto pair format.
Send the fields as a form body, as the cURL examples do, or as JSON with a
Content-Type: application/json header.
Request body
-
tokenstring Required - Your API key.
-
tickerstring Required - The crypto pair as BASE/QUOTE, for example BTC/USD. Input is uppercased before validation. BASE and QUOTE are each 1-10 letters or digits, separated by a single '/'.
Response fields (inside data)
-
tickerstring Required - The requested pair, uppercased.
-
bid_pricestring Required - Highest current buy offer, in the quote currency, as a full-precision decimal string (never rounded, never exponent notation). "0" when that side of the book is empty.
-
ask_pricestring Required - Lowest current sell offer, same format as bid_price.
-
bid_sizenumber Required - Size of the bid as reported by the upstream feed. Null when not reported.
-
ask_sizenumber Required - Size of the ask as reported by the upstream feed. Null when not reported.
-
mid_pricestring Required - Midpoint of bid and ask, as a decimal string. Null unless both sides are above zero and the ask is at or above the bid.
-
spreadstring Required - Ask minus bid, as a decimal string. Null under the same condition as mid_price.
-
last_trade_pricestring Required - Price of the most recent trade seen when this quote was written. It can be much older than the quote; compare last_trade_time with your own clock. Null until a trade is seen.
-
last_trade_timestring Required - UTC timestamp of that trade (RFC 3339). Null with last_trade_price.
-
daily_openstring Required - Open of the current daily bar, as a decimal string. The day boundary is the upstream feed's own, not a fixed UTC midnight. Briefly null after the pair is first requested or the feed reconnects.
-
daily_volumenumber Required - Volume of the current daily bar. Null under the same conditions as daily_open.
-
percent_changestring Required - Rolling 24-hour change of mid_price, in percent, 2 decimal places. Null when no 24-hour reference price is available yet (for example, about a minute after a pair is first requested) or when mid_price is null.
-
percent_change_posnegstring Required - "positive" (including 0.00) or "negative". Null when percent_change is null.
-
quote_timestampstring Required - UTC timestamp of the source quote (RFC 3339, may carry sub-millisecond precision).
Errors: 401, 403, 422, 429 and 503
all apply here: a temporary 422
or 503 on a cold ticker is
recoverable, not proof the symbol is invalid.
Request
cURL
export OKAMI_API_TOKEN='YOUR_API_TOKEN'
curl https://okamistocks.io/api/v1/crypto/real-time \
-d token="$OKAMI_API_TOKEN" \
-d ticker=BTC/USD
Python
import os
import requests
response = requests.post(
"https://okamistocks.io/api/v1/crypto/real-time",
headers={"Accept": "application/json"},
json={"token": os.environ["OKAMI_API_TOKEN"], "ticker": "BTC/USD"},
timeout=30,
)
print(response.status_code)
print(response.json())
response.raise_for_status()
Node.js
const token = process.env.OKAMI_API_TOKEN;
if (!token) throw new Error('Set OKAMI_API_TOKEN before running this example.');
const response = await fetch('https://okamistocks.io/api/v1/crypto/real-time', {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({ token, ticker: 'BTC/USD' }),
signal: AbortSignal.timeout(30000),
});
const body = await response.json();
console.log(response.status, body);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
Response Example ยท HTTP 200
HTTP 200
{
"data": {
"ticker": "BTC/USD",
"bid_price": "64187.5",
"ask_price": "64221.3",
"bid_size": 0.31,
"ask_size": 0.4537,
"mid_price": "64204.4",
"spread": "33.8",
"last_trade_price": "64199.1",
"last_trade_time": "2026-09-12T14:03:11.482913Z",
"daily_open": "63510.2",
"daily_volume": 412.0378,
"percent_change": "1.42",
"percent_change_posneg": "positive",
"quote_timestamp": "2026-09-12T14:03:12.105274Z"
}
}
HTTP 403
{
"message": "Crypto data requires a Standard or Supreme subscription."
}
HTTP 422
{
"message": "Error fetching ticker data. Please check that the ticker pair is valid and currently supported. Crypto data may be temporarily unavailable; please try again shortly.",
"errors": {
"ticker": [
"Error fetching ticker data. Please check that the ticker pair is valid and currently supported. Crypto data may be temporarily unavailable; please try again shortly."
]
}
}
HTTP 503
{
"message": "Quote data is warming up right now. Please try again in a few seconds."
}
Build a request
Set OKAMI_API_TOKEN in your own shell: this builder never asks for your key and sends nothing anywhere.
Crypto minute bar
Standard & Supreme/api/v1/crypto/minute
Returns the latest one-minute OHLCV bar for a crypto pair. Values are not rounded.
Standard and Supreme plans only: the Free plan receives a
403
naming the required plans. Pairs use the
crypto pair format.
Send the fields as a form body, as the cURL examples do, or as JSON with a
Content-Type: application/json header.
Request body
-
tokenstring Required - Your API key.
-
tickerstring Required - The crypto pair as BASE/QUOTE, for example BTC/USD. Input is uppercased before validation. BASE and QUOTE are each 1-10 letters or digits, separated by a single '/'.
Response fields (inside data)
-
tickerstring Required - The requested pair, uppercased.
-
minute_open_pricenumber Required - Open of the latest one-minute bar, in the quote currency, not rounded. Very small values may use exponent notation, for example 1.234e-05.
-
minute_high_pricenumber Required - High of the latest one-minute bar, not rounded. Very small values may use exponent notation.
-
minute_low_pricenumber Required - Low of the latest one-minute bar, not rounded. Very small values may use exponent notation.
-
minute_close_pricenumber Required - Close of the latest one-minute bar, not rounded. Very small values may use exponent notation.
-
minute_volumenumber Required - Volume of the bar, in the base currency. Can be fractional.
-
minute_volume_weighted_pricenumber Required - Volume-weighted average price of the bar, not rounded.
-
quote_timestampstring Required - UTC start of the bar (RFC 3339).
Errors: 401, 403, 422, 429 and 503
all apply here: a temporary 422
or 503 on a cold ticker is
recoverable, not proof the symbol is invalid.
Request
cURL
export OKAMI_API_TOKEN='YOUR_API_TOKEN'
curl https://okamistocks.io/api/v1/crypto/minute \
-d token="$OKAMI_API_TOKEN" \
-d ticker=BTC/USD
Python
import os
import requests
response = requests.post(
"https://okamistocks.io/api/v1/crypto/minute",
headers={"Accept": "application/json"},
json={"token": os.environ["OKAMI_API_TOKEN"], "ticker": "BTC/USD"},
timeout=30,
)
print(response.status_code)
print(response.json())
response.raise_for_status()
Node.js
const token = process.env.OKAMI_API_TOKEN;
if (!token) throw new Error('Set OKAMI_API_TOKEN before running this example.');
const response = await fetch('https://okamistocks.io/api/v1/crypto/minute', {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({ token, ticker: 'BTC/USD' }),
signal: AbortSignal.timeout(30000),
});
const body = await response.json();
console.log(response.status, body);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
Response Example ยท HTTP 200
HTTP 200
{
"data": {
"ticker": "BTC/USD",
"minute_open_price": 64180.1,
"minute_high_price": 64230,
"minute_low_price": 64171.4,
"minute_close_price": 64204.4,
"minute_volume": 1.2843,
"minute_volume_weighted_price": 64201.37,
"quote_timestamp": "2026-09-12T14:02:00Z"
}
}
HTTP 403
{
"message": "Crypto data requires a Standard or Supreme subscription."
}
HTTP 422
{
"message": "Error fetching ticker data. Please check that the ticker pair is valid and currently supported. Crypto data may be temporarily unavailable; please try again shortly.",
"errors": {
"ticker": [
"Error fetching ticker data. Please check that the ticker pair is valid and currently supported. Crypto data may be temporarily unavailable; please try again shortly."
]
}
}
HTTP 503
{
"message": "Quote data is warming up right now. Please try again in a few seconds."
}
Build a request
Set OKAMI_API_TOKEN in your own shell: this builder never asks for your key and sends nothing anywhere.
Crypto daily bar
Standard & Supreme/api/v1/crypto/daily
Returns the current daily OHLCV bar for a crypto pair, not a historical series. The day boundary is the upstream feed's own, often 05:00 or 06:00 UTC rather than midnight; read quote_timestamp.
Standard and Supreme plans only: the Free plan receives a
403
naming the required plans. Pairs use the
crypto pair format.
Send the fields as a form body, as the cURL examples do, or as JSON with a
Content-Type: application/json header.
Request body
-
tokenstring Required - Your API key.
-
tickerstring Required - The crypto pair as BASE/QUOTE, for example BTC/USD. Input is uppercased before validation. BASE and QUOTE are each 1-10 letters or digits, separated by a single '/'.
Response fields (inside data)
-
tickerstring Required - The requested pair, uppercased.
-
daily_open_pricenumber Required - Open of the current daily bar, not rounded. Very small values may use exponent notation, for example 1.234e-05.
-
daily_high_pricenumber Required - High of the current daily bar, not rounded. Very small values may use exponent notation.
-
daily_low_pricenumber Required - Low of the current daily bar, not rounded. Very small values may use exponent notation.
-
daily_close_pricenumber Required - Close of the current daily bar, not rounded. Very small values may use exponent notation.
-
daily_volumenumber Required - Volume of the bar, in the base currency. Can be fractional.
-
daily_volume_weighted_pricenumber Required - Volume-weighted average price of the bar, not rounded.
-
quote_timestampstring Required - UTC start of the bar (RFC 3339).
Errors: 401, 403, 422, 429 and 503
all apply here: a temporary 422
or 503 on a cold ticker is
recoverable, not proof the symbol is invalid.
Request
cURL
export OKAMI_API_TOKEN='YOUR_API_TOKEN'
curl https://okamistocks.io/api/v1/crypto/daily \
-d token="$OKAMI_API_TOKEN" \
-d ticker=BTC/USD
Python
import os
import requests
response = requests.post(
"https://okamistocks.io/api/v1/crypto/daily",
headers={"Accept": "application/json"},
json={"token": os.environ["OKAMI_API_TOKEN"], "ticker": "BTC/USD"},
timeout=30,
)
print(response.status_code)
print(response.json())
response.raise_for_status()
Node.js
const token = process.env.OKAMI_API_TOKEN;
if (!token) throw new Error('Set OKAMI_API_TOKEN before running this example.');
const response = await fetch('https://okamistocks.io/api/v1/crypto/daily', {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({ token, ticker: 'BTC/USD' }),
signal: AbortSignal.timeout(30000),
});
const body = await response.json();
console.log(response.status, body);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
Response Example ยท HTTP 200
HTTP 200
{
"data": {
"ticker": "BTC/USD",
"daily_open_price": 63510.2,
"daily_high_price": 64480,
"daily_low_price": 63122.9,
"daily_close_price": 64204.4,
"daily_volume": 412.0378,
"daily_volume_weighted_price": 63894.12,
"quote_timestamp": "2026-09-12T05:00:00Z"
}
}
HTTP 403
{
"message": "Crypto data requires a Standard or Supreme subscription."
}
HTTP 422
{
"message": "Error fetching ticker data. Please check that the ticker pair is valid and currently supported. Crypto data may be temporarily unavailable; please try again shortly.",
"errors": {
"ticker": [
"Error fetching ticker data. Please check that the ticker pair is valid and currently supported. Crypto data may be temporarily unavailable; please try again shortly."
]
}
}
HTTP 503
{
"message": "Quote data is warming up right now. Please try again in a few seconds."
}
Build a request
Set OKAMI_API_TOKEN in your own shell: this builder never asks for your key and sends nothing anywhere.
Crypto real-time quotes, batch
Standard & Supreme/api/v1/crypto/real-time/batch
Returns the latest bid/ask quote for up to 5 crypto pairs in one call, each with its own status -- the batch variant of the crypto real-time quote endpoint above.
Standard and Supreme plans only -- the Free plan receives a
403
naming the required plans. There is no per-pair whitelist: every pair failing the
crypto pair format
comes back as not_permitted
instead of failing the whole request.
Send the fields as a form body, as the cURL examples do, or as JSON with a
Content-Type: application/json header.
Request body
-
tokenstring Required - Your API key.
-
tickersarray of strings Required - The crypto pairs to look up, as BASE/QUOTE, in any order. Values are uppercased before validation. 1-5 distinct pairs after uppercasing; each with BASE and QUOTE 1-10 letters or digits separated by a single '/'.
Response fields (inside each data item)
-
tickerstring Required - The requested symbol, uppercased.
-
statusstring Required - One of ok, not_permitted, not_found, stale, pending, error. See the status table below.
-
quoteobject or null Required - Present only when status is ok -- the exact fields of the single-symbol endpoint's own response (see #crypto-realtime-response-fields above).
-
messagestring or null Required - Null when status is ok; otherwise a human-readable explanation of that status.
Per-ticker status values
| Status | Meaning |
|---|---|
| ok | A fresh quote was found; see quote. |
| not_permitted | You do not have access to this ticker or this ticker is invalid. |
| not_found | No quote data is currently available for this ticker. This does not by itself mean the ticker is invalid: data can be missing outside market hours or for thinly traded symbols. Retry later. |
| stale | Quote data is stale. The data pipeline may be delayed; please try again shortly. |
| pending | Quote data for this ticker is not available yet. It has been requested from the data feed; retry shortly. Retry that ticker shortly. |
| error | The stored data for this ticker is malformed. Only this item is affected -- the rest of the batch is unaffected. |
All requested pairs are looked up together in one read, with no per-pair time
budget -- the order you list them in has no effect on which pairs come back as
pending.
A batch call always costs exactly one request against your plan quota, regardless of how many symbols it contains (up to the cap) -- see Batch requests.
Errors: 401, 403, 422 (malformed batch) and 429
all apply here -- capacity 503s don't,
because a ticker that can't be served within the request's own time budget comes back
as pending instead.
Request
cURL
export OKAMI_API_TOKEN='YOUR_API_TOKEN'
curl https://okamistocks.io/api/v1/crypto/real-time/batch \
-d token="$OKAMI_API_TOKEN" \
-d 'tickers[]=BTC/USD' \
-d 'tickers[]=ETH/USD' \
-d 'tickers[]=BTCUSD'
Python
import os
import requests
response = requests.post(
"https://okamistocks.io/api/v1/crypto/real-time/batch",
headers={"Accept": "application/json"},
json={"token": os.environ["OKAMI_API_TOKEN"], "tickers": ["BTC/USD", "ETH/USD", "BTCUSD"]},
timeout=30,
)
print(response.status_code)
print(response.json())
response.raise_for_status()
Node.js
const token = process.env.OKAMI_API_TOKEN;
if (!token) throw new Error('Set OKAMI_API_TOKEN before running this example.');
const response = await fetch('https://okamistocks.io/api/v1/crypto/real-time/batch', {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({ token, tickers: ['BTC/USD', 'ETH/USD', 'BTCUSD'] }),
signal: AbortSignal.timeout(30000),
});
const body = await response.json();
console.log(response.status, body);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
Response Example ยท HTTP 200
HTTP 200
{
"data": [
{
"ticker": "BTC/USD",
"status": "ok",
"quote": {
"ticker": "BTC/USD",
"bid_price": "64187.5",
"ask_price": "64221.3",
"bid_size": 0.31,
"ask_size": 0.4537,
"mid_price": "64204.4",
"spread": "33.8",
"last_trade_price": "64199.1",
"last_trade_time": "2026-09-12T14:03:11.482913Z",
"daily_open": "63510.2",
"daily_volume": 412.0378,
"percent_change": "1.42",
"percent_change_posneg": "positive",
"quote_timestamp": "2026-09-12T14:03:12.105274Z"
},
"message": null
},
{
"ticker": "ETH/USD",
"status": "pending",
"quote": null,
"message": "Quote data for this ticker is not available yet. It has been requested from the data feed; retry shortly."
},
{
"ticker": "BTCUSD",
"status": "not_permitted",
"quote": null,
"message": "You do not have access to this ticker or this ticker is invalid."
}
]
}
HTTP 403
{
"message": "Crypto data requires a Standard or Supreme subscription."
}
HTTP 422
{
"message": "A batch request accepts at most 5 symbols.",
"errors": {
"tickers": [
"A batch request accepts at most 5 symbols."
]
}
}
Crypto minute bars, batch
Standard & Supreme/api/v1/crypto/minute/batch
Returns the latest one-minute OHLCV bar for up to 5 crypto pairs in one call, each with its own status -- the batch variant of the crypto minute bar endpoint above.
Standard and Supreme plans only -- the Free plan receives a
403
naming the required plans. There is no per-pair whitelist: every pair failing the
crypto pair format
comes back as not_permitted
instead of failing the whole request.
Send the fields as a form body, as the cURL examples do, or as JSON with a
Content-Type: application/json header.
Request body
-
tokenstring Required - Your API key.
-
tickersarray of strings Required - The crypto pairs to look up, as BASE/QUOTE, in any order. Values are uppercased before validation. 1-5 distinct pairs after uppercasing; each with BASE and QUOTE 1-10 letters or digits separated by a single '/'.
Response fields (inside each data item)
-
tickerstring Required - The requested symbol, uppercased.
-
statusstring Required - One of ok, not_permitted, not_found, stale, pending, error. See the status table below.
-
quoteobject or null Required - Present only when status is ok -- the exact fields of the single-symbol endpoint's own response (see #crypto-minute-response-fields above).
-
messagestring or null Required - Null when status is ok; otherwise a human-readable explanation of that status.
Per-ticker status values
| Status | Meaning |
|---|---|
| ok | A fresh quote was found; see quote. |
| not_permitted | You do not have access to this ticker or this ticker is invalid. |
| not_found | No quote data is currently available for this ticker. This does not by itself mean the ticker is invalid: data can be missing outside market hours or for thinly traded symbols. Retry later. |
| stale | Quote data is stale. The data pipeline may be delayed; please try again shortly. |
| pending | Quote data for this ticker is not available yet. It has been requested from the data feed; retry shortly. Retry that ticker shortly. |
| error | The stored data for this ticker is malformed. Only this item is affected -- the rest of the batch is unaffected. |
All requested pairs are looked up together in one read, with no per-pair time
budget -- the order you list them in has no effect on which pairs come back as
pending.
A batch call always costs exactly one request against your plan quota, regardless of how many symbols it contains (up to the cap) -- see Batch requests.
Errors: 401, 403, 422 (malformed batch) and 429
all apply here -- capacity 503s don't,
because a ticker that can't be served within the request's own time budget comes back
as pending instead.
Request
cURL
export OKAMI_API_TOKEN='YOUR_API_TOKEN'
curl https://okamistocks.io/api/v1/crypto/minute/batch \
-d token="$OKAMI_API_TOKEN" \
-d 'tickers[]=BTC/USD' \
-d 'tickers[]=ETH/USD' \
-d 'tickers[]=BTCUSD'
Python
import os
import requests
response = requests.post(
"https://okamistocks.io/api/v1/crypto/minute/batch",
headers={"Accept": "application/json"},
json={"token": os.environ["OKAMI_API_TOKEN"], "tickers": ["BTC/USD", "ETH/USD", "BTCUSD"]},
timeout=30,
)
print(response.status_code)
print(response.json())
response.raise_for_status()
Node.js
const token = process.env.OKAMI_API_TOKEN;
if (!token) throw new Error('Set OKAMI_API_TOKEN before running this example.');
const response = await fetch('https://okamistocks.io/api/v1/crypto/minute/batch', {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({ token, tickers: ['BTC/USD', 'ETH/USD', 'BTCUSD'] }),
signal: AbortSignal.timeout(30000),
});
const body = await response.json();
console.log(response.status, body);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
Response Example ยท HTTP 200
HTTP 200
{
"data": [
{
"ticker": "BTC/USD",
"status": "ok",
"quote": {
"ticker": "BTC/USD",
"minute_open_price": 64180.1,
"minute_high_price": 64230,
"minute_low_price": 64171.4,
"minute_close_price": 64204.4,
"minute_volume": 1.2843,
"minute_volume_weighted_price": 64201.37,
"quote_timestamp": "2026-09-12T14:02:00Z"
},
"message": null
},
{
"ticker": "ETH/USD",
"status": "pending",
"quote": null,
"message": "Quote data for this ticker is not available yet. It has been requested from the data feed; retry shortly."
},
{
"ticker": "BTCUSD",
"status": "not_permitted",
"quote": null,
"message": "You do not have access to this ticker or this ticker is invalid."
}
]
}
HTTP 403
{
"message": "Crypto data requires a Standard or Supreme subscription."
}
HTTP 422
{
"message": "A batch request accepts at most 5 symbols.",
"errors": {
"tickers": [
"A batch request accepts at most 5 symbols."
]
}
}
Crypto daily bars, batch
Standard & Supreme/api/v1/crypto/daily/batch
Returns the current daily OHLCV bar for up to 5 crypto pairs in one call, each with its own status -- the batch variant of the crypto daily bar endpoint above, not a historical series.
Standard and Supreme plans only -- the Free plan receives a
403
naming the required plans. There is no per-pair whitelist: every pair failing the
crypto pair format
comes back as not_permitted
instead of failing the whole request.
Send the fields as a form body, as the cURL examples do, or as JSON with a
Content-Type: application/json header.
Request body
-
tokenstring Required - Your API key.
-
tickersarray of strings Required - The crypto pairs to look up, as BASE/QUOTE, in any order. Values are uppercased before validation. 1-5 distinct pairs after uppercasing; each with BASE and QUOTE 1-10 letters or digits separated by a single '/'.
Response fields (inside each data item)
-
tickerstring Required - The requested symbol, uppercased.
-
statusstring Required - One of ok, not_permitted, not_found, stale, pending, error. See the status table below.
-
quoteobject or null Required - Present only when status is ok -- the exact fields of the single-symbol endpoint's own response (see #crypto-daily-response-fields above).
-
messagestring or null Required - Null when status is ok; otherwise a human-readable explanation of that status.
Per-ticker status values
| Status | Meaning |
|---|---|
| ok | A fresh quote was found; see quote. |
| not_permitted | You do not have access to this ticker or this ticker is invalid. |
| not_found | No quote data is currently available for this ticker. This does not by itself mean the ticker is invalid: data can be missing outside market hours or for thinly traded symbols. Retry later. |
| stale | Quote data is stale. The data pipeline may be delayed; please try again shortly. |
| pending | Quote data for this ticker is not available yet. It has been requested from the data feed; retry shortly. Retry that ticker shortly. |
| error | The stored data for this ticker is malformed. Only this item is affected -- the rest of the batch is unaffected. |
All requested pairs are looked up together in one read, with no per-pair time
budget -- the order you list them in has no effect on which pairs come back as
pending.
A batch call always costs exactly one request against your plan quota, regardless of how many symbols it contains (up to the cap) -- see Batch requests.
Errors: 401, 403, 422 (malformed batch) and 429
all apply here -- capacity 503s don't,
because a ticker that can't be served within the request's own time budget comes back
as pending instead.
Request
cURL
export OKAMI_API_TOKEN='YOUR_API_TOKEN'
curl https://okamistocks.io/api/v1/crypto/daily/batch \
-d token="$OKAMI_API_TOKEN" \
-d 'tickers[]=BTC/USD' \
-d 'tickers[]=ETH/USD' \
-d 'tickers[]=BTCUSD'
Python
import os
import requests
response = requests.post(
"https://okamistocks.io/api/v1/crypto/daily/batch",
headers={"Accept": "application/json"},
json={"token": os.environ["OKAMI_API_TOKEN"], "tickers": ["BTC/USD", "ETH/USD", "BTCUSD"]},
timeout=30,
)
print(response.status_code)
print(response.json())
response.raise_for_status()
Node.js
const token = process.env.OKAMI_API_TOKEN;
if (!token) throw new Error('Set OKAMI_API_TOKEN before running this example.');
const response = await fetch('https://okamistocks.io/api/v1/crypto/daily/batch', {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({ token, tickers: ['BTC/USD', 'ETH/USD', 'BTCUSD'] }),
signal: AbortSignal.timeout(30000),
});
const body = await response.json();
console.log(response.status, body);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
Response Example ยท HTTP 200
HTTP 200
{
"data": [
{
"ticker": "BTC/USD",
"status": "ok",
"quote": {
"ticker": "BTC/USD",
"daily_open_price": 63510.2,
"daily_high_price": 64480,
"daily_low_price": 63122.9,
"daily_close_price": 64204.4,
"daily_volume": 412.0378,
"daily_volume_weighted_price": 63894.12,
"quote_timestamp": "2026-09-12T05:00:00Z"
},
"message": null
},
{
"ticker": "ETH/USD",
"status": "pending",
"quote": null,
"message": "Quote data for this ticker is not available yet. It has been requested from the data feed; retry shortly."
},
{
"ticker": "BTCUSD",
"status": "not_permitted",
"quote": null,
"message": "You do not have access to this ticker or this ticker is invalid."
}
]
}
HTTP 403
{
"message": "Crypto data requires a Standard or Supreme subscription."
}
HTTP 422
{
"message": "A batch request accepts at most 5 symbols.",
"errors": {
"tickers": [
"A batch request accepts at most 5 symbols."
]
}
}
Historical crypto bars
Supreme plan/api/v1/crypto/historical
Returns OHLCV bars for a crypto pair over a date range: daily by default, or intraday
with timeframe.
Each bar's timestamp marks its start; for 1Day bars the day boundary is the upstream
feed's own (often 05:00 or 06:00 UTC), not midnight. Responses are not cached: every request is
fetched live from the upstream market-data provider and counts against a shared
upstream rate limit, so cache results on your side rather than re-requesting the same
range, and treat an occasional 422 under heavy load as retryable.
Requires the Supreme plan: other plans receive a
403
naming the required plan.
Request body
-
tokenstring Required - Your API key.
-
tickerstring Required - The crypto pair as BASE/QUOTE, for example BTC/USD. Input is uppercased before validation. BASE and QUOTE are each 1-10 letters or digits, separated by a single '/'.
-
startstring Required - First day of the range. YYYY-MM-DD.
-
endstring Required - Last day of the range. YYYY-MM-DD, same day as start or later.
-
timeframestring Optional - Bar size. Defaults to 1Day when omitted. One of 1Min, 5Min, 15Min, 1Hour, 1Day (case-sensitive). Intraday timeframes limit the range from start to end to at most 7 days for 1Min, 30 days for 5Min, 90 days for 15Min, 365 days for 1Hour.
-
formatstring Optional - Response format. Defaults to json when omitted. json or csv (case-sensitive). csv returns the bars as a CSV file instead of JSON; errors stay JSON.
Response fields (inside data)
-
tickerstring Required - The requested pair, uppercased.
-
timeframestring Required - The bar size of the returned bars: the requested timeframe, or 1Day when omitted.
-
startstring Required - The requested range start.
-
endstring Required - The requested range end.
-
barsarray Required - One object per bar, each with ticker, open_price, high_price, low_price, close_price, volume, volume_weighted and timestamp (UTC start of the bar). Values are not rounded and volume can be fractional. For 1Day, a day with no trades still has a bar with volume 0. An empty array means there is no data for that pair in that range, which can also mean the pair isn't supported upstream.
Errors: 401, 403, 422, 429 and 503.
A 503 here means historical data is
temporarily at capacity: the body says “Historical data is busy…”, and the
Retry-After header tells you how
many seconds to wait before retrying.
CSV output: send "format": "csv"
to get the bars as a CSV file instead of JSON, with a header row and one row per bar. See
CSV output
for the columns and how errors work.
Request
cURL
export OKAMI_API_TOKEN='YOUR_API_TOKEN'
curl https://okamistocks.io/api/v1/crypto/historical \
-d token="$OKAMI_API_TOKEN" \
-d ticker=BTC/USD \
-d start=2024-01-01 \
-d end=2024-01-02
Python
import os
import requests
response = requests.post(
"https://okamistocks.io/api/v1/crypto/historical",
headers={"Accept": "application/json"},
json={"token": os.environ["OKAMI_API_TOKEN"], "ticker": "BTC/USD", "start": "2024-01-01", "end": "2024-01-02"},
timeout=30,
)
print(response.status_code)
print(response.json())
response.raise_for_status()
Node.js
const token = process.env.OKAMI_API_TOKEN;
if (!token) throw new Error('Set OKAMI_API_TOKEN before running this example.');
const response = await fetch('https://okamistocks.io/api/v1/crypto/historical', {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({ token, ticker: 'BTC/USD', start: '2024-01-01', end: '2024-01-02' }),
signal: AbortSignal.timeout(30000),
});
const body = await response.json();
console.log(response.status, body);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
Response Example ยท HTTP 200
HTTP 200
{
"data": {
"ticker": "BTC/USD",
"timeframe": "1Day",
"start": "2024-01-01",
"end": "2024-01-02",
"bars": [
{
"ticker": "BTC/USD",
"open_price": 42283.1,
"high_price": 44175.6,
"low_price": 42196.2,
"close_price": 44173.9,
"volume": 241.8706,
"volume_weighted": 43271.55,
"timestamp": "2024-01-01T06:00:00Z"
},
{
"ticker": "BTC/USD",
"open_price": 44173.9,
"high_price": 45906.3,
"low_price": 44151.8,
"close_price": 44953.4,
"volume": 318.2451,
"volume_weighted": 45210.08,
"timestamp": "2024-01-02T06:00:00Z"
}
]
}
}
HTTP 403
{
"message": "Historical data requires a Supreme subscription."
}
HTTP 422
{
"message": "The end field must be a date after or equal to start.",
"errors": {
"end": [
"The end field must be a date after or equal to start."
]
}
}
HTTP 503
{
"message": "Historical data is busy right now. Please try again in a few seconds."
}
CSV request
cURL
export OKAMI_API_TOKEN='YOUR_API_TOKEN'
csv_file='okamistocks-crypto-historical-bars_BTC-USD_2024-01-01_to_2024-01-02.csv'
if [ -d "$csv_file" ] || ! tmp_file="$(mktemp "${csv_file}.XXXXXX")"; then
echo "Could not write $csv_file, nothing saved." >&2
false
elif http_code="$(curl --silent --show-error https://okamistocks.io/api/v1/crypto/historical \
-d token="$OKAMI_API_TOKEN" \
-d ticker=BTC/USD \
-d start=2024-01-01 \
-d end=2024-01-02 \
-d format=csv \
--output "$tmp_file" \
--write-out '%{http_code}')" && [ "$http_code" = '200' ]; then
if mv "$tmp_file" "$csv_file"; then
echo "Saved $csv_file"
else
rm -f "$tmp_file"
echo "Could not write $csv_file, nothing saved." >&2
false
fi
else
echo "Request failed (HTTP ${http_code:-none}), nothing saved:" >&2
cat "$tmp_file" >&2
echo >&2
rm -f "$tmp_file"
false
fi
Python
import os
import requests
response = requests.post(
"https://okamistocks.io/api/v1/crypto/historical",
json={"token": os.environ["OKAMI_API_TOKEN"], "ticker": "BTC/USD", "start": "2024-01-01", "end": "2024-01-02", "format": "csv"},
timeout=30,
)
if response.status_code != 200:
raise SystemExit(f"Request failed (HTTP {response.status_code}), nothing saved: {response.text}")
with open("okamistocks-crypto-historical-bars_BTC-USD_2024-01-01_to_2024-01-02.csv", "wb") as csv_file:
csv_file.write(response.content)
print("Saved okamistocks-crypto-historical-bars_BTC-USD_2024-01-01_to_2024-01-02.csv")
Node.js
import { writeFile } from 'node:fs/promises';
const token = process.env.OKAMI_API_TOKEN;
if (!token) throw new Error('Set OKAMI_API_TOKEN before running this example.');
const response = await fetch('https://okamistocks.io/api/v1/crypto/historical', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ token, ticker: 'BTC/USD', start: '2024-01-01', end: '2024-01-02', format: 'csv' }),
signal: AbortSignal.timeout(30000),
});
if (response.status !== 200) {
console.error(`Request failed (HTTP ${response.status}), nothing saved: ${await response.text()}`);
process.exitCode = 1;
} else {
await writeFile('okamistocks-crypto-historical-bars_BTC-USD_2024-01-01_to_2024-01-02.csv', await response.text());
console.log('Saved okamistocks-crypto-historical-bars_BTC-USD_2024-01-01_to_2024-01-02.csv');
}
CSV response Example ยท HTTP 200
timestamp,ticker,open_price,high_price,low_price,close_price,volume,volume_weighted
2024-01-01T06:00:00Z,BTC/USD,42283.1,44175.6,42196.2,44173.9,241.8706,43271.55
2024-01-02T06:00:00Z,BTC/USD,44173.9,45906.3,44151.8,44953.4,318.2451,45210.08
Build a request
YYYY-MM-DD
YYYY-MM-DD, same day or later
Intraday timeframes allow shorter date ranges; see the request body table.
Set OKAMI_API_TOKEN in your own shell: this builder never asks for your key and sends nothing anywhere.
Crypto technical indicators
Supreme plan/api/v1/crypto/indicators
Returns a daily series of one technical indicator for a crypto pair over a date range: a simple or exponential moving average, the relative strength index, or MACD. Rows come oldest first, one per daily bar whose UTC date is from start to end. Each day's value is computed from that day's bar and a fixed number of daily bars before it, never from your start date, so for a pair with bars through the five years before your start date a day has the same value whatever range you ask for. How each indicator is computed explains the rest.
Requires the Supreme plan: other plans receive a
403
naming it. Each call counts as one request against your rate limit.
Request body
-
tokenstring Required - Your API key.
-
tickerstring Required - The crypto pair as BASE/QUOTE, for example BTC/USD. Input is uppercased before validation. BASE and QUOTE are each 1-10 letters or digits, separated by a single '/'.
-
indicatorstring Required - The indicator: sma (simple moving average), ema (exponential moving average), rsi (relative strength index) or macd. One of sma, ema, rsi, macd (lowercase).
-
startstring Required - First day of the range. YYYY-MM-DD.
-
endstring Required - Last day of the range. YYYY-MM-DD, same day as start or later, at most 1825 days apart.
-
windowinteger Optional - Bars in the window. Required for sma and ema (2 to 200). For rsi, 2 to 100, default 14. Not used by macd. A whole number.
-
fast_windowinteger Optional - macd only: the fast EMA window. Defaults to 12. 2 to 99.
-
slow_windowinteger Optional - macd only: the slow EMA window. Defaults to 26. slow_window must be greater than fast_window. 3 to 100.
-
signal_windowinteger Optional - macd only: the signal line's EMA window. Defaults to 9. 2 to 50.
-
price_fieldstring Optional - The bar price the indicator is computed from. Defaults to close. One of close, open, high, low.
Response fields (inside data)
-
tickerstring Required - The requested pair, uppercased.
-
indicatorstring Required - sma, ema, rsi or macd.
-
timeframestring Required - Always 1Day: the indicators are daily.
-
price_fieldstring Required - The bar price the indicator was computed from.
-
windowinteger or null Required - The sma, ema or rsi window; null for macd.
-
fast_window, slow_window, signal_windowinteger or null Required - The macd windows; null for every other indicator.
-
startstring Required - The requested range start, YYYY-MM-DD.
-
endstring Required - The requested range end, YYYY-MM-DD.
-
valuesarray Required - Rows oldest first, one per daily bar. Each has timestamp (the bar's start, UTC) and value. The feed determines the daily boundary; do not assume midnight UTC or any other fixed hour. Start and end select bars by the UTC date of their timestamp. MACD rows also have signal and histogram (value minus signal). Values are unrounded doubles and can use exponent notation; a value is null only if its arithmetic overflows a double.
Errors: 401, 403, 422, 429 and 503.
A data 422 (“Error fetching data…”)
or a 503 (“Historical data is busy…”, with a
Retry-After header) means the bars could not be fetched; a retry fetches again.
The formulas, the lookback and how bars are used: How each indicator is computed.
Request
cURL
export OKAMI_API_TOKEN='YOUR_API_TOKEN'
curl https://okamistocks.io/api/v1/crypto/indicators \
-d token="$OKAMI_API_TOKEN" \
-d ticker=BTC/USD \
-d indicator=rsi \
-d window=14 \
-d start=2024-01-02 \
-d end=2024-01-04
Python
import os
import requests
response = requests.post(
"https://okamistocks.io/api/v1/crypto/indicators",
headers={"Accept": "application/json"},
json={"token": os.environ["OKAMI_API_TOKEN"], "ticker": "BTC/USD", "indicator": "rsi", "window": "14", "start": "2024-01-02", "end": "2024-01-04"},
timeout=30,
)
print(response.status_code)
print(response.json())
response.raise_for_status()
Node.js
const token = process.env.OKAMI_API_TOKEN;
if (!token) throw new Error('Set OKAMI_API_TOKEN before running this example.');
const response = await fetch('https://okamistocks.io/api/v1/crypto/indicators', {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({ token, ticker: 'BTC/USD', indicator: 'rsi', window: '14', start: '2024-01-02', end: '2024-01-04' }),
signal: AbortSignal.timeout(30000),
});
const body = await response.json();
console.log(response.status, body);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
Response Example ยท HTTP 200
HTTP 200
{
"data": {
"ticker": "BTC/USD",
"indicator": "rsi",
"timeframe": "1Day",
"price_field": "close",
"window": 14,
"fast_window": null,
"slow_window": null,
"signal_window": null,
"start": "2024-01-02",
"end": "2024-01-04",
"values": [
{
"timestamp": "2024-01-02T05:00:00Z",
"value": 61.0824331804281
},
{
"timestamp": "2024-01-03T05:00:00Z",
"value": 52.3117420946517
},
{
"timestamp": "2024-01-04T05:00:00Z",
"value": 48.9563112087403
}
]
}
}
HTTP 403
{
"message": "Technical indicators require a Supreme subscription."
}
HTTP 422
{
"message": "The window field is not used by macd. Send fast_window, slow_window and signal_window instead.",
"errors": {
"window": [
"The window field is not used by macd. Send fast_window, slow_window and signal_window instead."
]
}
}
HTTP 503
{
"message": "Historical data is busy right now. Please try again in a few seconds."
}
Crypto top movers
Standard & Supreme/api/v1/crypto/top-movers
Returns the crypto pairs with the largest percent gain and the largest percent loss over the current day, as two ranked lists.
The lists restart once a day, around midnight, so check as_of. Prices and changes are not rounded,
like crypto bars. Same request fields and plan as the stock top movers.
Requires the Standard or Supreme plan: the Free plan receives a
403
naming the plans. Each call counts as one request against your rate limit.
Request body
-
tokenstring Required - Your API key.
-
limitinteger Optional - The most rows in each list. Defaults to 20. A whole number from 1 to 50.
-
min_pricenumber Optional - Leave out pairs whose last price is below this, in each pair's quote currency (the part after the slash: USD for BTC/USD). It filters the 50 biggest movers on each side, so a list can come back shorter than limit. Omit for no filter. From 0 to 1,000,000; decimals allowed.
Response fields (inside data)
-
asset_classstring Required - crypto.
-
as_ofstring Required - When our data provider last computed the lists: an RFC 3339 timestamp in UTC, ending in Z, with up to nanosecond precision.
-
limitinteger Required - The most rows each list holds: your limit, or 20.
-
min_pricenumber or null Required - The price filter applied, or null.
-
gainersarray Required - Largest percent_change first; only pairs that are up.
-
losersarray Required - Most negative percent_change first; only pairs that are down.
-
tickerstring Required - Each row: the pair, such as BTC/USD.
-
last_pricenumber Required - Each row: the last price, in the pair's quote currency, as an unrounded JSON number, possibly in exponent form for very small values.
-
price_changenumber Required - Each row: the change since the previous close, as an unrounded JSON number, possibly in exponent form for very small values.
-
percent_changenumber Required - Each row: that change as a percent of the previous close, as an unrounded JSON number, possibly in exponent form for very small values.
Errors: 401, 403, 422, 429 and 503.
A data 422 (“Error fetching data…”, under
errors.asset_class) or a busy 503
(“Historical data is busy…”, with a Retry-After header)
comes only from a request that has to fetch a fresh list; a failed fetch is never stored, so a retry fetches again.
Any request, one served from the stored list too, can also get a 503
(“Quote data is temporarily unavailable…”, with a Retry-After header)
while our data store is briefly unreachable; retry after the header's delay.
How the lists are built: Market movers and most active.
Request
cURL
export OKAMI_API_TOKEN='YOUR_API_TOKEN'
curl https://okamistocks.io/api/v1/crypto/top-movers \
-d token="$OKAMI_API_TOKEN" \
-d limit=2
Python
import os
import requests
response = requests.post(
"https://okamistocks.io/api/v1/crypto/top-movers",
headers={"Accept": "application/json"},
json={"token": os.environ["OKAMI_API_TOKEN"], "limit": "2"},
timeout=30,
)
print(response.status_code)
print(response.json())
response.raise_for_status()
Node.js
const token = process.env.OKAMI_API_TOKEN;
if (!token) throw new Error('Set OKAMI_API_TOKEN before running this example.');
const response = await fetch('https://okamistocks.io/api/v1/crypto/top-movers', {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({ token, limit: '2' }),
signal: AbortSignal.timeout(30000),
});
const body = await response.json();
console.log(response.status, body);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
Response Example ยท HTTP 200
HTTP 200
{
"data": {
"asset_class": "crypto",
"as_of": "2026-11-02T21:00:04.104855120Z",
"limit": 2,
"min_price": null,
"gainers": [
{
"ticker": "BTC/USD",
"last_price": 64204.37,
"price_change": 1201.5,
"percent_change": 1.9071
},
{
"ticker": "SHIB/USD",
"last_price": 1.234e-5,
"price_change": 1.2e-7,
"percent_change": 0.98
}
],
"losers": [
{
"ticker": "ETH/USD",
"last_price": 2410.1,
"price_change": -30.25,
"percent_change": -1.24
}
]
}
}
HTTP 403
{
"message": "Market movers and most-active rankings need the Standard or Supreme plan."
}
HTTP 422
{
"message": "The limit field must be between 1 and 50.",
"errors": {
"limit": [
"The limit field must be between 1 and 50."
]
}
}
HTTP 503
{
"message": "Historical data is busy right now. Please try again in a few seconds."
}
Crypto pair search
Standard & Supreme/api/v1/crypto/search
Finds the crypto pairs you can request. Search by a pair or the beginning of its code, such as BTC or BTC/USD;
BTCUSD finds BTC/USD too. Other matches depend on the listed name, which may be a short label (for example
“BTC/USD pair”) rather than the coin's full name, so a full coin name may find nothing.
exchange and mic are always null for crypto, and quote_plan is always standard.
Same request fields as ticker search; limit caps the list.
Requires the Standard or Supreme plan: the Free plan receives a 403 naming the plans.
Each call counts as one request against your rate limit.
Request body
-
tokenstring Required - Your API key.
-
querystring Required - A ticker (BRK.B, BRKB), part of one (NV), or part of a company name (apple). 1 to 50 characters after leading and trailing spaces are removed: letters, digits, spaces, punctuation and symbols.
-
limitinteger Optional - The most rows to return. Defaults to 10. A whole number from 1 to 50.
Response fields (inside data)
-
asset_classstring Required - crypto.
-
querystring Required - The query as received, with leading and trailing spaces removed.
-
limitinteger Required - The limit applied: yours, or 10.
-
as_ofstring Required - When the list was last refreshed: an RFC 3339 timestamp in UTC, ending in Z, in whole seconds. If a refresh fails, the last list is kept, so this can be more than an hour old.
-
resultsarray Required - Best match first, at most limit rows; an empty array when nothing matches.
-
tickerstring Required - Each row: the pair, such as BTC/USD.
-
namestring Required - Each row: the listed name, a label such as BTC/USD pair.
-
exchangestring or null Required - Always null for crypto.
-
micstring or null Required - Always null for crypto.
-
quote_planstring Required - Always standard.
Errors: 401, 403 (unverified email, or the Free plan), 422, 429 and 503.
A data 422 (“Error fetching data…”, under errors.query) means the search couldn't run right now,
for example while the lists load after a restart (a minute or more) or during an outage; retry with backoff.
A busy 503 (“Historical data is busy…”, with a Retry-After header) means too many data requests are running at once.
Any request can also get a 503 (“Quote data is temporarily unavailable…”, with a Retry-After header)
while our data store is briefly unreachable; retry after the header's delay.
How matches are ordered: Ticker search.
Request
cURL
export OKAMI_API_TOKEN='YOUR_API_TOKEN'
curl https://okamistocks.io/api/v1/crypto/search \
-d token="$OKAMI_API_TOKEN" \
-d query=btc \
-d limit=3
Python
import os
import requests
response = requests.post(
"https://okamistocks.io/api/v1/crypto/search",
headers={"Accept": "application/json"},
json={"token": os.environ["OKAMI_API_TOKEN"], "query": "btc", "limit": "3"},
timeout=30,
)
print(response.status_code)
print(response.json())
response.raise_for_status()
Node.js
const token = process.env.OKAMI_API_TOKEN;
if (!token) throw new Error('Set OKAMI_API_TOKEN before running this example.');
const response = await fetch('https://okamistocks.io/api/v1/crypto/search', {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({ token, query: 'btc', limit: '3' }),
signal: AbortSignal.timeout(30000),
});
const body = await response.json();
console.log(response.status, body);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
Response Example ยท HTTP 200
HTTP 200
{
"data": {
"asset_class": "crypto",
"query": "btc",
"limit": 3,
"as_of": "2026-11-04T14:00:04Z",
"results": [
{
"ticker": "BTC/USD",
"name": "BTC/USD pair",
"exchange": null,
"mic": null,
"quote_plan": "standard"
},
{
"ticker": "BTC/USDC",
"name": "BTC/USDC pair",
"exchange": null,
"mic": null,
"quote_plan": "standard"
},
{
"ticker": "BTC/USDT",
"name": "BTC/USDT pair",
"exchange": null,
"mic": null,
"quote_plan": "standard"
}
]
}
}
HTTP 403
{
"message": "Crypto data requires a Standard or Supreme subscription."
}
HTTP 422
{
"message": "The query may contain only letters, digits, spaces, punctuation and symbols.",
"errors": {
"query": [
"The query may contain only letters, digits, spaces, punctuation and symbols."
]
}
}
HTTP 503
{
"message": "Historical data is busy right now. Please try again in a few seconds."
}
Ticker search
All plans/api/v1/quote/search
Finds US-listed stocks and ETFs by ticker or by company name and returns the best matches first:
the ticker to send to the other endpoints, the listed name, the listing exchange with its market
identifier code, and quote_plan, the lowest plan whose quote endpoints serve that ticker
(free for the Free plan's list, standard for everything else).
Only active listings on NYSE, Nasdaq, NYSE Arca, NYSE American, Cboe BZX and the Texas Stock
Exchange are included, the tickers the quote endpoints can serve; over-the-counter tickers are
not. The list is refreshed every hour, and as_of says when.
Available on every plan. Each call counts as one request against your rate limit, so for a search-as-you-type box, wait until the user pauses (about 300 ms) and has typed at least two characters.
Request body
-
tokenstring Required - Your API key.
-
querystring Required - A ticker (BRK.B, BRKB), part of one (NV), or part of a company name (apple). 1 to 50 characters after leading and trailing spaces are removed: letters, digits, spaces, punctuation and symbols.
-
limitinteger Optional - The most rows to return. Defaults to 10. A whole number from 1 to 50.
Response fields (inside data)
-
asset_classstring Required - stock.
-
querystring Required - The query as received, with leading and trailing spaces removed.
-
limitinteger Required - The limit applied: yours, or 10.
-
as_ofstring Required - When the list was last refreshed: an RFC 3339 timestamp in UTC, ending in Z, in whole seconds. If a refresh fails, the last list is kept, so this can be more than an hour old.
-
resultsarray Required - Best match first, at most limit rows; an empty array when nothing matches.
-
tickerstring Required - Each row: the ticker to send to the other endpoints, such as AAPL or BRK.B.
-
namestring Required - Each row: the listed name, including the share class, such as Apple Inc. Common Stock.
-
exchangestring or null Required - Each row: the listing exchange: NYSE, NASDAQ, NYSE Arca, NYSE American, Cboe BZX or TXSE.
-
micstring or null Required - Each row: the exchange's ISO 10383 market identifier code: XNYS, XNAS, ARCX, XASE, BATS or TXSE.
-
quote_planstring Required - Each row: the lowest plan whose quote endpoints serve this ticker: free or standard.
Errors: 401, 403 (unverified email), 422, 429 and 503.
A data 422 (“Error fetching data…”, under errors.query) means the search couldn't run right now,
for example while the lists load after a restart (a minute or more) or during an outage; retry with backoff.
A busy 503 (“Historical data is busy…”, with a Retry-After header) means too many data requests are running at once.
Any request can also get a 503 (“Quote data is temporarily unavailable…”, with a Retry-After header)
while our data store is briefly unreachable; retry after the header's delay.
How matches are ordered: Ticker search.
Request
cURL
export OKAMI_API_TOKEN='YOUR_API_TOKEN'
curl https://okamistocks.io/api/v1/quote/search \
-d token="$OKAMI_API_TOKEN" \
-d query=apple \
-d limit=3
Python
import os
import requests
response = requests.post(
"https://okamistocks.io/api/v1/quote/search",
headers={"Accept": "application/json"},
json={"token": os.environ["OKAMI_API_TOKEN"], "query": "apple", "limit": "3"},
timeout=30,
)
print(response.status_code)
print(response.json())
response.raise_for_status()
Node.js
const token = process.env.OKAMI_API_TOKEN;
if (!token) throw new Error('Set OKAMI_API_TOKEN before running this example.');
const response = await fetch('https://okamistocks.io/api/v1/quote/search', {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({ token, query: 'apple', limit: '3' }),
signal: AbortSignal.timeout(30000),
});
const body = await response.json();
console.log(response.status, body);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
Response Example ยท HTTP 200
HTTP 200
{
"data": {
"asset_class": "stock",
"query": "apple",
"limit": 3,
"as_of": "2026-11-04T14:00:03Z",
"results": [
{
"ticker": "AAPL",
"name": "Apple Inc. Common Stock",
"exchange": "NASDAQ",
"mic": "XNAS",
"quote_plan": "standard"
},
{
"ticker": "APLE",
"name": "Apple Hospitality REIT, Inc. Common Shares",
"exchange": "NYSE",
"mic": "XNYS",
"quote_plan": "standard"
},
{
"ticker": "MLP",
"name": "Maui Land & Pineapple Company, Inc. Common Stock",
"exchange": "NYSE",
"mic": "XNYS",
"quote_plan": "standard"
}
]
}
}
HTTP 403
{
"error": "Email verification required. Please verify your email address to continue using the API."
}
HTTP 422
{
"message": "The query may contain only letters, digits, spaces, punctuation and symbols.",
"errors": {
"query": [
"The query may contain only letters, digits, spaces, punctuation and symbols."
]
}
}
HTTP 503
{
"message": "Historical data is busy right now. Please try again in a few seconds."
}
Symbols & plan access
Free plan tickers
The Free plan can request exactly these 10 tickers on the
quote endpoints: any other symbol returns a
422:
SPYQQQVOOIWMDIAVTINVDASPCXMSFTAMZN
Paid plan symbol format
Standard and Supreme are not limited to a list. Any symbol that looks like a real US
ticker is accepted: one run of uppercase letters/digits (1–10 characters total),
optionally followed by up to two more parts, each a single
.,
/ or
-
separator and another letters/digits run, for example
BRK.B or the
three-part ABC.CV.CL
corporate-action suffix shape (lowercase input is uppercased for you). Separator-only input,
a doubled or trailing separator, or a fourth part are all rejected with a
422.
Passing the format check means the request is forwarded: it does not guarantee the upstream feed has
data for that symbol right now; to check that a ticker is listed, search for it with
ticker search; see
Timestamps & data behavior.
Crypto pairs
The crypto endpoints take a pair as
BASE/QUOTE, for example BTC/USD or ETH/USD:
1–10 uppercase letters or digits on each side of a single / (lowercase
input is uppercased for you). They are included in Standard and Supreme; the Free plan gets a
403. Like stock symbols on paid plans, pairs aren't limited to a list: passing
the format check means the request is forwarded, not that the upstream feed supports that pair.
Crypto pair search finds the pairs you can request.
Send pairs to the /crypto/* endpoints, not the stock ones.
A pair nobody has requested recently can take a few seconds to return data, and its first
request can return a 422 if the data isn't live yet. Retry after a few seconds:
every request re-sends the subscription for that pair, so a retry normally succeeds once the
feed has picked it up.
List symbols endpoint
POST /symbols
returns, for every plan, exactly what the two sections above describe in prose: send
asset_class
(stock or
crypto) in the JSON
request body along with your token,
like every other endpoint. The Free plan gets back
access_mode: "whitelist"
and the same ticker list shown above in symbols.
Standard and Supreme get back
access_mode: "format_only"
with symbols: null
and three fields describing the accepted shape completely:
pattern (the validation regex),
max_length, and
case_normalization
(always "uppercase" today), plus a
caveat string repeating, in the
response itself rather than only here in prose, that passing the format check is not a guarantee the
upstream feed has data for a given symbol right now (whitelist responses leave all four of these fields
null, since
there's no format to describe, or caveat about it, for a fixed ticker list). Free gets a
403 for
asset_class=crypto, same as the crypto
endpoints themselves. That 403 and a
422 for a missing or invalid
asset_class, like this endpoint's
own success response, carry
Cache-Control: no-store since
the body depends on your plan. That covers this endpoint's own responses only: an authentication
failure or a per-tier rate limit returns before this endpoint runs, and isn't covered by it.
Endpoint access by plan
| Endpoint | Free | Standard | Supreme |
|---|---|---|---|
| Real-time quote | Free list only | Included | Included |
| Latest minute bar | Free list only | Included | Included |
| Latest daily bar | Free list only | Included | Included |
| 52-week range and average volume | Not included | Included | Included |
| Top movers | Not included | Included | Included |
| Most active stocks | Not included | Included | Included |
| Market status | Included | Included | Included |
| Trading days | Included | Included | Included |
| Ticker search | Included | Included | Included |
| Historical bars | Not included | Not included | Included |
| Technical indicators | Not included | Not included | Included |
| Corporate actions | Not included | Not included | Included |
| Crypto real-time quote | Not included | Included | Included |
| Crypto minute bar | Not included | Included | Included |
| Crypto daily bar | Not included | Included | Included |
| Historical crypto bars | Not included | Not included | Included |
| Crypto technical indicators | Not included | Not included | Included |
| Crypto top movers | Not included | Included | Included |
| Crypto pair search | Not included | Included | Included |
| List symbols | Included | Included | Included |
Timestamps & data behavior
Timestamps
All timestamps are UTC in RFC 3339 format and describe the source data (when the quote or bar was produced upstream), never when the HTTP response was generated. Quote timestamps can carry more than millisecond precision; store them as strings if your pipeline would otherwise round them. A daily bar's timestamp marks the start of the bar.
Quotes are not trades
The real-time endpoint returns the current bid/ask (offers to buy and sell), not the last executed trade price. For a traded price, use the latest bar endpoints' close values.
Day change on stock quotes
The real-time stock quote's price_change and percent_change compare the
bid/ask midpoint with previous_close: the close of the last regular session
before the quote's own trading day, in New York time. Pre-market and after-hours quotes
carry the change too, so it includes the extended-hours move. Outside regular trading
hours previous_close is often null, because the data feed refreshes it only
during the session. daily_volume counts the quote's own trading day and stays
null until the ticker's first regular-session trade. Because the change uses the
midpoint, it can differ from a change based on the last traded price.
percent_change is price_change as a percent of previous_close,
computed from the values in the same response, so it never has the opposite sign; a change too small for the price can round to 0.0.
Prices are published to the cent, so for a stock under a few dollars the percent is
approximate. previous_close is the consolidated close as the data feed reports
it, which can differ by a cent or so from the official closing price another site shows.
Latest snapshots vs. history
The real-time, minute and daily endpoints each return one latest snapshot. Only historical bars returns a series over a range, daily or intraday.
Cold, missing and stale data
The first request for a ticker nobody has asked about recently can take a few seconds
while the data feed subscribes, and can return a temporary
422
(“Error fetching ticker data…”) or a capacity
503
before data is available. Data that exists but is too old to serve as current is also
rejected rather than silently returned. Outside the regular session, some ticker data is
unavailable; see Market status for the current session and
Trading days for holidays and half days.
See Errors & recovery
for the exact shapes and the retry guidance.
Market hours
Market hours follow the New York Stock Exchange (NYSE) calendar. Session times come from the exchange calendar in each
response; read them from there. On a typical full trading day they are 4:00 to 9:30 a.m. (pre-market), 9:30 a.m. to
4:00 p.m. (regular) and 4:00 to 8:00 p.m. (after hours), New York time, and a half day's regular session closes at
1:00 p.m. All times are UTC: 9:30 a.m. New York is 14:30 UTC in winter and 13:30 UTC in summer.
Overnight trading sessions are not included. When the calendar has no pre-market or after-hours times for a day,
market status reports that part of the day as
unknown, not closed.
The calendar is refreshed every hour, so a published change normally appears within about an hour; if a refresh fails,
the last stored calendar is served for up to a day, and after that the calendar endpoints answer 503 until a refresh
succeeds. Stock data freshness is checked during the regular session of each trading day, half days included.
Crypto data
Crypto trades around the clock, so crypto data is checked for staleness at all hours, and a
pair's data that is too old is rejected rather than returned as current. Crypto quote prices
are full-precision decimal strings, and crypto bar values are unrounded JSON numbers that may
use exponent notation for very small values. The real-time percent_change is a
rolling 24-hour change, unlike a stock's change since the previous close. The daily bar's day
boundary is the upstream feed's own rather than UTC midnight, and last_trade_price
can be much older than the quote itself: compare last_trade_time with your clock.
Requesting a pair also asks the upstream feed to start streaming it. That request is
best-effort: if the feed is briefly unavailable (for example, while it restarts) it is not
queued, and the call returns a 422 after a few seconds. Retrying is always safe
and re-sends the request. Historical crypto bars are not cached: each request is a live
upstream fetch that counts against a shared upstream rate limit, so cache ranges you reuse.
CSV output
Historical bars and historical crypto bars
can return a CSV file instead of JSON: add "format": "csv" to the request body
("json", the default, keeps the JSON response). The file has a header row, then one
row per bar, oldest first, in these columns: timestamp, ticker,
open_price, high_price, low_price,
close_price, volume and volume_weighted.
Each value is the one the JSON response carries: stock prices rounded to 2 decimal places,
crypto values unrounded (very small values can use exponent notation), and timestamps in UTC
RFC 3339 format. An empty cell means the JSON value is null, and a range with no bars returns
only the header row. The response's timeframe, adjustment,
start and end fields are not in the file; its download name carries
the ticker and the date range. The file is comma-separated with CRLF line endings (RFC 4180).
Errors are always JSON, whichever format you ask for, so save the body only after a
200, as the CSV request examples do. A CSV request counts as one request against
your rate limit, like a JSON one.
52-week range and average volume
The 52-week range endpoint covers the 52 weeks (364 days) that end the
day before your request, New York time; start and
end in the response name them. Today's trading never counts, even
after the close, so the window moves forward once a day, at midnight New York time. A computed result is
stored for the rest of that day and normally reused; a failed request is never stored. as_of is the last trading day counted and
close_price its closing price;
sessions_covered counts the trading days found, about 250 for a
stock that traded all year and fewer for a recent listing.
The high and low are each day's highest and lowest regular-session prices; daily volume also counts
pre-market and after-hours trades. When two days share the high or the low, the later day is reported. The two
percents compare close_price with each extreme, as a percent of that extreme,
using the rounded prices shown. Each average volume is the mean of the last 10 or 50 trading days, rounded to a whole
share, and is null until that many days exist.
The adjustment you choose (split by default) is applied to the daily bars
before anything is computed. split adjusts prices and volumes from before a stock split (after a 2-for-1 split,
earlier prices are halved and earlier volumes doubled), so the range and the averages compare like with like across
the split. Adjustments for cash dividends and spin-offs change prices only, never volumes: dividend adjusts earlier
prices for cash dividends, and all applies every adjustment, so it adjusts prices for splits, cash dividends and
spin-offs, and volumes for splits. raw uses prices and volumes as traded.
A ticker with no trading data in the window, such as a symbol that doesn't exist, returns
sessions_covered 0 and nulls rather than an error.
Technical indicators
The technical indicators endpoint computes each formula as follows. SMA is the mean of the last window prices. EMA starts as the SMA of its first window prices, then each day adds 2 / (window + 1) of the new price to the rest of the previous EMA. RSI uses Wilder's smoothing: the first averages are simple means of the first window gains and losses, then each new average is (previous x (window - 1) + today) / window, and RSI = 100 x average gain / (average gain + average loss), 50 when the price didn't move. MACD is the fast EMA minus the slow EMA, signal is an EMA of MACD over signal_window days, and histogram is MACD minus signal.
| Indicator | Lookback (trading days before each day) |
|---|---|
| SMA | window - 1 |
| EMA | (window - 1) + 5 x (window + 1); EMA 20: 124 |
| RSI | 11 x window; RSI 14: 154 |
| MACD | (slow_window - 1) + 5 x (slow_window + 1) + (signal_window - 1) + 5 x (signal_window + 1); MACD 12/26/9: 218 |
Each day's value is computed from that day's bar and the lookback's number of trading days before it, starting the calculation at the first of them, never at your start date, so two requests that hold the same bars for that day and its lookback return the same value for it. For EMA and MACD, when the full lookback is available, the average the calculation starts from keeps less than 0.005% of its weight by the time the day's value is computed, so where the calculation starts has all but faded; a tool that starts its calculation elsewhere can still differ slightly. With a shorter history the starting average keeps much more of its weight: the first EMA value of a recent listing is the starting average itself. RSI divides one average by the sum of two, so after weeks of almost no price movement a tool that still counts an older move can show a quite different RSI; ours counts only the lookback, and a stock that hasn't moved at all in it has an RSI of 50. We fetch the five years before your start date, which covers the longest lookback for any ticker that traded through them. A recent listing, or a ticker with months without a trade in those five years, has fewer days: its values are computed from the days that exist and appear once the indicator has enough (window for SMA and EMA, window + 1 for RSI, slow_window + signal_window - 1 for MACD). Only for a ticker with such gaps can a value depend on the range you request.
Computed from the daily bars with the adjustment you choose (split by default, so a stock split
doesn't show up as a crash in the averages) and the price_field you choose (close by
default). A day without a bar is skipped, never filled in, so a window always covers the last window bars that
exist. If end is today, the last row can use today's bar so far and changes until the
day's trading ends. Nothing is stored: each request computes from the bars as they are returned at that moment, so
if the adjusted bars of earlier days change (for example once a new split is applied), those days' values change
with them.
Values are rounded to 4 decimal places; MACD's histogram is the rounded MACD minus the rounded signal, so the three
always agree. A ticker with no data in the range returns an empty values list, not an error.
For crypto pairs (the crypto technical indicators endpoint), each row is one daily bar, dated by the UTC date of its start. The feed determines the daily boundary; do not assume midnight UTC or any other fixed hour (a bar may start at 05:00 UTC, for example). Start and end select bars by the UTC date of their timestamp. The lookback counts the bars actually returned: where a pair's history has gaps or is shorter than the lookback, a value comes from fewer bars, as for stocks, and nothing is filled in. There is no adjustment. Values are the unrounded double-precision results of the formulas above, so the last digits can carry floating-point error; a value is null only if its arithmetic overflows a double.
Market movers and most active
The top movers and crypto top movers measure the change from the previous close to the latest price; percent_change is that change as a percent of the previous close.
Stock movers restart when the market opens at 9:30 a.m. New York time; until then they show the previous trading session's movers. There is no pre-market list. Crypto movers restart once a day, around midnight.
as_of is when our data provider computed the lists, in UTC. The API keeps a fetched copy for up to a minute, so read as_of, not the time of your request. It is passed on as computed and never checked for age, so before the stock open it is hours old.
Gainers only include rows with a positive percent_change and losers only rows with a negative one, each sorted by percent_change, largest move first; rows with equal percent_change values keep the order they were computed in.
min_price keeps rows whose last price, before rounding, is at least the value you send. It filters the 50 biggest movers on each side, so a list can be shorter than limit. For crypto it is in each pair's quote currency (USD for BTC/USD), so one value compares pairs priced in the same currency.
Stock prices and changes are rounded to 2 decimal places and the percent to 2 places. The percent comes from unrounded prices, so for a stock under a dollar it can differ from what the rounded prices suggest. Crypto numbers are not rounded. Numbers are passed on as our data provider computed them; they are not checked against each other or against our quote endpoints.
Stock prices are adjusted for splits. Only symbols tradable on an exchange are included, which can mean warrants and stocks under a dollar; use min_price to leave them out. Symbols are passed on exactly as our data provider lists them.
Most active counts are cumulative for the current trading day.
If our data provider lists a symbol more than once in one list, only its first row is kept. Each list is checked on its own, so a symbol our data provider lists in both gainers and losers, up in one and down in the other, appears in both.
Ticker search
Results come from a list of active listings refreshed every hour; as_of is when it was last refreshed. A ticker listed in the last hour may not appear yet. If a refresh fails, the last list keeps being served, so as_of can be more than an hour old.
Matching ignores case. Ticker matches ignore separators, so BRKB, BRK B and brk-b all find BRK.B, and BTCUSD finds BTC/USD.
Order: an exact ticker first; then tickers that start with what you typed; then names that start with it; then names with a word that starts with it; then names that contain it anywhere (only for 3 characters or more). Within each group, shorter tickers come first, then alphabetical. Results are not ranked by company size or trading volume.
limit (1 to 50, default 10) applies after ordering.
Names are the listed names, including the share class (for example “Class A Common Stock”), which is how two tickers of one company differ.
quote_plan is about the quote endpoints only; historical bars, corporate actions and news need Supreme for any ticker.
Crypto: search by a pair or the beginning of its code, such as BTC or BTC/USD. Other matches depend on the listed name, which may be a short label such as BTC/USD pair rather than the coin's full name.
Retry transient failures with backoff
A cold-ticker 422/503
usually resolves within seconds. Retry a bounded number of times with increasing waits
and jitter, and check the status page
if it persists.
Rate limits
The quota is per account per minute, shared across all quote endpoints and MCP tool calls: it is not per-ticker, and replacing your API key does not reset it. The numbers below are the values the API actually enforces:
| Plan | Requests per minute |
|---|---|
| Free | 10 requests/min |
| Standard | 60 requests/min |
| Supreme | 600 requests/min |
Standard adds broader ticker access
(any supported symbol
instead of the Free list), crypto pairs, and a higher request allowance. Stock and
crypto requests draw from the same per-minute allowance, one request each. If the
allowance can't be checked for a moment, the request is served rather than refused, and
its X-RateLimit-* headers may be absent.
Response headers
| Header | Meaning | Present on |
|---|---|---|
X-RateLimit-Limit |
Current bucket allowance | Successful API response (absent if the allowance couldn't be checked); plan-quota 429 |
X-RateLimit-Remaining |
Remaining requests in that bucket | Successful API response (absent if the allowance couldn't be checked); plan-quota 429 (0, unless a batch needed more than remained) |
Retry-After |
Seconds to wait before retrying | Throttled 429 (any bucket); capacity 503 where supplied |
X-RateLimit-Reset |
Unix timestamp when the bucket resets | Plan-quota 429; not promised on 200 |
X-Auth-Failure-Limit / X-Auth-Failure-Remaining / X-Auth-Failure-Reset |
Same shape as the X-RateLimit-* trio above, but for the separate failed-authentication protection bucket |
Failed-auth 429 only |
X-Unverified-Email-Limit / X-Unverified-Email-Remaining / X-Unverified-Email-Reset |
Same shape as the X-RateLimit-* trio above, but for the separate unverified-email protection bucket |
Unverified-email 429 only |
Headers on a successful response Illustrative
HTTP/1.1 200 OK
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 41
Headers on a plan-quota 429 Illustrative
HTTP/1.1 429 Too Many Requests
Retry-After: 26
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1789718426
A 429
for repeated failed authentication is a separate, 30-attempts-per-minute-per-IP
protection bucket, unrelated to your plan quota: it carries its own
X-Auth-Failure-Limit/
X-Auth-Failure-Remaining
headers instead of
X-RateLimit-Limit,
so it can never be mistaken for your real allowance being cut. See
Errors & recovery
for the distinct error message too.
A 429
for a valid key on an unverified account is a third, separate,
60-requests-per-minute-per-account protection bucket, unrelated to your plan quota:
it carries its own
X-Unverified-Email-Limit/
X-Unverified-Email-Remaining
headers instead of
X-RateLimit-Limit,
for the same reason the failed-authentication bucket above does.
Batch requests
A batch request
always costs exactly 1 request against
your plan quota, no matter how many symbols it contains, up to
5 per call. A batch
rejected because your allowance is already exhausted comes back
429 and isn't charged at
all. A malformed batch (422)
is still charged, like any other request that reaches validation. The dashboard's
usage panel only counts a batch call once it actually reaches the quote service --
a call rejected by the plan gate (403)
or by validation (422)
is still charged against your rate limit but never appears in the panel, so the two
counts can differ for an account sending rejected batches. Batch endpoints
require a Standard or Supreme plan -- the Free plan
receives a 403
naming the required plans on every batch route.
Budgeting requests
On Standard, polling one symbol once per second uses 60 requests in 60 seconds; polling several symbols at that rate uses the allowance sooner. That describes request consumption only, not a promise of clock-aligned resets or guaranteed concurrency.
Stay under the limit
Cache responses where possible, watch X-RateLimit-Remaining
to self-throttle before hitting 429, and honor Retry-After
when you do. Automatic retries should cap their attempts, add jitter, and retry
transient failures only.
Errors & recovery
Errors on /api/*
always render as JSON, whatever Accept
header you sent. Three body shapes exist: an
error key
(authentication and rate limiting), a
message key
(plan restrictions and capacity), and validation's
message +
field-keyed errors.
| Status | What happened | What to do |
|---|---|---|
| 401 Invalid or missing token | The token field is absent, wrong, or belongs to a deleted account. Body: {"error":"Unauthenticated"}. | Check the body token and your key in the dashboard. Do not retry unchanged credentials. |
| 403 Email not verified | The key is valid but the account email is unverified. Body uses the error key. | Verify the account email address, then retry. |
| 403 Plan restriction | Crypto endpoints (crypto pair search included), the 52-week range, market movers and most active require Standard or Supreme; historical bars (stock and crypto), technical indicators (stock and crypto) and corporate actions require Supreme. Body uses the message key. | Use an endpoint your plan includes, or change plan. |
| 422 Input validation failed | A body field is missing or malformed: an out-of-list Free ticker, a malformed crypto pair, a bad date, an unknown adjustment, an unknown timeframe, a date range longer than the timeframe allows, or a malformed batch tickers list. Body: message plus field-keyed errors. | Correct the field named in errors. |
| 422 Date range too large | Historical bars (stock and crypto) and corporate actions: the range is within the documented limits but holds more data than one request can fetch. Keyed under errors.end. Retrying the same range fails the same way. | Split the range into shorter ranges and request each one. |
| 422 Data temporarily unavailable | The data fetch itself failed: a cold stock ticker still warming up, stock data unavailable after market hours, or a cold/unsupported crypto pair (crypto trades 24/7, so this is never a "closed market" case for crypto). Also field-keyed: under errors.ticker, except on the market movers and most-active endpoints, which take no ticker and use errors.asset_class; ticker search and crypto pair search use errors.query. The stock quote, crypto quote and historical/corporate-actions endpoints each use their own message wording; market movers share the historical wording (examples below). | Not proof the ticker is invalid: read the message, check the status page, retry transient cases with bounded backoff. |
| 429 Plan quota exhausted | You used your plan's per-minute allowance. Body: {"error":"You have hit your rate limit. Please try again shortly."}. | Honor Retry-After; reduce concurrent polling. |
| 429 Failed-auth protection | Too many failed authentication attempts from your IP (30/min bucket, separate from the plan quota). Distinct error message. | Wait, then send corrected credentials. |
| 503 Capacity busy / warming up | Too many concurrent cold requests, or historical capacity is saturated. Body uses the message key; Retry-After is set. | Honor the supplied delay; retry with bounded backoff and jitter. |
| 503 Market calendar not available | Market status or trading days needs a calendar year that is not stored yet (the calendar is refreshed every hour). Body uses the message key; Retry-After is set. | Honor the supplied delay, then retry. |
| 404 Route missing | The method or path is wrong. Unknown symbols do not return 404; symbol problems surface as 422. | Check the request method and the documented path. |
| 5xx Other server failure | An unexpected server error; no single documented response schema. | Retry only transient failures, with a cap, then check the status page or contact support. |
Copyable examples
Invalid or missing token HTTP 401
{
"error": "Unauthenticated"
}
Email not verified HTTP 403
{
"error": "Email verification required. Please verify your email address to continue using the API."
}
Plan does not include this endpoint HTTP 403
{
"message": "Historical data requires a Supreme subscription."
}
Plan does not include crypto HTTP 403
{
"message": "Crypto data requires a Standard or Supreme subscription."
}
Input validation failed HTTP 422
{
"message": "You do not have access to this ticker or this ticker is invalid.",
"errors": {
"ticker": [
"You do not have access to this ticker or this ticker is invalid."
]
}
}
Data temporarily unavailable (quote endpoints) HTTP 422
{
"message": "Error fetching ticker data. Please check that the ticker symbol is valid. Some ticker data is unavailable after market hours.",
"errors": {
"ticker": [
"Error fetching ticker data. Please check that the ticker symbol is valid. Some ticker data is unavailable after market hours."
]
}
}
Data temporarily unavailable (crypto quote endpoints) HTTP 422
{
"message": "Error fetching ticker data. Please check that the ticker pair is valid and currently supported. Crypto data may be temporarily unavailable; please try again shortly.",
"errors": {
"ticker": [
"Error fetching ticker data. Please check that the ticker pair is valid and currently supported. Crypto data may be temporarily unavailable; please try again shortly."
]
}
}
Data temporarily unavailable (historical & corporate actions) HTTP 422
{
"message": "Error fetching data. Please try again shortly.",
"errors": {
"ticker": [
"Error fetching data. Please try again shortly."
]
}
}
Date range too large (historical & corporate actions) HTTP 422
{
"message": "The requested date range returned too much data for one request. Please request a narrower date range.",
"errors": {
"end": [
"The requested date range returned too much data for one request. Please request a narrower date range."
]
}
}
Data temporarily unavailable (market movers and most active) HTTP 422
{
"message": "Error fetching data. Please try again shortly.",
"errors": {
"asset_class": [
"Error fetching data. Please try again shortly."
]
}
}
Data temporarily unavailable (ticker search) HTTP 422
{
"message": "Error fetching data. Please try again shortly.",
"errors": {
"query": [
"Error fetching data. Please try again shortly."
]
}
}
Plan quota exhausted HTTP 429
{
"error": "You have hit your rate limit. Please try again shortly."
}
Too many failed authentication attempts HTTP 429
{
"error": "Too many authentication attempts. Please try again shortly."
}
Quote capacity busy / warming up HTTP 503
{
"message": "Quote data is warming up right now. Please try again in a few seconds."
}
Troubleshooting
-
Getting 401 with a key you just copied?
The key goes in the request body (form or JSON) as
token, not in anAuthorizationheader, see Authentication. - Getting 403 right after signing up? Verify your email address first: every request is rejected until the account is verified.
- A ticker that "should work" returns 422? On the Free plan only the Free list is accepted. On any plan, a cold or (for stocks) after-hours ticker can return a temporary “Error fetching ticker data” 422, so retry shortly before concluding the symbol is wrong.
-
Responses look fine in curl but your code sees redirects or HTML?
Send
Accept: application/json, andContent-Type: application/jsonwhen the body is JSON, as the Python and Node examples do.
Available transports
The API is request/response REST only. Webhook delivery is not available: poll the endpoints above at an interval that fits inside your plan's rate limit.
Still stuck?
Check the system status page for a live view of the API's own health, or email [email protected] with the request you sent (minus your key) and the full response body.