TL;DR
The Grok Bot example enters NVDA with 20% of portfolio value while flat above its 50-day average and exits the entire holding at or below that average. Validation saved nothing and recorded no forward paper performance. Review the inactive draft, create a separate Paper deployment and verify its returned ID and evaluation schedule. Observe actual orders and history. Pausing the Bot's routine and stopping the NexusTrade paper book are separate actions; stopping evaluation does not liquidate holdings.
Create and monitor a separate paper deployment
Preview the candidate
NexusTrade toolbuild_portfolio
Identity boundaryReview the canonical configuration and fix validation issues before saving
Author the candidate
NexusTrade toolcreate_portfolio
Identity boundaryA newly authored chat portfolio, not an existing live account
Inspect the target
NexusTrade toolget_portfolio
Identity boundaryRead the exact returned ID and strategies before activation
Deploy the chat book
NexusTrade toolupdate_portfolio
Identity boundaryoperations: [{type: "deploy", portfolioId: returnedChatId}] creates paper
Find the running book
NexusTrade toolfetch_portfolios
Identity boundaryKeep the resulting deployment ID separately from the original chat/draft ID
Read actual paper history
NexusTrade toolquery_portfolio_history
Identity boundaryThe deployed portfolio curve; never substitute a backtest curve
Show the table · 6 rows, 3 columns
Scroll sideways to compare all columns. Select a heading to sort.
| 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.
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.
Validated example: NVDA entry and exit
- Starting capital
- $10,000
NexusTrade validation recorded October 10, 2026 returned valid:true with no issues. This preview saved nothing and has no forward Paper history.
Entry
Buy 20% of the portfolio in NVDA whenever NVDA's price is above its 50-day average price and the portfolio holds no NVDA.
Exit
Sell 100% of the current NVDA position whenever NVDA's price is at or below its 50-day average price and the portfolio holds NVDA.
Rule decision example
Hypothetical: NVDA at $110, its 50-day average at $100, no NVDA held, and a $10,000 portfolio. The entry proposes $2,000 of NVDA before whole-share rounding and execution costs.
Exit and equality
At price equal to the average, entry is false; with a holding, the exit passes because its comparison includes equality.
Try this example in Grok Bot
Inspect the request
Connect Grok Bot, then copy the request below. Review the returned result before continuing.
Connect the Bot and keep writes behind approval
In Grok Bot, open Connect apps in the sidebar. If a NexusTrade connector is available, select Add, complete its browser authentication and attach it with @ in this task. For your existing or custom MCP connection, give the Bot the current NexusTrade endpoint below and ask it to complete OAuth discovery. This is a connection request; verify the returned tools and account before continuing.
For sign-in or two-factor authentication, open Agent Computer, take control, finish the sensitive step and return control. Browser sessions and command-line credentials are shared by your account's Bots. Keep the experiment notes in a named folder under /workspace.
Open Settings → General → Auto-review and add Ask first rules for paid research, backtests, portfolio changes and deployment. Review the exact inputs on the approval card and use Allow once for a single accepted operation. The published NexusTrade case study documents Grok Bot MCP and Python SDK use. The SDK guide provides a terminal route when the current connector cannot finish authentication; its API key is separate from MCP OAuth.
Connect this Grok Bot task to NexusTrade MCP at https://nexustrade.io/api/mcp using OAuth discovery. Complete the sign-in handoff with me, list discovered tools, then run only the account read check. Do not launch research or backtests, activate a portfolio or place orders.Check the account with an owned portfolio read
Ask the agent to call fetch_portfolios with the arguments below. Compare the returned portfolio names, IDs and types with your NexusTrade account. fetch_portfolios returns portfolioId; pass that exact value as portfolio_id to get_portfolio. Inspect the structured portfolio.portfolioId, portfolio.type, portfolio.isActive, portfolio.strategies, portfolio.initialValue and portfolio.deployment. For a new account, an authenticated empty list is a valid result.
This request excludes live books and positions, includes chat drafts and inactive paper books, and returns up to 50 records per page. Follow subsequent pages before concluding a named book is absent. If OAuth expired, reconnect and repeat this read. For a missing tool, inspect the included app, environment and action permissions. An account mismatch must be fixed before a write.
{
"include_live": false,
"include_paper": true,
"include_chat_portfolios": true,
"include_inactive": true,
"include_positions": false,
"limit": 50,
"page": 1
}Freeze NVDA saved-strategy review
Proposed mechanics example: one long-only NVDA stock strategy pair, $10,000 starting simulated capital and a 50-trading-day simple moving average. The historical example uses interval Day. Enter only while flat when price is above that average; buy 20% of portfolio value. Exit the entire NVDA holding when price is at or below the same average. Keep the remainder in cash; use no leverage, options or parameter search.
Have the agent show the complete condition and action objects, then call build_portfolio with that full JSON to validate and canonicalize without saving. Review valid, issues and the returned portfolio. Correct each reported issue before approving create_portfolio with the same accepted JSON. The flat-position guard prevents another purchase on every evaluation while the condition stays true. Record how the configuration handles missing prices, warmup and evaluation timing. These are proposed inputs, not a recommended allocation or a tested trading edge.
Draft exactly one new chat portfolio named "Grok Bot NVDA SMA50 review" with initialValue 10000. Use daily NVDA prices and a SimpleMovingAverage window of 50 Day bars. Entry: price > SMA50 AND held PositionValue = 0; buy 20% of portfolio value. Exit: price <= SMA50 AND held PositionValue > 0; sell 100% of that holding. No options, leverage or repeated purchases while held. Show the full condition/action configuration and the dividend policy. Call build_portfolio with the full JSON; inspect valid, issues and the canonicalized portfolio without saving. After I approve saving, call create_portfolio with the same accepted JSON, preserve portfolios[0].portfolioId and read that exact ID with get_portfolio. Do not backtest or deploy yet.Approve one paper-copy operation
Read the newly created chat portfolio again and confirm its type, $10,000 simulated capital and complete strategy pair. Keep the saved draft ID and any historical backtest ID in separate fields. After you approve activation, call update_portfolio with only the chat ID below. Deploying that chat candidate creates a paper book; targeting an existing live portfolio can reactivate real brokerage trading.
Record the returned deployment result, then use fetch_portfolios with include_paper=true, include_live=false and include_chat_portfolios=false to find the deployed book. Read its exact ID with get_portfolio and verify paper type, copied strategies and state. Keep the running paper ID separately from the original chat ID. Inspect its evaluation state after the copy, even if the approval succeeded.
{
"operations": [
{
"type": "deploy",
"portfolioId": "<RETURNED_CHAT_PORTFOLIO_ID>"
}
]
}Confirm evaluation and the first paper record
Open /portfolio/<RETURNED_PAPER_PORTFOLIO_ID> in NexusTrade. Review the Deployment Center on that paper book. Its Automated Trading switch controls strategy evaluation. If it is off and you choose to begin evaluation, enable it for this verified paper target and select Save Changes. Read back the same portfolio and its active state before reporting it running. This is separate from the live-only Autonomous Trading approval policy; paper orders remain on manual review.
When a simulated order is pending approval, open Order Management, select Paper, inspect the portfolio, symbol, side and size, then choose Confirm only after review. Read its order state and paper history before claiming a fill.
Keep NVDA, the 50-day rule, 20% entry allocation and $10,000 initial value fixed during observation. Read the actual deployment frequency: the Day historical interval and a Day indicator window do not set paper cadence. Constant and OpenClose are different evaluation schedules; OpenClose evaluates at both open and close. Record that frequency, when evaluation began and what data was available. Paper behavior is simulated forward execution. A historical curve remains a separate artifact.
Monitor the deployed curve, not a replay
Use query_portfolio_history with the exact paper ID below and actual observation dates when applying filters. The expected result identifies the deployed portfolio and paper kind and returns {time, value} points. Follow pagination; an empty first result can mean no history yet. Check evaluation state, market timing and the same ID before diagnosing failure.
Keep a journal of signal, simulated order, holding, cash and history timestamps from the available portfolio and event tools. If the rule does not trade, report that observation. Do not invent a fill or launch a backtest to make the paper curve appear.
{
"portfolio_id": "<RETURNED_PAPER_PORTFOLIO_ID>",
"page": 1,
"page_size": 500
}Keep a Bot observation log and review its routine
Save the verified NVDA paper ID and last observed history timestamp in /workspace/nvda-paper. Complete one read-only observation before asking Grok Bot to save it as a skill or routine. Use a named daily check at 4:30 p.m. America/New_York for a confirmed 20-market-session observation period; show the next run and end date before enabling it.
Open View conversation details → Routines to inspect recent runs or pause the routine. Its Test run performs real tool calls, so keep the routine read-only. Closing your laptop does not stop the cloud Bot. Pausing the routine stops these checks; the NexusTrade paper book needs its own stop and readback.
For the verified NVDA paper ID <RETURNED_PAPER_PORTFOLIO_ID>, read get_portfolio and query_portfolio_history once and save the timestamped output to /workspace/nvda-paper. Compare with the prior observation. Report connection errors, rule changes and new simulated activity. Do not create, deploy, edit or start compute. After this succeeds, show a proposed read-only weekday routine and its end date for my review.Recover or stop without a duplicate activation
If the deploy response is missing, read the original draft, list paper books including inactive ones and compare the copied strategy set and creation record. Reuse the existing paper ID when found. An ambiguous timeout is not permission to issue another deploy operation; reconcile the task and account first.
To stop strategy evaluation, turn Automated Trading off in that paper book’s Deployment Center and select Save Changes. Read the same ID and policy to verify the stop. update_portfolio also exposes undeploy for the verified deployed ID when you explicitly choose to stop that deployment. Review existing simulated orders and holdings separately; stopping evaluation does not mean liquidation.
Stopping the external agent or canceling its observation schedule is separate from stopping the NexusTrade book. Save the final paper ID and its observed state before ending the assignment.
Stop this paper deployment and verify its state
After approving a stop, send this update_portfolio request only for the verified running paper ID. Read get_portfolio again and check portfolio.type is paper and portfolio.isActive is false. Retain the ID and history; undeploy is different from delete. Confirm the trading policy separately if you changed Automated Trading in the UI.
{
"operations": [
{
"type": "undeploy",
"portfolioId": "<RETURNED_PAPER_PORTFOLIO_ID>"
}
]
}Exact validation request and provenance
Inspect the complete paper-candidate JSON and validation provenance
On October 10, 2026, we constructed this complete NVDA configuration with the NexusTrade Python SDK and sent it to the product's build_portfolio tool. It returned valid: true and an empty issues list. The returned rules are summarized below; generated identifiers and editor metadata are omitted.
The preview saved nothing. Inspect these accepted rule definitions before creating your own paper draft. Copy the complete request below into build_portfolio to inspect the same candidate before saving it.
The entry sizes from total portfolio value, rather than remaining cash. Its zero-position guard prevents repeated purchases while held. The exit closes the current holding, rather than selling a percentage of total account value. The request specifies its dividend policy; the preview's compact result does not repeat every portfolio setting, so confirm those settings after saving.
| Product response | Observed value |
|---|---|
| Validation | valid: true; issues: [] |
| Capital | initialValue: 10000 |
| Entry | Buy 20% of the portfolio in NVDA whenever NVDA's price is above its 50-day average price and the portfolio holds no NVDA. |
| Exit | Sell 100% of the current NVDA position whenever NVDA's price is at or below its 50-day average price and the portfolio holds NVDA. |
| Order approval | automaticOrderApproval: false on both returned rules |
| Persistence | Nothing was saved |
No matching rows. Clear the filter to see all records.
{
"name": "Public SEO example - grok-bot NVDA SMA50",
"initialValue": 10000,
"cash": 10000,
"buyingPower": 10000,
"strategies": [
{
"name": "Enter while flat",
"condition": {
"type": "And",
"conditions": [
{
"type": "Base",
"lhs": {
"type": "Price",
"targetAsset": {
"type": "Stock",
"symbol": "NVDA",
"name": "NVDA"
}
},
"comparison": "greaterThan",
"rhs": {
"type": "SimpleMovingAverage",
"targetAsset": {
"type": "Stock",
"symbol": "NVDA",
"name": "NVDA"
},
"window": {
"length": 50,
"interval": "Day"
}
}
},
{
"type": "Base",
"lhs": {
"type": "PositionValue",
"targetAssets": [
{
"type": "Stock",
"symbol": "NVDA",
"name": "NVDA"
}
]
},
"comparison": "equal",
"rhs": {
"type": "Value",
"value": 0
}
}
]
},
"action": {
"type": "Buy",
"targetAsset": {
"type": "Stock",
"symbol": "NVDA",
"name": "NVDA"
},
"amount": {
"type": "percent of portfolio",
"amount": 20
}
},
"orderExecution": {
"type": "Market"
}
},
{
"name": "Exit held position",
"condition": {
"type": "And",
"conditions": [
{
"type": "Base",
"lhs": {
"type": "Price",
"targetAsset": {
"type": "Stock",
"symbol": "NVDA",
"name": "NVDA"
}
},
"comparison": "lessThanOrEqual",
"rhs": {
"type": "SimpleMovingAverage",
"targetAsset": {
"type": "Stock",
"symbol": "NVDA",
"name": "NVDA"
},
"window": {
"length": 50,
"interval": "Day"
}
}
},
{
"type": "Base",
"lhs": {
"type": "PositionValue",
"targetAssets": [
{
"type": "Stock",
"symbol": "NVDA",
"name": "NVDA"
}
]
},
"comparison": "greaterThan",
"rhs": {
"type": "Value",
"value": 0
}
}
]
},
"action": {
"type": "Sell",
"targetAsset": {
"type": "Stock",
"symbol": "NVDA",
"name": "NVDA"
},
"amount": {
"type": "percent of current positions",
"amount": 100
}
},
"orderExecution": {
"type": "Market"
}
}
],
"supportsFractionalShares": false,
"supportsCrypto": false,
"alertsEnabled": false,
"dividendPolicy": "cash"
}
No comments yet.