Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.2.0
info:
title: Arkham x402 Swaps API
description: Pay-per-request Arkham wallet intelligence and market data API protected by x402.
version: 1.0.0
x-guidance: '# Arkham x402 API
Arkham x402 exposes stateless Arkham wallet intelligence endpoints at the service root. All paid routes use x402 payments.
When to use:
- Pre-trade wallet due diligence before copy-trading or taking counterparty exposure.
- Counterparty and smart-money analysis, including token flow monitoring.
- Balance, portfolio, and historical portfolio tracking.
- Token and broader market intelligence for trading decisions.
- Polymarket market, wallet, position, and activity intelligence.
Use POST requests with JSON bodies. Path parameters from Arkham are supplied as body fields. Extra fields become Arkham query parameters. Address fields are canonicalized at ingress: EVM addresses are lowercased, Solana addresses are preserved.
Pricing is $0.20 per Arkham credit. The free chains, networks/status, and arkm/circulating endpoints use SIWX sign-in instead of payment. Per-row endpoints such as transfers and swaps price from request limit, defaulting to the upstream page size of 20 when omitted, so agents should pass the smallest useful limit. Failed upstream Arkham requests are not charged.
Rate limits are per payer wallet and endpoint. Most endpoints allow 100 requests/sec. Heavy endpoints allow 5 requests/sec: transfers, transfers/unenriched, transfers/histogram, swaps, token/top, token/top_flow, token/volume, intelligence/search, counterparties, and flow.
## Error handling
- 402 with PAYMENT-REQUIRED: this is the payment challenge, not an application error. Pay and retry the identical request with PAYMENT-SIGNATURE.
- 402 without PAYMENT-REQUIRED after payment: verification failed. Read the new challenge and re-sign; retry once.
- 400: validation failed or required body fields are missing. Fatal for the request as written; fix it before retrying. Not charged.
- 404: the upstream Arkham resource does not exist. Fatal for the same input. Not charged.
- 429: the payer wallet exceeded its endpoint rate limit. Retry with at least 1 second of backoff; keep heavy endpoints at no more than 5 requests/second.
- 5xx, including 502 and 504: Arkham failed or timed out. Retry with backoff. x402 payments are not settled for failed requests.
Examples:
- POST /search { "query": "Coinbase", "arkhamEntities": 3, "tokens": 2 }
- POST /intelligence/entity-summary { "entity": "coinbase" }
- POST /balances/address { "chains": "ethereum", "address": "0x..." }
Stateful Arkham account mutation routes such as alerts, private labels/entities, and WebSocket session lifecycle are intentionally not exposed.'
guidance: '# Arkham x402 API
Arkham x402 exposes stateless Arkham wallet intelligence endpoints at the service root. All paid routes use x402 payments.
When to use:
- Pre-trade wallet due diligence before copy-trading or taking counterparty exposure.
- Counterparty and smart-money analysis, including token flow monitoring.
- Balance, portfolio, and historical portfolio tracking.
- Token and broader market intelligence for trading decisions.
- Polymarket market, wallet, position, and activity intelligence.
Use POST requests with JSON bodies. Path parameters from Arkham are supplied as body fields. Extra fields become Arkham query parameters. Address fields are canonicalized at ingress: EVM addresses are lowercased, Solana addresses are preserved.
Pricing is $0.20 per Arkham credit. The free chains, networks/status, and arkm/circulating endpoints use SIWX sign-in instead of payment. Per-row endpoints such as transfers and swaps price from request limit, defaulting to the upstream page size of 20 when omitted, so agents should pass the smallest useful limit. Failed upstream Arkham requests are not charged.
Rate limits are per payer wallet and endpoint. Most endpoints allow 100 requests/sec. Heavy endpoints allow 5 requests/sec: transfers, transfers/unenriched, transfers/histogram, swaps, token/top, token/top_flow, token/volume, intelligence/search, counterparties, and flow.
## Error handling
- 402 with PAYMENT-REQUIRED: this is the payment challenge, not an application error. Pay and retry the identical request with PAYMENT-SIGNATURE.
- 402 without PAYMENT-REQUIRED after payment: verification failed. Read the new challenge and re-sign; retry once.
- 400: validation failed or required body fields are missing. Fatal for the request as written; fix it before retrying. Not charged.
- 404: the upstream Arkham resource does not exist. Fatal for the same input. Not charged.
- 429: the payer wallet exceeded its endpoint rate limit. Retry with at least 1 second of backoff; keep heavy endpoints at no more than 5 requests/second.
- 5xx, including 502 and 504: Arkham failed or timed out. Retry with backoff. x402 payments are not settled for failed requests.
Examples:
- POST /search { "query": "Coinbase", "arkhamEntities": 3, "tokens": 2 }
- POST /intelligence/entity-summary { "entity": "coinbase" }
- POST /balances/address { "chains": "ethereum", "address": "0x..." }
Stateful Arkham account mutation routes such as alerts, private labels/entities, and WebSocket session lifecycle are intentionally not exposed.'
contact:
name: Arkham Intelligence
email: api@arkm.com
url: https://api.arkm.com/x402
servers:
- url: https://api.arkm.com/x402
tags:
- name: Swaps
paths:
/swaps:
post:
operationId: swaps
summary: Get Arkham DEX swap transactions
tags:
- Swaps
x-payment-info:
price:
mode: dynamic
currency: USD
min: '0.40'
max: '659.60'
protocols:
- x402: {}
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
base:
description: Filter by specific entity or address involved in the swap. Omitting it returns an empty list. Pass several as a single…
anyOf:
- type: string
- type: number
- type: boolean
- type: array
items:
anyOf:
- type: string
- type: number
- type: boolean
chains:
description: Chains to filter by, as a single comma-separated value (e.g. 'ethereum,solana'). If omitted, returns data across all su…
anyOf:
- type: string
- type: number
- type: boolean
- type: array
items:
anyOf:
- type: string
- type: number
- type: boolean
counterparties:
description: List of addresses or entities to treat strictly as counterparties. Pass several as a single comma-separated value (e.g.…
anyOf:
- type: string
- type: number
- type: boolean
- type: array
items:
anyOf:
- type: string
- type: number
- type: boolean
flow:
description: 'Swap direction relative to the base address. Valid values: ''in'' (receiving token1), ''out'' (sending token0), or ''all''. D…'
anyOf:
- type: string
- type: number
- type: boolean
- type: array
items:
anyOf:
- type: string
- type: number
- type: boolean
from:
description: Filter to swaps where the base sold one of these tokens (token addresses or token IDs). Combine with 'to' for a specifi…
anyOf:
- type: string
- type: number
- type: boolean
- type: array
items:
anyOf:
- type: string
- type: number
- type: boolean
limit:
description: 'Maximum number of results to return. Default: 20. Max: 1650.'
anyOf:
- type: string
- type: number
- type: boolean
- type: array
items:
anyOf:
- type: string
- type: number
- type: boolean
offset:
description: Pagination offset. offset + limit must not exceed 10000 or the caller's swaps.max_results.
anyOf:
- type: string
- type: number
- type: boolean
- type: array
items:
anyOf:
- type: string
- type: number
- type: boolean
protocols:
description: Filter by protocol/DEX addresses or entity IDs. Pass several as a single comma-separated value (e.g. 'uniswap,sushiswap…
anyOf:
- type: string
- type: number
- type: boolean
- type: array
items:
anyOf:
- type: string
- type: number
- type: boolean
receivers:
description: Filter by the transaction parties that received the swap output (receiver addresses or entities). Distinct from 'to', w…
anyOf:
- type: string
- type: number
- type: boolean
- type: array
items:
anyOf:
- type: string
- type: number
- type: boolean
senders:
description: Filter by the transaction parties that initiated the swap (sender addresses or entities). Distinct from 'from', which f…
anyOf:
- type: string
- type: number
- type: boolean
- type: array
items:
anyOf:
- type: string
- type: number
- type: boolean
sortDir:
description: 'Sort direction: ''asc'' (ascending) or ''desc'' (descending). Defaults to ''desc''.'
anyOf:
- type: string
- type: number
- type: boolean
- type: array
items:
anyOf:
- type: string
- type: number
- type: boolean
sortKey:
description: 'Field by which to sort the results. One of: time, usd.'
anyOf:
- type: string
- type: number
- type: boolean
- type: array
items:
anyOf:
- type: string
- type: number
- type: boolean
timeGte:
description: Filter swaps at or after this time (unix ms, unix seconds, RFC3339, or YYYY-MM-DD).
anyOf:
- type: string
- type: number
- type: boolean
- type: array
items:
anyOf:
- type: string
- type: number
- type: boolean
timeLast:
description: Time range filter using relative durations (e.g. 24h, 7d). Cannot be combined with timeGte/timeLte.
anyOf:
- type: string
- type: number
- type: boolean
- type: array
items:
anyOf:
- type: string
- type: number
- type: boolean
timeLte:
description: Filter swaps at or before this time (unix ms, unix seconds, RFC3339, or YYYY-MM-DD).
anyOf:
- type: string
- type: number
- type: boolean
- type: array
items:
anyOf:
- type: string
- type: number
- type: boolean
to:
description: Filter to swaps where the base bought one of these tokens (token addresses or token IDs). Combine with 'from' for a spe…
anyOf:
- type: string
- type: number
- type: boolean
- type: array
items:
anyOf:
- type: string
- type: number
- type: boolean
tokens:
description: List of token addresses or token IDs that appear as either token0 or token1. Pass several as a single comma-separated v…
anyOf:
- type: string
- type: number
- type: boolean
- type: array
items:
anyOf:
- type: string
- type: number
- type: boolean
usdGte:
description: Minimum historical USD value.
anyOf:
- type: string
- type: number
- type: boolean
- type: array
items:
anyOf:
- type: string
- type: number
- type: boolean
usdLte:
description: Maximum historical USD value.
anyOf:
- type: string
- type: number
- type: boolean
- type: array
items:
anyOf:
- type: string
- type: number
- type: boolean
value0Gte:
description: Minimum token0 amount (decimal-adjusted; matched on absolute value).
anyOf:
- type: string
- type: number
- type: boolean
- type: array
items:
anyOf:
- type: string
- type: number
- type: boolean
value0Lte:
description: Maximum token0 amount (decimal-adjusted; matched on absolute value).
anyOf:
- type: string
- type: number
- type: boolean
- type: array
items:
anyOf:
- type: string
- type: number
- type: boolean
value1Gte:
description: Minimum token1 amount (decimal-adjusted; matched on absolute value).
anyOf:
- type: string
- type: number
- type: boolean
- type: array
items:
anyOf:
- type: string
- type: number
- type: boolean
value1Lte:
description: Maximum token1 amount (decimal-adjusted; matched on absolute value).
anyOf:
- type: string
- type: number
- type: boolean
- type: array
items:
anyOf:
- type: string
- type: number
- type: boolean
additionalProperties:
anyOf:
- type: string
- type: number
- type: boolean
- type: array
items:
anyOf:
- type: string
- type: number
- type: boolean
responses:
'200':
description: Successful response
content:
application/json:
schema: {}
'400':
$ref: '#/components/responses/BadRequest400'
'402':
$ref: '#/components/responses/PaymentRequired402'
'404':
$ref: '#/components/responses/NotFound404'
'429':
$ref: '#/components/responses/RateLimited429'
5XX:
$ref: '#/components/responses/UpstreamError5xx'
security: []
description: 'Get Arkham DEX swap transactions. Priced per row: $0.40 × limit (default 20, max 1649); pass the smallest useful limit.'
components:
responses:
BadRequest400:
description: 'Fatal for the request as written: validation failed or required JSON body fields are missing. Fix the request; do not retry it unchanged. Payment is not settled.'
content:
application/json:
schema:
type: object
required:
- success
- error
properties:
success:
type: boolean
enum:
- false
error:
type: string
issues:
type: array
description: Per-field validation issues, present when schema validation produced them.
RateLimited429:
description: Per-wallet endpoint rate limit exceeded. Retry with at least 1 second of backoff; keep heavy endpoints at no more than 5 requests per second.
UpstreamError5xx:
description: Arkham failed or timed out, including 502 and 504 responses. Retry with backoff. x402 payments and MPP transaction credentials are not settled for failed requests; MPP hash credits are redeemed at admission and are not refunded automatically.
PaymentRequired402:
description: 'Payment challenge, not an application error. Read the base64 x402 v2 challenge from PAYMENT-REQUIRED, sign it, and retry the same request with PAYMENT-SIGNATURE. If a post-payment 402 omits PAYMENT-REQUIRED, verification failed: read the new challenge, re-sign, and retry once.'
headers:
PAYMENT-REQUIRED:
description: Base64-encoded x402 v2 payment requirements. Its accepts array contains the scheme, network, asset, atomic amount, and payTo address.
schema:
type: string
NotFound404:
description: The upstream Arkham resource does not exist. Fatal for the same input. Payment is not settled.
securitySchemes:
siwx:
type: apiKey
in: header
name: SIGN-IN-WITH-X