Fealthy Insights API
Introduction
The Fealthy Insights API gives you market data over HTTP. It is read-only and returns JSON. It covers:
- Exchange rates
- Stock, index, commodity and crypto prices and candles
- Dividends and earnings
Live prices also stream over a WebSocket.
Quick start
Send your key in the Authorization header. This request returns the latest USD/UAH rate:
curl 'https://insights.api.fealthy.ua/v1/m/latest?series=forex.usd.uah' \
-H 'Authorization: Bearer YOUR_KEY'
The response is a JSON object keyed by series, with one point:
{"forex.usd.uah":{"time":"2026-11-20T22:00:00.000Z","value":45.0532}}
Base URL
https://insights.api.fealthy.ua/v1
Every path in this reference starts with /v1. Add the path to https://insights.api.fealthy.ua to get the full URL.
Authentication
Every request needs an API key.
- Send it as
Authorization: Bearer YOUR_KEY. The SDK does this from itsgetTokenoption. - To get a key, email hello@fealthy.ua and say what you are building.
- A key is shown once. Keep it secret: never put it in a URL or in code that runs in a browser.
- If a key leaks, ask for a new one.
Try it
Every operation has a request button, and its forms are prefilled with working examples. The button sends the request directly to https://insights.api.fealthy.ua.
Rate limits and caps
Keys that have limits get these defaults:
| Limit | Default |
|---|---|
| Requests per minute | 30 |
| Requests per day | 2,000 |
| Open live-price connections | 1 |
Responses to a key with limits carry RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset (in seconds), except a 401. They describe the limit you will reach first. Past a limit you get a 429 with Retry-After. The minute window starts on the full minute and the day window at 00:00 UTC.
To see the limits of your key and how much of them is left, call /v1/limits. That call counts as a request too.
Each request is also capped:
| Where | Cap |
|---|---|
/m, /m/as-of |
Up to 50 sources |
/assets/events |
1-100 ids |
| Asset events operations | A date range of at most 400 days |
/assets |
limit up to 200 |
/assets/search |
limit up to 50 |
Errors
A failed request returns a JSON body. Its shape varies, so branch on the HTTP status code.
| Status | Meaning | Example body | What to do |
|---|---|---|---|
400 |
A parameter is missing or invalid. | {"error":"Bad Request"} |
Fix the request. The body or its message names the problem. |
401 |
The key was not accepted. | {"error":"Unauthorized"} |
Check that you sent the whole key and that it is still active. |
404 |
No asset or event has this id. | {"error":"Asset not found"} |
Check the id. |
404 |
The path is not an operation. | {"message":"Route GET:/x not found","error":"Not Found","statusCode":404} |
Check the URL. |
429 |
The key is over a limit. | {"error":"Too Many Requests"} |
Wait for the number of seconds in Retry-After, then retry. |
500 |
The API could not read its data. | {"error":"Internal server error"} |
Try again later. |
503 |
Quotes or events are temporarily unavailable. | {"error":"unavailable"} |
Try again later. If Retry-After is set, wait that many seconds. |
A 400 can also carry Validation error, invalid_query (an unknown parameter on the asset events operations) or a sentence that names the problem, such as from is required and must be an ISO date.
Caching
ETag: when an operation supports it, the response has a strongETag. Send it back asIf-None-Match. If nothing changed, you get a304with no body.Cache-Control: set per operation. For a request with a key,publicbecomesprivate(max-agestays). A response with noCache-Controlgetsprivate.401and429responses areno-store.
Browser access (CORS)
JavaScript in a browser on another origin can read these response headers: ETag, Deprecation, Link, X-Insights-History, X-Insights-Profile, Server-Timing, Retry-After, WWW-Authenticate, RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset. It can also read the headers every browser exposes, such as Cache-Control and Content-Type.
Deprecated operations
A deprecated operation keeps working but is removed from this reference. Its responses include:
Deprecation: the deprecation date, in seconds since the epoch.Linkwithrel="successor-version": the replacement.
The same path under /v1 works too. No removal has been announced, so no Sunset header is sent.
Live prices (WebSocket)
Connect to wss://insights.api.fealthy.ua/v1/m/subscribe to stream live prices. This is a WebSocket, not an HTTP operation, so the request button cannot open it. Use the SDK's subscribe() or any WebSocket client.
A browser cannot set headers on a WebSocket. Pass two subprotocols instead: fealthy.insights.v1 and YOUR_KEY. The API replies with fealthy.insights.v1.
All messages are JSON text.
| Client sends | What it does |
|---|---|
{"type":"subscribe","series":["stock.us.aapl"]} |
Subscribe to these series. |
{"type":"unsubscribe","series":["stock.us.aapl"]} |
Unsubscribe from them. |
{"type":"ping"} |
Ask for a pong. |
| Server sends | What it does |
|---|---|
{"type":"subscribed","accepted":[...],"rejected":[{"series":"x","code":"unknown_series"}]} |
Replies to subscribe with the accepted series, and the rejected ones with a code. |
{"type":"snapshot","series":"stock.us.aapl","time":"2026-11-20T21:00:00.000Z","value":342.56,"session":"REGULAR"} |
Sent once for each accepted series, with its last price. |
{"type":"tick","series":"stock.us.aapl","time":"...","value":343.1,"session":"REGULAR"} |
The price changed. About one per second at most, per series and session. |
{"type":"unsubscribed","series":["stock.us.aapl"]} |
Replies to unsubscribe. |
{"type":"pong"} |
Replies to ping. |
{"type":"error","code":"invalid_message","message":"..."} |
The API rejected your message. |
Codes in rejected and in error messages:
| Code | When | What to do |
|---|---|---|
invalid_message |
The message is not valid JSON, has an unknown type, or series is not a non-empty array of strings. |
Fix the message. |
limit_exceeded |
The connection has 50 series already, or the API is at capacity. | Unsubscribe from some series, or try again later. |
not_live |
The series has no live price (forex and NBU series). | Use /m/latest instead. |
unknown_series |
The API does not know the series. | Check the series id. |
upstream_unavailable |
The data source for live prices is temporarily unavailable. | Use REST for now, and try again later. |
session is REGULAR, PRE, POST or EXTENDED. Use only REGULAR points for a headline price.
A connection holds at most 50 series. Connections do not last forever: when one drops, reconnect and subscribe again. The SDK does this for you.
import { InsightsClient } from '@fealthy/insights-sdk';
const insights = new InsightsClient();
const subscription = insights.subscribe(['stock.us.aapl', 'crypto.btc'], {
onSnapshot: point => console.log('start', point.series, point.value),
onTick: point => console.log(point.series, point.value, point.session),
onError: error => console.error(error.series, error.message),
});
subscription.add('stock.us.msft'); // add more series to the same socket
subscription.close(); // stop the stream and any reconnecting
SDK
@fealthy/insights-sdk is a TypeScript client for this API. It is a 0.x preview on GitHub Packages with restricted access, so only Fealthy's own apps can install it today. You do not need it: every operation works over plain HTTP and has a cURL sample. The TypeScript samples in this reference use the SDK. If you have access, create a client like this:
import { InsightsClient } from '@fealthy/insights-sdk';
const insights = new InsightsClient();
You can try the SDK in your browser, no install needed: open the SDK playground, paste your key and run any example from this reference.
A Python SDK is coming. Until then, use any HTTP client and start from the cURL samples.