XCN:—Loading price◈ Onyx Mainnet Chain ID 327 Gas: UnavailablePowered by Onyx
HomeDevelopers
DEVELOPER TOOLS

Build on every block.

Explore the API. Read the chain. Bring your next idea to Onyx.

Onyx Scan API schema
Onyx MainnetChain ID 327Native asset XCNAPI access Key required
OpenAPI spec

Create an account and generate a key to make requests. This field is kept only for this page visit.

One API at /api for indexed history, smart wallets, native XCN, bridges, analytics, and verified source. Each resource reports its available coverage.

43 endpoints
Network

Network statistics

Counts within Onyx Scan’s stored block range. These are not lifetime network totals. Unavailable metrics are null.

GET/api/stats

This endpoint has no path or query parameters.

Chain data · Authenticated

Request example

curl 'https://YOUR_ONYX_SCAN_HOST/api/stats' \
  -H "Authorization: Bearer $ONYX_SCAN_API_KEY" \
  -H 'Accept: application/json'

Response

Your response will appear here

Run a request to inspect live JSON, status, and response time.

Good to know

Use /api as the base URL. Legacy REST prefixes /api/v1 and /api/v2 are compatibility aliases to the same current implementation. There are no separate feature versions. The API directory at /api and this schema are public; resource requests require a key.

Indexed lists return items and next_page_params: add every returned cursor field to the next request and keep your original filters. XCN and staking use nextCursor; bridge lists use transfers and pagination.nextCursor. Pass these opaque values as cursor. Verified contracts use numbered pages. A null cursor marks the end; an empty page can still have a next cursor. The Next page button handles these differences.

Check each resource’s indexing, internal_indexing, coverage, or indexStatus before treating history as complete. Retrieval timestamps do not show indexing progress. EVM values and parent-transaction fees use 18 decimals; native XCN ledger amounts and user-operation fees use 8. Token values use their token’s decimals. Keep raw amounts as strings.

For smart wallets, use address /history or /user-operations; direct transactions alone can omit relayed executions. Native ledger-only activity comes from /xcn. Execution traces, token holdings, bridge history, network analytics, pending transactions, and contract verification are listed in this reference. Pending results cover only the connected node. Verification also has a Verify & publish form.

Check HTTP status before reading list items. REST errors use message; verification may also include error, code, and details. Show failures instead of converting them to empty history. A missing record can be outside indexed coverage; 503 reports unavailable data. Unsupported filters are rejected. Etherscan module/action and GraphQL APIs are unavailable.

Every REST resource and JSON-RPC request requires Authorization: Bearer YOUR_API_KEY or X-API-Key: YOUR_API_KEY. Create a key in your verified account. Send one credential header and keep keys out of URLs and published client code. HTTP 401 means the key is missing, invalid, or revoked; 429 means the rate limit was reached. Wait for Retry-After before retrying. Cross-origin requests are supported. Explorer browsing remains public.