tradestaq-mcp

v0.9.0
io.github.the-staq/tradestaq-mcp Checked 5 hours ago Published 4 hours ago

AI-powered crypto trading tools.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

login

Log in to TradeStaq with email and password and store the returned access token locally. Simple credential login for automation and headless use; for interactive users prefer authenticate (browser OAuth, where credentials never enter the chat). Credentials are sent directly to the TradeStaq API over HTTPS and are not persisted — only the returned token is saved.

ParameterTypeDescription
email *stringThe user's TradeStaq account email address.
password *stringThe user's TradeStaq password. Sent to the API over HTTPS; never stored.

authenticate

Log in to TradeStaq via browser. Opens a login page in your browser — you authenticate there and the token is saved automatically. No credentials enter the chat. Scope controls what the agent can do: "mcp:read" (view-only research agents), "mcp:paper" (paper-trade bots, safe default — cannot touch live money), "mcp:live" (full access including live-money deploys, live exchange connections, and wallet charges). Scopes are hierarchical: live implies paper implies read. When in doubt, pick paper first — the server returns 403 insufficient_scope if the agent tries a live action, and the use…

ParameterTypeDescription
scopestringOAuth scope to request. Known values today: "mcp:read" (view-only research agents), "mcp:paper" (paper-trade bots, safe default — cannot touch live money), "mcp:live" (full access including live-mon…

check_auth

Preflight check before invoking other tools. Returns the authenticated user, OAuth scope on the current token (mcp:read / mcp:paper / mcp:live), tier capabilities (allowLiveTrading, allowAIBuilder, allowNewsTrading, allowMcpServer), Strategy Lab wallet balance (for cost-charging tools like generate_strategy), and the OAuth client name/expiry. Agents should call this at the start of a workflow to pick the narrowest scope needed and to surface cost/balance to the user before committing to a charge. Response is cached server-side for 30s per token.

set_token

Manually store a TradeStaq JWT access token instead of logging in through the browser. Advanced / automation use only — most users should call authenticate (browser OAuth) or login (email + password) instead. The token is saved locally to ~/.tradestaq/mcp-config.json with an assumed 7-day expiry. Use this when you already hold a valid token, e.g. in CI or a headless environment.

ParameterTypeDescription
token *stringA valid TradeStaq JWT access token.
baseUrlstringOptional API base URL override for self-hosted or staging servers. Defaults to the production TradeStaq API.

connect_exchange

Connect a new exchange account via browser. Opens a page where you securely enter your exchange API keys. Keys never enter the chat.

logout

Remove the stored TradeStaq credentials from local config (~/.tradestaq/mcp-config.json), signing the user out. Also clears the cached OAuth client so the next authenticate registers cleanly — call this before re-authenticating with a different scope.

get_price

Get the current price of a trading pair, along with its 24h change and volume, from a connected exchange. Use it for a quick spot-price check or to confirm the market before sizing or placing a trade. Read-only — never places orders. For historical OHLCV data use get_candles.

ParameterTypeDescription
symbol *stringTrading pair in BASE/QUOTE format, e.g. "BTC/USDT" or "ETH/USDT".
exchangestringOptional exchange to price from: an exchange account ID from list_exchanges, or a platform name as list_exchanges shows it (e.g. "binance", "bybit"). Omit to use the default connected exchange.

get_candles

Fetch OHLCV (open/high/low/close/volume) candlestick data for a trading pair from a connected exchange. Use it to analyze price action, compute indicators, or ground a trading decision in real market data before backtesting or deploying a strategy. Returns the candles plus the latest candle and the high/low range over the window. Read-only — never places orders. Get exchange IDs from list_exchanges.

ParameterTypeDescription
symbol *stringTrading pair in BASE/QUOTE format, e.g. "BTC/USDT" or "ETH/USDT".
exchangestringOptional exchange account ID (from list_exchanges) to source candles from. Omit to use your first active connected exchange (public Binance data if you have none).
limitnumberNumber of most-recent candles to return, 1-500. Defaults to 100.
timeframestringCandle interval. One of 1m, 5m, 15m, 1h, 4h, 1d. Defaults to 1h.

list_exchanges

List your connected exchange accounts with their IDs, platform names, and status.

create_paper_exchange

Create a paper-trading exchange with a simulated balance. No API keys required. Paper exchanges let agents test strategies, deploy bots, and place trades without risking real money. Recommended starting point for first-time users and any scope=mcp:paper workflow. Requires OAuth scope mcp:paper or mcp:live. Session-cookie users (dashboard) can always call this.

ParameterTypeDescription
platform *stringExchange slug, e.g. "binance", "bybit", "okx", "hyperliquid". Use list_exchanges or the web docs for supported options.
accountLabelstringFriendly name shown in dashboard and bot configs, e.g. "BTC Paper Test". Defaults to platform name.
exchangeTypestring"spot" for cash trading, "futures" for leveraged/perps.
initialBalanceUsdtnumberSimulated starting balance in USDT. Defaults to 10,000.

search_markets

Search for trading pairs on a specific exchange. Use list_exchanges to find your exchange IDs.

ParameterTypeDescription
exchange *stringFilter by exchange
query *stringSearch query (e.g. "BTC", "ETH/USDT")

get_portfolio

Get portfolio overview: total balance, exchanges, and active bots.

get_positions

Get all open trading positions with current PnL.

ParameterTypeDescription
exchangestringFilter by exchange name

list_strategies

List available trading strategies — either the public marketplace or the user's own library. Supports filtering and sorting. Use it to discover strategies to backtest or deploy, or to find strategy IDs for get_strategy, compare_strategies, and deploy_bot. Read-only.

ParameterTypeDescription
categorystringFilter by category, e.g. "official", "community", "custom".
limitnumberMax results to return, 1-100. Defaults to 50.
marketstringFilter by market type.
ownedbooleanIf true, return only the user's own strategies; if false (default), return the public marketplace catalog.
pricingstringowned:false only. Filter by pricing.
searchstringFilter by a name/description substring match.
sortstringSort order. owned:true supports newest (default), oldest, name, downloads. owned:false (marketplace) additionally supports popular, rating, roi, winRate, trending.
statusstringowned:true only. Filter by status, e.g. "live" or "listed" for published-only strategies. Comma-separate multiple values, e.g. "live,listed".

get_strategy

Get full details for a specific strategy by ID: description, market/timeframe, performance stats, rating, code, and parameters. Use it to inspect a strategy before backtesting, deploying, comparing, or editing with update_strategy. Read-only. Get IDs from list_strategies; use compare_strategies for side-by-side comparison and explain_strategy for a plain-English breakdown. `code` is included when you own the strategy (or it's a forkable community strategy you have access to); omitted otherwise.

ParameterTypeDescription
id *stringThe strategy ID to fetch, obtained from list_strategies.

explain_strategy

Get a plain-English explanation of a strategy: what it does, risk profile, best market conditions.

ParameterTypeDescription
id *stringStrategy ID

compare_strategies

Compare 2-5 strategies side by side on their key performance metrics: ROI, max drawdown, win rate, Sharpe ratio, rating, and active bot count. Use this to help a user choose between strategies from the marketplace or their own library before backtesting or deploying one. Read-only. Get strategy IDs from list_strategies.

ParameterTypeDescription
ids *arrayArray of 2-5 strategy IDs to compare, obtained from list_strategies or get_strategy.

create_strategy

Save a new trading strategy from existing TradeDroid strategy code to the user's library, so it can be backtested or deployed. Use this when you already have the code (hand-written or produced by generate_strategy). To create a strategy from a natural-language description instead of code, use generate_strategy. Returns the new strategy ID; validate it with what_if_backtest before deploying via deploy_bot.

ParameterTypeDescription
code *stringTradeDroid strategy code (JavaScript) — the executable logic. Get it from generate_strategy or write it directly.
name *stringDisplay name for the strategy, e.g. "ETH Momentum v2".
descriptionstringOptional plain-English summary of what the strategy does and when it trades.
marketstring"spot" for cash trading or "futures" for leveraged/perpetual contracts. Defaults to futures.
timeframestringPrimary candle timeframe the strategy runs on, e.g. "1h", "4h", "1d". Defaults to 1h.

update_strategy

Update one of your own strategies: metadata (name, description, category, market, tags) and/or its code. Writing `code` creates or updates a DRAFT version — the currently stable/live version keeps running unaffected. NOTE: `status` here only changes the strategy's publish/visibility state (draft->testing->live->listed) -- it does NOT promote a new code version to the stable channel bots actually run. To ship a code change to already-deployed bots, validate the new version with validate_strategy_version, then promote it with promote_strategy_version. Use get_strategy first to see current valu…

ParameterTypeDescription
id *stringStrategy ID to update, obtained from list_strategies(owned:true) or get_strategy.
categorystringNew category. Omit to leave unchanged.
codestringNew TradeDroid strategy code. This writes to a DRAFT version, never directly to the live/stable one. Validate with what_if_backtest before promoting.
descriptionstringNew description. Omit to leave unchanged.
marketstringNew market type. Omit to leave unchanged.
namestringNew display name. Omit to leave unchanged.
statusstringAdvance the strategy through its publish workflow. Valid transitions only: draft->testing, testing->draft|live, live->testing|listed, listed->live. An invalid transition is rejected with a 400.
tagsarrayReplace the strategy's tags. Omit to leave unchanged.

generate_strategy

Generate a complete trading strategy from a natural-language description using AI (FORGE). Describe the idea and it writes runnable TradeDroid strategy code — no coding required — then saves it so you can validate with what_if_backtest and deploy with deploy_bot. The fastest path from idea to a deployable strategy. Note: AI generation is a paid, cost-bearing operation and can take up to ~2 minutes.

ParameterTypeDescription
description *stringNatural-language description of the strategy, e.g. "momentum strategy for ETH that buys on RSI oversold and sells on RSI overbought with a 2% trailing stop".
marketstring"spot" for cash trading or "futures" for leveraged/perpetual contracts. Defaults to futures.
timeframestringPrimary candle timeframe the strategy runs on, e.g. "1h", "4h", "1d". Defaults to 1h.

list_strategy_versions

List the version history for one of your own official/authored TradeDroid strategies: every stored version with its validation status, and which channel (if any) it currently serves -- 'stable' is what every bot without a channel override actually runs, 'beta' and 'latest' are not live to bots. Use this to check whether a version you validated has passed, and to find the exact version ID to pass to promote_strategy_version. Read-only. Get the strategy ID from list_strategies(owned:true) or get_strategy.

ParameterTypeDescription
id *stringStrategy ID, obtained from list_strategies(owned:true) or get_strategy.

validate_strategy_version

Run TradeDroid's automated validation pipeline (syntax check, entry/exit logic check, quick real-data backtest) against the current latest/draft version of one of your own strategies. Required before that version can be promoted to the stable channel with promote_strategy_version -- promotion to stable is rejected until this passes. Async: this only starts the job, which can take from a few seconds up to ~1-2 minutes. Poll list_strategy_versions afterward and watch validationStatus go pending -> running -> passed|failed. Get the strategy ID from list_strategies(owned:true); get exchangeId from…

ParameterTypeDescription
exchangeId *stringAn exchange you own (paper or live), obtained from list_exchanges. Used only to source historical candle data for the validation backtest.
id *stringStrategy ID whose latest/draft version to validate, obtained from list_strategies(owned:true) or get_strategy.
symbol *stringTrading pair to validate against, e.g. "ETH/USDT:USDT".

promote_strategy_version

Promote a specific version of one of your own official/authored TradeDroid strategies to the stable or beta channel. Promoting to STABLE is the step that actually changes the code every bot on the default channel runs -- editing a strategy (update_strategy) or validating a version has NO effect on already-deployed bots until this is called. Because it changes what live bots run, it needs the mcp:live scope. Promoting to stable requires that version's validationStatus already be 'passed' (run validate_strategy_version first, confirm with list_strategy_versions) -- rejected with a 400 otherwise.…

ParameterTypeDescription
channel *stringWhich channel to promote into. 'stable' is what default bots run and requires validationStatus:'passed' on this version; 'beta' has no validation gate.
id *stringStrategy ID, obtained from list_strategies(owned:true) or get_strategy.
versionId *stringThe specific version ID to promote, obtained from list_strategy_versions.

start_optimization_run

Start a Strategy Lab optimization run on one of your own strategies: an AI mutation loop that repeatedly tweaks the strategy code, backtests each variant, and keeps improvements (walk-forward validated: trains on trainSplit of the window, validates on the rest). This is different from generate_strategy -- that writes one strategy from a description; this iteratively improves an EXISTING strategy you already own. Does not create new strategies. Wallet-charging: call once WITHOUT acknowledgeCost to get a cost estimate (no charge, nothing queued), confirm the spend with the user, then call again…

ParameterTypeDescription
exchangeId *stringAn exchange you own (paper or live), from list_exchanges. Used only to source historical candle data.
strategyId *stringID of your own strategy to optimize, from list_strategies(owned:true) or get_strategy.
acknowledgeCostbooleanSet true only after showing the user the estimated cost (from a prior call without this flag, or from check_auth's wallet balance) and getting their approval. False (default) returns a cost preview an…
acknowledgedCostnumberMulti-pair runs only: the estimatedCost the user approved. Used when the quote has expired: the run starts if the fresh price is not above it, otherwise a new estimate comes back (quoteChanged:true).
autoPromotebooleanIf true, automatically promote the run's final saved version to the stable channel (what every bot on that strategy actually runs) when the run completes -- skipping the separate promote_strategy_vers…
endDatestringISO date for the end of the backtest window. Defaults to now.
maxExperimentsintegerHow many mutate-and-backtest experiments to run (1-30). Cost scales linearly with this -- fewer experiments for a quick/cheap check, more for a thorough search.
presetProfilesarrayWhich risk profiles the preset search should cover. Omit for all four. Cost scales per profile, so naming one or two is the cheaper option when the user only cares about a particular risk shape. Ignor…
quoteIdstringMulti-pair runs only: the quoteId from the cost_estimate the user approved. Send it with acknowledgeCost:true and the same other arguments; the run then uses exactly that quote.
scoringProfilestringbalanced: Performance-first: return drives the score, quality (Sharpe x profit factor) and win rate add, drawdown penalizes. | conservative: Low drawdown + consistent returns, scaled so a lucky handfu…
searchPresetsbooleanAlso search for per-risk-profile PARAMETER PRESETS once the code-mutation loop finishes -- tuning the strategy's own knobs separately for each risk profile, then walk-forward validating each winner an…
startDatestringISO date for the start of the backtest window. Defaults to 6 months ago.
symbolstringTrading pair to optimize against. Defaults to BTC/USDT when symbols is not given. With symbols, it only picks which listed pair is the primary and must be one of symbols (any case); a symbol that is n…
symbolsarrayPairs to test on, primary first, all on the same exchange account and market type, e.g. ["BTC/USDT","ETH/USDT","SOL/USDT"]. Entries are trimmed, empty ones dropped and duplicates (any case) removed; a…
timeframestringCandle timeframe, e.g. "1h", "4h", "1d".
trainSplitnumberFraction of the window used for training vs. out-of-sample validation (0.5-0.9).
userGuidancestringFree-text steering for the AI mutations, e.g. "focus on reducing drawdown" (max 2000 chars).

get_optimization_status

Check progress of a Strategy Lab optimization run started with start_optimization_run. Each experiment (AI mutation + backtest) typically takes 1-2+ minutes, so poll every 15-30 seconds rather than tightly looping. While the run is going, savedVersionId (once it appears) is the strategy version holding the best result found so far -- it is not the strategy's latestVersion yet. When status is completed, progress.verdict gives the out-of-sample result: on a pass (single-pair runs: also when inconclusive) savedVersionId is now the strategy's latestVersion -- inspect it with list_strategy_versions…

ParameterTypeDescription
jobId *stringJob ID returned by start_optimization_run.

cancel_optimization_run

Cancel a Strategy Lab optimization run you started. Takes effect after the current experiment finishes, not instantly -- check get_optimization_status to confirm it actually stopped. Any best version found before cancellation is kept but HELD (latestVersion is not changed); get_optimization_status then shows progress.cancelled, progress.heldVersionId and progress.heldBecause, and the author can still accept it in the TradeStaq web app.

ParameterTypeDescription
jobId *stringJob ID to cancel, from start_optimization_run.

send_optimization_guidance

Inject live free-text steering into a running Strategy Lab optimization, e.g. "stop trying mean-reversion tweaks, focus on trend-following". Applies starting with the NEXT experiment, not the one currently in flight. Overwrites any previously-injected guidance for this run.

ParameterTypeDescription
guidance *stringFree-text guidance for the AI to apply on the next experiment (max 2000 chars).
jobId *stringJob ID to steer, from start_optimization_run.

what_if_backtest

Run a backtest on a strategy. Async, may take 30-120 seconds. Returns full performance metrics.

ParameterTypeDescription
exchange *stringExchange account ID (use list_exchanges to find)
strategyId *stringStrategy ID to backtest
initialBalancenumber
periodstring
symbolstring
timeframestringCandle timeframe (e.g. 1h, 4h, 1d)

get_backtest_results

Check status/results of a previously started backtest.

ParameterTypeDescription
jobId *stringBacktest job ID

export_backtest

Get export links for a completed backtest. Returns CSV and PDF download URLs.

ParameterTypeDescription
id *stringBacktest ID

list_bots

List all your trading bots with status and performance.

get_bot_status

Get detailed status, configuration, and live performance for a specific trading bot by ID. Returns its run status, the strategy/symbol/exchange it trades, whether it is paper or live, P&L, win rate, total trades, risk config (leverage, stop-loss, take-profit, position size) and, for a strategy bot, strategyConfig (version channel and the version it runs, preset, timeframe, execution mode, interval, parameter overrides: what update_bot can change). Use it to check how a deployed bot is doing. stopAfterClose.enabled = true means the bot will pause itself once its current position closes (set wit…

ParameterTypeDescription
id *stringThe bot ID to inspect, obtained from list_bots.

get_bot_logs

Explain what a strategy bot has been doing run by run: why it did or did not trade, which signals it queued or dropped, and which runs failed. Use it when a bot is not trading as expected, after get_bot_status. Read-only. Sections (pick with `include`): - runs (default): one entry per bot run, newest first. Fields: ts (run time, ms epoch), k (outcome kind, below), r (reason code, e.g. bar_wait, entry_backoff, timeout), bar (candle open time, ms), px (price), em (signals the strategy emitted), q (orders queued), dr (signals dropped), why (short reason codes for drops/skips), err (error text, t…

ParameterTypeDescription
botId *stringThe bot ID, obtained from list_bots.
includearraySections to return: "runs", "spinLogs", "live". Defaults to ["runs", "spinLogs"].
kindarrayOnly return runs of these outcome kinds, e.g. ["error", "signal_dropped"]. Applies to the runs section only.
limitintegerEntries per section, 1-100. Defaults to 25. The live section returns at most 50.

deploy_bot

Deploy a strategy as a trading bot. Defaults to paper trading for safety — whether a bot trades real money is determined entirely by the exchange account it's attached to (not by the `live` flag alone), so this refuses to deploy if `live` doesn't match the target exchange's own paper/live status. Check an exchange's status with list_exchanges first, or create one with create_paper_exchange. The bot trades on the strategy's own timeframe unless you pass `timeframe`; omit `name` and the server names it. The bot STARTS TRADING when it is created, so give it its settings here, not in a later up…

ParameterTypeDescription
exchangeId *stringExchange account ID. Its own isPaper status (see list_exchanges) determines whether this bot trades real money — must match the `live` flag below.
strategyId *stringStrategy ID to deploy
executionModestring"on_bar_close" (what backtests simulate) or "continuous". Omit for the preset's, else the server default.
leveragenumber
livebooleanMust match the target exchange's own paper/live status: false requires a paper exchange, true requires a live one. Defaults to false (paper) for safety.
marketstringMarket type. Omit to use the account default (spot).
namestringBot name. Omit to let the server name it.
parameterOverridesobjectStrategy parameters, e.g. {"BUY_AMOUNT": 50}. With presetId they go on top of the preset's, and a null removes one of the preset's so the strategy default runs.
positionSizePercentnumberPosition size as a percentage of account balance per trade. Defaults to 10%.
presetIdstringApply this bot preset at creation: its ID or slug (e.g. "trade-wind-long-only"), a preset of `strategyId`. Its parameters, timeframe, execution mode and version, with parameterOverrides / executionMod…
startbooleantrue (default): the bot starts trading once created. false: it is created paused; start it with start_bot.
stopLossnumberStop loss % (e.g. 5)
symbolstring
takeProfitnumberTake profit % (e.g. 10)
timeframestringCandle timeframe the bot trades on (e.g. 15m, 1h, 4h, 1d). Omit to use the strategy's (or the preset's) own timeframe; only set it to override that. Your plan may limit which timeframes are allowed.

update_bot

Edit a deployed bot. One call can rename it, switch it to another strategy or apply a preset, change its timeframe, execution mode or run interval, set strategy parameters, change its version channel, and change its risk settings (leverage, position size %, stop loss, take profit), trade notifications or stopAfterClose. All of it goes in ONE update, so a strategy switch never lands half-done. Merging: the bot's current settings are fetched first and your changes go on top. Grouped settings (positionSizing, messaging, spinConfig, parameterOverrides) are merged, never wiped by a partial change.…

ParameterTypeDescription
id *stringThe bot ID to update, obtained from list_bots.
executionModestring"on_bar_close" runs the strategy once per closed candle (what backtests simulate); "continuous" runs it every interval. Omit to keep it.
leveragenumberNew leverage. Omit to leave unchanged.
namestringNew bot name. Omit to keep it.
notifyOnTradebooleanWhether to send a Telegram notification for each trade this bot executes. Omit to leave unchanged.
parameterOverridesobjectStrategy parameters to set, e.g. {"ENABLE_SHORTS": true, "VOL_SKIP_PCT": 80}. Merged into the bot's current overrides (or the preset's, with presetId); a null value removes that key so the strategy de…
pinnedVersionIdstringPin this strategy version ID (sets versionChannel "custom"). Version IDs come from list_strategy_versions.
positionSizePercentnumberNew position size as a percentage of account balance per trade. Omit to leave unchanged.
presetIdstringApply this bot preset: its ID or slug (e.g. "trade-wind-long-short"). Writes the preset's strategy, parameter overrides, timeframe, execution mode / interval and version; anything you pass explicitly…
resetParameterOverridesbooleantrue: drop all current parameter overrides first (the strategy defaults run), then apply parameterOverrides if given.
spinIntervalSecondsintegerRun interval in seconds. An on_bar_close bot still runs every closed bar; the server brings a longer interval down to the bar. Omit to keep it.
stopAfterClosebooleantrue: keep managing the open position, open no new entries, pause automatically once flat (immediately if already flat); false: cancel. Only an active bot can be set. Changing the bot's status (start_…
stopLossnumberNew stop loss %. Omit to leave unchanged.
strategyIdstringSwitch to this strategy: its ID or slug (e.g. "trade-wind", "supertrend-momentum"). The bot must be flat (see above). Its parameter overrides and preset are cleared unless you pass parameterOverrides…
takeProfitnumberNew take profit %. Omit to leave unchanged.
timeframestringCandle timeframe the bot trades on, e.g. "15m", "1h", "4h". Changing it needs the bot to be flat. Omit to keep it.
versionChannelstringStrategy version channel: "stable" (default for a switch), "beta", "latest", or "custom" (needs pinnedVersionId). Omit to keep it.

start_bot

Activate a paused or stopped bot so it starts opening new positions on its next scheduled interval (paper or live, depending on the exchange it's attached to). deploy_bot starts a new bot itself unless it was given start: false. Check state first with get_bot_status; find bot IDs with list_bots.

ParameterTypeDescription
id *stringThe bot ID to activate, obtained from list_bots.

stop_bot

Stop a running trading bot immediately. The bot stops trading entirely: any positions it currently holds stay open but are left unmanaged (no stop loss / take profit handling, no strategy exits) — close those separately with close_position. For a graceful stop that keeps managing the open position and pauses once it closes, use update_bot with stopAfterClose: true instead. The bot and its config are kept and can be restarted later (with start_bot), so this is a reversible state change, not a delete. Check state first with get_bot_status; find bot IDs with list_bots.

ParameterTypeDescription
id *stringThe bot ID to stop, obtained from list_bots.

delete_bot

Permanently delete a trading bot and its configuration -- irreversible, the bot cannot be recovered after this call. Refuses if the bot still has an open trade recorded (the delete itself doesn't close positions, so deleting it now would orphan that trade with nothing left to manage or close it) -- close_position and stop_bot it first. Confirm with the user before calling. Get bot IDs from list_bots.

ParameterTypeDescription
id *stringThe bot ID to delete, obtained from list_bots.

export_bot_trades

Export a bot's trade history as structured data — every closed trade with entry/exit prices and P&L, plus a performance summary. Use it to review or report on how a specific bot has performed. Read-only. Get bot IDs from list_bots.

ParameterTypeDescription
id *stringThe bot ID whose trades to export, obtained from list_bots.
formatstring"summary" = performance stats plus recent trades (default); "full" = every trade the bot has made.

close_position

Close an open trading position by placing a market order — fully or partially. This moves real money when the position is live, so confirm intent with the user before calling. Find the exchangeId, symbol, and side with get_positions. Set percentage below 100 for a partial close. A position one bot holds is closed as that bot's close (its lots, its exit record). Reports what actually closed (size, price, PnL) as the server confirmed it; when nothing closed, it returns the server's reason as an error, never "closed". Each call sends its close once. After CLOSE_OUTCOME_UNKNOWN, CLOSE_UNCONFIRME…

ParameterTypeDescription
exchangeId *stringThe exchange account ID where the position is open, from get_positions or list_exchanges.
side *stringPosition side, from get_positions.
symbol *stringTrading pair of the position, e.g. "BTC/USDT".
botIdstringOptional: the bot whose position this is (its id, from list_bots). Defaults to the position's own bot when exactly one bot holds it. With a position several bots share, only this bot's share closes (a…
percentagenumberPercentage of the position to close, 1-100. 100 = full close (default); e.g. 50 closes half.

get_trade_history

Get the user's closed trades, newest first: one row per close, with direction (long/short), entry and exit price, size, P&L (net of fees where booked), the return on position size, and when it opened and closed. Use it to review past trades or report on them. Read-only. Pages hold up to `limit` stored records, and a close is stored as an exit record plus the entry record(s) it closed, so a page usually lists about half that many trades: keep paging while hasMore is true. A trade with noExitRecord: true was closed by TradeStaq's reconcile after the exchange position was already gone; it is a re…

ParameterTypeDescription
exchangestringOptional filter by account instead of exchangeId: an account ID, or a platform or account name as list_exchanges shows it (e.g. "bitget"). Refused when more than one account matches.
exchangeIdstringOptional filter: one exchange account ID from list_exchanges. Omit for all accounts.
limitnumberNumber of stored records to read, max 200 (about half as many trades). Defaults to 50.
pagenumberPage number for pagination (1-based). Defaults to 1.
symbolstringOptional filter by trading pair, e.g. "BTC/USDT". Omit for all pairs.

get_performance_metrics

Get aggregate trading performance metrics over a time range: ROI, win rate, total P&L, and Sortino ratio. Use it to summarize how the user (or a subset of their trading) is performing. Read-only. For a list of individual trades use get_trade_history.

ParameterTypeDescription
exchangeIdstringOptional filter to a single exchange account ID (from list_exchanges). Omit for all.
timeRangestringWindow for the metrics: today, 7d, 30d, or 90d. Defaults to 30d.
tradeTypestringOptional filter: "live" or "paper" trades only. Omit to include both.

list_top_traders

Browse the leaderboard of top-performing traders you can copy.

ParameterTypeDescription
limitnumberNumber of traders to return (max 50)
periodstringLeaderboard time period
sortBystringSort criteria

follow_trader

Subscribe to copy a top trader's trades. WARNING: This commits capital to copy trading.

ParameterTypeDescription
exchangeId *stringYour exchange account to trade on
masterId *stringID of the trader to follow
multipliernumberTrade size multiplier relative to the master's trades

suggest_strategies

Suggest trading strategies matching your risk profile. Filters by risk tolerance, max drawdown, preferred assets, and minimum Sharpe ratio.

ParameterTypeDescription
maxDrawdownnumberMaximum acceptable drawdown % (e.g. 15)
minSharpenumberMinimum Sharpe ratio
preferredAssetsarrayPreferred assets like ['BTC', 'ETH']
riskTolerancestringRisk tolerance level

get_market_context

Get a market read for a symbol: trend direction, volatility level, and key support/resistance levels. Use it to inform a strategy or trade decision, or to ground market commentary in current conditions. Read-only — never places orders. Get exchange IDs from list_exchanges.

ParameterTypeDescription
exchangeId *stringExchange account ID to source data from (use list_exchanges to find one).
symbol *stringTrading pair in BASE/QUOTE format, e.g. "BTC/USDT".
timeframestringCandle timeframe for the analysis: 1h, 4h, or 1d. Defaults to 4h.