datafye-mcp-api
v2.0.63MCP server for the Datafye API — market data and trading operations for AI agents
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
connect
Connect to a Datafye environment by URL. Use this when the environment is running outside the default network (e.g. on the host machine or a remote cloud). The URL should point to the REST API base (e.g. https://myfoundry-foundry-dev-api.datafye.io).
| Parameter | Type | Description |
|---|---|---|
url * | string | Base URL of the Datafye REST API (e.g. http://localhost:7776 or https://myfoundry-foundry-dev-api.datafye.io) |
status
Get the current connection status — shows which Datafye environment URL is active.
ping
Health check for the Datafye environment. Optionally filter by dataset (SIP, Synthetic, Crypto), service (Reference, Feed, Agg, History), or system name. Returns service health status.
| Parameter | Type | Description |
|---|---|---|
dataset | string | Filter to a specific dataset |
service | string | Filter to a specific service within the dataset |
system | string | Check health of a specific system by name (mutually exclusive with dataset) |
get_deployed_datasets
Get the list of datasets deployed in this environment (e.g. SIP, Synthetic, Crypto).
get_deployed_systems
Get the list of systems deployed in this environment (e.g. datafye-sip-system, datafye-api-system).
get_deployed_symbols
Get the map of dataset to allowed symbols. An asterisk (*) means all symbols are allowed.
get_deployment_descriptor
Get the deployment descriptor (YAML configuration) used to provision this environment.
| Parameter | Type | Description |
|---|---|---|
pretty | boolean | If true, returns raw YAML; otherwise a JSON wrapper |
get_deployment_activity
Find out whether anything is actually happening in this environment. Fans out across every deployed dataset and its feed, agg, history and reference services in one call, returning when each last did real work. Use this to decide whether an environment is genuinely busy (a running backtest, a live feed, someone reading history) rather than merely provisioned. Requests used to OBSERVE a service - health pings, fetch-status polls, and the activity reads themselves - deliberately do not count, so polling this cannot make an environment look busy. Each entry also reports the KIND of its last activ…
| Parameter | Type | Description |
|---|---|---|
activeWithinSeconds | integer | How recent an activity time must be for dataFlowing to be true. Defaults to 300. Raw per-service timestamps are returned regardless, so you can apply your own window instead. |
get_service_activity
Get when one service last did ANYTHING, and what that was. A roll-up across everything the service does - receiving data, serving requests, replay, EOD, indexing, clearing its store - so you do not have to know and poll each activity separately. Returns latestActivityTime (epoch millis, 0 if nothing since startup) and latestActivityKind (data, clock, serve, eod, index, fetch, replay, clear-store). Requests used to OBSERVE a service (health pings, status polls, this call) do not count, so polling cannot make a service look busy. Use get_deployment_activity instead when you want the whole enviro…
| Parameter | Type | Description |
|---|---|---|
dataset * | string | The dataset the service belongs to |
service * | string | Which service within the dataset |
get_stocks_securities
Get the securities master (symbol, name, primaryExchange) for a stocks dataset. For SIP it is the provider's active tickers, stored and refreshed daily at 06:00 ET; a request for any other date than the stored list's is fetched from the provider and takes several seconds.
| Parameter | Type | Description |
|---|---|---|
dataset | string | Dataset (default: SIP) |
date | string | Date (yyyy-MM-dd). Omit for the stored list: for SIP, today's after 06:00 ET, otherwise yesterday's. |
exchanges | string | Comma-separated primary exchanges, as market identifier codes (e.g. XNYS,XNAS). Names like NYSE or NASDAQ match nothing. |
get_stocks_securities_status
Describe the stored SIP security master: the date it is for, how many securities it holds, and how many requests were answered from it versus fetched from the provider since the service started.
get_stocks_corporate_actions
Describe the stored SIP corporate actions (splits and dividends), which adjusted prices are computed from: the ex-dates covered (coverageFrom..coveredThrough), how many symbols they were fetched for, and how many splits and dividends there are. status is set when none are stored yet; lastRefreshError when the last refresh failed, in which case the previous copy is still served.
get_stocks_adjustment_factors
Get what to multiply one SIP symbol's as-traded bar by to put it on a price basis as of a later date: priceFactor for open/high/low/close, volumeFactor for volume. When the stored corporate actions cannot cover the window, missingReason is set and there are no factors: the bar cannot be adjusted, which is not the same as having nothing to adjust.
| Parameter | Type | Description |
|---|---|---|
basis * | string | Price basis to adjust to |
date * | string | Market date of the as-traded bar (yyyy-MM-dd) |
symbol * | string | Symbol (e.g. AAPL) |
asOf | string | Adjust as of this market date (yyyy-MM-dd); actions after it are not applied. Default: coveredThrough, the date the stored corporate actions are complete through; the response's asOf says which date w… |
get_stocks_latest_trade_time
Get the timestamp of the last trade received by the live feed.
| Parameter | Type | Description |
|---|---|---|
dataset | string | Dataset (default: SIP) |
get_stocks_latest_trades
Get the last trade for each requested symbol from the live feed.
| Parameter | Type | Description |
|---|---|---|
symbols * | string | Comma-separated symbols (e.g. AAPL,MSFT) |
dataset | string | Dataset (default: SIP) |
get_stocks_latest_quote_time
Get the timestamp of the last quote received by the live feed.
| Parameter | Type | Description |
|---|---|---|
dataset | string | Dataset (default: SIP) |
get_stocks_top_of_book
Get the current top-of-book bid/ask quote for each requested symbol.
| Parameter | Type | Description |
|---|---|---|
symbols * | string | Comma-separated symbols (e.g. AAPL,MSFT) |
dataset | string | Dataset (default: SIP) |
get_stocks_live_agg_latest_time
Get the timestamp of the last trade received by the live aggregates subsystem.
| Parameter | Type | Description |
|---|---|---|
dataset | string | Dataset (default: SIP) |
get_stocks_live_ohlcs
Get OHLC candles for the current trading day. Optionally include prior days with the history parameter. volume and count follow VOLUME eligibility, which the SIPs decide independently of price eligibility. Odd lots and similar prints contribute their shares without contributing a price, so volume divided by count is normally well below 100 shares. That is correct, not a defect. A bar whose every print was volume-only carries volume with the price fields ABSENT rather than zero.
| Parameter | Type | Description |
|---|---|---|
frequency * | string | Candle frequency (currently only Minute for live) |
symbol * | string | Symbol to fetch (e.g. AAPL) |
dataset | string | Dataset (default: SIP) |
history | integer | Number of prior days to include (default: 0) |
get_stocks_live_day_ohlcs
Get DAY bars for a symbol with the day-specific fields that get_stocks_live_ohlcs cannot return: the opening and closing auction executions with their sizes and timestamps, the session boundaries, and a separate extended-hours picture. Returns the retained day bars followed by the in-flight one. SIP only. open and close are the REGULAR SESSION's - the first eligible trade at or after the session start and the last at or before the session end - not the auction prices. The auction prices are reported separately as officialOpen and officialClose so you can choose which you want. officialOpen a…
| Parameter | Type | Description |
|---|---|---|
symbol * | string | Symbol to fetch (e.g. AAPL) |
get_stocks_live_last_day_ohlcs
Get the most recent COMPLETED day bar for each of a set of symbols in one call, with the day-specific fields (auction executions, session boundaries, extended-hours figures). The batch counterpart of get_stocks_live_day_ohlcs. SIP only. The in-flight bar is never returned, so repeated calls agree. Every requested symbol comes back with an entry; one with no bar is marked empty rather than dropped, so you can tell 'no data' from 'symbol not recognised'. Pass notBefore unless you have a reason not to: day bars span sessions and survive a service restart, so without it a symbol that has not tra…
| Parameter | Type | Description |
|---|---|---|
symbols * | string | Comma-separated symbols to fetch (e.g. AAPL,MSFT) |
notBefore | string | Reject a bar older than this point (YYYY-MM-DDThh:mm:ss, read in market time). |
get_stocks_live_last_ohlcs
Get the most recent COMPLETED candle for each of a set of symbols, in one call. Use this to sample the latest price across many symbols; use get_stocks_live_ohlcs for one symbol's full series. The in-flight (partial) candle is excluded, so repeated calls agree. Every requested symbol comes back with an entry - one with no candle is marked empty rather than dropped.
| Parameter | Type | Description |
|---|---|---|
frequency * | string | Candle frequency |
symbols * | string | Comma-separated symbols to fetch (e.g. AAPL,MSFT) |
dataset | string | Dataset (default: SIP) |
notBefore | string | Reject a candle older than this point (YYYY-MM-DDThh:mm:ss, read in the dataset's market timezone). Retained candles survive a service restart, so without this a symbol that has not traded in the curr… |
get_stocks_live_smas
Get Simple Moving Averages (SMAs) for the current trading day.
| Parameter | Type | Description |
|---|---|---|
frequency * | string | Frequency |
symbol * | string | Symbol to fetch |
dataset | string | Dataset (default: SIP) |
get_stocks_live_emas
Get Exponential Moving Averages (EMAs) for the current trading day, including MACD values and crossover states.
| Parameter | Type | Description |
|---|---|---|
frequency * | string | Frequency |
symbol * | string | Symbol to fetch |
dataset | string | Dataset (default: SIP) |
get_stocks_historical_ohlcs
Get historical OHLC candles. For Second/Minute frequency, from and to must be within the same day. At frequency=Day, closeAt selects which daily series to read. priceBasis puts the candles on a price basis (as-traded, split-adjusted, or split-and-dividend-adjusted); each symbol's priceBasis and basisAsOf in the response say what basis its candles are on.
| Parameter | Type | Description |
|---|---|---|
frequency * | string | Candle frequency |
from * | string | Start timestamp inclusive (yyyy-MM-DDThh:mm:ss) |
symbols * | string | Comma-separated symbols (e.g. AAPL,MSFT) |
to * | string | End timestamp inclusive (yyyy-MM-DDThh:mm:ss) |
asOf | string | The market date (yyyy-MM-dd) to adjust as of. Only with priceBasis. A symbol with a bar dated after asOf comes back with a missingReason. Default: coveredThrough, the date the stored corporate actions… |
closeAt | string | Selects WHICH daily series to read, as a 24-hour HH:MM (for example 15:30). Only meaningful at frequency=Day. Omit it -- or pass 'official' -- for the series sealed by the official close, which is wha… |
dataset | string | Dataset (default: SIP) |
priceBasis | string | The price basis to return the candles on. Omit it to get them as stored; each symbol's priceBasis in the response then says what that was (mixedBasis=true if they are not all on one). A symbol that ca… |
get_stocks_top_gainers
Get stocks that gained at or above a threshold percentage compared to the prior trading day.
| Parameter | Type | Description |
|---|---|---|
date * | string | Date (yyyy-MM-dd) |
gainThreshold * | number | Minimum gain percentage (e.g. 2 = 2%) |
dataset | string | Dataset (default: SIP) |
maxCount | integer | Max results (0 or omit for all) |
index_stocks_ohlc_history
Make stocks OHLC logs that were staged on disk readable. The history service holds an in-memory map of each log's per-symbol byte ranges, built when it started, so a log that is only on disk is a log it will NEVER read -- and a query against it returns EMPTY rather than an error. Call this after anything that writes the store directly (`datafye data history csv-to-binary`, a file copy, a restore). Not needed after a fetch, which indexes as it goes. Safe to repeat: a log whose index is current is skipped. An EMPTY `status` in the response means it worked.
| Parameter | Type | Description |
|---|---|---|
frequency * | string | The frequency whose logs to index |
clear_backtest_state
Clear all backtest state in the Foundry environment. Call this before starting a new backtest to ensure a clean slate. Typical workflow: 1) fetch history, 2) clear state, 3) start replay.
start_stocks_tick_fetch
Start fetching tick history (trades and/or quotes) from the data provider for backtest replay. Foundry only.
| Parameter | Type | Description |
|---|---|---|
date * | string | MOST RECENT date of the window (yyyy-MM-dd). numDays counts BACKWARDS from this date, so this is the END of the range fetched, not the start. |
allSymbols | boolean | Fetch the entire provider universe (large). Required to be true when symbols is omitted. |
dataset | string | Dataset (default: SIP) |
endTime | string | Intraday window end (exclusive), same format/timezone as startTime. |
noQuotes | boolean | Exclude quote data (default: false) |
noTrades | boolean | Exclude trade data (default: false) |
numDays | integer | Number of days to fetch, counting BACKWARDS from `date` (default: 1). numDays=5 with date=2026-08-07 fetches 2026-08-03..2026-08-07. NOTE: a fetch REPLACES the stored history for this frequency -- it… |
sortByExchangeTs | boolean | Sort by exchange timestamp (default: true) |
startTime | string | Intraday window start, HH:MM[:SS[.mmm]] in the dataset's market timezone (ET for SIP/Synthetic); inclusive. Ticks/trades/quotes only. |
symbols | string | Comma-separated symbols. Required unless allSymbols is true. |
check_stocks_tick_fetch
Check whether a stocks tick history fetch is currently running.
| Parameter | Type | Description |
|---|---|---|
dataset | string | Dataset (default: SIP) |
cancel_stocks_tick_fetch
Cancel a running stocks tick history fetch.
| Parameter | Type | Description |
|---|---|---|
dataset | string | Dataset (default: SIP) |
start_stocks_quote_fetch
Start fetching quote history from the data provider. Use this if your algo only needs quotes. Otherwise prefer tick history (includes both). Foundry only.
| Parameter | Type | Description |
|---|---|---|
date * | string | MOST RECENT date of the window (yyyy-MM-dd). numDays counts BACKWARDS from this date, so this is the END of the range fetched, not the start. |
allSymbols | boolean | Fetch the entire provider universe (large). Required to be true when symbols is omitted. |
dataset | string | Dataset (default: SIP) |
endTime | string | Intraday window end (exclusive), same format/timezone as startTime. |
format | string | Output format (default: Binary — use Binary for replay) |
groupBySymbol | boolean | Group output files by symbol (default: false) |
numDays | integer | Number of days to fetch, counting BACKWARDS from `date` (default: 1). numDays=5 with date=2026-08-07 fetches 2026-08-03..2026-08-07. NOTE: a fetch REPLACES the stored history for this frequency -- it… |
sortByExchangeTs | boolean | Sort by exchange timestamp (default: true) |
startTime | string | Intraday window start, HH:MM[:SS[.mmm]] in the dataset's market timezone (ET for SIP/Synthetic); inclusive. Ticks/trades/quotes only. |
symbols | string | Comma-separated symbols. Required unless allSymbols is true. |
check_stocks_quote_fetch
Check whether a stocks quote history fetch is currently running.
| Parameter | Type | Description |
|---|---|---|
dataset | string | Dataset (default: SIP) |
cancel_stocks_quote_fetch
Cancel a running stocks quote history fetch.
| Parameter | Type | Description |
|---|---|---|
dataset | string | Dataset (default: SIP) |
start_stocks_trade_fetch
Start fetching trade history from the data provider. Use this if your algo only needs trades. Otherwise prefer tick history (includes both). Foundry only.
| Parameter | Type | Description |
|---|---|---|
date * | string | MOST RECENT date of the window (yyyy-MM-dd). numDays counts BACKWARDS from this date, so this is the END of the range fetched, not the start. |
allSymbols | boolean | Fetch the entire provider universe (large). Required to be true when symbols is omitted. |
dataset | string | Dataset (default: SIP) |
endTime | string | Intraday window end (exclusive), same format/timezone as startTime. |
format | string | Output format (default: Binary — use Binary for replay) |
groupBySymbol | boolean | Group output files by symbol (default: false) |
numDays | integer | Number of days to fetch, counting BACKWARDS from `date` (default: 1). numDays=5 with date=2026-08-07 fetches 2026-08-03..2026-08-07. NOTE: a fetch REPLACES the stored history for this frequency -- it… |
sortByExchangeTs | boolean | Sort by exchange timestamp (default: true) |
startTime | string | Intraday window start, HH:MM[:SS[.mmm]] in the dataset's market timezone (ET for SIP/Synthetic); inclusive. Ticks/trades/quotes only. |
symbols | string | Comma-separated symbols. Required unless allSymbols is true. |
check_stocks_trade_fetch
Check whether a stocks trade history fetch is currently running.
| Parameter | Type | Description |
|---|---|---|
dataset | string | Dataset (default: SIP) |
cancel_stocks_trade_fetch
Cancel a running stocks trade history fetch.
| Parameter | Type | Description |
|---|---|---|
dataset | string | Dataset (default: SIP) |
start_stocks_ohlc_fetch
Start fetching OHLC history at a given frequency from the data provider. Foundry only. Name the window one of two ways, never both: `date` + `numDays` fetches whole dates and REPLACES each date's stored bars; `startDateTime` + `endDateTime` (Second, Minute or Hour, SIP only) fetches a time range and MERGES it into the stored dates, so a day's minute bars can be collected a range at a time as they become available (e.g. every few minutes through the session), ready for start_stocks_daily_series_update with minuteSource Stored at the cutoff. Poll check_stocks_ohlc_fetch for the outcome.
| Parameter | Type | Description |
|---|---|---|
frequency * | string | OHLC frequency |
adjusted | boolean | Store the provider's split-adjusted bars instead of as-traded ones (default: false). Leave it false: get_stocks_historical_ohlcs converts as-traded bars to any priceBasis (AsTraded, SplitAdjusted, Spl… |
allSymbols | boolean | Fetch the entire provider universe (large). Required to be true when symbols is omitted. |
closeAt | string | Which daily series to PRODUCE, as 24-hour HH:MM (e.g. 15:30). Day ONLY -- any other frequency is rejected. Omit for the official close, which is what a provider day aggregate already is. Set, it DERIV… |
dataset | string | Dataset (default: SIP) |
date | string | MOST RECENT date of the window (yyyy-MM-dd). numDays counts BACKWARDS from this date, so this is the END of the range fetched, not the start. Required unless startDateTime and endDateTime are given; n… |
endDateTime | string | With startDateTime: the EXCLUSIVE end of the range, yyyy-MM-ddTHH:mm:ss New York time. A range ending 11:00:00 includes the minute bar that starts at 10:59 and not the one at 11:00. May not be in the… |
format | string | Output file format (default: Binary). Binary is the indexed message log the history serves and a backtest replays. Csv writes text beside it in the interchange format `datafye data history csv-to-bina… |
numDays | integer | Number of days to fetch, counting BACKWARDS from `date` (default: 1). numDays=5 with date=2026-08-07 fetches 2026-08-03..2026-08-07. NOTE: a fetch by date REPLACES the stored history for each date --… |
startDateTime | string | With endDateTime: the start of a time range to fetch, yyyy-MM-ddTHH:mm:ss in New York time, inclusive. Second, Minute or Hour, SIP only. The range MERGES into the stored dates: for each symbol fetched… |
symbols | string | Comma-separated symbols. Required unless allSymbols is true. |
check_stocks_ohlc_fetch
Check whether a stocks OHLC history fetch is currently running. At Second, Minute and Hour it also reports what the last ranged fetch (startDateTime/endDateTime) did: from, to, merged, barsFetched, barsAdded, barsReplaced, barsRemoved, symbolCounts per symbol, failedSymbols. A refused or failed ranged fetch also reports isRunning=false, so read `error` too.
| Parameter | Type | Description |
|---|---|---|
frequency * | string | OHLC frequency to check |
dataset | string | Dataset (default: SIP) |
cancel_stocks_ohlc_fetch
Cancel a running stocks OHLC history fetch.
| Parameter | Type | Description |
|---|---|---|
frequency * | string | OHLC frequency to cancel |
dataset | string | Dataset (default: SIP) |
start_stocks_daily_series_update
Start merging a range of dates into a stored DAILY OHLC series (SIP only), instead of replacing it as start_stocks_ohlc_fetch does. For each symbol and date in the range the fetched bar is added, or replaces the stored bar when its prices or volume differ; every other stored bar is kept. Re-running the same range changes nothing, and a series that does not exist yet is created. Use a fetch to build a series and this to keep it current (e.g. add today's 15:30 bar once 15:30 New York time has passed) or to repair dates. Bars are always as-traded, as the store holds them; read with a priceBasis t…
| Parameter | Type | Description |
|---|---|---|
date * | string | LAST date of the range (yyyy-MM-dd); may not be after today, and may be today only once the series' close has passed (closeAt, or 16:00 New York time for the official series). numDays counts BACKWARDS… |
allSymbols | boolean | Fetch the entire provider universe (large). Required to be true when symbols is omitted. |
closeAt | string | Which daily series to update, as a 24-hour HH:MM (e.g. 15:30). Omit for the official close. Bars are derived as a fetch derives them: the official close from day aggregates, a cutoff series from minut… |
dryRun | boolean | Report how many bars would be added and changed, and write nothing (default: false). |
minuteSource | string | Where a cutoff series' bars are derived from (default: Provider). Provider fetches each date's minute bars from the provider after the cutoff; for a large universe that takes longer than a few minutes… |
numDays | integer | Number of days to merge, counting BACKWARDS from `date` (default: 1, i.e. `date` alone). Calendar days: a date with no trading produces no bar. |
symbols | string | Comma-separated symbols. Required unless allSymbols is true. |
check_stocks_daily_series_update
Check whether a daily series update is running and, once finished, what it did: barsAdded, barsChanged, barsUnchanged, barsKept, written, failedSymbols. With minuteSource Stored or Supplied it also reports derivedBars (per symbol: the bar, minuteBars it was built from and lastMinuteTime, so a symbol whose minutes stop early is visible) and symbolsWithoutMinutes. A refused or failed update also reports isRunning=false, so read `error` too: when it is set, the series is unchanged, unless it says the updated log could not be swapped in or loaded, in which case the update completes when the next o…
start_stocks_daily_series_update_from_minutes
Merge one date's cutoff day bar, derived from minute bars you send, into a stored DAILY series (SIP only). Use it when you collected the day's minutes yourself and want the cutoff bar as soon as the cutoff passes. The bar is the one a closeAt fetch derives: open from the first minute at or after 09:30, running high/low, cumulative volume, close from the last minute before closeAt. Minutes on another date, before 09:30 or at/after closeAt are not used; the minutes are not stored. Suitable for a modest number of symbols through MCP; for a full universe POST the CSV gzipped to /datafye-api/v1/sto…
| Parameter | Type | Description |
|---|---|---|
closeAt * | string | The cutoff, 24-hour HH:MM (e.g. 15:30); names the daily series to update. |
csv * | string | Minute bars as CSV: header `timestamp,symbol,open,high,low,close,volume`, timestamps yyyy-MM-ddTHH:mm:ss New York time (the minute's start), each symbol's minutes together and ascending in time, as-tr… |
date * | string | The date to derive (yyyy-MM-dd); may be today once closeAt has passed. |
dryRun | boolean | Derive and report what would change, and write nothing (default: false). |
cancel_stocks_daily_series_update
Cancel a daily series update while it is still fetching, leaving the series unchanged. Once it has started merging (seconds) it cannot be cancelled.
start_stocks_tick_replay
Start replaying previously fetched tick history data. This drives backtest execution. Foundry only. Typical workflow: 1) fetch tick history, 2) clear backtest state, 3) start tick replay.
| Parameter | Type | Description |
|---|---|---|
date * | string | Date of previously fetched tick history (yyyy-MM-dd) |
dataset | string | Dataset (default: SIP) |
duration | string | Replay window duration, e.g. "6.5h", "30m" (default: "6.5h") |
rate | integer | Replay rate multiplier when rateType=MultipleOfActual (default: 1) |
rateType | string | Replay rate type (default: Exact) |
startPoint | string | Offset from start-of-day, e.g. "9.5h", "30m" (default: "9.5h") |
startTime | string | Time within day to start replay (hh:mm or "now", default: "now") |
check_stocks_tick_replay
Check whether a stocks tick history replay is currently running.
| Parameter | Type | Description |
|---|---|---|
dataset | string | Dataset (default: SIP) |
cancel_stocks_tick_replay
Cancel a running stocks tick history replay.
| Parameter | Type | Description |
|---|---|---|
dataset | string | Dataset (default: SIP) |
get_crypto_securities
Get the securities master (symbol, name, exchange) for the crypto dataset.
| Parameter | Type | Description |
|---|---|---|
date | string | Date (yyyy-MM-dd). Omit for current date. |
exchanges | string | Comma-separated exchange filter |
get_crypto_latest_trade_time
Get the timestamp of the last crypto trade received by the live feed.
get_crypto_latest_trades
Get the last crypto trade for each requested symbol from the live feed.
| Parameter | Type | Description |
|---|---|---|
symbols * | string | Comma-separated symbols (e.g. X:BTC-USD,X:ETH-USD) |
get_crypto_latest_quote_time
Get the timestamp of the last crypto quote received by the live feed.
get_crypto_top_of_book
Get the current top-of-book bid/ask quote for each requested crypto symbol.
| Parameter | Type | Description |
|---|---|---|
symbols * | string | Comma-separated symbols (e.g. X:BTC-USD,X:ETH-USD) |
get_crypto_live_agg_latest_time
Get the timestamp of the last trade received by the crypto live aggregates subsystem.
get_crypto_live_ohlcs
Get crypto OHLC candles for the current trading day.
| Parameter | Type | Description |
|---|---|---|
frequency * | string | Candle frequency (currently only Minute for live) |
symbol * | string | Symbol to fetch (e.g. X:BTC-USD) |
get_crypto_live_last_ohlcs
Get the most recent COMPLETED candle for each of a set of crypto symbols, in one call. Use this to sample the latest price across many symbols; use get_crypto_live_ohlcs for one symbol's full series. The in-flight (partial) candle is excluded, so repeated calls agree. Every requested symbol comes back with an entry - one with no candle is marked empty rather than dropped.
| Parameter | Type | Description |
|---|---|---|
frequency * | string | Candle frequency |
symbols * | string | Comma-separated symbols to fetch (e.g. BTCUSD,ETHUSD) |
notBefore | string | Reject a candle older than this point (YYYY-MM-DDThh:mm:ss, read in UTC). Retained candles survive a service restart, so without this a symbol that has not traded recently answers with a stale candle. |
get_crypto_live_smas
Get crypto Simple Moving Averages (SMAs) for the current trading day.
| Parameter | Type | Description |
|---|---|---|
frequency * | string | Frequency (currently only Minute for live) |
symbol * | string | Symbol to fetch (e.g. X:BTC-USD) |
get_crypto_live_emas
Get crypto Exponential Moving Averages (EMAs) for the current trading day, including MACD values and crossover states.
| Parameter | Type | Description |
|---|---|---|
frequency * | string | Frequency (currently only Minute for live) |
symbol * | string | Symbol to fetch (e.g. X:BTC-USD) |
get_crypto_historical_ohlcs
Get historical crypto OHLC candles. For Second/Minute frequency, from and to must be within the same day. At frequency=Day, closeAt selects which daily series to read.
| Parameter | Type | Description |
|---|---|---|
frequency * | string | Candle frequency |
from * | string | Start timestamp inclusive (yyyy-MM-DDThh:mm:ss) |
symbols * | string | Comma-separated symbols (e.g. X:BTC-USD,X:ETH-USD) |
to * | string | End timestamp inclusive (yyyy-MM-DDThh:mm:ss) |
closeAt | string | Selects WHICH daily series to read, as a 24-hour HH:MM (for example 15:30). Only meaningful at frequency=Day. Omit it -- or pass 'official' -- for the series sealed by the official close, which is wha… |
get_crypto_top_gainers
Get crypto assets that gained at or above a threshold percentage.
| Parameter | Type | Description |
|---|---|---|
date * | string | Date (yyyy-MM-dd) |
gainThreshold * | number | Minimum gain percentage (e.g. 2 = 2%) |
maxCount | integer | Max results (0 or omit for all) |
index_crypto_ohlc_history
Make crypto OHLC logs that were staged on disk readable. The history service holds an in-memory map of each log's per-symbol byte ranges, built when it started, so a log that is only on disk is a log it will NEVER read -- and a query against it returns EMPTY rather than an error. Call this after anything that writes the store directly (`datafye data history csv-to-binary`, a file copy, a restore). Not needed after a fetch, which indexes as it goes. Safe to repeat: a log whose index is current is skipped. An EMPTY `status` in the response means it worked.
| Parameter | Type | Description |
|---|---|---|
frequency * | string | The frequency whose logs to index |
start_crypto_tick_fetch
Start fetching crypto tick history (trades and/or quotes) from the data provider for backtest. Foundry only.
| Parameter | Type | Description |
|---|---|---|
date * | string | MOST RECENT date of the window (yyyy-MM-dd). numDays counts BACKWARDS from this date, so this is the END of the range fetched, not the start. |
allSymbols | boolean | Fetch the entire provider universe (large). Required to be true when symbols is omitted. |
endTime | string | Intraday window end (exclusive), same format/timezone (UTC) as startTime. |
noQuotes | boolean | Exclude quote data (default: false) |
noTrades | boolean | Exclude trade data (default: false) |
numDays | integer | Number of days to fetch, counting BACKWARDS from `date` (default: 1). numDays=5 with date=2026-08-07 fetches 2026-08-03..2026-08-07. NOTE: a fetch REPLACES the stored history for this frequency -- it… |
sortByExchangeTs | boolean | Sort by exchange timestamp (default: true) |
startTime | string | Intraday window start, HH:MM[:SS[.mmm]] in UTC (crypto market timezone); inclusive. Ticks/trades/quotes only. |
symbols | string | Comma-separated symbols. Required unless allSymbols is true. |
check_crypto_tick_fetch
Check whether a crypto tick history fetch is currently running.
cancel_crypto_tick_fetch
Cancel a running crypto tick history fetch.
start_crypto_quote_fetch
Start fetching crypto quote history from the data provider. Foundry only.
| Parameter | Type | Description |
|---|---|---|
date * | string | MOST RECENT date of the window (yyyy-MM-dd). numDays counts BACKWARDS from this date, so this is the END of the range fetched, not the start. |
allSymbols | boolean | Fetch the entire provider universe (large). Required to be true when symbols is omitted. |
endTime | string | Intraday window end (exclusive), same format/timezone (UTC) as startTime. |
format | string | Output format (default: Binary) |
groupBySymbol | boolean | Group output files by symbol (default: false) |
numDays | integer | Number of days to fetch, counting BACKWARDS from `date` (default: 1). numDays=5 with date=2026-08-07 fetches 2026-08-03..2026-08-07. NOTE: a fetch REPLACES the stored history for this frequency -- it… |
sortByExchangeTs | boolean | Sort by exchange timestamp (default: true) |
startTime | string | Intraday window start, HH:MM[:SS[.mmm]] in UTC (crypto market timezone); inclusive. Ticks/trades/quotes only. |
symbols | string | Comma-separated symbols. Required unless allSymbols is true. |
check_crypto_quote_fetch
Check whether a crypto quote history fetch is currently running.
cancel_crypto_quote_fetch
Cancel a running crypto quote history fetch.
start_crypto_trade_fetch
Start fetching crypto trade history from the data provider. Foundry only.
| Parameter | Type | Description |
|---|---|---|
date * | string | MOST RECENT date of the window (yyyy-MM-dd). numDays counts BACKWARDS from this date, so this is the END of the range fetched, not the start. |
allSymbols | boolean | Fetch the entire provider universe (large). Required to be true when symbols is omitted. |
endTime | string | Intraday window end (exclusive), same format/timezone (UTC) as startTime. |
format | string | Output format (default: Binary) |
groupBySymbol | boolean | Group output files by symbol (default: false) |
numDays | integer | Number of days to fetch, counting BACKWARDS from `date` (default: 1). numDays=5 with date=2026-08-07 fetches 2026-08-03..2026-08-07. NOTE: a fetch REPLACES the stored history for this frequency -- it… |
sortByExchangeTs | boolean | Sort by exchange timestamp (default: true) |
startTime | string | Intraday window start, HH:MM[:SS[.mmm]] in UTC (crypto market timezone); inclusive. Ticks/trades/quotes only. |
symbols | string | Comma-separated symbols. Required unless allSymbols is true. |
check_crypto_trade_fetch
Check whether a crypto trade history fetch is currently running.
cancel_crypto_trade_fetch
Cancel a running crypto trade history fetch.
start_crypto_ohlc_fetch
Start fetching crypto OHLC history at a given frequency from the data provider. Foundry only.
| Parameter | Type | Description |
|---|---|---|
date * | string | MOST RECENT date of the window (yyyy-MM-dd). numDays counts BACKWARDS from this date, so this is the END of the range fetched, not the start. |
frequency * | string | OHLC frequency |
adjusted | boolean | Fetch adjusted prices (default: FALSE). Crypto has no splits or dividends, so this normally has no effect; it exists for API symmetry with the stocks path. |
allSymbols | boolean | Fetch the entire provider universe (large). Required to be true when symbols is omitted. |
closeAt | string | Which daily series to PRODUCE, as 24-hour HH:MM in UTC (e.g. 15:30). Day ONLY -- any other frequency is rejected. Omit for the official series, which is what a provider day aggregate already is. Set,… |
format | string | Output file format (default: Binary). Binary is the indexed message log the history serves and a backtest replays. Csv writes text beside it in the interchange format `datafye data history csv-to-bina… |
numDays | integer | Number of days to fetch, counting BACKWARDS from `date` (default: 1). numDays=5 with date=2026-08-07 fetches 2026-08-03..2026-08-07. NOTE: a fetch REPLACES the stored history for this frequency -- it… |
symbols | string | Comma-separated symbols. Required unless allSymbols is true. |
check_crypto_ohlc_fetch
Check whether a crypto OHLC history fetch is currently running.
| Parameter | Type | Description |
|---|---|---|
frequency * | string | OHLC frequency to check |
cancel_crypto_ohlc_fetch
Cancel a running crypto OHLC history fetch.
| Parameter | Type | Description |
|---|---|---|
frequency * | string | OHLC frequency to cancel |
get_palpha_measurements
Read STORED Precision Alpha measurements for one symbol over a time range: temperature, free energy, power, resistance, noise, and the probability of the series moving up or down. Does NOT compute anything -- use start_palpha_measurements_computation for that, and expect this to return empty until a computation has run for the same metric. An empty result is a normal answer, not an error. NOTE on vocabulary: a METRIC is the identity (assetClass, aggValueType, frequency, history, closeAt); the MEASUREMENTS are the values returned for it.
| Parameter | Type | Description |
|---|---|---|
aggValueType * | string | Which time series was measured -- the aggregate value taken from each bar of the source series. ClosingPrice is the only value Precision Alpha computes today. Part of a metric's IDENTITY: pass the val… |
frequency * | string | Bar frequency of the source series, and the unit `history` is read in. Day is the only value measurements exist for: the store has intraday levels, but the source fetch reads one multi-day Day series… |
from * | string | Start timestamp inclusive (yyyy-MM-DDThh:mm:ss) |
history * | integer | REQUIRED. How much history the metrics were derived from, as a number of CALENDAR days ending on the run's date, inclusive. This is a directory level in the store, so it IDENTIFIES the series rather t… |
symbol * | string | Symbol to fetch metrics for. Required -- there is no cross-sectional form, so 'every symbol for one date' is one call per symbol. |
to * | string | End timestamp inclusive (yyyy-MM-DDThh:mm:ss) |
assetClass | string | Asset class the measurements describe. Stocks is the only value measurements exist for: the on-demand service resolves its symbol universe from the SIP reference service, which serves stocks. Default:… |
closeAt | string | Which daily series the metrics were computed from: a 24-hour HH:MM such as 15:30, or 'official' (the default when omitted). IDENTITY, not a filter -- metrics from the 15:30 series and from the officia… |
start_palpha_measurements_computation
Start an on-demand Precision Alpha measurements computation and return immediately with a run id. Does NOT wait for the run: poll is_palpha_measurements_computation_running until it reports not running, then read the results with get_palpha_measurements. Only one computation runs at a time.
| Parameter | Type | Description |
|---|---|---|
history * | integer | REQUIRED, 2 to 2520. How much history to derive the price series from, as a number of CALENDAR days ending on `date`, inclusive -- weekends and holidays included. The engine is handed one row per day… |
aggValueType | string | Which time series to measure -- the aggregate value taken from each bar (default: ClosingPrice, the only value Precision Alpha computes today). |
assetClass | string | Asset class to compute for (default: Stocks). Stocks is the only supported value -- the symbol universe comes from the SIP reference service, which serves stocks. The taxonomy carries the dimension so… |
closeAt | string | Which daily series to build the price series from: a 24-hour HH:MM such as 15:30, or 'official' (default). Every point of a run comes from this ONE series -- a symbol missing a point in an intraday se… |
date | string | As-of date (yyyy-MM-dd) or 'today' (default). The series ends on this date and reaches backwards. |
exchanges | string | Comma-separated exchanges whose whole universe to sweep: XNAS, XNYS. Mutually exclusive with `symbols`; omit both to sweep XNAS and XNYS. A whole-market run takes minutes. |
frequency | string | Bar frequency of the source series, and the unit `history` is read in (default: Day, the only value served today). An intraday frequency is refused with its reason rather than attempted. |
minPoints | integer | Minimum number of DISTINCT closing prices a symbol's series must have to be computed (default: 100). Distinct, not raw bars -- a thin or halted symbol can have enough bars and still be filtered. Must… |
symbols | string | Comma-separated symbols to compute for instead of a universe. Mutually exclusive with `exchanges` -- naming BOTH is refused rather than resolved, because it would be ambiguous whether the list narrows… |
is_palpha_measurements_computation_running
Poll the Precision Alpha computation in progress, or -- when none is -- the LAST one to finish. A finished run still answers for itself, so this is also how you find out how a run went. NOTE: a 200 from the start tool does not mean a run started; check its `status` field. And only the most recent run is retained, so this cannot report on a run from before a later one started.
flush_palpha_measurements
Make measurements servable that the Precision Alpha history service has received but not yet stored. Until they are written they cannot be read back. A BACKSTOP, not the normal path: a computation that finishes cleanly has its measurements stored on receipt, so reading results straight after a run needs no flush. Use it when a run timed out or failed, or for measurements the live service accumulated through a session. An EMPTY `status` in the response means it worked; the `state` field says Complete either way. NOTE: nothing about this is tied to end of day -- run it whenever you want computed…
get_hwai_alerts
Get HWAI alerts and signals for a given date and asset class.
| Parameter | Type | Description |
|---|---|---|
date * | string | Date (yyyy-MM-dd) |
assetClass | string | Asset class (default: Stocks) |
place_stocks_order
Place a new stocks broker order (buy or sell).
| Parameter | Type | Description |
|---|---|---|
accountNumber * | string | Broker account number |
broker * | string | Broker name |
clOrderId * | string | Client order ID (your unique ID) |
instrument * | string | Instrument type |
orderQty * | string | Order quantity |
orderTif * | string | Time in force |
orderType * | string | Order type |
side * | string | Order side |
symbol * | string | Security symbol (e.g. AAPL) |
orderLimitPrice | string | Limit price (required for LIMIT and STOP_LIMIT) |
stopPrice | string | Stop price (required for STOP and STOP_LIMIT) |
get_stocks_orders
List stocks broker orders for an account.
| Parameter | Type | Description |
|---|---|---|
accountNumber * | string | Broker account number |
broker * | string | Broker name |
status | string | Filter by order status |
get_stocks_order
Get a specific stocks broker order by ID.
| Parameter | Type | Description |
|---|---|---|
accountNumber * | string | Broker account number |
broker * | string | Broker name |
orderId * | string | Order ID |
cancel_stocks_order
Cancel a stocks broker order by ID.
| Parameter | Type | Description |
|---|---|---|
accountNumber * | string | Broker account number |
broker * | string | Broker name |
orderId * | string | Order ID to cancel |