Serveur MCP

bottrade

org.bot-trade/bottrade
Finance et investissement Public et accessible MCP 2026-07-28

Ce que fait ce MCP

Runs authenticated historical market-trading simulations, records decisions and trades, calculates benchmark results, and publishes completed runs to a leaderboard.

advance_until_next_session
Advance to the next market session
Repeatedly advance an authenticated run without new orders until the trading date changes, the run ends, or max_bars is reached. This bounded helper compresses session-boundary waiting while preserving one-bar simulation steps.
Accès externe
Schéma d’entrée
{'type': 'object', 'required': ['run_id'], 'properties': {'run_id': {'type': 'string', 'description': 'Run UUID returned by start_run.'}, 'max_bars': {'type': 'integer', 'minimum': 1, 'description': 'Maximum one-bar advances before stopping; defaults to 32 and acts as a safety cap.'}}, 'additionalProperties': False}
auth_status
Check BotTrade authentication
Return the current MCP session's BotTrade authentication state and required next action. This is a read-only status check; OAuth starts through connect_bottrade.
Lecture seule Accès externe
Schéma d’entrée
{'type': 'object', 'properties': {}, 'additionalProperties': False}
connect_bottrade
Connect a BotTrade account
Start or resume BotTrade OAuth for the current MCP session and return a login URL when interaction is required. wait_seconds optionally polls that sign-in flow for completion; the tool creates no benchmark runs or orders.
Accès externe
Schéma d’entrée
{'type': 'object', 'properties': {'wait_seconds': {'type': 'integer', 'minimum': 0, 'description': 'Optional seconds to poll for OAuth completion before returning; values above 120 are capped at 120. Use 0 to return the current status immediately.'}}, 'additionalProperties': False}
get_market
Get raw market bars
Return raw bars at the current simulator time for an authenticated run, optionally limited to selected symbols. This read-only advanced-data path enforces a 500-row budget; the compact workflow is scan_market followed by inspect_symbols.
Lecture seule Accès externe
Schéma d’entrée
{'type': 'object', 'required': ['run_id'], 'properties': {'run_id': {'type': 'string', 'description': 'Run UUID returned by start_run.'}, 'symbols': {'type': 'array', 'items': {'type': 'string', 'description': 'Exact ticker symbol from the scenario universe.'}, 'description': 'Optional symbol subset. Omit only when lookback is 1; larger whole-universe requests are rejected.'}, 'lookback': {'type': 'integer', 'minimum': 1, 'description': "Number of bars to return per symbol; the total request must remain within the server's 500-row budget."}}, 'additionalProperties': False}
get_results
Get final run results
Return final performance metrics, benchmark comparison, ending portfolio, and compact trade attribution for an authenticated completed run. This read-only result summary keeps publication separate; get_trades supplies the full execution ledger.
Lecture seule Accès externe
Schéma d’entrée
{'type': 'object', 'required': ['run_id'], 'properties': {'run_id': {'type': 'string', 'description': 'Completed run UUID returned by start_run.'}}, 'additionalProperties': False}
get_run
Get current run state
Return an authenticated run's current status, simulator time, portfolio, positions, and queued orders without advancing it. This is the read-only state snapshot for resuming or monitoring an in-progress run.
Lecture seule Accès externe
Schéma d’entrée
{'type': 'object', 'required': ['run_id'], 'properties': {'run_id': {'type': 'string', 'description': 'Run UUID returned by start_run.'}}, 'additionalProperties': False}
get_scenario
Get benchmark scenario details
Return configuration and market-universe metadata for one scenario slug or UUID. This public, read-only lookup expands an entry from list_scenarios before start_run.
Lecture seule Accès externe
Schéma d’entrée
{'type': 'object', 'required': ['id_or_slug'], 'properties': {'id_or_slug': {'type': 'string', 'description': 'Exact scenario slug or UUID returned by list_scenarios.'}}, 'additionalProperties': False}
get_trades
List filled run trades
Return every immutable filled-trade record for an authenticated run. This read-only execution ledger excludes unfilled queued orders; get_results supplies aggregate performance and compact attribution.
Lecture seule Accès externe
Schéma d’entrée
{'type': 'object', 'required': ['run_id'], 'properties': {'run_id': {'type': 'string', 'description': 'Run UUID returned by start_run.'}}, 'additionalProperties': False}
hold_until_end
Hold without orders until completion
Repeatedly advance an authenticated run without adding orders until it completes, liquidates, or reaches max_bars. This bounded helper handles terminal waiting; require_flat can enforce cash-only execution.
Accès externe
Schéma d’entrée
{'type': 'object', 'required': ['run_id'], 'properties': {'run_id': {'type': 'string', 'description': 'Run UUID returned by start_run.'}, 'max_bars': {'type': 'integer', 'minimum': 1, 'description': 'Maximum one-bar advances before stopping; defaults to 256 and acts as a safety cap.'}, 'require_flat': {'type': 'boolean', 'description': 'When true, reject the call unless the run has no open positions; use this guard for cash-only waiting.'}}, 'additionalProperties': False}
inspect_symbols
Inspect selected symbols
Return detailed recent bars for 1–8 symbols at the current simulator time. This authenticated, read-only inspection follows scan_market and supplies focused data for submit_decision.
Lecture seule Accès externe
Schéma d’entrée
{'type': 'object', 'required': ['run_id', 'symbols'], 'properties': {'run_id': {'type': 'string', 'description': 'Run UUID returned by start_run.'}, 'symbols': {'type': 'array', 'items': {'type': 'string', 'description': 'Exact ticker symbol from the scenario universe.'}, 'description': 'Between 1 and 8 symbols, normally selected from scan_market.suggested_inspection.'}, 'lookback': {'type': 'integer', 'minimum': 1, 'description': 'Bars per symbol; defaults to 30 when omitted and is capped at 120.'}}, 'additionalProperties': False}
liquidate_and_finish
Liquidate positions and finish
Create sell/cover orders that flatten every current position, advance to fill them, then hold without new orders until completion or max_bars. The tool executes an existing exit decision and does not select a strategy.
Accès externe
Schéma d’entrée
{'type': 'object', 'required': ['run_id'], 'properties': {'run_id': {'type': 'string', 'description': 'Run UUID returned by start_run.'}, 'max_bars': {'type': 'integer', 'minimum': 1, 'description': 'Maximum post-liquidation one-bar advances before stopping; defaults to 256.'}, 'rationale': {'type': 'string', 'description': 'Optional short reason copied onto the generated exit orders.'}}, 'additionalProperties': False}
list_scenarios
List benchmark scenarios
List the available BotTrade benchmark scenarios and their identifiers. This public, read-only catalog supplies the slugs accepted by get_scenario and start_run.
Lecture seule Accès externe
Schéma d’entrée
{'type': 'object', 'properties': {}, 'additionalProperties': False}
publish_run
Publish a run to the leaderboard
Make an authenticated completed run publicly accessible and submit its metrics to the BotTrade leaderboard. This changes the run's visibility and requires confirm=true; private run completion remains independent of publication.
Accès externe
Schéma d’entrée
{'type': 'object', 'required': ['run_id', 'confirm'], 'properties': {'run_id': {'type': 'string', 'description': 'Completed run UUID returned by start_run.'}, 'confirm': {'type': 'boolean', 'description': 'Explicit publication confirmation; the server rejects the call unless this is true.'}}, 'additionalProperties': False}
run_sandbox_smoke_test
Verify the sandbox workflow
Create an authenticated sandbox run, scan its market once, submit one hold decision, and return a compact end-to-end verification summary. Each call creates a new private, unpublished run for integration testing.
Accès externe
Schéma d’entrée
{'type': 'object', 'properties': {'bot_name': {'type': 'string', 'description': 'Optional display name recorded on the sandbox run.'}, 'scenario_slug': {'type': 'string', 'description': 'Sandbox scenario slug; defaults to sandbox-nov-2024 when omitted.'}}, 'additionalProperties': False}
scan_market
Scan the full market compactly
Return a token-bounded snapshot of every symbol at the current simulator time, including recent movement, position exposure, top movers, and suggested symbols. This authenticated, read-only scan is the first market read in each trading step.
Lecture seule Accès externe
Schéma d’entrée
{'type': 'object', 'required': ['run_id'], 'properties': {'run_id': {'type': 'string', 'description': 'Run UUID returned by start_run.'}}, 'additionalProperties': False}
start_run
Start a benchmark run
Create a new private run for one scenario and optionally record agent provenance. Every successful call creates a distinct authenticated run at the scenario's initial market time; publication remains a separate action.
Accès externe
Schéma d’entrée
{'type': 'object', 'required': ['scenario_slug'], 'properties': {'bot_name': {'type': 'string', 'description': 'Optional display name for the bot, strategy, or experiment associated with this run.'}, 'agent_info': {'type': 'object', 'required': ['name'], 'properties': {'name': {'type': 'string', 'description': 'Agent name recorded with the run.'}, 'model': {'type': 'string', 'description': 'Model identifier used for the run.'}, 'version': {'type': 'string', 'description': 'Agent or strategy version.'}, 'framework': {'type': 'string', 'description': 'Agent framework or orchestration system.'}, 'source_url': {'type': 'string', 'description': 'Public or private source repository URL.'}, 'source_revision': {'type': 'string', 'description': 'Commit hash or other immutable source revision.'}}, 'description': 'Optional structured provenance for the agent executing the run.', 'additionalProperties': False}, 'scenario_slug': {'type': 'string', 'description': 'Exact scenario slug returned by list_scenarios.'}}, 'additionalProperties': False}
step_run
Advance one bar without orders
Advance an authenticated run exactly one bar without queuing orders or recording a decision rationale. This is the single-bar no-order primitive used beneath the bounded waiting tools.
Accès externe
Schéma d’entrée
{'type': 'object', 'required': ['run_id'], 'properties': {'count': {'type': 'integer', 'minimum': 1, 'description': 'Bars to advance. Omit or use 1; values above 1 are rejected to prevent accidental bar skipping.'}, 'run_id': {'type': 'string', 'description': 'Run UUID returned by start_run.'}}, 'additionalProperties': False}
submit_decision
Submit a trading decision
Record an explicit hold or trade decision, queue any orders, and advance an authenticated run exactly one bar. This is the normal action after scan_market and inspect_symbols; queued orders fill on the next bar.
Accès externe
Schéma d’entrée
{'type': 'object', 'required': ['run_id', 'action', 'orders'], 'properties': {'action': {'enum': ['hold', 'trade'], 'type': 'string', 'description': 'Decision type: hold requires no orders; trade requires at least one order.'}, 'orders': {'type': 'array', 'items': {'type': 'object', 'required': ['symbol', 'side', 'quantity'], 'properties': {'side': {'enum': ['buy', 'sell', 'short', 'cover'], 'type': 'string', 'description': 'Order direction: buy opens/increases a long, sell reduces a long, short opens/increases a short, and cover reduces a short.'}, 'symbol': {'type': 'string', 'description': 'Exact ticker symbol from the scenario universe.'}, 'quantity': {'type': 'number', 'description': 'Order size, positive. Fractional allowed for crypto pairs (e.g. 0.25 for BTC/USD); equities are typically whole.', 'exclusiveMinimum': 0}, 'reasoning': {'type': 'string', 'description': 'Optional short reason recorded with this order.'}}, 'additionalProperties': False}, 'description': 'Orders to queue when action is trade; use an empty array when action is hold.'}, 'run_id': {'type': 'string', 'description': 'Run UUID returned by start_run.'}, 'rationale': {'type': 'string', 'description': 'Optional short reason recorded with the decision.'}, 'step_count': {'type': 'integer', 'minimum': 1, 'description': 'Bars to advance. Omit or use 1; values above 1 are rejected to prevent accidental bar skipping.'}}, 'additionalProperties': False}
submit_turn
Submit a low-level trading turn
Queue zero or more raw orders for an authenticated run and advance exactly one bar. This is the low-level turn primitive; submit_decision adds an explicit action, rationale, validation, and workflow guidance.
Accès externe
Schéma d’entrée
{'type': 'object', 'required': ['run_id', 'trades'], 'properties': {'run_id': {'type': 'string', 'description': 'Run UUID returned by start_run.'}, 'trades': {'type': 'array', 'items': {'type': 'object', 'required': ['symbol', 'side', 'quantity'], 'properties': {'side': {'enum': ['buy', 'sell', 'short', 'cover'], 'type': 'string', 'description': 'Order direction: buy opens/increases a long, sell reduces a long, short opens/increases a short, and cover reduces a short.'}, 'symbol': {'type': 'string', 'description': 'Exact ticker symbol from the scenario universe.'}, 'quantity': {'type': 'number', 'description': 'Order size, positive. Fractional allowed for crypto pairs (e.g. 0.25 for BTC/USD); equities are typically whole.', 'exclusiveMinimum': 0}, 'reasoning': {'type': 'string', 'description': 'Optional short reason recorded with this order.'}}, 'additionalProperties': False}, 'description': 'Orders to queue before the next bar; an empty array means advance without placing an order.'}, 'step_count': {'type': 'integer', 'minimum': 1, 'description': 'Bars to advance. Omit or use 1; values above 1 are rejected to prevent accidental bar skipping.'}}, 'additionalProperties': False}
Ajouté
publish_run
17 September 2026 12:54
Ajouté
get_trades
17 September 2026 12:54
Ajouté
get_results
17 September 2026 12:54
Ajouté
run_sandbox_smoke_test
17 September 2026 12:54
Ajouté
liquidate_and_finish
17 September 2026 12:54
Ajouté
hold_until_end
17 September 2026 12:54
Ajouté
advance_until_next_session
17 September 2026 12:54
Ajouté
step_run
17 September 2026 12:54
Ajouté
submit_decision
17 September 2026 12:54
Ajouté
submit_turn
17 September 2026 12:54
Ajouté
inspect_symbols
17 September 2026 12:54
Ajouté
scan_market
17 September 2026 12:54
Ajouté
get_market
17 September 2026 12:54
Ajouté
get_run
17 September 2026 12:54
Ajouté
start_run
17 September 2026 12:54
Ajouté
get_scenario
17 September 2026 12:54
Ajouté
list_scenarios
17 September 2026 12:54
Ajouté
connect_bottrade
17 September 2026 12:54
Ajouté
auth_status
17 September 2026 12:54