API Reference v1
Get API Key API Key

GET /v1/copy-trade/configs/{id}/trades

Settled trades of a Copy Trading config, with realized PnL

Newest-oldest is not guaranteed within a page like the orders cursor — this is page/limit paging over a different list: it contains terminal strategy records (including failures and unknown timeouts), available realized PnL per sell, and sells made from the wallet outside the platform (source=external). Platform rows share order_id with the orders sub-resource. failure_stage and reason_code share the orders/account-history normalization. filtered includes balance/route rejections and failed market-cap guards; it does not establish a harmless pre-trade skip. success includes external sells and is not task execution success. meta.analytics_available=false means the upstream answered with prices/PnL degraded; a 503 unavailable means it could not answer at all, which is never reported as an empty page. Requires the copytrade:read scope.

Required scope: copytrade:read

Path parameters

FieldTypeRequiredDescription
idstring✓Config id returned by create or list.

Query parameters

FieldTypeRequiredDescription
outcomeenum ("success" | "failed" | "filtered")Default: available filled/failed/timeout strategy records and attributed external sells; reject rows require filtered. success includes filled strategy trades and attributed external sells, not just orders executed by this task. failed includes failed/timeout records outside the filtered bucket; timeout is an unknown outcome. filtered includes every reject (even balance or route blockers) and historical failed copy-buy market-cap guard records, which may carry a transaction hash. It does not mean harmless skips or no gas spent. These buckets must not be used as an execution success-rate denominator.
sincestringRFC 3339 UTC lower bound on the trade time, not on updated_at.
pageinteger1-based page number. Default 1, maximum 1000.
limitintegerPage size. Default 20, maximum 100.

Responses

200 — OK

