Skip to main content
GET
/
api
/
v1
/
customer
/
{chain}
/
blocks
/
transaction
Get Transaction by Block
curl --request GET \
  --url https://api-gateway.sonarx.com/api/v1/customer/{chain}/blocks/transaction \
  --header 'apikey: <api-key>'
{
"block_number": 81911103,
"timestamp": 1768942178,
"datetime": "2026-01-20T20:49:38",
"transaction_hash": "0x0063079708b5fab44762765a01c17ab2754ebc15cb9ecd0e14fcbbd520452c27",
"transaction_index": 80,
"version": 0,
"from_address": "0xb63c1246a11edc1e784c39ab95295e4180c5071b",
"to_address": "0x9ead30c8518a19f0b493eea1bd5af8fcc5fd4ba2",
"value": 1e-7,
"usd_value": 1.30889e-8,
"price": 0.130889,
"transaction_fee": 0.000762618316404,
"usd_transaction_fee": 0.00009981834881580316,
"gas_price": 3.6315157924e-8,
"gas_price_gwei": 36.315157924,
"effective_gas_price": 3.6315157924e-8,
"effective_gas_price_gwei": 36.315157924,
"max_fee_per_gas": null,
"max_fee_per_gas_gwei": null,
"max_priority_fee_per_gas": null,
"max_priority_fee_per_gas_gwei": null,
"gas_limit": 21200,
"gas_used": 21000,
"gas_used_pct": 0.9905660377358491,
"cumulative_gas_used": 9824334,
"input": "0x",
"transaction_type": 0,
"contract_address": null,
"status": true,
"source_value": "100000000000",
"source_gas_price": "36315157924",
"source_effective_gas_price": "36315157924",
"source_max_fee_per_gas": null,
"source_max_priority_fee_per_gas": null
}

Authorizations

apikey
string
header
required

API key for authentication

Path Parameters

chain
enum<string>
required

The blockchain network to query

Available options:
polygon
Example:

"polygon"

Query Parameters

block_number
integer
required

Block number to query (>= 0)

Required range: x >= 0
Example:

81901165

transaction_index
integer
required

Transaction position in block (0-indexed)

Required range: x >= 0
Example:

0

Response

Transaction data

block_number
integer

Block number containing this transaction

timestamp
integer

Unix timestamp of the block

datetime
string<date-time>

ISO 8601 formatted datetime

transaction_hash
string

Hash of the transaction

transaction_index
integer

Position of the transaction in the block

version
integer

Transaction version

from_address
string

Sender address

to_address
string | null

Recipient address

value
number

Value transferred in native token

usd_value
number

USD value of the transfer

price
number

Native token price in USD

transaction_fee
number

Transaction fee in native token

usd_transaction_fee
number

Transaction fee in USD

gas_price
number

Gas price in native token

gas_price_gwei
number

Gas price in Gwei

effective_gas_price
number

Effective gas price

effective_gas_price_gwei
number

Effective gas price in Gwei

max_fee_per_gas
number | null

Maximum fee per gas (EIP-1559)

max_fee_per_gas_gwei
number | null
max_priority_fee_per_gas
number | null

Maximum priority fee (EIP-1559)

max_priority_fee_per_gas_gwei
number | null
gas_limit
integer

Maximum gas allowed

gas_used
integer

Actual gas used

gas_used_pct
number

Percentage of gas limit used

cumulative_gas_used
integer

Total gas used up to this transaction

input
string

Transaction input data

transaction_type
integer

Transaction type (0=legacy, 1=access list, 2=EIP-1559)

contract_address
string | null

Contract address created

status
boolean

Transaction success status

source_value
string

Raw value in wei

source_gas_price
string
source_effective_gas_price
string
source_max_fee_per_gas
string | null
source_max_priority_fee_per_gas
string | null