Skip to main content
GET
/
v1
/
orders
/
gas
curl --request GET \
  --url 'https://mach-prod-536329393577.asia-northeast1.run.app/v1/orders/gas?chain=avalanche'
{
  "gas_estimate": 21000,
  "gas_price": 25000000000
}
This endpoint provides an estimation of gas costs for a specific blockchain. It returns the gas estimate and gas price in the chain’s native format, which can be used to calculate the total gas cost for transactions on that chain.

Query Parameters

chain
string
required
The chain identifier (e.g., “avalanche”, “ethereum”)

Response

gas_estimate
integer
Estimated gas units required for a typical transaction
gas_price
integer
Current gas price in the chain’s native format (e.g., wei)
curl --request GET \
  --url 'https://mach-prod-536329393577.asia-northeast1.run.app/v1/orders/gas?chain=avalanche'
{
  "gas_estimate": 21000,
  "gas_price": 25000000000
}

Status Codes

Status CodeDescription
200Success - Gas estimate returned successfully
422Validation Error - Invalid chain parameter
500Internal Server Error - Something went wrong on the server