Finance Query Streaming API#
Generated by
cargo soothfast spec htmlfromasyncapi.yaml(AsyncAPI 3.0.0). Regenerate withcargo soothfast spec gen+spec html; do not hand-edit.
Version: 3.0.0
High-performance financial data API server built on finance-query library
Servers:
financeQuery—wss://finance-query.comlocalhost—ws://localhost:8000
Channels 2 channel(s)#
/v2/feeds/streamFeedStreamCommand, GqlFeedEntry
Messages
FeedStreamCommand, GqlFeedEntry
/v2/streamPriceStreamMessage, params_StreamCommand
Messages
PriceStreamMessage, params_StreamCommand
Operations 4 operation(s)#
SENDv2FeedsStreamNewly-seen RSS/Atom feed entries as the server polls each source.
Payload · GqlFeedEntry
{
"published": "string",
"source": "string",
"summary": "string",
"title": "string",
"url": "string"
}GqlFeedEntry
SENDv2StreamReal-time price ticks, or fired alert events while alert rules are active.
Payload · PriceStreamMessage
{
"ask": 0.0,
"askSize": 0,
"bid": 0.0,
"bidSize": 0,
"change": 0.0,
"changePercent": 0.0,
"circulatingSupply": 0.0,
"currency": "string",
"dayHigh": 0.0,
"dayLow": 0.0,
"dayVolume": 0,
"exchange": "string",
"expireDate": 0,
"fromCurrency": "string",
"id": "string",
"lastMarket": "string",
"lastSize": 0,
"marketCap": 0.0,
"marketHours": "PRE_MARKET",
"miniOption": 0,
"openInterest": 0,
"openPrice": 0.0,
"optionsType": "CALL",
"previousClose": 0.0,
"price": 0.0,
"priceHint": 0,
"quoteType": "NONE",
"shortName": "string",
"strikePrice": 0.0,
"time": 0,
"underlyingSymbol": "string",
"vol24hr": 0,
"volAllCurrencies": 0
}PriceStreamMessage
RECEIVEv2FeedsStreamSubscribe/unsubscribe to feed sources.
Payload · FeedStreamCommand
{
"formType": "string",
"subscribe": [
"string"
],
"unsubscribe": [
"string"
]
}FeedStreamCommand
RECEIVEv2StreamSubscribe/unsubscribe to symbols, or set alert rules.
Payload · params_StreamCommand
{
"alerts": [
{
"condition": "crossesAbove",
"repeat": true,
"symbol": "string",
"value": 0.0
}
],
"subscribe": [
"string"
],
"unsubscribe": [
"string"
]
}params_StreamCommand
Schemas 12 type(s)#
AlertConditiononeOf · 7 variants
A predicate over incoming price ticks.
one of:
field type required description crossesAbovenumberrequired field type required description crossesBelownumberrequired field type required description priceAbovenumberrequired field type required description priceBelownumberrequired field type required description percentChangeAbovenumberrequired field type required description percentChangeBelownumberrequired field type required description volumeAboveintegerrequired
AlertConditionKindenum
Which predicate an [`AlertCondition`] applies, without its threshold.
one of: "crossesAbove", "crossesBelow", "priceAbove", "priceBelow", "percentChangeAbove", "percentChangeBelow", "volumeAbove"
AlertEventobject · 7 fields
A fired alert, carrying the tick that triggered it.
| field | type | required | description |
|---|---|---|---|
changePercent | number | required | Percent change carried by the triggering tick. |
condition | AlertCondition | required | Condition that fired. |
previousPrice | number | optional | Last price seen before this tick, if any. |
price | number | required | Price on the triggering tick. |
symbol | string | required | Symbol that triggered. |
time | integer | required | Tick timestamp (milliseconds). |
update | PriceUpdate | required | The full triggering tick. |
FeedStreamCommandobject · 3 fields
Inbound control message for `/v2/feeds/stream`.
| field | type | required | description |
|---|---|---|---|
formType | string | optional | SEC filing form type, used when `sec-filings` is in `subscribe`. |
subscribe | string[] | optional | Feed source slugs to subscribe to (same slugs as `GET /v2/feeds`'s `sources` param). |
unsubscribe | string[] | optional | Feed source slugs to unsubscribe from. |
GqlFeedEntryobject · 5 fields
A single entry from an RSS/Atom feed.
| field | type | required | description |
|---|---|---|---|
published | string | optional | |
source | string | required | |
summary | string | optional | |
title | string | required | |
url | string | required |
MarketHoursTypeenum
Market hours type enumeration
one of: "PRE_MARKET", "REGULAR_MARKET", "POST_MARKET", "EXTENDED_HOURS_MARKET"
OptionTypeenum
Option type enumeration
one of: "CALL", "PUT"
PriceStreamMessageoneOf · 2 variants
Outbound message on `/v2/stream`: a live price tick, or — while a client's alert rules are active — a fired alert event instead of the raw tick. Schema-only: `deliver()` in `handlers::stream` sends each variant's JSON directly rather than constructing this type.
one of:
PriceUpdateAlertEvent
PriceUpdateobject · 33 fields
Real-time price update from Yahoo Finance WebSocket.
| field | type | required | description |
|---|---|---|---|
ask | number | required | |
askSize | integer | required | |
bid | number | required | |
bidSize | integer | required | |
change | number | required | |
changePercent | number | required | |
circulatingSupply | number | required | |
currency | string | required | |
dayHigh | number | required | |
dayLow | number | required | |
dayVolume | integer | required | |
exchange | string | required | |
expireDate | integer | required | |
fromCurrency | string | required | |
id | string | required | |
lastMarket | string | required | |
lastSize | integer | required | |
marketCap | number | required | |
marketHours | MarketHoursType | required | |
miniOption | integer | required | |
openInterest | integer | required | |
openPrice | number | required | |
optionsType | OptionType | required | |
previousClose | number | required | |
price | number | required | |
priceHint | integer | required | |
quoteType | pricing_QuoteType | required | |
shortName | string | required | |
strikePrice | number | required | |
time | integer | required | |
underlyingSymbol | string | required | |
vol24hr | integer | required | |
volAllCurrencies | integer | required |
WsAlertRuleobject · 4 fields
One alert rule as sent over the wire.
| field | type | required | description |
|---|---|---|---|
condition | AlertConditionKind | required | Predicate to evaluate. Crossing conditions compare against the previous tick and never fire on a symbol's first tick. |
repeat | boolean | optional | Fire every time the condition becomes true again, instead of once. |
symbol | string | required | Ticker symbol to watch. |
value | number | required | Threshold the predicate compares against. |
params_StreamCommandobject · 3 fields
Inbound control message for `/v2/stream`.
| field | type | required | description |
|---|---|---|---|
alerts | WsAlertRule[] | optional | Replace the connection's alert rule set. While a non-empty rule set is active the server sends alert events instead of raw price updates; send an empty array to revert to raw ticks. Symbols named by rules are subscribed automatically. |
subscribe | string[] | optional | Ticker symbols to subscribe to. |
unsubscribe | string[] | optional | Ticker symbols to unsubscribe from. |
pricing_QuoteTypeenum
Quote type enumeration
one of: "NONE", "ALT_SYMBOL", "HEARTBEAT", "EQUITY", "INDEX", "MUTUAL_FUND", "MONEY_MARKET", "OPTION", "CURRENCY", "WARRANT", "BOND", "FUTURE", "ETF", "COMMODITY", "ECN_QUOTE", "CRYPTOCURRENCY", "INDICATOR", "INDUSTRY"
