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
| Field | Type | Required | Description |
|---|---|---|---|
id | string | ✓ | Globally unique auto sell item ID. |
Query parameters
| Field | Type | Required | Description |
|---|---|---|---|
token | string | Only return protection groups for this token address. | |
status | enum ("open" | "all") | open returns only live exit rows; all also includes completed, cancelled and failed exits. | |
limit | integer | Maximum protection groups per page, from 1 to 50. | |
cursor | string | Opaque next_cursor for this account, item and filter. |
Responses
200 — OK
| Field | Type | Required | Description |
|---|---|---|---|
data | array<object> | ✓ | Response payload. |
data[].protection_id | string | ✓ | Protected buy ID, grouping its exit orders. |
data[].chain | string | ✓ | Execution chain. |
data[].wallet | string | ✓ | Covered wallet address. |
data[].token | string | ✓ | Protected token address. |
data[].buy_tx_hash | string | null | ✓ | Protected buy transaction, or null when unavailable. |
data[].buy_order_id | string | null | ✓ | APM buy order ID, or null for external buys. |
data[].created_at | number | ✓ | Protection time as Unix milliseconds; groups are returned newest first. |
data[].exits | array<object> | ✓ | Protection exit rows for this buy. |
data[].exits[].order_id | string | ✓ | Exit order ID. |
data[].exits[].source | string | ✓ | order or segmented-parent. Segmented parents can only be cancelled as a whole. |
data[].exits[].order_type | string | ✓ | Stored order type; trailing-stop for trailing ladder parents, empty for segmented take-profit parents. |
data[].exits[].status | string | ✓ | Stored order status. |
data[].exits[].error_msg | string | null | ✓ | Recorded completion or failure reason, or null. |
data[].exits[].trigger_type | string | null | ✓ | Recorded trigger type, or null. |
data[].exits[].amount_bps | number | 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_at | number | null | ✓ | Expiration as Unix milliseconds, or null for no expiration. |
data[].exits[].price | object | null | ✓ | Fixed-price trigger, or null. |
data[].exits[].price.direction | string | ✓ | above or below. |
data[].exits[].price.price_usd | string | ✓ | Trigger price in USD. |
data[].exits[].trailing | object | null | ✓ | Trailing or break-even trigger, or null. |
data[].exits[].trailing.threshold_bps | number | ✓ | Activation threshold in basis points. |
data[].exits[].trailing.stop_bps | number | ✓ | Trailing distance in basis points. |
data[].exits[].trailing.activated | boolean | ✓ | Whether activation has occurred. |
data[].exits[].trailing.activation_price_usd | string | null | ✓ | Activation price in USD, or null. |
data[].exits[].trailing.highest_price_usd | string | null | ✓ | Highest observed price in USD, or null. |
data[].exits[].trailing.lock_bps | number | null | ✓ | Break-even locked gain in basis points, or null. |
data[].exits[].trailing.fixed_stop_price_usd | string | null | ✓ | Break-even fixed stop price in USD, or null. |
data[].exits[].execute_at | number | null | ✓ | Flash-sell execution time as Unix milliseconds, or null. |
data[].exits[].segmented | object | null | ✓ | Segmented take-profit parent, or null. |
data[].exits[].segmented.segments | array<object> | ✓ | Stored segment definitions. |
data[].exits[].segmented.segments[].price_percentage | number | ✓ | Segment price change in basis points. |
data[].exits[].segmented.segments[].amount_percentage | number | ✓ | Segment sell fraction in basis points. |
data[].exits[].segmented.segments[].expiration | number | ✓ | Segment lifetime in milliseconds. |
data[].exits[].segmented.segments[].timeout_sell_enabled | boolean | ✓ | Whether to sell when this segment expires. |
data[].exits[].segmented.segments[].timeout_amount_percentage | number | ✓ | Timeout sell fraction in basis points. |
data[].exits[].segmented.current_segment | number | ✓ | Current segment index. |
data[].exits[].segmented.total_amount | string | null | ✓ | Recorded total token amount, or null. |
data[].exits[].segmented.remaining_amount | string | null | ✓ | Recorded remaining token amount, or null. |
data[].exits[].conditions | array | null | ✓ | Stored exit-condition leaves, or null. |
data[].exits[].trailing_fire | integer | One-based trigger number across all tiers of this buy’s repeating trailing ladder, when recorded. | |
data[].exits[].exit_ref | string | null | ✓ | JSON pointer into the frozen exits definition, or null. |
data[].exits[].exit_rule_id | string | null | ✓ | Stable rule ID, or null. |
data[].exits[].exit_stage_id | string | null | ✓ | Stage ID, or null for the initial stage. |
data[].exits[].exit_goto | string | null | ✓ | Next stage after execution, or null. |
data[].exits[].parent_order_id | string | null | ✓ | Parent order ID, or null. |
data[].exits[].tx_hash | string | null | ✓ | Exit transaction hash or signature, or null. |
data[].exits[].created_at | number | ✓ | Creation time as Unix milliseconds. |
data[].exits[].updated_at | number | null | ✓ | Last update as Unix milliseconds, or null. |
data[].exits[].cancellable | boolean | ✓ | Whether the domain currently allows user cancellation; this resource itself only reads orders. |
data[].exits[].sold_token | string | null | ✓ | Sold token quantity in display units, or null when unavailable. |
data[].exits[].received_quote | string | null | ✓ | Received quote-currency quantity in display units, or null. |
data[].exits[].received_usd | string | null | ✓ | Received value in USD, or null when amount or price is unavailable. |
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. |
meta.next_cursor | string | null | ✓ | Cursor for the next page, or null when exhausted. |
400 — validation_error / missing_idempotency_key / unsupported_chain_feature
| Field | Type | Required | Description |
|---|---|---|---|
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. |
401 — unauthorized (missing/invalid/revoked/expired Bearer token)
| Field | Type | Required | Description |
|---|---|---|---|
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
| Field | Type | Required | Description |
|---|---|---|---|
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
| Field | Type | Required | Description |
|---|---|---|---|
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. |
409 — version_conflict / auto_sell_wallet_conflict / auto_sell_default_conflict / not_paused / idempotency_conflict / idempotency_in_progress
| Field | Type | Required | Description |
|---|---|---|---|
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. |
412 — version_conflict (malformed If-Match)
| Field | Type | Required | Description |
|---|---|---|---|
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. |
428 — precondition_required
| Field | Type | Required | Description |
|---|---|---|---|
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)
| Field | Type | Required | Description |
|---|---|---|---|
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
| Field | Type | Required | Description |
|---|---|---|---|
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/auto-sell-tasks/cfg_8f2a1c9b/protection-orders" \
-H "Authorization: Bearer apm_live_<prefix>.<secret>" {
"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
}
}