Usage Guide#
The Onchain Core Data API provides public-chain summaries, blocks, transactions, event logs, and address data. Always discover support for the target endpoint before calling it. Support for a chain in one module does not imply support in another module.
API references#
Quick start#
Request conventions#
- Base URL:
https://web3.okx.com chainIndexis a numeric string, such as1for Ethereum and0for Bitcoin. Chain names are not accepted.- Time parameters use Unix timestamps in milliseconds, such as
1597026383085. - Every request requires
OK-ACCESS-KEY,OK-ACCESS-SIGN,OK-ACCESS-TIMESTAMP, andOK-ACCESS-PASSPHRASE. - Generate the signature from the method, path, query, body, and timestamp of the current request. Do not reuse it across URLs or pages.
- Successful responses use a
code,msg, anddataenvelope.codeis a string.
Recommended request flow#
- Convert the input chain name to a
chainIndex. - Call the target module's
supported-chainsendpoint. - Match both
apiNameandchainIndexin the response. - Call the target endpoint only after a match; otherwise return that the endpoint does not currently support the chain.
- Split batch parameters and block ranges according to endpoint limits.
- Return each
cursorunchanged until the responsecursoris an empty string.
Composed scenarios#
| Goal | Calls in order | Key handling |
|---|---|---|
| Multi-chain overview | 1. info/supported-chains 2. Call info/summary, info/block, info/transaction, and info/address in parallel 3. Use info/stats for trends | Validate each apiName + chainIndex; preserve successful cards when one call fails; keep statistics ranges within one year |
| Time to block and transactions | 1. block/supported-chains 2. block/block-height-by-time 3. Pass the returned height to block/block-fills and block/transaction-list | closest=before selects the nearest earlier block; after selects the nearest later block |
| Complete transaction view | 1. Discover transaction and log support separately 2. transaction/transaction-multi 3. Call internal-transaction-multi, token-transfer-multi, and log/by-transaction in parallel | Send at most 20 hashes per batch; if logs are unsupported, return the base transaction and mark logs as unsupported |
| Address profile | 1. address/address-active-chain 2. Validate support per module 3. Call address/information-evm, both address-transaction endpoints, and block/address-balance-history | Send at most 50 addresses per batch and 10,000 blocks per range; do not call information-evm for non-EVM addresses |
| Contract event monitor | 1. log/supported-chains 2. log/by-address-and-topic 3. Paginate by cursor | Continue while the cursor is non-empty; deduplicate by chainIndex + txId + logIndex |
| Multi-address fund flows | 1. Split addresses into groups of 50 2. Split blocks into windows of 10,000 3. Call both address-transaction endpoints for every slice 4. Merge and deduplicate | Paginate each slice serially; run independent slices concurrently within rate limits; use isFromOrTo for direction |
Supported-chain mapping#
Discover support by module#
| Module | Discovery endpoint | Endpoints validated |
|---|---|---|
| Public chain info | /api/v6/explorer/info/supported-chains | /info/* |
| Block | /api/v6/explorer/block/supported-chains | /block/* |
| Transaction | /api/v6/explorer/transaction/supported-chains | /transaction/* |
| Event log | /api/v6/explorer/log/supported-chains | /log/* |
| Address | /api/v6/explorer/address/supported-chains | /address/* |
Store the response as a supported[(module, apiName, chainIndex)] = true set. For example, before calling /api/v6/explorer/transaction/transaction-multi, check supported[("transaction", "transaction-multi", "1")].
apiName-to-endpoint mapping#
| Module | apiName | Endpoint path |
|---|---|---|
| info | detail | /api/v6/explorer/info/detail |
| info | summary | /api/v6/explorer/info/summary |
| info | transaction | /api/v6/explorer/info/transaction |
| info | block | /api/v6/explorer/info/block |
| info | address | /api/v6/explorer/info/address |
| info | stats | /api/v6/explorer/info/stats |
| info | hashes | /api/v6/explorer/info/hashes |
| block | block-list | /api/v6/explorer/block/block-list |
| block | block-fills | /api/v6/explorer/block/block-fills |
| block | transaction-list | /api/v6/explorer/block/transaction-list |
| block | block-height-by-time | /api/v6/explorer/block/block-height-by-time |
| block | block-stats | /api/v6/explorer/block/block-stats |
| block | address-balance-history | /api/v6/explorer/block/address-balance-history |
| transaction | transaction-multi | /api/v6/explorer/transaction/transaction-multi |
| transaction | internal-transaction-multi | /api/v6/explorer/transaction/internal-transaction-multi |
| transaction | token-transfer-multi | /api/v6/explorer/transaction/token-transfer-multi |
| transaction | normal-transaction-list-multi | /api/v6/explorer/transaction/normal-transaction-list-multi |
| transaction | token-transaction-list-multi | /api/v6/explorer/transaction/token-transaction-list-multi |
| log | by-block-and-address | /api/v6/explorer/log/by-block-and-address |
| log | by-address-and-topic | /api/v6/explorer/log/by-address-and-topic |
| log | by-address | /api/v6/explorer/log/by-address |
| log | by-transaction | /api/v6/explorer/log/by-transaction |
| address | address-active-chain | /api/v6/explorer/address/address-active-chain |
| address | information-evm | /api/v6/explorer/address/information-evm |
Use address/information-evm, event-log endpoints, and endpoints marked EVM-only only after the relevant support response confirms the chain. On 50038, refresh support for the current module instead of permanently marking the chain as globally unsupported. See the appendix for the complete name mapping.
Pagination, batches, and ranges#
Cursor pagination#
- Omit
cursoron the first request. - Pass the returned
cursorunchanged on the next request; do not convert it to a page number. - Stop when
cursoris an empty string. - For log endpoints, continue when
logListis empty butcursoris non-empty. - Paginate serially within one
cursorchain. Independent queries can run concurrently within the rate-limit budget.
Request limits#
| Parameter or scenario | Limit |
|---|---|
transaction-multi.txId | Comma-separated, at most 20; duplicates are removed |
internal-transaction-multi.txId | Comma-separated, at most 20 |
token-transfer-multi.txId | Comma-separated, at most 20 |
Address transaction query address | Comma-separated, at most 50 |
tokenContractAddress filter | At most 50 contracts |
startBlockHeight to endBlockHeight | At most 10,000 blocks |
Standard cursor limit | Default 20, maximum 100 |
Log scanning limit | Default 100, maximum 1,000 |
info/stats time range | At most one year |
Split oversized input on the client. Deduplicate merged results by transaction hash, log index, or another documented business key.
Appendix: complete chainName-to-chainIndex mapping#
Use this table to convert a chain name or alias to a candidate chainIndex. It includes mainnets, testnets, and historical names. It is not an endpoint-support list; before making a business request, match both apiName and chainIndex through the corresponding module's supported-chains endpoint.
Some names identify different networks or historical registry entries, including CORE=70000025 and CORE_EVM=1116, CRO=25 and CRO_COSMOS=394, and CFX=1030 and Conflux=503. Resolve ambiguous names from the network context instead of guessing from the display name alone.
| chainName | chainIndex | chainName | chainIndex |
|---|---|---|---|
| ACT | 666 | ADA | 1815 |
| ALGO | 283 | ARB_ETH | 42161 |
| ARDR | 16754 | ARK | 111 |
| ASP | 70000008 | ASTR_DOT | 70000090 |
| ATOM | 118 | AURORA_ETH | 1313161554 |
| AVAX | 43114 | AXL | 718 |
| BCH | 145 | BITCI | 70000006 |
| BNB | 56 | BOBA_ETH | 288 |
| BRISE | 32520 | BSV | 236 |
| BTC | 0 | BTS | 308 |
| CELO | 42220 | CFX | 1030 |
| CHZ | 2182 | CRO | 25 |
| CUBE | 1818 | DASH | 5 |
| DOT | 354 | ECH | 70000005 |
| ECOC | 70000009 | EGLD | 70000003 |
| ELA | 20 | EOS | 194 |
| ETC | 61 | ETH | 1 |
| ETL | 70000010 | EVER | 396 |
| EVMOS | 710 | FLOW | 539 |
| FSN | 32659 | FTM | 250 |
| FUSE | 122 | GLMR | 1284 |
| GO | 60 | GT | 86 |
| GXC | 2303 | HIVE | 70000004 |
| HOO | 70 | HT | 128 |
| HTML | 172 | ICX | 74 |
| INT | 70000007 | IOST | 291 |
| IOTX | 4689 | JUNO | 709 |
| KAI | 70000002 | KAR | 686 |
| KAVA | 459 | KCS | 321 |
| Kaia(KLAY) | 8217 | KSM | 434 |
| LTC | 2 | LUNC | 70000001 |
| MAN | 318 | MATIC | 137 |
| METIS | 1088 | MOVR | 1285 |
| MTR | 82 | NAS | 2718 |
| NBT | 12 | NEAR | 397 |
| NULS | 8964 | NXT | 29 |
| OKT | 66 | ONE | 1666600000 |
| ONT | 1024 | OP_ETH | 10 |
| OSMO | 706 | QTUM | 2301 |
| RON | 2020 | ROSE | 474 |
| SCRT | 529 | SDN | 336 |
| SGB | 19 | SOL | 501 |
| STARKNET | 9004 | STARS | 563 |
| STX | 5757 | THETA | 361 |
| TLOS | 40 | TOMO | 88 |
| TRC | 83 | TRX | 195 |
| UBQ | 8 | VET | 818 |
| VITE | 666666 | VLX | 106 |
| WAN | 5718350 | WAVES | 5741564 |
| WAX | 708 | XCP | 9 |
| XDAI | 100 | XDC | 50 |
| XEM | 43 | XHB | 3030 |
| XLM | 70000088 | XOR | 617 |
| XRP | 144 | XTZ | 1729 |
| ZEC | 133 | ZIL | 313 |
| APT | 637 | KUJI | 70000011 |
| AKT | 70000012 | ABT | 260 |
| ACA | 787 | AERGO | 441 |
| ALPHA | 622 | AR | 472 |
| BAND | 494 | BCD | 999 |
| BHP | 547 | BNT | 483 |
| BTG | 156 | BTM | 153 |
| CFG | 747 | CMT | 1122 |
| CSPR | 506 | CTC | 583 |
| DCR | 42 | DMD | 152 |
| DOGE | 3 | EFI | 1155 |
| ELF | 1616 | HC(HSR) | 171 |
| HYC | 1397 | ICP | 70000048 |
| IOTA | 4218 | KDA | 626 |
| LAMB | 364 | LAT | 210425 |
| LET | 518 | LSK(KLY) | 134 |
| LUNA | 330 | MINA | 12586 |
| RVN | 175 | SC | 1991 |
| SRM | 573 | TON | 607 |
| TRUE | 2049 | VSYS | 360 |
| XCH | 8444 | XEC | 899 |
| XMR | 70000013 | XNO | 165 |
| YEE | 4096 | YOU | 534 |
| ZEN | 121 | NRG | 39797 |
| FCTID | 281 | KMD | 141 |
| JEWEL | 53935 | mADA | 2001 |
| XIN | 2365 | CANTO | 70000014 |
| HYDRA | 609 | ARB_NOVA | 42170 |
| SYS | 57 | CET | 52 |
| FRA | 2152 | STRAT | 105 |
| SX | 416 | ETP | 2302 |
| RUNE | 931 | TT | 108 |
| POLIS | 333999 | smartBCH | 10000 |
| ETHW | 10001 | ENQ | 70000016 |
| YOC | 70000017 | CELR | 70000018 |
| SKL | 70000019 | ETHF | 513100 |
| IRIS | 566 | IMX | 1761886 |
| ERA_ETH | 324 | SUI | 784 |
| DEV_SUI | 783 | FITFI | 1234 |
| pCKB | 71402 | SERO | 569 |
| CTXC | 70000021 | FLR | 14 |
| PHA_KHA | 70000022 | CLV | 70000023 |
| EM | 70000024 | CORE | 70000025 |
| CORE_EVM | 1116 | YOYOW | 70000026 |
| WTC | 70000027 | AAC | 512 |
| ZKS | 13 | LITE_ETH | 805 |
| FIL | 314 | UMEE | 70000028 |
| CRO_COSMOS | 394 | POM | 18159 |
| X1_TEST | 19500 | OKT_TEST | 65 |
| GON_ETH | 1101 | SEI | 70000029 |
| KAVA_EVM | 2222 | Conflux | 503 |
| GOERLI_ETH | 70000030 | SEI_TEST | 70000031 |
| BMTC | 4321 | ZETA_MAINNET | 7000 |
| OMN | 408 | WEMIX | 1111 |
| ROSE_EVM | 42262 | OAS | 70000033 |
| XETA | 70000034 | BNC | 788 |
| HASH | 505 | POKT | 635 |
| DNA | 515 | DGB | 70000035 |
| CKB | 309 | AVAX_X | 9000 |
| WICC(WGRT) | 70000036 | FAN | 99999 |
| PLS | 369 | ACE | 648 |
| TIA | 70000037 | MNT | 5000 |
| LINEA | 59144 | Base | 8453 |
| BTC_TestNet | 70000038 | OP_BNB | 204 |
| Sepolia | 11155111 | enj | 70000039 |
| Beacon | 70000040 | scroll | 534352 |
| injective | 70000041 | DYDX | 70000042 |
| Kaspa | 111111 | Venom | 70000043 |
| MANTA_ETH | 169 | HAQQ | 11235 |
| NOSTR | 1237 | FacetVM | 70000044 |
| hnt | 904 | gas_n3 | 888 |
| astr_evm | 592 | FIL_EVM | 461 |
| IMX_ZKEVM | 13371 | MXC | 18686 |
| CHZ_V2 | 88888 | Mumbai_Testnet | 80001 |
| PolygonzkEVM_Testnet | 1442 | ETHS | 70000045 |
| BTC_src20 | 70000046 | Amoy_Testnet | 80002 |
| BTC_Signet | 70000047 | DYM | 1100 |
| Rangers | 2025 | Blast_Sepolia | 168587773 |
| WEMIX3_Testnet | 1112 | Avocado | 634 |
| zkSync_Sepolia | 300 | Shardeum_Sphinx | 8082 |
| Mode | 34443 | MerLin | 4200 |
| XION | 70000051 | XION_TEST | 70000052 |
| DYM_TEST | 70000053 | Blast | 81457 |
| Arbitrum_Sepolia | 421614 | LUMI | 94168 |
| BBNylon_TEST | 70000054 | B2Network_TEST | 1102 |
| BEVM_Canary | 1501 | TunaChain_TEST | 10123 |
| XLayer_TEST | 196 | BITLAYER_BTC | 200901 |
| B2Network | 223 | ZKLINK_ETH | 810180 |
| Avail | 70000055 | ZETA_COSMOS | 70000050 |
| STC | 70000056 | BOB_ETH | 60808 |
| BounceBit_BTC | 6001 | TAIKO_ETH | 167000 |
| SOL_Testnet | 70000057 | ZORA_ETH | 7777777 |
| ONCHAIN_ETH | 27563 | OVER | 54176 |
| BEVM_BTC | 11501 | frxETH | 252 |
| MAT | 698 | KARAK_ETH | 2410 |
| KROMA_ETH | 255 | Lisk | 1135 |
| Sonic_Testnet | 70000058 | Sonic_Devnet | 70000059 |
| EVM_SEI | 1329 | PLUME_ETH_TEST | 161221135 |
| MOVEMENT_TestNet | 70000060 | B3_ETH | 8333 |
| G | 1625 | FB | 70000061 |
| APE | 33139 | WORLD | 480 |
| RBTC | 30 | Sonic_Testnet_v1 | 70000062 |
| TESTNET_IP | 1516 | Reya | 70000063 |
| Zircuit | 48900 | CTK | 70000064 |
| DORA_FACTORY | 70000065 | DuckChain_TON | 5545 |
| HSK | 177 | MOVE | 70000066 |
| SOON_testnet | 70000067 | Eclipse | 70000068 |
| MINT_ETH | 185 | S | 146 |
| PLUME_ETH | 98865 | XTERIO_BNB | 112358 |
| SOON_mainnet | 70000069 | tbaby | 70000070 |
| XYM | 70000071 | assetHub | 70000072 |
| Abstract | 2741 | Soneium | 1868 |
| Unite | 88899 | TESTNET_MON | 10143 |
| SONIC_SOL | 70000130 | TESTNET_SAHARA | 313313 |
| SOON_BNB | 70000075 | Plume | 98866 |
| TAKER | 1125 | Endless | 70000076 |
| BABY | 70000077 | ZKCANDY_ETH | 320 |
| INIT | 70000078 | NERO | 1689 |
| MEZO_BTC | 31612 | Noble | 70000079 |
| BTT | 199 | HYPE_TEST | 998 |
| assethub_ksm | 70000081 | FX | 530 |
| VC | 207 | FLOW_EVM | 70000082 |
| BOTANIX | 3637 | XLayer_testnet2 | 1952 |
| GOAT_BTC | 2345 | USTC | 70000001 |
| SOPH | 50104 | Mind | 228 |
| Silicon | 2355 | Metadium | 11 |
| AlephZero_EVM | 41455 | Ink | 57073 |
| lens | 232 | redstone | 690 |
| Etherlink | 42793 | Superposition | 55244 |
| Swell | 1923 | Vana | 1480 |
| Corn | 21000000 | Fuse | 122 |
| Degen | 666666666 | Glue | 1300 |
| Hemi | 43111 | Lightlink | 1890 |
| Nibiru | 6900 | Peaq | 3338 |
| RariChain | 1380012617 | Hedera | 295 |
| Shibarium | 109 | RadixDLT | 70000083 |
| MAYA | 70000084 | WITNESS | 1702448187 |
| LUMIA | 994873017 | WIREX | 31415 |
| HAUST | 938 | TERNOA | 752025 |
| PENTAGON | 3344 | FORKNET | 838 |
| ENI | 173 | MANTRA | 70000085 |
| IOTA_MOVE | 70000086 | KATANA_ETH | 747474 |
| MORPH_ETH | 2818 | XPL_Plasma | 9745 |
| EVM_HYPE | 70000080 | 0G | 16661 |
| FOGO | 70000087 | MemeCore | 4352 |
| ShimmerEVM | 148 | MON | 143 |
| CANTON | 70000089 | BITTENSOR | 964 |
| STABLE | 988 | Mega_ETH | 4326 |
| BRIDGE | 13441 | ZANO | 70000091 |
| Gate_Layer | 10088 | PROS | 1672 |
| Tempo | 4217 | Edge | 3343 |
| Jovay | 5734951 | TradeZone | 70000196 |
| TradeZoneTestNet | 70000195 | orbit | 70000092 |
| KITE | 2366 | BittensorDot | 70000093 |
| Gensyn | 685689 | xlayertest | 1952 |
| HyperCore | 70000094 | MMPTestnet | 70000095 |
| RobinhoodChain | 4663 | HPP | 190415 |
