Skip to main content
POST
/
sdk
/
{environmentId}
/
chains
/
{chainName}
/
transactions
/
estimate
Estimate transaction fees
curl --request POST \
  --url https://app.dynamicauth.com/api/v0/sdk/{environmentId}/chains/{chainName}/transactions/estimate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "base64RawTransaction": "<string>",
  "fromAddress": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
  "rawTransactionData": "<string>"
}
'
{
  "estimatedFee": "<string>",
  "currency": "<string>",
  "decimals": 123,
  "units": "<string>",
  "unitPrice": "<string>",
  "baseFee": "<string>",
  "priorityFee": "<string>",
  "maxFee": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

environmentId
string
required

ID of the environment

Required string length: 36
Pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
Example:

"95b11417-f18f-457f-8804-68e361f9164f"

chainName
enum<string>
required
Available options:
ETH,
EVM,
FLOW,
SOL,
ALGO,
STARK,
COSMOS,
BTC,
ECLIPSE,
SUI,
SPARK,
TRON,
APTOS,
TON,
STELLAR,
ALEO,
TEMPO,
MIDNIGHT

Body

application/json

Raw transaction to estimate

base64RawTransaction
string
deprecated

Deprecated — use rawTransactionData instead. The base64-encoded raw transaction to estimate gas fees for.

Pattern: ^[A-Za-z0-9+/]*={0,2}$
fromAddress
string

Valid blockchain wallet address, must be an alphanumeric string without any special characters

Maximum string length: 255
Pattern: ^[A-Za-z0-9]{18,100}$
Example:

"0xbF394748301603f18d953C90F0b087CBEC0E1834"

rawTransactionData
string

The raw transaction data to estimate gas fees for. For BTC, the PSBT string. For EVM, the transaction data in JSON format with properties: { to, data, value }. For Solana, the base64-encoded transaction data. For Sui, the base64-encoded transaction data.

Response

Transaction fee estimate returned successfully

estimatedFee
string
required

Total estimated fee in the smallest unit of the native currency

currency
string
required

Native currency symbol (ETH, SOL, BTC, SUI, etc.)

decimals
integer

Number of decimals for the native currency

units
string

Estimated units of compute/space required (gas, compute units, vBytes, etc.)

unitPrice
string

Price per unit in the smallest denomination

baseFee
string

Base fee component

priorityFee
string

Priority/tip fee component

maxFee
string

Maximum possible fee (for chains with variable pricing)