Open a market session
open_sessionOpen a simulated market session to control each step manually and receive a session ID for orders, state checks, forking, or rewinding.
Instructions
Open a simulated market that this server keeps between calls, and get a session id back. Use a session when you want to decide each step yourself and see what happened before the next: send orders with session_step, read with session_state, try two actions from one state with session_fork, and go back with session_rewind. To score a strategy you can write as a spec, use evaluate_strategies or rank_strategies instead. agents names the traders: null for one you drive with orders, or a strategy spec for one that trades itself each step. preset and population choose the market as they do for evaluate_strategies. Opening runs no market. At most 8 sessions are open at once, in this server's memory only, and one idle for 30 minutes is closed.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "open_session"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cash | No | Starting cash for each entrant, in currency. | |
| seed | No | Simulation seed, an integer from 0 to 2**64 - 1. The same seed and arguments give the same result. | |
| agents | No | The traders in this market, keyed by a name you choose. null is one you drive with orders in session_step; a strategy spec, for example {"signal": {"kind": "momentum", "lookback_days": 1.0}, "portfolio": {"top_k": 5, "gross": 1.0}}, trades by itself each step. At most 8. All of them trade one market and move each other's prices. Omit for one agent called "me". | |
| preset | No | A shipped model preset to run, by name: pt-v1, pt-v2, pt-v3, pt-v4, pt-v5, pt-v6, pt-v7, pt-v8, pt-v9, pt-v10, pt-v11, pt-v12, pt-v13, pt-v14, pt-v15, pt-v16, pt-v18, pt-v19, pt-v20, pt-v21. Omit for the shipped default, pt-v21, the only preset the realism envelope certifies; a result under any other carries a caveat saying it is outside the certification, with that preset's own measured record. describe_simulator lists every preset's record. | |
| universe | No | A roster document, usually the `universe` field of a build_universe result. Either {"size": n, "seed": s, "sectors": [...]} or {"instruments": [...]}. When given it replaces universe_size, universe_seed and universe_sectors. | |
| population | No | A shipped population of background traders to run beside, by name: standard, crowded. They share each strategy's market and react to its trading (populated mode), so a result says whether an edge survives other traders, and strategies no longer meet identical markets. Omit for isolated mode, the default. describe_simulator lists each population's traders. | |
| max_leverage | No | Cap on gross exposure as a multiple of net worth. null removes the cap, and the result then warns that trading size alone can win. | |
| steps_per_day | No | Decision points per trading day, 1 to 22. A step is 65 minutes, so 6 cover the trading session. | |
| universe_seed | No | Seed that generates the roster, separate from the simulation seed. Ignored when `universe` is given. | |
| universe_size | No | Names in a generated roster, 2 to 120. Ignored when `universe` is given. | |
| universe_sectors | No | Lowercase sector ids to concentrate a generated roster on, for example ["technology", "energy"]. The ids: technology, financial_services, healthcare, energy, consumer_discretionary, consumer_staples, industrials, materials, real_estate, utilities, telecommunications, transportation. A concentrated roster is a named envelope gap, and the result says so. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||