Get Current Block Height: API Migration (v3 to v4)
This guide covers the migration from legacy v3 chain-specific Get block endpoints to the new unified Blockhains API endpoint Get current block height
Endpoint Change Summary
| Component | v3 (Legacy) | v4 (New) |
|---|---|---|
| Standard Pattern | /v3/{chain}/block/current | /v4/data/blockchains/block/current |
| Tron Exception | /v3/tron/info | /v4/data/blockchains/block/current |
Deprecated v3 Endpoints
The following chain-specific endpoints have been consolidated:
| Old v3 Endpoint | Status |
|---|---|
/v3/algorand/block/current | Deprecated |
/v3/arb/block/current | Deprecated |
/v3/avalanche/block/current | Deprecated |
/v3/base/block/current | Deprecated |
/v3/egld/block/current | Deprecated |
/v3/sonic/block/current | Deprecated |
/v3/cronos/block/current | Deprecated |
/v3/bsc/block/current | Deprecated |
/v3/celo/block/current | Deprecated |
/v3/kcs/block/current | Deprecated |
/v3/ethereum/block/current | Deprecated |
/v3/fantom/block/current | Deprecated |
/v3/flare/block/current | Deprecated |
/v3/one/block/current | Deprecated |
/v3/klaytn/block/current | Deprecated |
/v3/polygon/block/current | Deprecated |
/v3/solana/block/current | Deprecated |
/v3/optimism/block/current | Deprecated |
/v3/xdc/block/current | Deprecated |
/v3/vet/block/current | Deprecated |
/v3/tron/info | Deprecated |
Migration Steps
1. Update Your Base URL
Standard endpoints:
- GET /v3/ethereum/block/current
+ GET /v4/data/blockchains/block/current?chain=ethereum-mainnetTron endpoint:
- GET /v3/tron/info
+ GET /v4/data/blockchains/block/current?chain=tron-mainnet2. Adjust Chain Identifiers
Ensure you're using the new chain identifier format (e.g., ethereum-mainnet instead of ethereum).
3. Update Response Handling
Review your code for any response schema changes between v3 and v4.
Attention
Updated about 11 hours ago