GET /v1/block-xray
Inspect transactions around a successful trade
Read the same X-Ray fields as Web. Requires any existing read scope. Limited to 12 requests per user per minute across API keys and MCP connections. Solana, BSC and Robinhood lookups cover 7 days. Fees are native smallest-unit decimal strings. Missing indexed facts are omitted. BSC tip and inferred bundle data come from block traces when available. Failed attempts never contribute to success counts; unknown-direction failures remain visible in same_token_action. This query never modifies task fees.
Required scope: any ofcopytrade:read / sniper:read / portfolio:read / orders:read Query parameters
| Field | Type | Required | Description |
|---|---|---|---|
chain | string | Chain: sol or solana, bsc, robinhood, arc. | |
tx | string | Successful transaction signature or hash to inspect. | |
before_blocks | string | Integer 0 through 8, default 0. Supply once. | |
after_blocks | string | Integer 0 through 8, default 0. Supply once. | |
scope | string | all (default), same_token, same_action, or same_token_action. Supply once. | |
include_failed | string | true or false, default false. Supply once. Token scopes retain failed attempts with matching or unknown direction; other scopes and legacy Arc omit failures. |
Responses
200 — OK
| Field | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | ✓ | Response payload. | |
data.chain | string | ✓ | ClickHouse chain code: sol, bsc, robinhood or arc. | |
data.slot | number | ✓ | Target block height or Solana slot. | |
data.target | object | ✓ | Queried successful transaction. | |
data.target.tx_hash | string | ✓ | Queried transaction hash or signature. | |
data.target.tx_index | number | ✓ | Target transaction position. | |
data.target.block_height | number | ✓ | Target block height or slot. | |
data.target.token_address | string | ✓ | Target token address. | |
data.target.action | enum ("buy" | "sell" | "unknown") | ✓ | Target direction. | |
data.window | object | ✓ | Requested inclusive block window and scope. | |
data.window.before_blocks | number | ✓ | Number of preceding blocks requested. | |
data.window.after_blocks | number | ✓ | Number of following blocks requested. | |
data.window.from_block | number | ✓ | Inclusive first block. | |
data.window.to_block | number | ✓ | Inclusive last block. | |
data.window.scope | enum ("all" | "same_token" | "same_action" | "same_token_action") | ✓ | Success-row matching scope; failed rows require a token scope. | |
data.summary | object | ✓ | Full-window counts of successful transactions only. | |
data.summary.ahead_wallet_count | number | ✓ | Distinct successful wallets ahead of the target in the full window. | |
data.summary.behind_wallet_count | number | ✓ | Distinct successful wallets behind the target in the full window. | |
data.summary.total_wallet_count | number | ✓ | Distinct successful wallets in the full window. | |
data.summary.ahead_tx_count | number | ✓ | Successful transactions ahead of the target in the full window. | |
data.summary.behind_tx_count | number | ✓ | Successful transactions behind the target in the full window. | |
data.summary.total_tx_count | number | ✓ | Successful transactions in the full window. | |
data.summary.complete | boolean | ✓ | Whether full-window success counts are complete. | |
data.truncated | boolean | ✓ | Whether successful rows exceed the 1500-row cap. | |
data.total | number | ✓ | Number of returned successful rows, excluding failed attempts. | |
data.swaps | array<object> | ✓ | Successes and optional failures ordered by block height and transaction position. | |
data.swaps[].block_height | number | ✓ | Block height or Solana slot. | |
data.swaps[].block_delta | number | ✓ | Signed block offset from the target. | |
data.swaps[].tx_index | number | ✓ | Transaction position in the block. | |
data.swaps[].swap_index | number | ✓ | Swap position within the transaction; zero for failures. | |
data.swaps[].swap_count | number | ✓ | Swap count metadata; zero for failures. | |
data.swaps[].timestamp | number | ✓ | Block time in Unix milliseconds. | |
data.swaps[].tx_hash | string | ✓ | Transaction hash or signature. | |
data.swaps[].wallet | string | ✓ | Trader or failed transaction signer. | |
data.swaps[].token | string | ✓ | Token address. | |
data.swaps[].dex | string | DEX label when available. | ||
data.swaps[].action | enum ("buy" | "sell" | "unknown") | ✓ | Buy, sell or unknown direction. | |
data.swaps[].pool_address | string | Pool address when available. | ||
data.swaps[].base_amount | number | ✓ | Absolute token amount; zero for failures. | |
data.swaps[].quote_amount | number | ✓ | Absolute quote amount; zero for failures. | |
data.swaps[].quote_token | string | ✓ | Quote token address. | |
data.swaps[].quote_token_symbol | string | ✓ | Quote symbol; empty when unavailable. | |
data.swaps[].price | number | null | ✓ | Quote amount per token; null for failures or zero token amount. | |
data.swaps[].mcap_at_trade | number | null | ✓ | Market capitalization in USD at execution, or null when unavailable. | |
data.swaps[].is_target | boolean | ✓ | Whether this is the queried transaction; does not imply ownership. | |
data.swaps[].status | enum ("success" | "failed") | Successful swap or failed attempt; absent on the legacy Arc path. | ||
data.swaps[].error_code | string | Chain or indexer error code for failures. | ||
data.swaps[].fee | string | pattern: ^\d+$ | Actual transaction fee in native smallest units: Solana lamports or EVM wei. | |
data.swaps[].priority_fee | string | pattern: ^\d+$ | Solana priority fee in lamports. | |
data.swaps[].compute_unit_price | string | pattern: ^\d+$ | Solana price in micro-lamports per compute unit. | |
data.swaps[].compute_units | string | pattern: ^\d+$ | Actual Solana compute units or EVM gas used. | |
data.swaps[].compute_unit_limit | string | pattern: ^\d+$ | Solana compute unit limit. | |
data.swaps[].gas_price | string | pattern: ^\d+$ | EVM effective gas price in wei. | |
data.swaps[].tip | string | pattern: ^\d+$ | Successful Solana transaction tip in lamports, or BSC tip paid by this transaction to the block builder in wei, directly or within a contract. | |
data.swaps[].builder | enum ("48club" | "blockrazor" | "other") | BSC block builder identified by the first transaction marker. | ||
data.swaps[].bundle_tip | string | pattern: ^\d+$ | Tip paid by other transactions in the inferred BSC bundle, in wei. | |
data.swaps[].bundle_tip_tx | string | Hash of the first other transaction paying a tip in the inferred BSC bundle. | ||
data.swaps[].bundle_tx_count | number | Number of consecutive same-sender transactions with successive nonces in the inferred BSC bundle, when greater than one. | ||
data.swaps[].bid | string | pattern: ^\d+$ | BSC wei bid for the inferred bundle: all tips plus 90% of summed gas fees (rounded down) for 48club or all gas fees for BlockRazor. Omitted for other builders. | |
data.swaps[].tip_forward | enum ("none" | "direct" | "forwarded" | "unseen") | Token-scoped successful Solana rows: none (no tip), direct (paid straight to the block-producer tip account), forwarded (an adjacent forward to the producer was found) or unseen (tipped, forward not observed in the block). Omitted otherwise, and for tipped rows before forward capture began (2026-11-11 04:06 UTC), whose delivery status is unknown. | ||
data.swaps[].delivered_tip | string | pattern: ^\d+$ | Tip received by the block producer in lamports; omitted for unseen or unknown status. | |
data.swaps[].offered_tip | string | pattern: ^\d+$ | Failed Solana transaction tip offer in lamports, rolled back and not paid. | |
data.swaps[].platform | string | Recognized submitting platform. | ||
data.failed_truncated | boolean | Failures exceed their independent 300-row cap; only present when failures are queried. | ||
data.tips_unavailable | boolean | Trace data is unavailable for at least one BSC block in the requested window. | ||
data.mine | object | Private order metadata only when the queried transaction belongs to the authenticated caller. | ||
data.mine.task_id | string | Owning legacy or strategy task ID; omitted for manual orders. | ||
data.mine.task_name | string | Owned task name when still available. | ||
data.mine.leader_address | string | Leader wallet copied by this caller-owned order; omitted when absent or empty. | ||
data.mine.fee_subsidy | string | pattern: ^\d+$ | Platform subsidy on this caller-owned order in native smallest units. | |
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. |
400 — validation_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. |
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. |
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. |
503 — unavailable
| 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/block-xray" \
-H "Authorization: Bearer apm_live_<prefix>.<secret>" {
"data": {
"chain": "string",
"slot": 0,
"target": {
"tx_hash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcd",
"tx_index": 0,
"block_height": 0,
"token_address": "0x8f2a1c9bde34567890abcdef1234567890abcdef",
"action": "buy"
},
"window": {
"before_blocks": 0,
"after_blocks": 0,
"from_block": 0,
"to_block": 0,
"scope": "all"
},
"summary": {
"ahead_wallet_count": 0,
"behind_wallet_count": 0,
"total_wallet_count": 0,
"ahead_tx_count": 0,
"behind_tx_count": 0,
"total_tx_count": 0,
"complete": true
},
"truncated": true,
"total": 0,
"swaps": [
{
"block_height": 0,
"block_delta": 0,
"tx_index": 0,
"swap_index": 0,
"swap_count": 0,
"timestamp": 0,
"tx_hash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcd",
"wallet": "0x8f2a1c9bde34567890abcdef1234567890abcdef",
"token": "string",
"dex": "string",
"action": "buy",
"pool_address": "0x8f2a1c9bde34567890abcdef1234567890abcdef",
"base_amount": 0,
"quote_amount": 0,
"quote_token": "string",
"quote_token_symbol": "string",
"price": null,
"mcap_at_trade": null,
"is_target": true,
"status": "success",
"error_code": "string",
"fee": "0.05",
"priority_fee": "0.05",
"compute_unit_price": "string",
"compute_units": "string",
"compute_unit_limit": "string",
"gas_price": "string",
"tip": "string",
"builder": "48club",
"bundle_tip": "string",
"bundle_tip_tx": "string",
"bundle_tx_count": 0,
"bid": "string",
"tip_forward": "none",
"delivered_tip": "string",
"offered_tip": "string",
"platform": "string"
}
],
"failed_truncated": true,
"tips_unavailable": true,
"mine": {
"task_id": "cfg_8f2a1c9b",
"task_name": "string",
"leader_address": "0x8f2a1c9bde34567890abcdef1234567890abcdef",
"fee_subsidy": "0.05"
}
},
"meta": {
"request_id": "cfg_8f2a1c9b"
}
}