finance-query v3.0.0

Finance Query Streaming API#

Generated by cargo soothfast spec html from asyncapi.yaml (AsyncAPI 3.0.0). Regenerate with cargo 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:

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:

  • fieldtyperequireddescription
    crossesAbovenumberrequired
  • fieldtyperequireddescription
    crossesBelownumberrequired
  • fieldtyperequireddescription
    priceAbovenumberrequired
  • fieldtyperequireddescription
    priceBelownumberrequired
  • fieldtyperequireddescription
    percentChangeAbovenumberrequired
  • fieldtyperequireddescription
    percentChangeBelownumberrequired
  • fieldtyperequireddescription
    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.

fieldtyperequireddescription
changePercentnumberrequiredPercent change carried by the triggering tick.
conditionAlertConditionrequiredCondition that fired.
previousPricenumberoptionalLast price seen before this tick, if any.
pricenumberrequiredPrice on the triggering tick.
symbolstringrequiredSymbol that triggered.
timeintegerrequiredTick timestamp (milliseconds).
updatePriceUpdaterequiredThe full triggering tick.
FeedStreamCommandobject · 3 fields

Inbound control message for `/v2/feeds/stream`.

fieldtyperequireddescription
formTypestringoptionalSEC filing form type, used when `sec-filings` is in `subscribe`.
subscribestring[]optionalFeed source slugs to subscribe to (same slugs as `GET /v2/feeds`'s `sources` param).
unsubscribestring[]optionalFeed source slugs to unsubscribe from.
GqlFeedEntryobject · 5 fields

A single entry from an RSS/Atom feed.

fieldtyperequireddescription
publishedstringoptional
sourcestringrequired
summarystringoptional
titlestringrequired
urlstringrequired
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:

  • PriceUpdate

  • AlertEvent

PriceUpdateobject · 33 fields

Real-time price update from Yahoo Finance WebSocket.

fieldtyperequireddescription
asknumberrequired
askSizeintegerrequired
bidnumberrequired
bidSizeintegerrequired
changenumberrequired
changePercentnumberrequired
circulatingSupplynumberrequired
currencystringrequired
dayHighnumberrequired
dayLownumberrequired
dayVolumeintegerrequired
exchangestringrequired
expireDateintegerrequired
fromCurrencystringrequired
idstringrequired
lastMarketstringrequired
lastSizeintegerrequired
marketCapnumberrequired
marketHoursMarketHoursTyperequired
miniOptionintegerrequired
openInterestintegerrequired
openPricenumberrequired
optionsTypeOptionTyperequired
previousClosenumberrequired
pricenumberrequired
priceHintintegerrequired
quoteTypepricing_QuoteTyperequired
shortNamestringrequired
strikePricenumberrequired
timeintegerrequired
underlyingSymbolstringrequired
vol24hrintegerrequired
volAllCurrenciesintegerrequired
WsAlertRuleobject · 4 fields

One alert rule as sent over the wire.

fieldtyperequireddescription
conditionAlertConditionKindrequiredPredicate to evaluate. Crossing conditions compare against the previous tick and never fire on a symbol's first tick.
repeatbooleanoptionalFire every time the condition becomes true again, instead of once.
symbolstringrequiredTicker symbol to watch.
valuenumberrequiredThreshold the predicate compares against.
params_StreamCommandobject · 3 fields

Inbound control message for `/v2/stream`.

fieldtyperequireddescription
alertsWsAlertRule[]optionalReplace 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.
subscribestring[]optionalTicker symbols to subscribe to.
unsubscribestring[]optionalTicker 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"

built with cargo soothfast docs build source