Website
Dashboard
Website
Dashboard
  • πŸ‘‰ Welcome
  • 🧐 How to set up an account
  • πŸ“ˆ Monitoring and analytics
  • πŸ” Introducing coins vs tokens
  • πŸ‘¨β€πŸ’Ό The meaning of owning crypto
  • πŸ’° Wallets
  • πŸ“œ Supported Blockchains
  • GITHUB
    • 🐘 SDK PHP
    • πŸ“ SDK Python
    • πŸ‘¨β€πŸ’» SDK GOLANG
    • ✳️ SDK NODE JS
    • ✳️ PHP Wallet
  • API REFERENCE
    • πŸ”‘ Authentication & base URL
    • Bitcoin
      • πŸ” Info
        • 🧐 Check BTC node health
        • πŸ“œ Get latest Bitcoin block
      • πŸ†Ž Block
        • πŸ“ˆ Get Bitcoin block by height
        • πŸ‘¨β€πŸ’» Get Bitcoin block by hash
        • πŸ“‘ Get transaction count in block by height
        • πŸ“‘ Get transaction count in block by hash
      • πŸ’° Transactions
        • πŸ‘¨β€πŸ’» Get Bitcoin transaction by hash
        • πŸ“ Send pre-signed raw Bitcoin transaction
      • πŸ‘¨β€πŸ’Ό Account
        • πŸ’° List BTC addresses managed by node wallet
        • πŸ†Ž Get BTC received amount for address
      • πŸ” Watch-only addresses
        • πŸ” Register an account zpub
        • πŸ“œ List registered extended public keys
        • πŸ†Ž Issue the next BTC address
        • πŸ“‘ History of issued BTC addresses
        • ❌ Delete a registered zpub
      • πŸ” JSON-RPC
        • πŸ” JSON-RPC
    • Ethereum
      • πŸ” Info
        • 🧐 Check ETH node health
        • πŸ“œ Get latest Ethereum block
      • πŸ†Ž Block
        • πŸ“ˆ Get Ethereum block by height
        • πŸ‘¨β€πŸ’» Get Ethereum block by hash
        • πŸ“‘ Get transaction count in block by height
        • πŸ“‘ Get transaction count in block by hash
      • πŸ’° Transactions
        • πŸ‘¨β€πŸ’» Get Ethereum transaction by hash
        • πŸ‘¨β€πŸ’» Get Ethereum transaction receipt by hash
        • πŸ“ Send pre-signed raw Ethereum transaction
      • πŸ‘¨β€πŸ’Ό Account
        • πŸ” List ETH accounts managed by node
        • πŸ†Ž Get ETH balance for address
        • πŸ†Ž Get transaction count (nonce) for address
        • πŸ‘‰ Estimate gas for transaction
        • πŸ“‘ Read-only contract call (eth_call)
        • πŸ‘¨β€πŸ’Ό Send transaction from node-managed account
      • πŸ” Watch-only addresses
        • πŸ” Register an account xpub
        • πŸ“œ List registered extended public keys
        • πŸ†Ž Issue the next ETH address
        • πŸ“‘ History of issued ETH addresses
        • ❌ Delete a registered xpub
      • πŸ” JSON-RPC
        • πŸ” JSON-RPC
    • Tron
      • πŸ” Info
        • πŸ“‘ Get TRX node info
        • 🧐 Check Tron node health
        • πŸͺ™ List supported TRC20 tokens
      • πŸ†Ž Block
        • πŸ“œ Get latest Tron block
        • πŸ“œ Get latest N blocks
        • 🟠 Get block by number
        • πŸ‘¨β€πŸ’» Get block by hash
      • πŸ’° Transactions
        • πŸ‘¨β€πŸ’» Get transaction by hash
        • πŸ†Ž Get all transactions for an address
        • πŸ“ Create an unsigned transaction
        • πŸ“‘ Broadcast a signed transaction
      • πŸ‘¨β€πŸ’Ό Account
        • πŸ†Ž Validate a Tron address
        • πŸ” Get account information
        • πŸ’° Get account balance
        • πŸ’° Get all asset balances
        • πŸ’΅ Get a single TRC20 balance
        • ⚠️ Create a new Tron address (deprecated)
        • ⚠️ Generate a private key from a mnemonic (deprecated)
        • ⚠️ Send TRX from one address to another (deprecated)
        • ⚠️ Send USDT (TRC20) from one address to another (deprecated)
      • πŸ“Š Schemas
      • πŸ” JSON-RPC
    • Webhooks
      • ✳️ Management
        • πŸ‘¨β€πŸ“œ List webhooks
        • 🧐 Create webhook
        • πŸ‘‰ Get webhook
        • πŸ‘¨β€πŸ” Update webhook
        • ❌ Delete webhook
        • πŸ”‘ Rotate signing secret
      • πŸ“¨ Receiving notifications

πŸ‘‰ Estimate gas for transaction

Code samples

POST /api/v1/eth/account/estimate-gas

curl -X POST 'https://settla.net/api/v1/eth/account/estimate-gas' \
  -H 'X-API-Key: $SETTLA_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "transaction": {
    "to": "0x28c6c06298d514db089934071355e5743bf21d60",
    "value": "0x1"
  }
}'

Estimates the gas required for a transaction using eth_estimateGas.

Body parameter

{
  "transaction": {
    "to": "0x28c6c06298d514db089934071355e5743bf21d60",
    "value": "0x1"
  }
}

πŸ› οΈ Parameters

NameInTypeRequiredDescription
bodybodyobjecttruenone
Β» transactionbodyobjecttrueEthereum transaction parameters used with eth_call, eth_estimateGas and eth_sendTransaction.
»» frombodystringfalseSender address.
»» tobodystring¦nullfalseRecipient address, or null for contract creation.
»» gasbodystringfalseGas limit as hex QUANTITY.
»» gasPricebodystringfalseLegacy gas price as hex QUANTITY.
»» maxFeePerGasbodystringfalseEIP-1559 max fee per gas as hex QUANTITY.
»» maxPriorityFeePerGasbodystringfalseEIP-1559 priority fee per gas as hex QUANTITY.
»» valuebodystringfalseAmount of wei to send as hex QUANTITY.
»» databodystringfalseCall data or contract deployment bytecode.
»» noncebodystringfalseNonce as hex QUANTITY.
Β» blockbodystringfalseOptional block number or tag; defaults to latest.

Example responses

200 Response

{
  "gas": "0x5208"
}

422 Response

{
  "error": "Field \"transaction\" is required and must be an object"
}

500 Response

{
  "error": "Could not connect to ETH node."
}

πŸ” Responses

StatusMeaningDescriptionSchema
200OKEstimated gas. 0x5208 (21000) is the floor for a plain ETH transfer; a contract call costs more.Inline
422Unprocessable EntityInvalid request body (missing or invalid transaction)Inline
500Internal Server ErrorNode unreachable β€” or the node refused to estimate, for example when from cannot cover value plus fees. The API collapses both cases into the same message, so check the sender's balance before assuming the node is down.Inline

πŸ”„ Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
Β» gasstringfalsenoneGas estimate as hex QUANTITY from eth_estimateGas.

Status Code 422

NameTypeRequiredRestrictionsDescription
Β» errorstringfalsenonenone

Status Code 500

NameTypeRequiredRestrictionsDescription
Β» errorstringfalsenonenone
To perform this operation, you must be authenticated by means of one of the following methods: ApiKeyAuth
Prev
πŸ†Ž Get transaction count (nonce) for address
Next
πŸ“‘ Read-only contract call (eth_call)