FieldTypeRequiredDescription
dataarray<object>✓Response payload.
data[].order_idstring✓Platform trades share this id with the orders sub-resource. External sells use a synthetic id of the form ext_<event id>, stable for that attributed sell.
data[].config_idstring✓Config this trade is attributed to.
data[].sourceenum ("strategy" | "external")✓strategy: the platform placed this trade. external: the share of a sell allocated to this config by FIFO, either a sale made from the wallet outside the platform or a sell by another config that overflowed into the holdings of this config.
data[].chainstring✓Chain of the config this trade belongs to.
data[].wallet_idstring✓Custodial wallet that traded.
data[].sidestring✓buy or sell.
data[].triggerstring✓Same vocabulary as the orders sub-resource trigger: copy_buy, copy_sell, snipe, take_profit, stop_loss, or another engine order type.
data[].token_addressstring✓Token that traded.
data[].token_symbolstring | null✓Token symbol when known. Null otherwise.
data[].statusstring | null✓Platform trades only: filled, failed, timeout or reject. Null on an external sell.
data[].failure_stageenum ("pre_trade" | "execution")✓Status-derived stage: reject maps to pre_trade; failed/error map to execution. This is not proof of broadcast or confirmation. A market-cap guard may fail during execution; inspect reason_code and tx_hash separately. A timeout has null stage. Its outcome is unknown unless reason_code is anti_mev_not_landed, which confirms the order did not fill.
data[].reason_codestring | null✓Specific reason, such as sell_amount_zero (no sellable task position; excluded from copy-sell success-rate attempts), fomo_route_unsupported, buy_fee_too_high, buy_fee_unknown, first_buy_blocked, first_buy_history_unavailable (a Price-protection first-buy-only copy skipped because the target's recent on-chain buys could not be confirmed yet), already_bought, buy_amount_below_min, token_blacklisted, quick_sell_banned, market_cap_too_small, buy_dynamic_cap_reached, buy_tier_no_match, buy_tier_market_cap_unknown, prior_buyers_unavailable (Price protection skipped this buy because listed wallet history was incomplete), or strategy_leaf_rejected (including a prior-buyer blacklist match). For a sniper buy, creator_sold means the creator sold and the filter required no sale. creator_not_sold means the filter required a sale and none occurred. creator_sale_unknown means the sale history could not be confirmed. delayed_snipe_expired means the executor canceled an unsigned delayed snipe more than 60 seconds after its scheduled buy time to avoid buying long after launch. contract_not_recipient means the followed address is a contract and the bought tokens were transferred to another wallet, not to that contract; follow the wallet that received them. On Solana, anti_mev_not_landed means the Anti-MEV order did not fill: slippage may have been exceeded, or the auction was lost. The public status is expired for task timeouts and failed for pending buys or sells that end with this reason. Uses the same normalizer as account history, including failed/timeout records and legacy market-cap text. Unknown raw chain text is null; producer codes and stable snake-case codes are preserved as opaque values. A reason alone does not prove a harmless skip.
data[].amount_instring | null✓Amount spent, as a decimal string. Null when unknown.
data[].amount_outstring | null✓Amount received, as a decimal string. Null when unknown.
data[].price_usdstring | null✓Trade price in USD, as a decimal string. Null when the price could not be resolved (see price_stale).
data[].value_usdnumber | null✓Trade value in USD. Null when the price could not be resolved.
data[].market_capnumber | null✓Token market cap in USD at the trade. Null when unknown.
data[].price_staleboolean✓The trade price could not be resolved, so USD figures are absent.
data[].realized_pnl_usdnumber | null✓Realized result of this sell: (trade price - this config's average cost for the token) x amount sold. Null on a buy, and on a sell whose trade price or average cost is unknown — never 0 to mean unknown.
data[].realized_pnl_pctnumber | null✓realized_pnl_usd as a percent of cost. Null in the same cases as realized_pnl_usd — never 0 to mean unknown.
data[].task_remainingnumber | null✓External sells only: the token amount attributed to this config. Null on platform trades.
data[].tx_hashstring | null✓Chain transaction hash. Null when it is not known.
data[].leader_tx_hashstring | null✓Leader transaction this trade was copying. Null when there is not one.
data[].block_timestring | null✓Chain execution time. Null when unknown.
data[].created_atstring | null✓When the trade record was created. Null when the upstream did not send it.
data[].updated_atstring | null✓When the trade record last changed. Null when the upstream did not send it.
metaobject✓Request id, plus paging fields when this operation is a list.
meta.request_idstring✓Id of this request. Also sent as the X-Request-Id response header.
meta.pagenumber✓1-based page number that was returned.
meta.total_pagesnumber✓How many pages the current filters match.
meta.total_recordsnumber✓How many trades the current filters match.
meta.has_moreboolean✓True when a later page exists.
meta.analytics_availableboolean✓False when the upstream answered but prices or PnL were degraded. A total outage is 503, never an empty page.

401 — unauthorized (missing/invalid/revoked/expired Bearer token)

FieldTypeRequiredDescription
errorobject✓Why the request failed.
error.codestring✓Stable machine-readable error code.
error.messagestring✓Human-readable explanation of the error.
error.totalnumberNumber of distinct blacklisted wallets the account would have on this chain after saving.
error.limitnumberMaximum distinct blacklisted wallets per account on this chain.
error.detailsarray<object>Only present when at least one field-level validation issue exists.
error.details[].fieldstring✓Request field this issue refers to, or a dotted path such as buy.amount.
error.details[].reasonstring✓Why that field was rejected.
error.details[].codestringStable 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.
metaobject✓Request id for this failure.
meta.request_idstring✓Id of this request. Also sent as the X-Request-Id response header.

403 — insufficient_scope / ip_not_allowed

FieldTypeRequiredDescription
errorobject✓Why the request failed.
error.codestring✓Stable machine-readable error code.
error.messagestring✓Human-readable explanation of the error.
error.totalnumberNumber of distinct blacklisted wallets the account would have on this chain after saving.
error.limitnumberMaximum distinct blacklisted wallets per account on this chain.
error.detailsarray<object>Only present when at least one field-level validation issue exists.
error.details[].fieldstring✓Request field this issue refers to, or a dotted path such as buy.amount.
error.details[].reasonstring✓Why that field was rejected.
error.details[].codestringStable 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.
metaobject✓Request id for this failure.
meta.request_idstring✓Id of this request. Also sent as the X-Request-Id response header.

404 — not_found

FieldTypeRequiredDescription
errorobject✓Why the request failed.
error.codestring✓Stable machine-readable error code.
error.messagestring✓Human-readable explanation of the error.
error.totalnumberNumber of distinct blacklisted wallets the account would have on this chain after saving.
error.limitnumberMaximum distinct blacklisted wallets per account on this chain.
error.detailsarray<object>Only present when at least one field-level validation issue exists.
error.details[].fieldstring✓Request field this issue refers to, or a dotted path such as buy.amount.
error.details[].reasonstring✓Why that field was rejected.
error.details[].codestringStable 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.
metaobject✓Request id for this failure.
meta.request_idstring✓Id of this request. Also sent as the X-Request-Id response header.

429 — rate_limited (Retry-After response header set)

FieldTypeRequiredDescription
errorobject✓Why the request failed.
error.codestring✓Stable machine-readable error code.
error.messagestring✓Human-readable explanation of the error.
error.totalnumberNumber of distinct blacklisted wallets the account would have on this chain after saving.
error.limitnumberMaximum distinct blacklisted wallets per account on this chain.
error.detailsarray<object>Only present when at least one field-level validation issue exists.
error.details[].fieldstring✓Request field this issue refers to, or a dotted path such as buy.amount.
error.details[].reasonstring✓Why that field was rejected.
error.details[].codestringStable 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.
metaobject✓Request id for this failure.
meta.request_idstring✓Id of this request. Also sent as the X-Request-Id response header.

500 — internal_error

FieldTypeRequiredDescription
errorobject✓Why the request failed.
error.codestring✓Stable machine-readable error code.
error.messagestring✓Human-readable explanation of the error.
error.totalnumberNumber of distinct blacklisted wallets the account would have on this chain after saving.
error.limitnumberMaximum distinct blacklisted wallets per account on this chain.
error.detailsarray<object>Only present when at least one field-level validation issue exists.
error.details[].fieldstring✓Request field this issue refers to, or a dotted path such as buy.amount.
error.details[].reasonstring✓Why that field was rejected.
error.details[].codestringStable 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.
metaobject✓Request id for this failure.
meta.request_idstring✓Id of this request. Also sent as the X-Request-Id response header.

503 — unavailable (the trade analytics service could not answer)

FieldTypeRequiredDescription
errorobject✓Why the request failed.
error.codestring✓Stable machine-readable error code.
error.messagestring✓Human-readable explanation of the error.
error.totalnumberNumber of distinct blacklisted wallets the account would have on this chain after saving.
error.limitnumberMaximum distinct blacklisted wallets per account on this chain.
error.detailsarray<object>Only present when at least one field-level validation issue exists.
error.details[].fieldstring✓Request field this issue refers to, or a dotted path such as buy.amount.
error.details[].reasonstring✓Why that field was rejected.
error.details[].codestringStable 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.
metaobject✓Request id for this failure.
meta.request_idstring✓Id of this request. Also sent as the X-Request-Id response header.
Example request
curl -X GET "https://api.apm.fun/v1/copy-trade/configs/cfg_8f2a1c9b/trades" \
  -H "Authorization: Bearer apm_live_<prefix>.<secret>"
Example response 200
{
  "data": [
    {
      "order_id": "cfg_8f2a1c9b",
      "config_id": "cfg_8f2a1c9b",
      "source": "strategy",
      "chain": "string",
      "wallet_id": "cfg_8f2a1c9b",
      "side": "string",
      "trigger": "string",
      "token_address": "0x8f2a1c9bde34567890abcdef1234567890abcdef",
      "token_symbol": null,
      "status": null,
      "failure_stage": "pre_trade",
      "reason_code": null,
      "amount_in": null,
      "amount_out": null,
      "price_usd": null,
      "value_usd": null,
      "market_cap": null,
      "price_stale": true,
      "realized_pnl_usd": null,
      "realized_pnl_pct": null,
      "task_remaining": null,
      "tx_hash": null,
      "leader_tx_hash": null,
      "block_time": null,
      "created_at": null,
      "updated_at": null
    }
  ],
  "meta": {
    "request_id": "cfg_8f2a1c9b",
    "page": 0,
    "total_pages": 0,
    "total_records": 0,
    "has_more": true,
    "analytics_available": true
  }
}