---
title: "Precalculate gas pump addresses"
method: POST
path: "/v3/gas-pump"
tags: ["Gas pump"]
---

# Precalculate gas pump addresses

`POST /v3/gas-pump`

## Request

- Base URL: `https://api.tatum.io`
- URL: `https://api.tatum.io/v3/gas-pump`
- Auth: API key in header `x-api-key`

/v3/gas-pump

**2 credits per API call**

Precalculate (generate) gas pump addresses that you can assign to the customers of your custodial application.

This API does not make any changes on the blockchain itself, just generates addresses that follow the blockchain's requirements for the address format; therefore, no gas fee is applied.

This API is supported for the following blockchains:

*   BNB Smart Chain
*   Celo
*   Ethereum
*   Harmony
*   Klaytn
*   Polygon
*   TRON

**Address index**  
Each address should be associated with its own index. Use the `from` and `to` request body parameters to set a range of index values for the addresses to precalculate. You can start with any number, but we recommend that you start from 0.

In one API call, you can precalculate:

*   Up to 4,000 addresses for Harmony
*   Up to 500 addresses for TRON
*   Up to 5,000 addresses for the other supported blockchains

If you need more addresses than one API call can precalculate, make several API calls. For example, if you need 10,000 addresses on Ethereum, make an API call with an index range from 0 through 4,999 and then make another API call with an index range from 5,000 through 9,999.

The order in which the precalculated addresses are returned in the API response is the order of the values in the index range, and the index values are assigned to the addresses accordingly.  
For example, you precalculated three gas pump addresses with a range of index values from 3 to 5. The first address in the returned arrray is assigned the index value "3", the second one - "4", and the third one - "5".

\[
  "0x8cb76aed9c5e336ef961265c6079c14e9cd3d2ea", // index is 3
  "0x5c6079c14e9cd3d2ea8cb76aed9c5e336ef96126", // index is 4
  "0xc5e336ef9612614e9cd3d2ea8cb76aed95c6079c"  // index is 5
\]

**The owner of the gas pump addresses**  
The owner (also referred to as "master address") is the blockchain address that will own the precalculated gas pump addresses. The owner will also be paying gas fees for operations made on the gas pump addresses. You have to make sure that the owner always has enough funds to cover these gas fees.

**Activated and not activated addresses**  
The precalculated addresses can be immediately assigned to customers and can **receive** funds. However, they cannot be used to **send** funds to other addresses. This is because the addresses are not activated. To make the addresses be able to send funds, [activate them](https://docs.tatum.io/reference/activategaspumpaddresses).

## Request body

- CreateGasPump
  - `chain` 'BSC' | 'CELO' | 'ETH' | 'MATIC' | 'KLAY' | 'ONE' | 'TRON', required: The blockchain to work with
  - `owner` string, required: The blockchain address that will own the precalculated gas pump addresses and will be used to pay gas fees for operations made on the gas pump addresses; can be referred to as "master address"
  - `from` integer, required: The start index of the range of gas pump addresses to precalculate
  - `to` integer, required: The end index of the range of gas pump addresses to precalculate; must be greater than or equal to the value in the <code>from</code> parameter

## Response `200`

OK

- GasPumpAddress[]

## 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 perform the 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.dev/tatum/apis/smart-contracts.md) - [All operations](https://skmtc.dev/tatum/apis/smart-contracts/llms.txt) - [OpenAPI document](https://skmtc.dev/tatum/apis/smart-contracts/revisions/c0146043bb37?raw)
