Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.2.0
info:
title: Trading Data On Chain API
version: 1.0.0-mvp
description: 'Agent-ready trading, market-data and on-chain API. 29 endpoints across crypto/stock prices & OHLCV, indicators (ATR, Fair Value Gaps, ICT liquidity levels), perp funding/OI, order books, Kalshi prediction markets, DeFi TVL, volatility, a verified macro calendar, an AI momentum score, and on-chain reads (balances, token balances, nonces, blocks, ENS, transactions) on 5 EVM chains.
**Access — two ways, both work on every /v1 endpoint:**
1. **API key** — send an `x-api-key` header for free, rate-limited access.
2. **x402 pay-per-call** — no signup: call any endpoint with no key, receive a `402` with a USDC price (currently $0.001/request on base), pay via an x402 client, and get `200` + data. Settled on-chain via the Coinbase CDP facilitator.'
x-guidance: All endpoints are GET /v1/<name> with query parameters (see each operation). Free endpoints (/v1/status, /v1/sentiment, /v1/macro-calendar, /v1/market-overview, /v1/gas, /v1/kalshi-probability) need no payment. Every other /v1 endpoint returns a 402 x402 (v2) challenge in the PAYMENT-REQUIRED header with a flat price of $0.001 USDC per request on Base; pay with an x402 client and retry the same request. Start with GET /v1/status for the full catalog.
contact:
url: https://api.wickedapi.com
termsOfService: https://api.wickedapi.com/
servers:
- url: https://api.wickedapi.com
description: Production
tags:
- name: On-chain
paths:
/v1/chain-balance:
get:
operationId: get_v1_chain_balance
summary: Native-token balance (ETH/POL) for any address or ENS name on Ethereum, Base…
description: 'Native-token balance (ETH/POL) for any address or ENS name on Ethereum, Base, Arbitrum, Optimism or Polygon. Live from the chain over redundant RPCs — wei plus formatted units.
**Example:** `/v1/chain-balance?address=vitalik.eth&chain=ethereum`'
tags:
- On-chain
parameters:
- name: address
in: query
required: true
description: Required. A 0x address or an ENS name (e.g. vitalik.eth).
schema:
type: string
- name: chain
in: query
required: false
description: Optional. ethereum, base, arbitrum, optimism, polygon (default base).
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/Envelope'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/PaymentRequired'
'429':
$ref: '#/components/responses/RateLimited'
'502':
$ref: '#/components/responses/UpstreamError'
security:
- ApiKeyAuth: []
- {}
x-payment-info:
price:
mode: fixed
currency: USD
amount: '0.001000'
protocols:
- x402: {}
/v1/chain-token-balance:
get:
operationId: get_v1_chain_token_balance
summary: ERC-20 token balance for an address or ENS name, with token symbol and decimals…
description: 'ERC-20 token balance for an address or ENS name, with token symbol and decimals read from the contract. Ethereum, Base, Arbitrum, Optimism, Polygon.
**Example:** `/v1/chain-token-balance?address=0xB71C06dAC44c91bc997FB84C247DeEF676F4A9f6&token=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&chain=base`'
tags:
- On-chain
parameters:
- name: address
in: query
required: true
description: 'Required. Holder: a 0x address or an ENS name.'
schema:
type: string
- name: token
in: query
required: true
description: Required. ERC-20 contract address.
schema:
type: string
- name: chain
in: query
required: false
description: Optional. ethereum, base, arbitrum, optimism, polygon (default base).
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/Envelope'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/PaymentRequired'
'429':
$ref: '#/components/responses/RateLimited'
'502':
$ref: '#/components/responses/UpstreamError'
security:
- ApiKeyAuth: []
- {}
x-payment-info:
price:
mode: fixed
currency: USD
amount: '0.001000'
protocols:
- x402: {}
/v1/chain-nonce:
get:
operationId: get_v1_chain_nonce
summary: 'Transaction count (nonce) for an address or ENS name: confirmed nonce plus…'
description: 'Transaction count (nonce) for an address or ENS name: confirmed nonce plus pending nonce, so an agent can sign the next transaction without a collision.
**Example:** `/v1/chain-nonce?address=0xB71C06dAC44c91bc997FB84C247DeEF676F4A9f6&chain=base`'
tags:
- On-chain
parameters:
- name: address
in: query
required: true
description: Required. A 0x address or an ENS name.
schema:
type: string
- name: chain
in: query
required: false
description: Optional. ethereum, base, arbitrum, optimism, polygon (default base).
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/Envelope'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/PaymentRequired'
'429':
$ref: '#/components/responses/RateLimited'
'502':
$ref: '#/components/responses/UpstreamError'
security:
- ApiKeyAuth: []
- {}
x-payment-info:
price:
mode: fixed
currency: USD
amount: '0.001000'
protocols:
- x402: {}
/v1/chain-block:
get:
operationId: get_v1_chain_block
summary: 'Block header lookup: number, hash, timestamp, miner, tx count, gas used/limit…'
description: 'Block header lookup: number, hash, timestamp, miner, tx count, gas used/limit and base fee. Latest by default, or any block number, safe or finalized.
**Example:** `/v1/chain-block?chain=base&block=latest`'
tags:
- On-chain
parameters:
- name: block
in: query
required: false
description: Optional. A block number, "latest", "safe" or "finalized" (default latest).
schema:
type: string
- name: chain
in: query
required: false
description: Optional. ethereum, base, arbitrum, optimism, polygon (default base).
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/Envelope'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/PaymentRequired'
'429':
$ref: '#/components/responses/RateLimited'
'502':
$ref: '#/components/responses/UpstreamError'
security:
- ApiKeyAuth: []
- {}
x-payment-info:
price:
mode: fixed
currency: USD
amount: '0.001000'
protocols:
- x402: {}
/v1/chain-ens:
get:
operationId: get_v1_chain_ens
summary: 'ENS lookup on Ethereum mainnet in either direction: name to address, or address…'
description: 'ENS lookup on Ethereum mainnet in either direction: name to address, or address to primary name.
**Example:** `/v1/chain-ens?name=vitalik.eth`'
tags:
- On-chain
parameters:
- name: name
in: query
required: true
description: Optional. An ENS name to resolve (e.g. vitalik.eth). Either name or address is required.
schema:
type: string
- name: address
in: query
required: false
description: Optional. An address to reverse-resolve to its primary ENS name.
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/Envelope'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/PaymentRequired'
'429':
$ref: '#/components/responses/RateLimited'
'502':
$ref: '#/components/responses/UpstreamError'
security:
- ApiKeyAuth: []
- {}
x-payment-info:
price:
mode: fixed
currency: USD
amount: '0.001000'
protocols:
- x402: {}
/v1/chain-tx:
get:
operationId: get_v1_chain_tx
summary: 'Transaction lookup by hash: status (success/reverted/pending), block, from/to…'
description: 'Transaction lookup by hash: status (success/reverted/pending), block, from/to, value, nonce, gas used, effective gas price and log count.
**Example:** `/v1/chain-tx?hash=0x...&chain=base`'
tags:
- On-chain
parameters:
- name: hash
in: query
required: true
description: Required. 0x-prefixed 32-byte transaction hash.
schema:
type: string
- name: chain
in: query
required: false
description: Optional. ethereum, base, arbitrum, optimism, polygon (default base).
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/Envelope'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/PaymentRequired'
'429':
$ref: '#/components/responses/RateLimited'
'502':
$ref: '#/components/responses/UpstreamError'
security:
- ApiKeyAuth: []
- {}
x-payment-info:
price:
mode: fixed
currency: USD
amount: '0.001000'
protocols:
- x402: {}
components:
responses:
UpstreamError:
description: Upstream data error — never fabricated data, a real source failure
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
RateLimited:
description: Rate limit exceeded (keyed access)
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Unauthorized:
description: Missing or invalid x-api-key
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
PaymentRequired:
description: No valid x-api-key — pay per call via x402 (USDC on Base). See the `accepts` array for exact price/network/payTo.
content:
application/json:
schema:
$ref: '#/components/schemas/X402Challenge'
schemas:
Envelope:
type: object
required:
- data
- meta
properties:
data:
type: object
description: Endpoint-specific payload.
meta:
type: object
required:
- timestamp
properties:
timestamp:
type: string
format: date-time
additionalProperties: true
X402Challenge:
type: object
description: x402 v2 payment challenge. The base64-encoded challenge is in the PAYMENT-REQUIRED response header (decode to JSON with x402Version 2 and an `accepts` array); sign it and retry with a PAYMENT-SIGNATURE header. The response body is not the challenge.
properties: {}
additionalProperties: true
Error:
type: object
properties:
error:
type: string
source:
type: string
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: x-api-key
description: Free, rate-limited access.