1. Connect NexusTrade in Claude
Open Customize > Connectors, choose + Add > Add custom connector, enter NexusTrade and the endpoint below, then Continue. Review detected authentication, Continue, choose Sign in now and finish with Add. Complete NexusTrade OAuth. In this conversation, open + > Connectors and enable NexusTrade.
On Team or Enterprise, the authorized owner or role adds the connector first; each member connects their own account. Use Search and tools to select the tools needed for this task. Keep account-changing approvals enabled.
NexusTrade server URL
https://nexustrade.io/api/mcp2. Check the returned account tools
The result is a paginated object with portfolios, total and totalPages. Walk pages when necessary. A new account may return an empty list. Keep authentication errors and missing results separate. Do not infer a successful connection from a tool list alone.
Use fetch_portfolios with the JSON below. Read a portfolioId returned by that call with get_portfolio, setting its portfolio_id argument to the same value. Compare the name, type and strategies with the intended NexusTrade account. If no portfolio exists, keep the empty result and continue to the new draft preview below. Do not create anything during this check.
{
"include_paper": true,
"include_live": false,
"include_chat_portfolios": true,
"include_positions": false,
"limit": 20,
"page": 1
}Confirm permission for this task
Discover build_portfolio, create_portfolio, get_portfolio and update_portfolio, fetch_portfolios and query_portfolio_history in the current connection. Check that the granted app actions allow this task before submitting anything. A plugin listing or successful read does not grant write access. Keep approvals enabled for saving and account changes.
3. Freeze this proposed rule before submitting anything
This teaching example uses AAPL only, no leverage and a $10,000 starting balance. At each daily evaluation, compare Price with its 200-period SimpleMovingAverage using a Day window. Target 25% of portfolio value in AAPL when price is above the average, 0% when below it, and keep the prior target at equality. Leave the rest in cash. Review the returned strategy JSON for these rules and for repeated-buy protection.
Use 2021-01-01 through 2024-12-31 for the first historical window. Keep 2025-01-01 through 2025-12-31 unopened until the exact rule and evaluation criteria are frozen. The dates and allocation are proposed inputs, not a performance result. Choosing after seeing that period would make it retrospective validation and would no longer test an unseen period.
4. Author and read back a new candidate
Use structured strategy objects after reviewing them. Read condition/action fields rather than relying on a strategy name. Saving the chat candidate does not activate a paper or brokerage portfolio.
Read get_portfolio structured output under portfolio: portfolioId, type, isActive, strategies, initialValue and deployment. Resolve a mismatch before using that ID in another operation.
Draft a NEW chat portfolio named AAPL SMA200 25pct v1 with initialValue 10000 and dividendPolicy reinvest. Author two explicit strategies for the daily AAPL Price versus 200-Day SimpleMovingAverage target rule above, capped at 25% long exposure with remaining cash. Show complete condition and action objects, sizing, evaluation schedule and orderExecution before saving. Call build_portfolio with the full structured draft first. Inspect valid, the canonical portfolio and every reported issue. Fix issues and repeat the preview; it does not persist a candidate. After I approve the definition, use create_portfolio structured name, initialValue, dividendPolicy and strategies fields. Read the returned chat portfolio with get_portfolio using its actual portfolio_id. Retain the exact strategy definition, review notes and returned operation IDs. Stop after saving; do not backtest or deploy yet.5. Review the historical run and set the paper budget
Read the completed historical result for this exact strategy version before activation. Record the paper start date, $10,000 simulated initial balance, 25% target cap, intended evaluation schedule and review dates. Name the conditions that would pause the experiment, such as an incorrect signal, a duplicate order or unexpected exposure. Historical validation and paper observation answer different questions.
A Day backtest interval and Day indicator window do not set the running schedule. Inspect deployment.frequency in get_portfolio: Constant and OpenClose are different modes, and OpenClose is not once per day. Record the actual frequency and timing fields before judging forward activity.
6. Activate only the reviewed chat candidate
After reviewing the plan, use this update_portfolio operation with the newly authored chat ID. Deploying that chat candidate creates a separate paper book. An existing live ID can reactivate brokerage trading, so read the target first and do not substitute a live portfolio. This example is simulated money only.
{
"operations": [
{
"type": "deploy",
"portfolioId": "REPLACE_WITH_RETURNED_CHAT_ID"
}
]
}7. Find the running paper identity
Call fetch_portfolios with these flags after activation. Compare the deployment response with the returned rows. Require type:paper, the expected strategy/name and isActive:true, then read the running portfolio with get_portfolio. Record its portfolioId separately from the chat candidate ID. If the response was interrupted, recover this book before retrying deployment.
{
"include_paper": true,
"include_live": false,
"include_chat_portfolios": false,
"include_inactive": true,
"search": "AAPL SMA200 25pct v1",
"page": 1,
"limit": 20
}8. Read forward history, then pause the verified book
A new deployment can have little or no history. Empty forward history is not a backtest result and does not justify inventing a curve or redeploying. get_portfolio_performance returns aggregates; query_portfolio_history supplies the recorded curve.
Paper fills use simulated money. Brokerage permissions, order handling, spreads and fill availability need a separate live review. Pausing automation is not an instruction to liquidate positions; inspect holdings and any outstanding orders separately.
| Running ID, activation date and actual cadence | Deployment response and get_portfolio |
| First recorded time/value and exposure | query_portfolio_history and account positions |
| Unexpected activity or signal mismatch | Compare observed activity with the frozen strategy JSON |
| Pause time and inactive confirmation | undeploy response and get_portfolio for the same ID |
No matching rows. Clear the filter to see all records.
Fill this log with returned observations. These rows contain no invented paper results.
Call query_portfolio_history with portfolio_id set to the verified running paper ID, start_date set to the recorded activation date, page:1 and page_size:500. Preserve the returned time/value observations and continue pages. Compare those values with recorded cash changes, strategy edits and actual activity.
To pause after reviewing the exact target, call update_portfolio with:
{
"operations": [
{
"type": "undeploy",
"portfolioId": "REPLACE_WITH_VERIFIED_RUNNING_PAPER_ID"
}
]
}
Then call get_portfolio with portfolio_id set to that same running paper ID. Confirm portfolio.type:paper and portfolio.isActive:false. Keep the existing history; do not delete the book.Create and monitor a separate paper deployment
Deploying an existing live portfolio ID can reactivate real brokerage trading. For this workflow use the newly authored chat candidate and verify the returned deployment is paper. The SDK also separates saved draft IDs from deployment.portfolioId.
| Preview the candidate | build_portfolio | Review the canonical configuration and fix validation issues before saving |
| Author the candidate | create_portfolio | A newly authored chat portfolio, not an existing live account |
| Inspect the target | get_portfolio | Read the exact returned ID and strategies before activation |
| Deploy the chat book | update_portfolio | operations: [{type: "deploy", portfolioId: returnedChatId}] creates paper |
| Find the running book | fetch_portfolios | Keep the resulting deployment ID separately from the original chat/draft ID |
| Read actual paper history | query_portfolio_history | The deployed portfolio curve; never substitute a backtest curve |
No matching rows. Clear the filter to see all records.
