How to read this page. Each tool lists its inputs (what you send) and
its result (what comes back). Every tool returns the standard envelope
below; the Result fields documented per tool are what lands inside
structuredContent.The result envelope
Every tool returns the same shape. A human-readable summary incontent, the
structured data in structuredContent, and isError: true only when something
went wrong.
array
A one-element array with a
text block: a short summary plus a pretty-printed
copy of the structured data.object
The machine-readable result. The per-tool Result fields below describe
what’s in here.
boolean
Present and
true only on failure. On a failure the structured content carries
the error detail (for example a status and, for upstream errors, the failing
status code and body).Sessions
A session is the workspace your strategies live in. Create or list one first, then pass itssession_id to everything else.
create_session
Create an AskFutures session for strategy work. Inputsstring
Optional session title.
string
The new session’s ID. Pass this to the strategy tools.
string
Link to the session in the web app.
list_sessions
List the sessions owned by the authenticated user. Inputsstring
default:"active"
Filter:
active, archived, or all.integer
default:"20"
Page size, 1–100.
string
Opaque pagination cursor from a previous page.
array
The sessions on this page. Each carries its own
session_id and app_url.object
Cursor info for fetching the next page, when present.
get_session
Fetch one session by ID. Inputsstring
required
The session to fetch.
string
The session ID.
string
Link to the session in the web app.
Strategies
A strategy is the rule-based plan AskFutures builds from your description. See Strategies for the concept.create_strategy
Start building a new strategy from a plain-English description. This is asynchronous: it queues the work and returns anoperation_id. Call
wait_for_completion next with that operation_id.
By default a backtest runs as part of creation.
Inputs
string
required
The session to build in.
string
required
The strategy idea, in plain English — e.g. “Buy Micro Nasdaq when price breaks
above the first 15-minute high.”
boolean
default:"true"
Whether to run a backtest as part of creation. Set
false to build the rules
without testing yet, then call
backtest_existing_strategy later.string
Optional. Reuse the same key to safely retry the same creation request without
building a duplicate. Generated automatically when omitted.
string
Advanced/optional. Leave unset to use the default.
string
The async operation to poll with
wait_for_completion
(task="strategy_op").string
The session the strategy is being built in.
string
Link to the session in the web app.
update_strategy
Start modifying an existing strategy — add a filter, change an exit, swap the symbol, change the period. Like creation, this is asynchronous and returns anoperation_id. Every edit becomes a new saved version.
Inputs
string
required
The session the strategy lives in.
string
required
The strategy to modify.
string
required
The change, in plain English — e.g. “Add a 200-tick stop and only trade
9:30–11:00.”
string
Advanced/optional. Leave unset to use the default.
string
The async operation to poll with
wait_for_completion
(task="strategy_op").string
The session the strategy lives in.
string
Link to the session in the web app.
list_strategies
List the strategies in a session, including the canonical parameters you need for optimization. Inputsstring
required
The session to list.
array
The strategies in the session. Each entry is summarized — see the fields below.
object
Pagination info, when present.
inspect_strategy
Fetch one strategy in full: entry/exit rules, exit conditions, parameters, the extraction plan, and backtest status. Inputsstring
required
The session the strategy lives in.
string
required
The strategy to inspect.
list_strategies summary,
plus:
array
The rules that open positions.
array
The rules that close positions.
array
The parameter definitions as they appear on the strategy card.
array
Structured exits — stop, target, trailing stop, max-time, end-of-day.
object
The structured plan AskFutures derived from your description.
delete_strategy
Delete a draft strategy. The server refuses unless you setconfirm: true.
Inputs
string
required
The session the strategy lives in.
string
required
The strategy to delete.
boolean
default:"false"
Must be
true to actually delete. Anything else is a no-op refusal.string
The deleted strategy’s ID, echoed back on success.
Backtesting
See Backtesting and Is the backtest real? for what the engine does and doesn’t model.backtest_existing_strategy
Run (or re-run) a backtest on an existing strategy. It does not create or fork — it tests the strategy in place. Becausecreate_strategy already
backtests by default, only call this when the strategy was created with
backtest=false, when its backtestStatus is not_tested or failed, or when
you explicitly want a re-run.
This is asynchronous — poll with wait_for_completion
(task="backtest").
Inputs
string
required
The session the strategy lives in.
string
required
The strategy to backtest.
string
The strategy being backtested.
string
The session.
string
Link to watch the backtest in the web app.
Optimization
Optimization is a two-step flow: configure the sweep, then run it. See Optimization.setup_optimization
Configure an optimization sweep for a backtested strategy. Calllist_strategies first to get the canonical parameter
key values to sweep.
Inputs
string
required
The session the strategy lives in.
string
required
The strategy to optimize. It should already be backtested.
array
required
The parameters to sweep. Each entry:
string
The configured batch’s ID. Pass it to
run_optimization.string
Link to the session in the web app.
run_optimization
Promote a configured batch to running. Queues one backtest per parameter combination; results land on the strategy when the batch completes. This is asynchronous — poll withwait_for_completion
(task="optimization").
Inputs
string
required
The session the strategy lives in.
string
required
The strategy being optimized.
string
required
The batch ID from
setup_optimization.string
The running batch’s ID.
string
Link to watch the sweep in the web app.
Async control
Strategy creation, updates, backtests, and optimizations all run in the background. These two tools let you wait on them and cancel them.wait_for_completion
Poll an async operation until it succeeds, fails, or the timeout is reached. On timeout the operation keeps running server-side — just call again later. Thetask you pass decides which IDs are required.
- strategy_op
- backtest
- optimization
For
create_strategy and
update_strategy. Pass the operation_id. On success the
result includes the finished strategy summary.string
required
The session.
string
required
Which kind of wait:
strategy_op, backtest, or optimization.string
Required when
task="strategy_op".string
Required when
task="backtest" or task="optimization".string
Required when
task="optimization".number
default:"45"
How long to wait this call, 1–300. On timeout the work continues server-side.
string
Present as
timed_out when the wait window elapses but the work is still
running. Call again to keep waiting.object
On a successful
strategy_op: the finished strategy summary.object
On a successful
backtest: the run’s metrics.object
On a successful
optimization: the best combination found, alongside
total_combinations and failed_count.A failed or timed-out operation comes back with
isError: true and the
operation detail (for example backtestError for a failed backtest, or the
batch error for a failed sweep).cancel_task
Request cancellation of an in-flight task. Returns immediately and is idempotent. For optimization, the session’s single running sweep is resolved automatically, stops between combinations, and partial results are kept. For backtests and create/update, cancellation only takes effect if the worker hasn’t started yet — short in-flight tasks are allowed to finish. Inputsstring
required
The session.
string
required
Which task to cancel:
strategy_op, backtest, or optimization.string
The operation to cancel, for
strategy_op.string
The strategy whose task to cancel, for
backtest / optimization.string
The sweep to cancel, for
optimization.string
The session, echoed back with the upstream cancellation acknowledgement.
Planning
write_todos
Replace the agent’s task list for the session. Full-replace semantics — send the entire list every call. Useful for multi-step work, especially when an async wait may span turns. Keep exactly one itemin_progress while working, and mark
items completed as you finish them.
Inputs
string
required
The session.
array
required
The full task list. Each item:
string
The session, echoed back with the saved plan.
Reference data
What’s available to trade, and the contract specs. Scope is CME Group only (CME, CBOT, NYMEX, COMEX), ~74 symbols.list_symbols
List all CME Group futures symbols available for trading. Use it to discover what’s available before creating a strategy. Inputs None. Resultnumber
How many symbols were returned.
array
The symbols. Each entry includes
ticker, name, and sector.get_reference_data
Look up contract metadata for one symbol. Inputsstring
required
The ticker, e.g.
MNQ.Next steps
Tools walkthrough
The same tools, explained as a workflow.
Recipes
End-to-end programmatic examples.
Internal HTTP API
Why the web app’s HTTP layer is private.
Is the backtest real?
Where the AI stops and the deterministic math begins.