OKTC REST API Documentation

·

The OKTC (OKX Chain) REST API provides developers and blockchain enthusiasts with a powerful interface to interact with the OKTC network. Whether you're retrieving account balances, querying block data, or analyzing staking and governance activities, this comprehensive API enables seamless integration into decentralized applications (dApps), analytics platforms, and wallet services.

With a rate limit of 6 requests per second, the API ensures high availability while maintaining network stability. Historical data can be queried using the height parameter—though nodes may prune old records—so it's recommended to query within the latest 10 blocks for reliable results.

This guide walks through all major endpoints grouped by functional modules: Account, Blocks, Staking, Distribution, WASM, and Governance.


Account Information

Access key wallet and balance details via simple HTTP GET requests.

Get Balance

Retrieve all currency balances for a specific address.

Endpoint:
GET okexchain/v1/accounts/{address}

Parameters:

Response Fields:

👉 Explore blockchain account data with powerful tools

Get Account Number and Sequence

Fetch critical transaction metadata used in signing operations.

Endpoint:
GET okexchain/v1/auth/accounts/{address}

Response Includes:

This data is essential when constructing signed transactions manually.


Block Data Queries

Monitor chain activity by accessing real-time and historical block information.

Get Latest Block

Obtain the most recent block on the chain.

Endpoint:
GET okexchain/v1/blocks/latest

No parameters required. Returns full block header, metadata, validator signatures, and transaction hashes.

Get Block by Height

Query a specific block using its height.

Endpoint:
GET okexchain/v1/blocks/{height}

Useful for auditing or replaying historical state changes.

Get Transaction Info

Retrieve details of a transaction using its hash.

Endpoint:
GET okexchain/v1/txs/{hash}

Key Response Data:

Node Status Endpoints

Monitor node health and synchronization status.

Get Node Info:
GET okexchain/v1/node_info
Returns software versions, network ID, P2P settings, and consensus details.

Check Sync Status:
GET okexchain/v1/syncing
Returns boolean syncing field—true if catching up, false if fully synced.


Staking & Validator Management

Interact with OKTC’s proof-of-stake ecosystem.

Staking Parameters

View current staking rules:

Endpoint:
GET okexchain/v1/staking/parameters

Includes:

Delegator and Validator Data

Special endpoints include:

👉 Maximize your staking insights with advanced blockchain tools


Distribution Module

Manage rewards distribution for delegators and validators.

Distribution Parameters

Endpoint:
GET okexchain/v1/distribution/parameters

Reveals:

Reward Queries

Also includes:


WASM Smart Contract Interactions

OKTC supports WebAssembly-based smart contracts. These APIs allow deep interaction with deployed dApps.

Contract Code Management

Contract State & Data Access

These tools are indispensable for debugging, front-end integration, and analytics.


Governance Participation

Engage with on-chain governance proposals and voting mechanisms.

Governance Parameters

Fetch rules for:

Use {ParamsType} in the endpoint: deposit, voting, or tallying.

Proposal Tracking

Get Proposals:
List all active and past proposals with full metadata:

Additional endpoints:


Frequently Asked Questions (FAQ)

Q: What is the rate limit for OKTC REST API?
A: The API allows up to 6 requests per second per IP address.

Q: Can I query historical blocks older than 100 blocks?
A: While possible using the height parameter, nodes may have pruned old data. For reliability, query within the last 10 blocks.

Q: How do I decode smart contract query responses?
A: Use Base64 decoding for /smart endpoint outputs. Ensure your query message is properly encoded before sending.

Q: Is there a way to monitor validator uptime?
A: Yes—check the jailed status and compare signing activity over time using block proposer data.

Q: How often does the staking pool update?
A: The bonded and non-bonded token values update in real time as delegations and unbondings occur.

Q: Can I use these APIs for building a wallet?
A: Absolutely. Endpoints like balance lookup, transaction history, and account sequence are ideal for wallet development.


Core Keywords

OKTC REST API, blockchain developer tools, staking API, smart contract queries, governance data, transaction lookup, validator information, OKX Chain endpoints

👉 Start building on OKTC with full API access today