API Reference v1
Get API Key API Key

GET /v1/auto-sell-tasks/{id}/protection-orders

List auto sell protection orders

Read buy-protection groups for the item’s currently covered wallets, including history that now belongs to these wallets. External buys have no APM buy order ID. Cursors bind the account, item, wallet coverage and filters. Existing orders survive configuration edits and pause; empty wallet coverage yields an empty page. Requires the copytrade:read scope.

Required scope: copytrade:read

Path parameters

FieldTypeRequiredDescription
idstring✓Globally unique auto sell item ID.

Query parameters

FieldTypeRequiredDescription
tokenstringOnly return protection groups for this token address.
statusenum ("open" | "all")open returns only live exit rows; all also includes completed, cancelled and failed exits.
limitintegerMaximum protection groups per page, from 1 to 50.
cursorstringOpaque next_cursor for this account, item and filter.

Responses

200 — OK

FieldTypeRequiredDescription
dataarray<object>✓Response payload.
data[].protection_idstring✓Protected buy ID, grouping its exit orders.
data[].chainstring✓Execution chain.
data[].walletstring✓Covered wallet address.
data[].tokenstring✓Protected token address.
data[].buy_tx_hashstring | null✓Protected buy transaction, or null when unavailable.
data[].buy_order_idstring | null✓APM buy order ID, or null for external buys.
data[].created_atnumber✓Protection time as Unix milliseconds; groups are returned newest first.
data[].exitsarray<object>✓Protection exit rows for this buy.
data[].exits[].order_idstring✓Exit order ID.
data[].exits[].sourcestring✓order or segmented-parent. Segmented parents can only be cancelled as a whole.
data[].exits[].order_typestring✓Stored order type; trailing-stop for trailing ladder parents, empty for segmented take-profit parents.
data[].exits[].statusstring✓Stored order status.
data[].exits[].error_msgstring | null✓Recorded completion or failure reason, or null.
data[].exits[].trigger_typestring | null✓Recorded trigger type, or null.
data[].exits[].amount_bpsnumber | null✓Recorded sell fraction in basis points. Repeating trailing sells use the ladder remainder; ordinary price exits use the initial buy. Null when absent.
data[].exits[].expires_atnumber | null✓Expiration as Unix milliseconds, or null for no expiration.
data[].exits[].priceobject | null✓Fixed-price trigger, or null.
data[].exits[].price.directionstring✓above or below.
data[].exits[].price.price_usdstring✓Trigger price in USD.
data[].exits[].trailingobject | null✓Trailing or break-even trigger, or null.
data[].exits[].trailing.threshold_bpsnumber✓Activation threshold in basis points.
data[].exits[].trailing.stop_bpsnumber✓Trailing distance in basis points.
data[].exits[].trailing.activatedboolean✓Whether activation has occurred.
data[].exits[].trailing.activation_price_usdstring | null✓Activation price in USD, or null.
data[].exits[].trailing.highest_price_usdstring | null✓Highest observed price in USD, or null.
data[].exits[].trailing.lock_bpsnumber | null✓Break-even locked gain in basis points, or null.
data[].exits[].trailing.fixed_stop_price_usdstring | null✓Break-even fixed stop price in USD, or null.
data[].exits[].execute_atnumber | null✓Flash-sell execution time as Unix milliseconds, or null.
data[].exits[].segmentedobject | null✓Segmented take-profit parent, or null.
data[].exits[].segmented.segmentsarray<object>✓Stored segment definitions.
data[].exits[].segmented.segments[].price_percentagenumber✓Segment price change in basis points.
data[].exits[].segmented.segments[].amount_percentagenumber✓Segment sell fraction in basis points.
data[].exits[].segmented.segments[].expirationnumber✓Segment lifetime in milliseconds.
data[].exits[].segmented.segments[].timeout_sell_enabledboolean✓Whether to sell when this segment expires.
data[].exits[].segmented.segments[].timeout_amount_percentagenumber✓Timeout sell fraction in basis points.
data[].exits[].segmented.current_segmentnumber✓Current segment index.
data[].exits[].segmented.total_amountstring | null✓Recorded total token amount, or null.
data[].exits[].segmented.remaining_amountstring | null✓Recorded remaining token amount, or null.
data[].exits[].conditionsarray | null✓Stored exit-condition leaves, or null.
data[].exits[].trailing_fireintegerOne-based trigger number across all tiers of this buy’s repeating trailing ladder, when recorded.
data[].exits[].exit_refstring | null✓JSON pointer into the frozen exits definition, or null.
data[].exits[].exit_rule_idstring | null✓Stable rule ID, or null.
data[].exits[].exit_stage_idstring | null✓Stage ID, or null for the initial stage.
data[].exits[].exit_gotostring | null✓Next stage after execution, or null.
data[].exits[].parent_order_idstring | null✓Parent order ID, or null.
data[].exits[].tx_hashstring | null✓Exit transaction hash or signature, or null.
data[].exits[].created_atnumber✓Creation time as Unix milliseconds.
data[].exits[].updated_atnumber | null✓Last update as Unix milliseconds, or null.
data[].exits[].cancellableboolean✓Whether the domain currently allows user cancellation; this resource itself only reads orders.
data[].exits[].sold_tokenstring | null✓Sold token quantity in display units, or null when unavailable.
data[].exits[].received_quotestring | null✓Received quote-currency quantity in display units, or null.
data[].exits[].received_usdstring | null✓Received value in USD, or null when amount or price is unavailable.
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 exhausted.

400 — validation_error / missing_idempotency_key / unsupported_chain_feature

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 — version_conflict / auto_sell_wallet_conflict / auto_sell_default_conflict / not_paused / idempotency_conflict / idempotency_in_progress

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 (malformed If-Match)

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/auto-sell-tasks/cfg_8f2a1c9b/protection-orders" \
  -H "Authorization: Bearer apm_live_<prefix>.<secret>"
Example response 200
{
  "data": [
    {
      "protection_id": "cfg_8f2a1c9b",
      "chain": "string",
      "wallet": "0x8f2a1c9bde34567890abcdef1234567890abcdef",
      "token": "string",
      "buy_tx_hash": null,
      "buy_order_id": null,
      "created_at": 0,
      "exits": [
        {
          "order_id": "cfg_8f2a1c9b",
          "source": "string",
          "order_type": "string",
          "status": "string",
          "error_msg": null,
          "trigger_type": null,
          "amount_bps": null,
          "expires_at": null,
          "price": {
            "direction": "string",
            "price_usd": "string"
          },
          "trailing": {
            "threshold_bps": 0,
            "stop_bps": 0,
            "activated": true,
            "activation_price_usd": null,
            "highest_price_usd": null,
            "lock_bps": null,
            "fixed_stop_price_usd": null
          },
          "execute_at": null,
          "segmented": {
            "segments": [
              null
            ],
            "current_segment": 0,
            "total_amount": null,
            "remaining_amount": null
          },
          "conditions": null,
          "trailing_fire": 0,
          "exit_ref": null,
          "exit_rule_id": null,
          "exit_stage_id": null,
          "exit_goto": null,
          "parent_order_id": null,
          "tx_hash": null,
          "created_at": 0,
          "updated_at": null,
          "cancellable": true,
          "sold_token": null,
          "received_quote": null,
          "received_usd": null
        }
      ]
    }
  ],
  "meta": {
    "request_id": "cfg_8f2a1c9b",
    "next_cursor": null
  }
}