First API Call
Walk through your first tool call, understand the response, and see how billing works.
The pre_trade_gate
The best first call is pre_trade_gate. It combines three operations (position sizing, risk validation, system health) into one call for $0.01.
Reading the response
Field breakdown
Top level:
| Field | Type | Description |
|---|---|---|
gate_passed | bool | true if both sizing and risk check succeeded. |
sizing | object | Position sizing result from the G-formula. |
risk | object | Iron Fist risk validation result. |
system_health | object or null | System health check. Present only if you pass r_multiples. |
Sizing:
| Field | Type | Description |
|---|---|---|
shares | int | Number of shares to buy. |
risk_amount | string | Dollar amount at risk. |
risk_percent | string | Risk as a fraction of equity (0.02 = 2%). |
notional | string | Total position value in dollars. |
one_r_dollars | string | Dollar value of one R-unit. |
direction | string | Trade direction (long or short). |
Risk:
| Field | Type | Description |
|---|---|---|
approved | bool | true if the trade passes all risk rules. |
score | int | Risk score from 0 (worst) to 100 (best). |
errors | string[] | Blocking issues that prevented approval. |
warnings | string[] | Non-blocking concerns. |
Adding system health
Pass your recent R-multiples to include a system health check:
How billing works
Every tool call deducts from your compute credit balance:
- System R checks your balance before executing the tool.
- If the balance is sufficient, the call executes and the cost is deducted.
- If the balance is insufficient, you receive a 402 error. No charge.
Check your balance:
The is_low flag turns true when your balance drops below $0.01.
Using the generic tool call
Every tool can be called through the universal endpoint:
The generic call_tool method maps to POST /v1/tools/call:
Next calls to try
| Tool | Cost | What it does |
|---|---|---|
calculate_position_size | $0.003 | G-formula position sizing alone. |
check_trade_risk | $0.004 | Iron Fist risk validation alone. |
evaluate_performance | $0.10 | G-metric analysis from R-multiples. |
run_monte_carlo | $0.008 | Simulate 1,000 future equity paths. |
assess_trading_system | $2.00 | Complete system diagnostic (7 tools in one). |
See the full tools reference for all 55 tools.
System R AI
| Python SDK | pip install systemr |
| MCP Server | agents.systemr.ai/mcp/sse |
| OpenAPI Spec | agents.systemr.ai/openapi.json |
| Machine Docs | agents.systemr.ai/llms.txt |
| GitHub | System-R-AI |
| X | @Systemrai |
| YouTube | @systemr_ai |
| hello@systemr.ai | |
| Phone | 628 333 6693 |
| Address | 7901 4TH ST N, STE 28529, ST PETERSBURG, FL 33702 |
| Terms | Terms of Service |
| Privacy | Privacy Policy |
| Security | Security Policy |
© 2026 System R AI. Software platform. Not financial advice.