Wallet API


Here we summarize some common parameters you will encounter when using OKX OnchainOS services. You can learn their definitions and usage scenarios.


accountId is a unique identifier assigned by OKX OnchainOS to an account. Its function is to associate multiple chains and addresses for aggregated queries of assets and transaction history.

We provide two types of accounts: wallet accounts and watch-only accounts.

Wallet Account: Requires message signature for authentication, allows adding custom tokens, and can send transactions.

Watch-Only Account: Does not require message signature, defaults to displaying all tokens listed on the OKX platform, and cannot send transactions.


chainIndex is the unique identifier for a blockchain within the OKX OnchainOS service. For chains following the EVM architecture and EIP-155 protocol, the standard chainIndex is used. For other chains like BTC and Solana that do not have a unified ID standard, we use the cointype parameter from the BIP44 specification as the chain identifier. In other special cases, we will ensure the uniqueness of the ID before assigning it. Example chainIndexes are as follows:

Blockchain NetworkchainIndexeip155chainId
Bitcoin Mainnet0
Ethereum Mainnet11
OP Mainnet1010
Flare Mainnet1414
Cronos Mainnet2525

You can check here for a full list of supported blockchain networks and their chainIndexes.


orderId is a unique identifier assigned to each transaction within the OKX OnchainOS system. Using orderId for queries ensures that even if a transaction is not on the blockchain, it is recorded within the system, ensuring full visibility of the transaction process.