Skip to main content
POST
/
public
/
v1
/
query
/
get_gas_usage

Authorizations

X-Stamp
string
required
Cryptographically signed (stamped) request to be passed in as a header. For more info, see here.

Body

organizationId
string
required
Unique identifier for a given Organization.

Response

A successful response returns the following fields:
windowDurationMinutes
number
required
The window duration (in minutes) for the organization or sub-organization.
windowLimitUsd
string
required
The window limit (in USD) for the organization or sub-organization.
usageUsd
string
required
The total gas usage (in USD) of all sponsored transactions processed over the last window_duration_minutes
curl --request POST \
  --url https://api.turnkey.com/public/v1/query/get_gas_usage \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header "X-Stamp: <string> (see Authorizations)" \
  --data '{
    "organizationId": "<string>"
}'
{
  "windowDurationMinutes": "<number>",
  "windowLimitUsd": "<string>",
  "usageUsd": "<string>"
}