Create Gas Station

Use Case

Provisions a new gas station for a chain/network with an optional auto-refill source.

Create Gas Station

Request Body
1
namestringRequired

Display name for the gas station (2-100 characters). Shown in dashboards and audit logs.

2
chainstringRequired

Blockchain the gas station sponsors fees on (e.g., `ethereum`, `tron`).

3
networkstringRequired

Network within the chain (e.g., `mainnet`, `sepolia`).

4
thresholdstringRequired

Low-balance alert threshold (numeric, > 0) in the native asset. Crossing it flips `health_status` from `healthy` to `low`.

5
auto_refill_enabledboolean

Turn on automatic top-ups from `refill_from_wallet_id` whenever the balance falls below `threshold`.

6
refill_amountstring

Amount of native asset (numeric, > 0) to move on each auto-refill.

7
refill_from_wallet_iduuid

Source treasury wallet that funds auto-refills. Required when `auto_refill_enabled = true`.

8
gas_strategystring

How Bitnob prices fees when sponsoring transactions from this station (e.g., `medium`, `aggressive`). Leave empty for the default strategy.

Example Payload

Create Gas Station Response
1
idstring (uuid)

Unique identifier for the gas station. Use it for refills, configuration changes, and Tron staking endpoints.

2
namestring

Display name as supplied on creation.

3
chainstring

Blockchain the gas station operates on.

4
networkstring

Network within the chain.

5
symbolstring

Native asset symbol used for sponsorship (e.g., `ETH`, `TRX`).

6
addressstring

On-chain address the gas station signs from when topping up customer wallets.

7
balancestring

Current native-asset balance held by the station.

8
balance_usdstring

USD equivalent of `balance` at the latest exchange rate.

9
thresholdstring

Configured low-balance threshold. Once balance dips below this, `health_status` flips to `low`.

10
threshold_percentinteger

Computed `(balance / threshold) * 100`. Useful as a single number for dashboards.

11
health_statusstring

`healthy` when balance ≥ threshold; `low` when it's dropped beneath. Drive alerts off this.

12
auto_refill_enabledboolean

Whether auto-refill is currently active.

13
refill_amountstring

How much native asset auto-refill will move on each top-up.

14
refill_from_wallet_idstring (uuid)

Source treasury wallet that funds auto-refills.

15
gas_strategystring

Gas pricing strategy this station uses when sponsoring transactions.

16
statusstring

`active` (sponsoring) or `inactive` (paused). `active` immediately after creation.

17
created_atstring (RFC3339)

When the gas station was created.

18
updated_atstring (RFC3339)

Timestamp of the most recent configuration update.

19
energy_limitinteger

Total energy units available from TRX staked for energy. Tron only.

20
energy_usedinteger

Energy consumed in the current cycle. Tron only.

21
energy_remaininginteger

Energy still available to spend in the current cycle. Tron only.

22
bandwidth_limitinteger

Total bandwidth points available from TRX staked for bandwidth. Tron only.

23
bandwidth_usedinteger

Bandwidth consumed in the current cycle. Tron only.

24
bandwidth_remaininginteger

Bandwidth still available to spend in the current cycle. Tron only.

25
staked_for_energystring

TRX currently staked for energy. Tron only.

26
staked_for_bandwidthstring

TRX currently staked for bandwidth. Tron only.

Create Gas Station Response

List Gas Stations

Use Case

Lists gas stations in the organization.

List Gas Stations

Query Parameters
1
limitinteger

Page size. Default 20, max 100.

2
offsetinteger

Number of items to skip. Default 0. Pair with `limit` for cursor-style paging.

3
chainstring

Filter by blockchain (e.g., `ethereum`, `tron`). Useful when you run gas stations on several chains.

4
statusstring

`active` (sponsoring) or `inactive` (paused).

Query

List Gas Stations Response
Same shape as Create Gas Station Response

Each entry in data[] uses the same GasStationResponse object as Create Gas Station Response. Refer there for the per-field explanations. The meta envelope below carries pagination state (total, limit, offset, has_more).

List Gas Stations Response

Get Gas Station

Use Case

Retrieves a single gas station by ID.

Get Gas Station

Get Gas Station Response
Same shape as Create Gas Station Response

data is the same GasStationResponse object returned by Create Gas Station Response. Refer there for the per-field explanations.

Get Gas Station Response

Configure Gas Station

Use Case

Updates the gas station's configuration (name, threshold, auto-refill, gas strategy, status).

Configure Gas Station

Request Body
1
namestring

Updated display name (2-100 characters).

2
thresholdstring

New low-balance alert threshold (numeric, > 0).

3
auto_refill_enabledboolean

Turn auto-refill on or off.

4
refill_amountstring

Updated per-refill amount (numeric, > 0).

5
refill_from_wallet_iduuid

Swap the source treasury wallet that funds auto-refills.

6
gas_strategystring

Updated gas pricing strategy used when sponsoring transactions.

7
statusstring

Set to `active` to resume sponsoring; `inactive` to pause.

Example Payload

Configure Gas Station Response
Same shape as Create Gas Station Response

data is the same GasStationResponse object returned by Create Gas Station Response. Refer there for the per-field explanations. The fields you supplied in the request body are reflected back along with a fresh updated_at timestamp.

Configure Gas Station Response

Delete Gas Station

Use Case

Removes a gas station.

Response: 204 No Content — empty body.

Delete Gas Station

Refill Gas Station

Use Case

Transfers native tokens from a source wallet to the gas station.

Refill Gas Station

Request Body
1
source_wallet_iduuidRequired

Wallet to transfer from.

2
amountstringRequired

Amount (numeric, > 0).

3
idempotency_keystringRequired

1-64 characters.

Example Payload

Stats, Refill & Usage History

Use Case

Aggregate stats across all gas stations, plus paginated refill and usage history. The two history endpoints share the same query parameters.

Stats & History

Stats Response
1
total_balancestring

Sum of every gas station's native balance, in their own unit. Mixed-asset orgs should treat this as informational.

2
total_balance_usdstring

USD-normalised total balance across all stations. Use this for a single dashboard number.

3
active_stationsinteger

Count of gas stations with `status: "active"`.

4
low_balance_alertsinteger

Number of stations currently below their `threshold` (i.e., `health_status: "low"`). Drive ops alerts off this.

5
today_transactionsinteger

Number of sponsored / refill transactions executed today across all stations.

Stats Response

History Query Parameters

Used by both GET /gasstations/refill-history and GET /gasstations/usage-history.

1
limitinteger

Page size. Default 20, max 100.

2
offsetinteger

Number of items to skip. Default 0.

3
station_iduuid

Narrow to a single gas station.

4
chainstring

Filter by blockchain (e.g., `ethereum`, `tron`).

5
statusstring

Filter by transaction status (e.g., `completed`, `failed`).

6
date_fromstring (RFC3339)

Custom range start. Pair with `date_to` to scope to a precise window.

7
date_tostring (RFC3339)

Custom range end.

8
periodstring

Preset window: `today`, `week`, `month`, or `all`. Quicker than supplying date bounds for common ranges.

History Query
Did you find this page useful?