For the complete documentation index, see llms.txt. This page is also available as Markdown.

Geth/Parity Proxy (WIP)

eth_blockNumber (WIP)

Returns the number of most recent block

https://api.xdcscan.io/api
   ?module=proxy
   &action=eth_blockNumber
   &apikey=YourApiKeyToken

Try this endpoint in your browser 🔗

No parameters required.

Sample response

{
   "jsonrpc":"2.0",
   "id":83,
   "result":"0x1104728"
}

eth_getBlockTransactionCountByNumber (WIP)

Returns the number of transactions in a block.

https://api.xdcscan.io/api
   ?module=proxy
   &action=eth_getBlockTransactionCountByNumber
   &tag=0x10FB78
   &apikey=YourApiKeyToken

Try this endpoint in your browser 🔗

Query Parameters

Parameter
Description

tag

the block number, in hex eg. 0x10FB78

Sample response

{
   "jsonrpc":"2.0",
   "id":1,
   "result":"0x3"
}

eth_getTransactionByHash (WIP)

Returns the information about a transaction requested by transaction hash.

Try this endpoint in your browser 🔗

Query Parameters

Parameter
Description

txhash

the string representing the hash of the transaction

Sample Response

eth_getTransactionByBlockNumberAndIndex (WIP)

Returns information about a transaction by block number and transaction index position.

Try this endpoint in your browser 🔗

Query Parameters

Parameter
Description

tag

the block number, in hex eg. 0x10FB78

index

the position of the uncle's index in the block, in hex eg. 0x0

Sample Response

eth_getTransactionCount (WIP)

Returns the number of transactions performed by an address.

Try this endpoint in your browser 🔗

Query Parameters

Parameter
Description

address

the string representing the address to get transaction count

tag

the string pre-defined block parameter, either earliest, pending or latest

Sample Response

eth_sendRawTransaction (WIP)

Submits a pre-signed transaction for broadcast to the XDC network.

Try this endpoint in your browser 🔗

Query Parameters

Parameter
Description

hex

the string representing the signed raw transaction data to broadcast.

Sample Response

💡 Tip: Send a POST request if your hex string is particularly long.

⛏️ Note: The result represents the transaction hash of the submitted raw transaction.

Use eth_getTransactionReceipt (WIP) to retrieve full details.

eth_getTransactionReceipt (WIP)

Returns the receipt of a transaction by transaction hash.

Try this endpoint in your browser 🔗

Query Parameters

Parameter
Description

txhash

the string representing the hash of the transaction

Sample Response

eth_call (WIP)

Executes a new message call immediately without creating a transaction on the block chain.

Try this endpoint in your browser 🔗

Query Parameters

Parameter
Description

to

the string representing the address to interact with

data

the hash of the method signature and encoded parameters

tag

the string pre-defined block parameter, either earliest, pending or latest

Note: The gas parameter is capped at 2x the current block gas limit.

Sample Response

eth_getCode (WIP)

Returns code at a given address.

Try this endpoint in your browser 🔗

Query Parameters

Parameter
Description

address

the string representing the address to get code

tag

the string pre-defined block parameter, either earliest, pending or latest

Sample Response

eth_getStorageAt (WIP)

Returns the value from a storage position at a given address.

Try this endpoint in your browser

Query Parameters

Parameter
Description

address

the string representing the address to get code

position

the hex code of the position in storage, eg 0x0

tag

the string pre-defined block parameter, either earliest, pending or latest

Sample Response

eth_gasPrice (WIP)

Returns the current price per gas in wei.

Try this endpoint in your browser 🔗

No parameters required.

Sample Response

📖 Tip: The result is returned in wei.

Easily convert XDC units using our unit converter.

eth_estimateGas (WIP)

Makes a call or transaction, which won't be added to the blockchain and returns the used gas.

Try this endpoint in your browser 🔗

Query Parameters

Parameter
Description

data

the hash of the method signature and encoded parameters

to

the string representing the address to interact with

value

the value sent in this transaction, in hex eg. 0xff22

gas

the amount of gas provided for the transaction, in hex eg. 0x5f5e0ff

gasPrice

the gas price paid for each unit of gas, in wei

post EIP-1559, the gasPrice has to be higher than the block's baseFeePerGas

Note: The gas parameter is capped at 2x the current block gas limit.

Sample Response

Last updated