API Reference v1
Get API Key API Key

GET /v1/strategy-tasks

List strategy tasks

List owned, non-deleted apm.task/2 tasks with cursor pagination. run_state.reason: Known buy-pause reasons: account, loss_streak, creator_limit, leader_token_limit, follow_count, buy_fail_streak, funding_low. Buys pause while sells and exits continue. For run-bound pauses, reopen to start a new run: follow, loss and creator counts reset; leader distinct-token counts persist, so raise the limit or disable that filter before reopening. Known stop reasons: low_balance, inactivity, loss_streak, creator_limit. Null means no recorded reason or user stop; unknown reasons are preserved. Requires the copytrade:read scope.

Required scope: copytrade:read

Query parameters

FieldTypeRequiredDescription
labelstringFilter to configs carrying this caller-defined label.
limitintegerMaximum tasks per page, from 1 to 100.
cursorstringOpaque next_cursor from the previous page.

Responses

200 — OK

FieldTypeRequiredConstraintsDescription
dataarray<object>✓Response payload.
data[].labelsarray<string>default: []The caller's task labels. Empty if none are set.
data[].task_idstring✓Strategy task ID.
data[].namestring✓Task display name.
data[].chainstring✓Execution chain.
data[].statusenum ("active" | "paused" | "deleted")✓Requested task state; engine reports synchronization separately. deleted appears only in the DELETE response.
data[].versionnumber✓Current version, also returned as the ETag.
data[].specobject✓Stored apm.task/2 specification, including the server-assigned id.
data[].engineobject | null✓Engine synchronization state, or null when absent.
data[].engine.applied_versionnumber | null✓Last acknowledged version, or null before the first acknowledgement.
data[].engine.sync_statestring✓Engine synchronization state: syncing, synced or failed.
data[].engine.error_codestringEngine rejection code, when present.
data[].engine.warning_codestringThe config has taken effect. prior_buyers_unavailable means listed wallet history is still loading. prior_buyers_fast_unavailable means updates for some listed wallets are delayed. The task may miss purchases those wallets make just before the leader buys. This warning does not reject buys. prior_buyers_over_limit means the account exceeds the wallet limit on this chain. Purchases by wallets beyond the limit are not checked. prior_buyers_history_truncated means a listed wallet bought more than 5,000 distinct tokens inside the window. Only its most recent 5,000 are checked. The task keeps running.
data[].engine.updated_atstring✓Engine state update time in RFC 3339 UTC.
data[].run_stateobject✓Effective task runtime state.
data[].run_state.stateenum ("running" | "buy_paused" | "stopped")✓Effective runtime state: running, buy_paused or stopped.
data[].run_state.reasonstring | null✓Known buy-pause reasons: account, loss_streak, creator_limit, leader_token_limit, follow_count, buy_fail_streak, funding_low. Buys pause while sells and exits continue. For run-bound pauses, reopen to start a new run: follow, loss and creator counts reset; leader distinct-token counts persist, so raise the limit or disable that filter before reopening. Known stop reasons: low_balance, inactivity, loss_streak, creator_limit. Null means no recorded reason or user stop; unknown reasons are preserved.
data[].buy_pausedobject | null✓Buy pause for this run, or null.
data[].buy_paused.rule_idstring✓Rule that paused buying.
data[].buy_paused.observedobject✓Observed values that triggered the pause.
data[].buy_paused.atstring✓Buy pause time in RFC 3339 UTC.
data[].funding_low_sincestring | null✓Start of the low-funding interval in RFC 3339 UTC, or null.
data[].deactivation_close_positionboolean✓Whether the latest pause or delete requested closing positions.
data[].created_atstring✓Creation time in RFC 3339 UTC.
data[].updated_atstring✓Last update time in RFC 3339 UTC.
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.next_cursorstring | null✓Cursor for the next page, or null when there are no more results.

400 — validation_error / unsupported_chain_feature / wallet_unavailable

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.

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.

409 — not_paused / invalid_state / idempotency_conflict

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.

412 — version_conflict

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.

428 — precondition_required

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.
Example request
curl -X GET "https://api.apm.fun/v1/strategy-tasks" \
  -H "Authorization: Bearer apm_live_<prefix>.<secret>"
Example response 200
{
  "data": [
    {
      "labels": [],
      "task_id": "cfg_8f2a1c9b",
      "name": "string",
      "chain": "string",
      "status": "active",
      "version": 0,
      "spec": {},
      "engine": {
        "applied_version": null,
        "sync_state": "string",
        "error_code": "string",
        "warning_code": "string",
        "updated_at": "string"
      },
      "run_state": {
        "state": "running",
        "reason": null
      },
      "buy_paused": {
        "rule_id": "cfg_8f2a1c9b",
        "observed": {},
        "at": "string"
      },
      "funding_low_since": null,
      "deactivation_close_position": true,
      "created_at": "string",
      "updated_at": "string"
    }
  ],
  "meta": {
    "request_id": "cfg_8f2a1c9b",
    "next_cursor": null
  }
}