---
title: "Estimate the fee for a XinFin transaction"
method: POST
path: "/v3/xdc/gas"
tags: ["Fee Estimation API"]
---

# Estimate the fee for a XinFin transaction

`POST /v3/xdc/gas`

**2 credits per API call**

Get an estimated gas price and the number of gas units needed for a XinFin transaction. The gas price is obtained from [https://rpc.xinfin.network/gasPrice](https://rpc.xinfin.network/gasPrice).

**NOTE:** The estimated gas price is returned in **wei**. However, when [making the transaction itself](https://apidoc.tatum.io/tag/XinFin#operation/XdcBlockchainTransfer) and providing the custom fee, you have to provide the gas price in **Gwei**. Make sure to convert the estimated gas price from wei to Gwei before submitting your transaction.

## Request body

- XdcEstimateGas
  - `from` string, required — Sender address.
  - `to` string, required — Blockchain address to send assets
  - `amount` string, required — Amount to be sent in XDC.

## Response `200`

OK

- GasEstimated
  - `gasPrice` string, required — The estimated price for one gas unit (in wei)
  - `gasLimit` number, required — The number of the gas units needed to process the transaction at the estimated gas price

## Other responses

- `400` — Bad Request
- `401` — Unauthorized. Not valid or inactive subscription key present in the HTTP Header.
- `403` — Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.
- `500` — Internal server error. There was an error on the server during the processing of the request.

---

[API](https://skmtc.net/tatum/apis/blockchain-data.md) · [All operations](https://skmtc.net/tatum/apis/blockchain-data/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tatum/blockchain-data/versions/8622ee4b8fae/schema)
