Skip to main content
POST
/
api
/
v1
/
transactions
/
estimate-gas
Estimate gas
curl --request POST \
  --url https://api.example.com/api/v1/transactions/estimate-gas \
  --header 'Content-Type: application/json' \
  --data '
{
  "chainId": 8453,
  "from": "0xabc1230000000000000000000000000000000000",
  "to": "0xdef4560000000000000000000000000000000000",
  "amount": "0.1"
}
'
{
  "code": 0,
  "msg": "ok",
  "data": {
    "chainId": 8453,
    "gasLimit": 21000,
    "gasPriceGwei": 1.2,
    "estimatedFeeNative": 0.0000252,
    "estimatedFeeUsd": 0.09,
    "confidence": "high",
    "updatedAt": "2026-05-11T10:00:00.000Z"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.nexfi.robert.dpdns.org/llms.txt

Use this file to discover all available pages before exploring further.

Body

application/json

Gas estimation request body.

chainId
integer
required

Chain ID.

Example:

8453

from
string
required

Sender address.

Example:

"0xabc1230000000000000000000000000000000000"

to
string
required

Recipient address.

Example:

"0xdef4560000000000000000000000000000000000"

amount
string
required

Transfer amount as a decimal string.

Example:

"0.1"

tokenAddress
string

Token contract address. Omit or leave empty for native transfers.

Example:

"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"

Response

200 - application/json

Gas estimate response

Standard response envelope.

code
integer
required

Business status code. 0 means success.

Example:

0

msg
string
required

Human-readable message.

Example:

"ok"

data
object

Gas estimation result.