Analytics
5 tools in this category.
Overview
Analytics includes 5 tools for this workflow area.
Available tools: check_order, get_pnl_by_symbol, get_pnl_by_time, get_tick_history, get_trade_stats.
Use the parameter tables and examples below as the canonical request contract.
check_order
Checks whether an order can be placed without sending it. Supports both market and pending order types. Returns { feasible, required_margin, free_margin, estimated_cost, reason? }.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
symbol | string | Yes | — | — |
order_type | string | Yes | — | (one of: BUY, SELL, BUY_LIMIT, BUY_STOP, SELL_LIMIT, SELL_STOP) |
volume | number | Yes | — | — |
price | number | No | — | — |
Example Request
{
"tool": "check_order",
"arguments": {
"symbol": "EURUSD",
"order_type": "BUY",
"volume": 1
}
}get_pnl_by_symbol
Returns P&L broken down per trading symbol. Result: { items: [{ symbol, pnl, trades }] } sorted by |pnl| descending.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
from_date | string | No | — | — |
to_date | any | No | — | — |
Example Request
{
"tool": "get_pnl_by_symbol",
"arguments": {}
}get_pnl_by_time
Returns P&L bucketed into time intervals. Result: { items: [{ period_start, pnl, trades }] } sorted chronologically.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
period | string | No | "DAY" | (one of: DAY, WEEK, MONTH) |
from_date | string | No | — | — |
to_date | any | No | — | — |
Example Request
{
"tool": "get_pnl_by_time",
"arguments": {}
}get_tick_history
Returns a sequence of raw ticks for a symbol. Result: { ticks: [{ time, bid, ask, last, volume }] }.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
symbol | string | Yes | — | — |
count | integer | No | 100 | — |
from_date | string | No | — | — |
Example Request
{
"tool": "get_tick_history",
"arguments": {
"symbol": "EURUSD",
"count": 100
}
}Usage Notes
- Start with a smaller
count/barsvalue while iterating, then increase once the workflow is stable.
get_trade_stats
Returns aggregate statistics over closed trades: total_trades, win/loss counts, win_rate, avg_profit, avg_loss, profit_factor, total_pnl, expectancy, max_drawdown_percent, sharpe_ratio, consistency_percent.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
symbol | string | No | — | — |
from_date | string | No | — | — |
to_date | any | No | — | — |
Example Request
{
"tool": "get_trade_stats",
"arguments": {}
}