API 参考文档 v1
获取 API Key 获取 Key

POST /v1/copy-trade/configs/batch-pause

批量暂停跟单任务配置

每一项在请求体里各带一个 If-Match(不是走请求头)。单条失败不影响整批——响应里的每一项各自带 status_code/code。 需要 copytrade:write scope。

所需 Scope: copytrade:write

请求体 application/json

字段类型必填约束说明
itemsarray<object>✓minItems: 1, maxItems: 1001 to 100 configs. One failing item does not fail the rest.
items[].idstring✓minLength: 1, maxLength: 128Config id to pause or resume.
items[].if_matchstring✓minLength: 1Quoted ETag of the version you last read, for example "3". Checked per item, not as a request header.
items[].close_positionbooleandefault: falsebatch-pause: also close positions this config opened. batch-resume: true on any item rejects the whole request. Default false.

响应

200 — OK (see per-item results)

字段类型必填说明
dataobject✓Response payload.
data.resultsarray<object>✓One entry per requested item, in request order.
data.results[].idstring✓Config id this result is for.
data.results[].status_codenumber✓HTTP status for this item: 200 when it changed or was already in the requested state, or an error status.
data.results[].codestringError code when this item failed. Absent on success.
data.results[].versionnumberNew optimistic-concurrency version. Present on success.
data.results[].sync_stateenum ("syncing" | "synced" | "failed")Engine sync state after the change. Present on success.
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.

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

字段类型必填说明
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

字段类型必填说明
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)

字段类型必填说明
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

字段类型必填说明
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.
请求示例
curl -X POST "https://api.apm.fun/v1/copy-trade/configs/batch-pause" \
  -H "Authorization: Bearer apm_live_<prefix>.<secret>" \
  -H "Content-Type: application/json" \
  -d '{
    "items": [
      {
        "id": "cfg_8f2a1c9b",
        "if_match": "\"3\""
      },
      {
        "id": "cfg_2b7e441d",
        "if_match": "\"1\""
      }
    ]
  }'
响应示例 200
{
  "data": {
    "results": [
      {
        "id": "cfg_8f2a1c9b",
        "status_code": 0,
        "code": "string",
        "version": 0,
        "sync_state": "syncing"
      }
    ]
  },
  "meta": {
    "request_id": "cfg_8f2a1c9b"
  }
}