GasTankerDocs
Gas operations

Check a wallet now

POST
/v1/gas/ensure

When the wallet is not low, returns status: healthy and no operation. When it is low, records a watch-only gas operation, alerts the organization, and returns it. If the wallet already has an active operation, that operation is returned instead of a new one.

Authorization

apiKeyAuth
headerX-API-Key<token>

Organization-owned GasTanker API key.

Header Parameters

idempotency-key*string
Length1 <= length <= 255

Request Body

application/json
  1. body
walletId*string
Length1 <= length

Response Body

Response for status 200

application/json
  1. response
id*string
organizationId*string
walletId*string
policyId*string
observedBalanceBaseUnits*string

Decimal string in the wallet network's native-asset base units (wei, lamports, stroops or MIST).

Match^(0|[1-9][0-9]*)$
requiredBaseUnits*string

Decimal string in the wallet network's native-asset base units (wei, lamports, stroops or MIST).

Match^(0|[1-9][0-9]*)$
status*string
idempotencyKey*string
createdAt*string
curl -X POST 'https://api.gastanker.xyz/v1/gas/ensure' \  -H 'idempotency-key: string' \  -H 'Content-Type: application/json' \  -d '{  "walletId": "string"}'
{  "id": "string",  "organizationId": "string",  "walletId": "string",  "policyId": "string",  "observedBalanceBaseUnits": "string",  "requiredBaseUnits": "string",  "status": "string",  "idempotencyKey": "string",  "createdAt": "string"}