Aller directement au contenu principal

X Layer API Overview

Mis à jour le
28 avril 2026

Quicknode supports the following X Layer APIs on all endpoints. Using your X Layer endpoint, you can call any of the methods available in these APIs. For a complete list of supported RPC methods, refer to the documentation for each API.

API prises en charge

Réseaux pris en charge

Quicknode provides access to the following X Layer networks:

Mainnet
Type :Production
Identifiant de la chaîne :
196
HTTP :
WSS :
Archives :Oui
Taille :Aucune
Testnet
Type :Testnet
Identifiant de la chaîne :
1952
HTTP :
WSS :
Archives :Oui
Taille :Aucune
Remarque :

XLayer uses a re-genesis at block 42,810,021. Historical data before this block is available but stored on legacy nodes and automatically routed when you provide a specific block number for methods like eth_getBlockByNumber, eth_getBalance, et debug_trace*.

Block 42,810,021 itself is untraceable and may return {"code":4444,"message":"pruned history unavailable"}.

Transaction Node Requirements

X Layer uses two different node clients split at the re-genesis boundary (block 42,810,021):

  • Block 42,810,021 and earlier — Requires a cdk-Erigon node. Geth nodes return null for these historical transactions.
  • After block 42,810,021 — Requires a Geth node. Erigon nodes return null for these current transactions.

To query pre-regenesis data, include the x-qn-height header with the target block number in your request to route it to the cdk-Erigon node. Without this header, requests default to the Geth node, so the header is not required for post-regenesis blocks.

Pre-Regenesis Example (cdk-Erigon, block ≤ 42,810,021):

curl --location 'https://docs-demo.xlayer-mainnet.quiknode.pro/' \
--header 'Content-Type: application/json' \
--header 'x-qn-height: 42810020' \
--data '{"method":"eth_getBlockByNumber","params":["0x28D3AA4",false],"id":1,"jsonrpc":"2.0"}'

Post-Regenesis Example (Geth, block > 42,810,021):

curl --location 'https://docs-demo.xlayer-mainnet.quiknode.pro/' \
--header 'Content-Type: application/json' \
--data '{"method":"eth_getBlockByNumber","params":["0x28D3AA6",false],"id":1,"jsonrpc":"2.0"}'

Produits pris en charge