Gas Manager Admin API Endpoints

The Gas Manager Admin API endpoints allows you to programmatically create, update and manage gas policies.

What is the Gas Manager Admin API?

The Gas Manager Admin API is a REST API with endpoints that allow you to programmatically create, update and manage gas policies. Programmatically managing gas policies is for "power" users with complex use cases who need to manage this process dynamically through code instead of incrementally in the Alchemy Dashboard.

How to Use the Gas Manager Admin API to Create a Policy

To use Gas Manager Admin API, follow these steps:

  1. Create an Alchemy app: to create gas policies, you first need to create an Alchemy app through your Alchemy Dashboard.
  2. Create access keys for your account: To call Gas Manager Admin APIs, an authorization header is required in all the requests. This auth header should be your access key. Follow this guide for creating access keys.
  3. Create the policy: Next, make a request to the Create Policy endpoint with your policy rules.

Methods

MethodDescription
Create PolicyCreates a new gas manager policy with the specified rules. Returns the policy id of a successfully created policy.
Get PolicyReturns policy information by id.
Delete PolicyDeletes a policy by id.
Replace PolicyAccepts a rules object and replaces all rules in an existing policy by id.
Get All PoliciesAccepts an app id and returns all policies under that app.
Update Policy StatusModifies the status of a policy to either "active" or "inactive".
Get Policy StatsReturns stats about a policy specified by ID, including signatures mined, signatures expired, signatures pending, USD mined, and USD pending.
Get SponsorshipsReturns a list of sponsorships associated with the specified policy ID. The results are paginated.
ReadMe