GET /v1/sniper/configs/{id}/orders
获取某条 Snipe 任务配置下发的订单
按 (updated_at, order_id) 升序返回某条 Snipe 任务配置的订单——状态发生变化的订单会重新出现在流的后面。默认不排除任何状态,可传 status 过滤。failed 可能包括交易前跳过,须结合 failure_stage 与 reason_code;sell_amount_zero 表示无可卖金额。
需要 sniper:read scope。
sniper:read 路径参数
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
id | string | ✓ | Config id returned by create or list. |
查询参数
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
status | enum ("pending" | "broadcast" | "confirmed" | "failed" | "expired") | Opt-in filter — omit to get every status. | |
side | enum ("buy" | "sell") | buy or sell. Omit for both. | |
since | string | RFC 3339 UTC, inclusive. Must not be after until. | |
until | string | RFC 3339 UTC, inclusive. Must not be before since. | |
limit | integer | Page size. Default 20, maximum 100. | |
cursor | string | Opaque keyset cursor from a previous response's meta.next_cursor. |
响应
200 — OK
| 字段 | 类型 | 必填 | 约束 | 说明 |
|---|---|---|---|---|
data | array<object> | ✓ | Response payload. | |
data[].order_id | string | ✓ | Order id. | |
data[].config_id | string | ✓ | Config that placed this order. | |
data[].config_version | number | null | ✓ | Config version that placed the order. Null — the current engines do not record it. | |
data[].chain | string | ✓ | Chain the order ran on. | |
data[].wallet_id | string | ✓ | Custodial wallet that sent the order. | |
data[].side | string | ✓ | buy or sell. | |
data[].trigger | string | ✓ | Why the order was placed: copy_buy, copy_sell, snipe, take_profit, stop_loss, migration.sell, or another engine order type passed through as-is. | |
data[].token_address | string | ✓ | Token the order traded. | |
data[].token_symbol | string | null | ✓ | Token symbol. Null — the current engines do not fill it on this endpoint. | |
data[].amount_in | string | ✓ | Amount spent, as a decimal string. The settlement currency on a buy, the token itself on a sell. | |
data[].amount_in_unit | string | ✓ | Unit of amount_in: on a buy, the settlement currency symbol (the chain native symbol, or a quote token such as USDC; its address when the symbol is unknown); TOKEN on a sell. | |
data[].amount_out | string | null | ✓ | Amount received, as a decimal string. Null until the fill is known. | |
data[].amount_out_unit | string | ✓ | Unit of amount_out: TOKEN on a buy; on a sell, the settlement currency symbol, as in amount_in_unit. | |
data[].platform_fee | string | ✓ | Platform fee for this order, as a decimal string in fee_unit. | |
data[].network_fee | string | null | ✓ | Network fee. Null — the current engines do not record it. | |
data[].fee_unit | string | ✓ | Unit of platform_fee and network_fee. The chain native symbol. | |
data[].tx_hash | string | null | ✓ | Chain transaction hash once the order was broadcast. Null before that. | |
data[].status | enum ("pending" | "broadcast" | "confirmed" | "failed" | "expired") | ✓ | Public status folded from the engine status: pending, broadcast, confirmed, failed, or expired. failed also includes pre-trade skips; inspect failure_stage and reason_code before computing execution statistics. | |
data[].error_code | string | null | ✓ | Coarse failure marker kept for existing callers. execution_failed when the engine stored an error message, otherwise null. reason_code is the specific one. | |
data[].failure_stage | enum ("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_code | string | 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[].buy_tier | integer | null | min: 0 | Zero-based index of the selected buy tier, when recorded. | |
data[].buy_tier_market_cap_usd | string | null | pattern: ^-?\d+(\.\d+)?$ | Market cap used to select the buy tier, as a USD decimal string, when recorded. | |
data[].trailing_fire | integer | One-based trigger number across all tiers of this buy’s repeating trailing ladder, when recorded. | ||
data[].price_strategy | string | Price strategy used for this order, when the engine recorded one. Absent otherwise. | ||
data[].price_reference_source | string | Where the price reference came from, when recorded. Absent otherwise. | ||
data[].price_min_amount_out | string | Minimum amount the order was willing to receive, in the smallest units of the output token. This is the limit, not the fill. Absent when not recorded. | ||
data[].flash_sell_status | string | Timed-sell bookkeeping for this order, when the engine recorded it. Absent otherwise. | ||
data[].flash_sell_error | string | Why timed-sell bookkeeping failed, when the engine recorded an error. Absent otherwise. | ||
data[].leader_tx_hash | string | null | ✓ | Leader transaction this order was copying. Null for exits that were not a direct copy of one leader transaction, and before it is known. | |
data[].created_via | string | ✓ | web or api, matching the config that placed the order. | |
data[].created_at | string | ✓ | When the order was created, RFC 3339 UTC. | |
data[].updated_at | string | ✓ | When the order last changed, RFC 3339 UTC. Listing is oldest-updated first, so a status change moves the order later in the stream. | |
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 | ✓ | Opaque keyset cursor for the next page. Null on the last page. |
401 — unauthorized (missing/invalid/revoked/expired Bearer token)
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
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
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
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
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
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)
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
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
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
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/sniper/configs/cfg_8f2a1c9b/orders" \
-H "Authorization: Bearer apm_live_<prefix>.<secret>" 响应示例 200
{
"data": [
{
"order_id": "cfg_8f2a1c9b",
"config_id": "cfg_8f2a1c9b",
"config_version": null,
"chain": "string",
"wallet_id": "cfg_8f2a1c9b",
"side": "string",
"trigger": "string",
"token_address": "0x8f2a1c9bde34567890abcdef1234567890abcdef",
"token_symbol": null,
"amount_in": "0.05",
"amount_in_unit": "0.05",
"amount_out": null,
"amount_out_unit": "0.05",
"platform_fee": "0.05",
"network_fee": null,
"fee_unit": "0.05",
"tx_hash": null,
"status": "pending",
"error_code": null,
"failure_stage": "pre_trade",
"reason_code": null,
"buy_tier": null,
"buy_tier_market_cap_usd": null,
"trailing_fire": 0,
"price_strategy": "string",
"price_reference_source": "string",
"price_min_amount_out": "0.05",
"flash_sell_status": "string",
"flash_sell_error": "string",
"leader_tx_hash": null,
"created_via": "string",
"created_at": "string",
"updated_at": "string"
}
],
"meta": {
"request_id": "cfg_8f2a1c9b",
"next_cursor": null
}
}