GET /v1/copy-trade/configs/{id}/performance
获取跟单任务收益与样本计数
任务级收益汇总。跟卖成功率是 0–1 的 copy-sell 终态订单比例,排除零卖出与明确配置策略 reject 跳过;copy_sell_counts 返回有效终态和跳过计数,不代表所有退出或盈利概率。收益百分比的 1 表示 1%;无投入返回 null。平均 gas 只覆盖已成交策略买卖,无样本或计数未知返回 null,不是钱包完整费用账本。缺价格的估值与收益保持 null。需要 copytrade:read。
所需 Scope:copytrade:read 路径参数
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
id | string | ✓ | Task config id returned by create or list. |
响应
200 — OK
| 字段 | 类型 | 必填 | 约束 | 说明 |
|---|---|---|---|---|
data | object | ✓ | Response payload. | |
data.task_id | string | ✓ | Task config id whose analytics are shown. | |
data.chain | string | ✓ | Chain on which the task runs. | |
data.retrieved_at | string | ✓ | When the gateway received the analytics result. This is not the underlying trade or price snapshot time. | |
data.data_as_of | null | ✓ | Underlying analytics snapshot time is unavailable. | |
data.source | enum ("task-data/summary") | ✓ | Analytics endpoint that supplied this task summary. | |
data.total_bought_usd | number | ✓ | Total recorded USD value bought by this task. | |
data.total_sold_usd | number | ✓ | Total recorded USD value sold by this task. | |
data.total_hold_usd | number | null | ✓ | Current holdings USD value; null when any held token lacks a usable price. | |
data.total_pnl_usd | number | null | ✓ | Task analytics total PnL; null when any held token lacks price. Gas is reported separately. | |
data.total_pnl_percentage | number | null | ✓ | Task PnL / total_bought_usd × 100 (1 means 1%). Null when any held token lacks price or total_bought_usd is zero; a zero-investment return is undefined. | |
data.copy_sell_success_rate | number | null | ✓ | Lifetime order-record ratio in [0,1], not a percentage: filled / (filled + failed + timeout + reject) from copy-sell orders on this task and chain. Zero-amount sell skips and explicit configured-policy reject skips are excluded; balance, route, lookup and unknown rejections remain. Automatic exits and pending orders are excluded. Null when no eligible records exist. This is not overall exit success, profitability or a deduplicated leader-signal rate. | |
data.copy_sell_counts | object | null | ✓ | Counts used by copy_sell_success_rate, including excluded zero-amount skips. Null when the analytics version does not supply the breakdown. | |
data.copy_sell_counts.filled | integer | ✓ | min: 0 | Successful copy-sell order records. |
data.copy_sell_counts.failed | integer | ✓ | min: 0 | Failed copy-sell order records. |
data.copy_sell_counts.timeout | integer | ✓ | min: 0 | Timed-out copy-sell order records; outcome may be unknown. |
data.copy_sell_counts.reject | integer | ✓ | min: 0 | Other rejected copy-sell records; zero-amount skips excluded. |
data.copy_sell_counts.skipped_policy | integer | min: 0 | Explicit configured-policy reject skips, excluded from the denominator. Absent on older analytics; balance, route, lookup and unknown errors are not policy skips. | |
data.copy_sell_counts.skipped_no_position | integer | ✓ | min: 0 | Zero-amount sell skips, including no tracked position, already exited and calculated zero amount. Excluded from the denominator. |
data.filled_trade_count | integer | null | ✓ | min: 0 | Recorded filled strategy trades, buys and sells, used for the gas-fee average. Null when not supplied by analytics. |
data.active_position_count | number | ✓ | Number of currently active token positions. | |
data.total_position_count | number | ✓ | Number of token-summary rows for this task and chain, including closed holdings. This is not an order count or a count of repeated position openings. | |
data.price_stale_tokens | array<string> | ✓ | Token addresses whose prices are stale or unavailable. | |
data.total_gas_fee_usd | number | ✓ | Recorded gas fees of filled strategy trades in USD; excludes failed-transaction gas and is not a complete wallet fee ledger. Reported separately from PnL. | |
data.avg_fee_per_trade_usd | number | null | ✓ | Recorded gas USD divided by filled_trade_count, including buys and sells. Null with no filled trades or when the count is unavailable. Failed-transaction gas is not included. | |
meta | object | ✓ | Request id, plus paging fields when this operation is a list. | |
meta.request_id | string | ✓ | Id of this request. Also sent as the X-Request-Id response header. |
401 — unauthorized (missing/invalid/revoked/expired Bearer token)
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
error | object | ✓ | Why the request failed. |
error.code | string | ✓ | Stable machine-readable error code. |
error.message | string | ✓ | Human-readable explanation of the error. |
error.total | number | Number of distinct blacklisted wallets the account would have on this chain after saving. | |
error.limit | number | Maximum distinct blacklisted wallets per account on this chain. | |
error.details | array<object> | Only present when at least one field-level validation issue exists. | |
error.details[].field | string | ✓ | Request field this issue refers to, or a dotted path such as buy.amount. |
error.details[].reason | string | ✓ | Why that field was rejected. |
error.details[].code | string | Stable machine-readable reason for a strategy spec issue, for example unsupported_leaf or pump_callers_required. Present only on strategy spec validation errors; reason may change. | |
meta | object | ✓ | Request id for this failure. |
meta.request_id | string | ✓ | Id of this request. Also sent as the X-Request-Id response header. |
403 — insufficient_scope / ip_not_allowed
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
error | object | ✓ | Why the request failed. |
error.code | string | ✓ | Stable machine-readable error code. |
error.message | string | ✓ | Human-readable explanation of the error. |
error.total | number | Number of distinct blacklisted wallets the account would have on this chain after saving. | |
error.limit | number | Maximum distinct blacklisted wallets per account on this chain. | |
error.details | array<object> | Only present when at least one field-level validation issue exists. | |
error.details[].field | string | ✓ | Request field this issue refers to, or a dotted path such as buy.amount. |
error.details[].reason | string | ✓ | Why that field was rejected. |
error.details[].code | string | Stable machine-readable reason for a strategy spec issue, for example unsupported_leaf or pump_callers_required. Present only on strategy spec validation errors; reason may change. | |
meta | object | ✓ | Request id for this failure. |
meta.request_id | string | ✓ | Id of this request. Also sent as the X-Request-Id response header. |
404 — not_found (missing, foreign-owned or wrong task kind)
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
error | object | ✓ | Why the request failed. |
error.code | string | ✓ | Stable machine-readable error code. |
error.message | string | ✓ | Human-readable explanation of the error. |
error.total | number | Number of distinct blacklisted wallets the account would have on this chain after saving. | |
error.limit | number | Maximum distinct blacklisted wallets per account on this chain. | |
error.details | array<object> | Only present when at least one field-level validation issue exists. | |
error.details[].field | string | ✓ | Request field this issue refers to, or a dotted path such as buy.amount. |
error.details[].reason | string | ✓ | Why that field was rejected. |
error.details[].code | string | Stable machine-readable reason for a strategy spec issue, for example unsupported_leaf or pump_callers_required. Present only on strategy spec validation errors; reason may change. | |
meta | object | ✓ | Request id for this failure. |
meta.request_id | string | ✓ | Id of this request. Also sent as the X-Request-Id response header. |
429 — rate_limited (Retry-After response header set)
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
error | object | ✓ | Why the request failed. |
error.code | string | ✓ | Stable machine-readable error code. |
error.message | string | ✓ | Human-readable explanation of the error. |
error.total | number | Number of distinct blacklisted wallets the account would have on this chain after saving. | |
error.limit | number | Maximum distinct blacklisted wallets per account on this chain. | |
error.details | array<object> | Only present when at least one field-level validation issue exists. | |
error.details[].field | string | ✓ | Request field this issue refers to, or a dotted path such as buy.amount. |
error.details[].reason | string | ✓ | Why that field was rejected. |
error.details[].code | string | Stable machine-readable reason for a strategy spec issue, for example unsupported_leaf or pump_callers_required. Present only on strategy spec validation errors; reason may change. | |
meta | object | ✓ | Request id for this failure. |
meta.request_id | string | ✓ | Id of this request. Also sent as the X-Request-Id response header. |
500 — internal_error
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
error | object | ✓ | Why the request failed. |
error.code | string | ✓ | Stable machine-readable error code. |
error.message | string | ✓ | Human-readable explanation of the error. |
error.total | number | Number of distinct blacklisted wallets the account would have on this chain after saving. | |
error.limit | number | Maximum distinct blacklisted wallets per account on this chain. | |
error.details | array<object> | Only present when at least one field-level validation issue exists. | |
error.details[].field | string | ✓ | Request field this issue refers to, or a dotted path such as buy.amount. |
error.details[].reason | string | ✓ | Why that field was rejected. |
error.details[].code | string | Stable machine-readable reason for a strategy spec issue, for example unsupported_leaf or pump_callers_required. Present only on strategy spec validation errors; reason may change. | |
meta | object | ✓ | Request id for this failure. |
meta.request_id | string | ✓ | Id of this request. Also sent as the X-Request-Id response header. |
503 — unavailable (analytics could not provide a trustworthy answer)
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
error | object | ✓ | Why the request failed. |
error.code | string | ✓ | Stable machine-readable error code. |
error.message | string | ✓ | Human-readable explanation of the error. |
error.total | number | Number of distinct blacklisted wallets the account would have on this chain after saving. | |
error.limit | number | Maximum distinct blacklisted wallets per account on this chain. | |
error.details | array<object> | Only present when at least one field-level validation issue exists. | |
error.details[].field | string | ✓ | Request field this issue refers to, or a dotted path such as buy.amount. |
error.details[].reason | string | ✓ | Why that field was rejected. |
error.details[].code | string | Stable machine-readable reason for a strategy spec issue, for example unsupported_leaf or pump_callers_required. Present only on strategy spec validation errors; reason may change. | |
meta | object | ✓ | Request id for this failure. |
meta.request_id | string | ✓ | Id of this request. Also sent as the X-Request-Id response header. |
请求示例
curl -X GET "https://api.apm.fun/v1/copy-trade/configs/cfg_8f2a1c9b/performance" \
-H "Authorization: Bearer apm_live_<prefix>.<secret>" 响应示例 200
{
"data": {
"task_id": "cfg_8f2a1c9b",
"chain": "string",
"retrieved_at": "2026-01-15T09:30:00Z",
"data_as_of": null,
"source": "task-data/summary",
"total_bought_usd": 0,
"total_sold_usd": 0,
"total_hold_usd": null,
"total_pnl_usd": null,
"total_pnl_percentage": null,
"copy_sell_success_rate": null,
"copy_sell_counts": {
"filled": 0,
"failed": 0,
"timeout": 0,
"reject": 0,
"skipped_policy": 0,
"skipped_no_position": 0
},
"filled_trade_count": null,
"active_position_count": 0,
"total_position_count": 0,
"price_stale_tokens": [
"string"
],
"total_gas_fee_usd": 0,
"avg_fee_per_trade_usd": null
},
"meta": {
"request_id": "cfg_8f2a1c9b"
}
}