mygas.one API reference · v0.1 preview
Change log
Changes to the public API, newest first. Dates are in UTC. Items under Planned follow the roadmap and may change.
2026-11-02
- Published the v0.1 preview of this reference.
- Added Season 0 points:
GET /v1/points/{address},GET /v1/points/{address}/breakdown,GET /v1/seasons,GET /v1/grades. - Added the list of 50 Season 0 networks:
GET /v1/networks,GET /v1/networks/{network}. - Added current gas and the 24-hour forecast:
GET /v1/gas/{network},GET /v1/gas/{network}/forecast. - Added wallet sign-in (EIP-4361) and linking of wallets from other ecosystems.
- Added WebSocket channels
gas.{network}andforecast.{network}.
Planned
Q1 2027 · API v1
- API v1 is released with the app. Preview endpoints become stable.
- Batching (EIP-7702), Limit send and Refuel endpoints become callable.
- Private WebSocket channels
points,limitSendandrefuel.
Q2 2027 · Markets on testnet
- Whole block and inclusion preconf markets on the Ethereum Hoodi testnet.
- Validator registration and collateral endpoints for the Commit-Boost module.
Q3 2027 · Markets on mainnet
- Whole block futures and inclusion preconfirmations on Ethereum mainnet.
- Bundle submission, realtime RPC beta and x402 agentic payments beta.
Q4 2027 · Institutional
- Endpoints for verified counterparties and private order flow with audit trails.
curl -s "https://api.mygas.one/v1/points/0x5eF3a9c2B71d40E8a6F1c9D2b84E7A0c3F96d21B" \
-H "X-GWEI-KEY: $GW_KEY"import os
import requests
r = requests.get(
"https://api.mygas.one/v1/points/0x5eF3a9c2B71d40E8a6F1c9D2b84E7A0c3F96d21B",
headers={"X-GWEI-KEY": os.environ["GW_KEY"]},
timeout=10,
)
print(r.json()["data"])const res = await fetch("https://api.mygas.one/v1/points/0x5eF3a9c2B71d40E8a6F1c9D2b84E7A0c3F96d21B", {
headers: {
"X-GWEI-KEY": process.env.GW_KEY,
},
});
const { data } = await res.json();
console.log(data);{
"success": true,
"data": {
"address": "0x5eF3a9c2B71d40E8a6F1c9D2b84E7A0c3F96d21B",
"season": 0,
"final": false,
"snapshot": "2026-12-15T00:00:00Z",
"networks": 13,
"transactions": 436,
"gasUsd": "435.36",
"basePoints": 43536,
"txPoints": 2180,
"spreadMultiplier": "1.36",
"ageMultiplier": "1.10",
"firstFeeYear": 2023,
"points": 68391,
"grade": "RON 98",
"nextGrade": {"grade": "RON 100", "pointsNeeded": 181609}
},
"ts": 1793615460000
}Introduction
Environments, rate limits, authentication and conventions of the mygas.one API.
Overview
The mygas.one API returns Season 0 gas points for any wallet on 50 networks, plus current and forecast gas prices. Endpoints for batching, Limit send and Refuel open with the app in Q1 2027. Endpoints for blockspace and preconfirmation markets open with the markets, starting on the Hoodi testnet in Q2 2027.
Each endpoint has a status:
- Preview callable in the v0.1 preview. Breaking changes are announced in the change log before they take effect.
- Planned documented for integration planning. Not callable yet. The specification may change.
All base URLs use HTTPS. Request and response bodies are UTF-8 JSON. The language tabs above the code panel switch samples between Shell, Python and JavaScript.
export GW_KEY="gk_live_your_key_here"
curl -s "https://api.mygas.one/v1/networks" -H "X-GWEI-KEY: $GW_KEY"import os, requests
r = requests.get(
"https://api.mygas.one/v1/networks",
headers={"X-GWEI-KEY": os.environ["GW_KEY"]},
timeout=10,
)
print(len(r.json()["data"]), "networks")const res = await fetch("https://api.mygas.one/v1/networks", {
headers: { "X-GWEI-KEY": process.env.GW_KEY },
});
const { data } = await res.json();
console.log(data.length, "networks");Environments
Use testnet during development. Testnet points come from a fixed test dataset. Market endpoints on testnet will use the Ethereum Hoodi testnet.
| Environment | REST | WebSocket | Realtime RPC |
|---|---|---|---|
| Mainnet | https://api.mygas.one | wss://ws.mygas.one/v1 | https://rpc.mygas.one/realtime/{network} Planned |
| Testnet | https://api.testnet.mygas.one | wss://ws.testnet.mygas.one/v1 | https://rpc.testnet.mygas.one/realtime/{network} Planned |
Rate limits
Limits apply per API key, or per IP address for anonymous calls. Each response includes the X-RateLimit-Limit and X-RateLimit-Remaining headers. Over the limit, the API returns 429 with error code 1300 and a Retry-After header in seconds.
| Caller | Requests | Daily cap | WebSocket |
|---|---|---|---|
| Anonymous | 1 per second, /v1/points and /v1/networks only | 2,000 | Not available |
| API key | 10 per second | 50,000 | 5 connections, 50 subscriptions each |
| Signed-in wallet | 20 per second on private endpoints | Unlimited within fair use | Private channels on the same connection |
{
"success": false,
"data": null,
"error": {"code": 1300, "message": "Rate limit reached. Retry in 2 seconds."},
"ts": 1793615460000
}Connecting to mygas.one
The API uses two authentication methods: an API key for public data and wallet sign-in for private endpoints. Most integrations use both.
API key
Public endpoints (networks, gas, points for any address) accept calls without a key at the anonymous rate limit. An API key in the X-GWEI-KEY header raises the limit. During the preview, keys are issued through the support chat on this site. Store keys on your server. Do not include them in browser bundles or mobile apps.
Wallet sign-in
Private endpoints act for a wallet owner: linking wallets, setting a payout address, managing Limit send orders. They use Sign-In with Ethereum (EIP-4361). Request a nonce, sign the returned message with the wallet and exchange the signature for an access token. Send the token in the header Authorization: Bearer <token>.
- Access tokens expire after 15 minutes, refresh tokens after 30 days.
- A refresh returns a new pair of tokens and revokes the old refresh token.
- Sign-in does not send a transaction and costs no gas.
Conventions
- Amounts are decimal strings to preserve precision, for example
"435.36". - Times are ISO 8601 in UTC. The envelope field
tsis in Unix milliseconds. - EVM addresses are accepted in any case and returned checksummed.
- Networks are referenced by slug, such as
eth,baseorsol. See Network slugs.
REST API
REST endpoints under /v1, grouped by product.
Response structure
All responses use the same envelope.
| Field | Type | Description |
|---|---|---|
success | boolean | true if the request succeeded. |
data | object, array or null | Response payload. null on errors. |
error | object | Only on errors: code (see Error codes) and a human-readable message. |
page | object | On list endpoints: cursor for the next page (or null) and count. |
ts | number | Server time in Unix milliseconds. |
Check both the HTTP status and success. A 200 response always has success: true. Any other status includes an error object.
{
"success": true,
"data": {"network": "eth", "baseFee": "0.412"},
"ts": 1793615460000
}{
"success": false,
"data": null,
"error": {"code": 1102, "message": "Address 0x12 is not a valid EVM address."},
"ts": 1793615460000
}Integration guide
Typical integration steps. Steps 6 and 7 use planned endpoints.
- Get an API key. Request a key through the support chat and store it on your server as
GW_KEY. - Read public data. List networks, read current gas and the forecast, and look up Season 0 points for any address.
- Sign users in. Use the EIP-4361 flow to get a bearer token for the wallet owner.
- Link wallets. Let users link wallets from other ecosystems. Points from all linked wallets add up in one receipt.
- Use the WebSocket. Subscribe to
gas.{network}to receive updates without polling. - Add saving tools. After API v1 is released, quote and submit batches, queue Limit send orders and refuel wallets.
- Trade blockspace. When markets open, test on Hoodi, then switch the base URL to mainnet.
Authentication
Private endpoints use EIP-4361 sign-in. The nonce endpoint also issues the message for linking additional wallets.
Get a nonce
Preview/v1/auth/nonceReturns a one-time nonce and the message for the wallet to sign. With purpose: "link", the message links an additional wallet to the signed-in account.
Auth None
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
addressbody | string | Yes | Address that signs the message. |
purposebody | string | No | signin (default) or link. |
curl -s -X POST "https://api.mygas.one/v1/auth/nonce" \
-H "Content-Type: application/json" \
-d '{
"address": "0x5eF3a9c2B71d40E8a6F1c9D2b84E7A0c3F96d21B",
"purpose": "signin"
}'import requests
r = requests.post(
"https://api.mygas.one/v1/auth/nonce",
json={
"address": "0x5eF3a9c2B71d40E8a6F1c9D2b84E7A0c3F96d21B",
"purpose": "signin",
},
timeout=10,
)
print(r.json()["data"])const res = await fetch("https://api.mygas.one/v1/auth/nonce", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
address: "0x5eF3a9c2B71d40E8a6F1c9D2b84E7A0c3F96d21B",
purpose: "signin",
}),
});
const { data } = await res.json();
console.log(data);{
"success": true,
"data": {
"nonce": "8hK2pQx7Lm4vT9sA",
"expiresAt": "2026-11-02T10:41:00Z",
"message": "mygas.one wants you to sign in with your Ethereum account:\n0x5eF3a9c2B71d40E8a6F1c9D2b84E7A0c3F96d21B\n\nSign in to mygas.one. This request does not trigger a transaction or cost any gas.\n\nURI: https://mygas.one\nVersion: 1\nChain ID: 1\nNonce: 8hK2pQx7Lm4vT9sA\nIssued At: 2026-11-02T10:31:00Z\nExpiration Time: 2026-11-02T10:41:00Z"
},
"ts": 1793615460000
}Verify the signature
Preview/v1/auth/verifyVerifies the signed message. Returns an access token for the Authorization header and a refresh token.
Auth None
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
messagebody | string | Yes | The message from /v1/auth/nonce, unchanged. |
signaturebody | string | Yes | EIP-191 signature of the message. |
curl -s -X POST "https://api.mygas.one/v1/auth/verify" \
-H "Content-Type: application/json" \
-d '{
"message": "mygas.one wants you to sign in with your Ethereum account:\n0x5eF3a9c2B71d40E8a6F1c9D2b84E7A0c3F96d21B\n\nSign in to mygas.one. This request does not trigger a transaction or cost any gas.\n\nURI: https://mygas.one\nVersion: 1\nChain ID: 1\nNonce: 8hK2pQx7Lm4vT9sA\nIssued At: 2026-11-02T10:31:00Z\nExpiration Time: 2026-11-02T10:41:00Z",
"signature": "0xa4c123b1612dd272d1371c17149d439536b3216fdaeeb975729fae923d5a4fd12aabfe228f219e9cb0eb53f16947ccf25ec84d8dbc74254770f58904dba41ecccc"
}'import requests
r = requests.post(
"https://api.mygas.one/v1/auth/verify",
json={
"message": "mygas.one wants you to sign in with your Ethereum account:\n0x5eF3a9c2B71d40E8a6F1c9D2b84E7A0c3F96d21B\n\nSign in to mygas.one. This request does not trigger a transaction or cost any gas.\n\nURI: https://mygas.one\nVersion: 1\nChain ID: 1\nNonce: 8hK2pQx7Lm4vT9sA\nIssued At: 2026-11-02T10:31:00Z\nExpiration Time: 2026-11-02T10:41:00Z",
"signature": "0xa4c123b1612dd272d1371c17149d439536b3216fdaeeb975729fae923d5a4fd12aabfe228f219e9cb0eb53f16947ccf25ec84d8dbc74254770f58904dba41ecccc",
},
timeout=10,
)
print(r.json()["data"])const res = await fetch("https://api.mygas.one/v1/auth/verify", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
message: "mygas.one wants you to sign in with your Ethereum account:\n0x5eF3a9c2B71d40E8a6F1c9D2b84E7A0c3F96d21B\n\nSign in to mygas.one. This request does not trigger a transaction or cost any gas.\n\nURI: https://mygas.one\nVersion: 1\nChain ID: 1\nNonce: 8hK2pQx7Lm4vT9sA\nIssued At: 2026-11-02T10:31:00Z\nExpiration Time: 2026-11-02T10:41:00Z",
signature: "0xa4c123b1612dd272d1371c17149d439536b3216fdaeeb975729fae923d5a4fd12aabfe228f219e9cb0eb53f16947ccf25ec84d8dbc74254770f58904dba41ecccc",
}),
});
const { data } = await res.json();
console.log(data);{
"success": true,
"data": {
"accessToken": "eyJhbGciOiJFUzI1NiJ9.eyJzdWIiOiJ1c3JfM2M5ZjFhN2UifQ.k3v9",
"refreshToken": "rt_5mQ9xW2pL8zR4tB7",
"expiresIn": 900,
"userId": "usr_3c9f1a7e"
},
"ts": 1793615460000
}Refresh tokens
Preview/v1/auth/refreshExchanges a refresh token for a new access token and refresh token. The old refresh token is revoked immediately.
Auth None
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
refreshTokenbody | string | Yes | Current refresh token. |
curl -s -X POST "https://api.mygas.one/v1/auth/refresh" \
-H "Content-Type: application/json" \
-d '{
"refreshToken": "rt_5mQ9xW2pL8zR4tB7"
}'import requests
r = requests.post(
"https://api.mygas.one/v1/auth/refresh",
json={
"refreshToken": "rt_5mQ9xW2pL8zR4tB7",
},
timeout=10,
)
print(r.json()["data"])const res = await fetch("https://api.mygas.one/v1/auth/refresh", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
refreshToken: "rt_5mQ9xW2pL8zR4tB7",
}),
});
const { data } = await res.json();
console.log(data);{
"success": true,
"data": {
"accessToken": "eyJhbGciOiJFUzI1NiJ9.eyJzdWIiOiJ1c3JfM2M5ZjFhN2UifQ.p8d2",
"refreshToken": "rt_9cT4nV1kH6sY3wQ2",
"expiresIn": 900
},
"ts": 1793615460000
}Sign out
Preview/v1/auth/logoutRevokes the refresh token and all access tokens issued with it.
Auth Bearer token (wallet sign-in)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
refreshTokenbody | string | Yes | Refresh token to revoke. |
curl -s -X POST "https://api.mygas.one/v1/auth/logout" \
-H "Authorization: Bearer $GW_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"refreshToken": "rt_9cT4nV1kH6sY3wQ2"
}'import os
import requests
r = requests.post(
"https://api.mygas.one/v1/auth/logout",
headers={"Authorization": f"Bearer {os.environ['GW_TOKEN']}"},
json={
"refreshToken": "rt_9cT4nV1kH6sY3wQ2",
},
timeout=10,
)
print(r.json()["data"])const res = await fetch("https://api.mygas.one/v1/auth/logout", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.GW_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
refreshToken: "rt_9cT4nV1kH6sY3wQ2",
}),
});
const { data } = await res.json();
console.log(data);{
"success": true,
"data": {"signedOut": true},
"ts": 1793615460000
}Networks
The 50 networks counted in Season 0 and the tools available on each. Other endpoints take the network slug.
List networks
Preview/v1/networksReturns all supported networks, optionally filtered by group. The example response shows three items.
Auth API key
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
groupquery | string | No | l1, l2 or nx (non-EVM). |
cursorquery | string | No | Cursor from the previous page. |
curl -s "https://api.mygas.one/v1/networks" \
-H "X-GWEI-KEY: $GW_KEY"import os
import requests
r = requests.get(
"https://api.mygas.one/v1/networks",
headers={"X-GWEI-KEY": os.environ["GW_KEY"]},
timeout=10,
)
print(r.json()["data"])const res = await fetch("https://api.mygas.one/v1/networks", {
headers: {
"X-GWEI-KEY": process.env.GW_KEY,
},
});
const { data } = await res.json();
console.log(data);{
"success": true,
"data": [
{
"id": "eth",
"name": "Ethereum",
"group": "l1",
"vm": "evm",
"native": "ETH",
"feeUnit": "gwei",
"season0": true,
"tools": {"radar": true, "batching": true, "limitSend": true, "refuel": true}
},
{
"id": "base",
"name": "Base",
"group": "l2",
"vm": "evm",
"native": "ETH",
"feeUnit": "gwei",
"season0": true,
"tools": {"radar": true, "batching": true, "limitSend": true, "refuel": true}
},
{
"id": "sol",
"name": "Solana",
"group": "nx",
"vm": "svm",
"native": "SOL",
"feeUnit": "microlamports/cu",
"season0": true,
"tools": {"radar": true, "batching": false, "limitSend": false, "refuel": true}
}
],
"page": {"cursor": "bmV0OjM", "count": 50},
"ts": 1793615460000
}Get a network
Preview/v1/networks/{network}Returns one network with its address format and the start of fee counting.
Auth API key
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
networkpath | string | Yes | Network slug. |
curl -s "https://api.mygas.one/v1/networks/base" \
-H "X-GWEI-KEY: $GW_KEY"import os
import requests
r = requests.get(
"https://api.mygas.one/v1/networks/base",
headers={"X-GWEI-KEY": os.environ["GW_KEY"]},
timeout=10,
)
print(r.json()["data"])const res = await fetch("https://api.mygas.one/v1/networks/base", {
headers: {
"X-GWEI-KEY": process.env.GW_KEY,
},
});
const { data } = await res.json();
console.log(data);{
"success": true,
"data": {
"id": "base",
"name": "Base",
"group": "l2",
"vm": "evm",
"native": "ETH",
"feeUnit": "gwei",
"addressFormat": "0x followed by 40 hex characters",
"season0": {"counted": true, "countedFrom": "genesis", "failedTxCount": true},
"tools": {"radar": true, "batching": true, "limitSend": true, "refuel": true}
},
"ts": 1793615460000
}Gas
Current fees and a 24-hour forecast for each network. EVM fees are in gwei. Other networks use their native unit, given in the unit field: microlamports per compute unit on Solana, sat/vB on Bitcoin.
Current gas
Preview/v1/gas/{network}Returns the latest base fee, three priority fee tiers and the USD cost of a plain transfer at each tier.
Auth API key
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
networkpath | string | Yes | Network slug. |
curl -s "https://api.mygas.one/v1/gas/eth" \
-H "X-GWEI-KEY: $GW_KEY"import os
import requests
r = requests.get(
"https://api.mygas.one/v1/gas/eth",
headers={"X-GWEI-KEY": os.environ["GW_KEY"]},
timeout=10,
)
print(r.json()["data"])const res = await fetch("https://api.mygas.one/v1/gas/eth", {
headers: {
"X-GWEI-KEY": process.env.GW_KEY,
},
});
const { data } = await res.json();
console.log(data);{
"success": true,
"data": {
"network": "eth",
"block": 26318442,
"at": "2026-11-02T10:30:59Z",
"unit": "gwei",
"baseFee": "0.412",
"priorityFee": {"slow": "0.010", "standard": "0.050", "fast": "0.200"},
"nativeUsd": "3412.50",
"transferCostUsd": {"slow": "0.0302", "standard": "0.0331", "fast": "0.0439"},
"trend": "falling"
},
"ts": 1793615460000
}Gas forecast
Preview/v1/gas/{network}/forecastReturns an hourly forecast with low and high bounds and the cheapest upcoming window. The example response shows four of 24 points.
Auth API key
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
networkpath | string | Yes | Network slug. |
hoursquery | integer | No | Forecast length in hours, from 1 to 72. Default 24. |
curl -s "https://api.mygas.one/v1/gas/eth/forecast?hours=24" \
-H "X-GWEI-KEY: $GW_KEY"import os
import requests
r = requests.get(
"https://api.mygas.one/v1/gas/eth/forecast",
headers={"X-GWEI-KEY": os.environ["GW_KEY"]},
params={
"hours": 24,
},
timeout=10,
)
print(r.json()["data"])const res = await fetch("https://api.mygas.one/v1/gas/eth/forecast?hours=24", {
headers: {
"X-GWEI-KEY": process.env.GW_KEY,
},
});
const { data } = await res.json();
console.log(data);{
"success": true,
"data": {
"network": "eth",
"hours": 24,
"generatedAt": "2026-11-02T10:31:00Z",
"unit": "gwei",
"points": [
{
"at": "2026-11-02T11:00:00Z",
"baseFee": "0.430",
"low": "0.360",
"high": "0.520"
},
{
"at": "2026-11-02T12:00:00Z",
"baseFee": "0.468",
"low": "0.390",
"high": "0.571"
},
{
"at": "2026-11-02T13:00:00Z",
"baseFee": "0.455",
"low": "0.380",
"high": "0.560"
},
{
"at": "2026-11-02T14:00:00Z",
"baseFee": "0.401",
"low": "0.330",
"high": "0.498"
}
],
"cheapestWindow": {
"from": "2026-11-03T02:00:00Z",
"to": "2026-11-03T05:00:00Z",
"expectedBaseFee": "0.284",
"savingVsNow": "31%"
}
},
"ts": 1793615460000
}Points · Season 0
Season 0 counts all network fees a wallet paid on the 50 networks, from each chain's first block to the snapshot on Dec 15, 2026, 00:00 UTC. Each fee is priced in USD on the day it was paid. Failed transactions count.
Points are calculated as (gasUsd × 100 + transactions × 5) × spread × age. Spread adds 3% for each network after the first, capped at ×2.00. Age depends on the year of the first fee: ×1.30 before 2020, ×1.20 in 2020-2021, ×1.10 in 2022-2023, ×1.00 after 2023.
Totals are provisional (final: false) until the snapshot is processed.
Points for an address
Preview/v1/points/{address}Returns the Season 0 receipt for one address: totals, multipliers, grade and points needed for the next grade. Accepts any supported address format or an ENS name.
Auth API key
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
addresspath | string | Yes | Wallet address in any supported format, or an ENS name. |
seasonquery | integer | No | Season id. Default 0. |
curl -s "https://api.mygas.one/v1/points/0x5eF3a9c2B71d40E8a6F1c9D2b84E7A0c3F96d21B" \
-H "X-GWEI-KEY: $GW_KEY"import os
import requests
r = requests.get(
"https://api.mygas.one/v1/points/0x5eF3a9c2B71d40E8a6F1c9D2b84E7A0c3F96d21B",
headers={"X-GWEI-KEY": os.environ["GW_KEY"]},
timeout=10,
)
print(r.json()["data"])const res = await fetch("https://api.mygas.one/v1/points/0x5eF3a9c2B71d40E8a6F1c9D2b84E7A0c3F96d21B", {
headers: {
"X-GWEI-KEY": process.env.GW_KEY,
},
});
const { data } = await res.json();
console.log(data);{
"success": true,
"data": {
"address": "0x5eF3a9c2B71d40E8a6F1c9D2b84E7A0c3F96d21B",
"season": 0,
"final": false,
"snapshot": "2026-12-15T00:00:00Z",
"networks": 13,
"transactions": 436,
"gasUsd": "435.36",
"basePoints": 43536,
"txPoints": 2180,
"spreadMultiplier": "1.36",
"ageMultiplier": "1.10",
"firstFeeYear": 2023,
"points": 68391,
"grade": "RON 98",
"nextGrade": {"grade": "RON 100", "pointsNeeded": 181609}
},
"ts": 1793615460000
}Breakdown by network
Preview/v1/points/{address}/breakdownReturns per-network totals for the receipt, sorted by gas paid. basePoints here exclude the spread and age multipliers. Their sum equals basePoints + txPoints in the receipt.
Auth API key
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
addresspath | string | Yes | Wallet address or ENS name. |
seasonquery | integer | No | Season id. Default 0. |
curl -s "https://api.mygas.one/v1/points/0x5eF3a9c2B71d40E8a6F1c9D2b84E7A0c3F96d21B/breakdown" \
-H "X-GWEI-KEY: $GW_KEY"import os
import requests
r = requests.get(
"https://api.mygas.one/v1/points/0x5eF3a9c2B71d40E8a6F1c9D2b84E7A0c3F96d21B/breakdown",
headers={"X-GWEI-KEY": os.environ["GW_KEY"]},
timeout=10,
)
print(r.json()["data"])const res = await fetch("https://api.mygas.one/v1/points/0x5eF3a9c2B71d40E8a6F1c9D2b84E7A0c3F96d21B/breakdown", {
headers: {
"X-GWEI-KEY": process.env.GW_KEY,
},
});
const { data } = await res.json();
console.log(data);{
"success": true,
"data": {
"address": "0x5eF3a9c2B71d40E8a6F1c9D2b84E7A0c3F96d21B",
"season": 0,
"networks": [
{
"network": "eth",
"gasUsd": "377.40",
"transactions": 64,
"basePoints": 38060,
"firstFee": "2023-03-08"
},
{
"network": "arb",
"gasUsd": "29.00",
"transactions": 65,
"basePoints": 3225,
"firstFee": "2023-04-19"
},
{
"network": "bnb",
"gasUsd": "19.86",
"transactions": 72,
"basePoints": 2346,
"firstFee": "2023-06-02"
},
{
"network": "zks",
"gasUsd": "2.23",
"transactions": 44,
"basePoints": 443,
"firstFee": "2023-04-02"
},
{
"network": "op",
"gasUsd": "1.88",
"transactions": 15,
"basePoints": 263,
"firstFee": "2023-07-11"
},
{
"network": "avax",
"gasUsd": "1.77",
"transactions": 20,
"basePoints": 277,
"firstFee": "2023-09-27"
},
{
"network": "base",
"gasUsd": "0.97",
"transactions": 86,
"basePoints": 527,
"firstFee": "2023-08-21"
},
{
"network": "zora",
"gasUsd": "0.88",
"transactions": 9,
"basePoints": 133,
"firstFee": "2023-10-04"
},
{
"network": "linea",
"gasUsd": "0.44",
"transactions": 14,
"basePoints": 114,
"firstFee": "2023-08-14"
},
{
"network": "ape",
"gasUsd": "0.40",
"transactions": 12,
"basePoints": 100,
"firstFee": "2024-11-02"
},
{
"network": "metis",
"gasUsd": "0.36",
"transactions": 8,
"basePoints": 76,
"firstFee": "2024-01-15"
},
{
"network": "pol",
"gasUsd": "0.12",
"transactions": 18,
"basePoints": 102,
"firstFee": "2023-05-30"
},
{
"network": "celo",
"gasUsd": "0.05",
"transactions": 9,
"basePoints": 50,
"firstFee": "2023-12-12"
}
]
},
"ts": 1793615460000
}Seasons
Preview/v1/seasonsReturns all seasons with status and scoring rules.
Auth API key
curl -s "https://api.mygas.one/v1/seasons" \
-H "X-GWEI-KEY: $GW_KEY"import os
import requests
r = requests.get(
"https://api.mygas.one/v1/seasons",
headers={"X-GWEI-KEY": os.environ["GW_KEY"]},
timeout=10,
)
print(r.json()["data"])const res = await fetch("https://api.mygas.one/v1/seasons", {
headers: {
"X-GWEI-KEY": process.env.GW_KEY,
},
});
const { data } = await res.json();
console.log(data);{
"success": true,
"data": [
{
"id": 0,
"name": "Retro",
"status": "live",
"countsFrom": "genesis",
"snapshot": "2026-12-15T00:00:00Z",
"rules": {
"perUsdPaid": 100,
"perTransaction": 5,
"spreadStep": "0.03",
"spreadCap": "2.00"
}
},
{
"id": 1,
"name": "Burn smart",
"status": "upcoming",
"starts": "Q1 2027",
"durationDays": 90,
"rules": {"perUsdPaidThroughApp": 200, "perUsdSaved": 100, "perTransaction": 10}
},
{"id": 2, "name": null, "status": "announced_later"}
],
"ts": 1793615460000
}Grades
Preview/v1/gradesReturns the octane grades and the perk of each. A wallet's grade is set by its Season 0 total.
Auth API key
curl -s "https://api.mygas.one/v1/grades" \
-H "X-GWEI-KEY: $GW_KEY"import os
import requests
r = requests.get(
"https://api.mygas.one/v1/grades",
headers={"X-GWEI-KEY": os.environ["GW_KEY"]},
timeout=10,
)
print(r.json()["data"])const res = await fetch("https://api.mygas.one/v1/grades", {
headers: {
"X-GWEI-KEY": process.env.GW_KEY,
},
});
const { data } = await res.json();
console.log(data);{
"success": true,
"data": [
{"grade": "RON 92", "minPoints": 0, "perk": "Base rate"},
{"grade": "RON 95", "minPoints": 10000, "perk": "+5% on Season 1 points"},
{"grade": "RON 98", "minPoints": 50000, "perk": "+10% on Season 1 points"},
{"grade": "RON 100", "minPoints": 250000, "perk": "+15% and Refuel credits"},
{
"grade": "JET A-1",
"minPoints": 1000000,
"perk": "+20% and an early claim window"
},
{"grade": "RP-1", "minPoints": 5000000, "perk": "+25% and a genesis council seat"}
],
"ts": 1793615460000
}Account
Private endpoints for the signed-in wallet owner. Points of all linked wallets, from any ecosystem, are combined into one receipt.
Get the account
Preview/v1/userReturns the signed-in account with its linked wallets and payout address.
Auth Bearer token (wallet sign-in)
curl -s "https://api.mygas.one/v1/user" \
-H "Authorization: Bearer $GW_TOKEN"import os
import requests
r = requests.get(
"https://api.mygas.one/v1/user",
headers={"Authorization": f"Bearer {os.environ['GW_TOKEN']}"},
timeout=10,
)
print(r.json()["data"])const res = await fetch("https://api.mygas.one/v1/user", {
headers: {
"Authorization": `Bearer ${process.env.GW_TOKEN}`,
},
});
const { data } = await res.json();
console.log(data);{
"success": true,
"data": {
"userId": "usr_3c9f1a7e",
"primaryAddress": "0x5eF3a9c2B71d40E8a6F1c9D2b84E7A0c3F96d21B",
"wallets": [
{
"address": "0x5eF3a9c2B71d40E8a6F1c9D2b84E7A0c3F96d21B",
"kind": "evm",
"primary": true,
"linkedAt": "2026-11-02T10:31:12Z"
},
{
"address": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
"kind": "sol",
"primary": false,
"linkedAt": "2026-11-02T10:34:40Z"
}
],
"payoutAddress": null,
"grade": "RON 98",
"createdAt": "2026-11-02T10:31:12Z"
},
"ts": 1793615460000
}Link a wallet
Preview/v1/user/walletsLinks another wallet to the account. Request a nonce with purpose: "link" for the new address, sign the message with that wallet and send the signature to this endpoint. Non-EVM wallets use their chain's signing standard, for example BIP-322 on Bitcoin, SNIP-12 on Starknet or ton_proof on TON. An account can have up to 10 wallets.
Auth Bearer token (wallet sign-in)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
addressbody | string | Yes | Address to link. |
kindbody | string | Yes | evm, sol, tron, ton, move, near or btc. |
noncebody | string | Yes | Nonce issued for this address. |
signaturebody | string | Yes | Signature of the link message. |
curl -s -X POST "https://api.mygas.one/v1/user/wallets" \
-H "Authorization: Bearer $GW_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"address": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
"kind": "sol",
"nonce": "Qm4t8Zr2Lx9v",
"signature": "3vD9kQe5JmW8pTz2HcN7rYb4XsLf6Ga1Ud8Rk3Vq2Bn9Ct5Ey7Hw1Mj4Pz6So8Ki2"
}'import os
import requests
r = requests.post(
"https://api.mygas.one/v1/user/wallets",
headers={"Authorization": f"Bearer {os.environ['GW_TOKEN']}"},
json={
"address": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
"kind": "sol",
"nonce": "Qm4t8Zr2Lx9v",
"signature": "3vD9kQe5JmW8pTz2HcN7rYb4XsLf6Ga1Ud8Rk3Vq2Bn9Ct5Ey7Hw1Mj4Pz6So8Ki2",
},
timeout=10,
)
print(r.json()["data"])const res = await fetch("https://api.mygas.one/v1/user/wallets", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.GW_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
address: "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
kind: "sol",
nonce: "Qm4t8Zr2Lx9v",
signature: "3vD9kQe5JmW8pTz2HcN7rYb4XsLf6Ga1Ud8Rk3Vq2Bn9Ct5Ey7Hw1Mj4Pz6So8Ki2",
}),
});
const { data } = await res.json();
console.log(data);{
"success": true,
"data": {
"linked": true,
"wallet": {
"address": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
"kind": "sol",
"primary": false,
"linkedAt": "2026-11-02T10:34:40Z"
},
"walletsLinked": 2
},
"ts": 1793615460000
}Unlink a wallet
Preview/v1/user/wallets/{address}Removes a linked wallet. The primary wallet cannot be removed. The removed wallet's points leave the combined receipt immediately.
Auth Bearer token (wallet sign-in)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
addresspath | string | Yes | Linked wallet to remove. |
curl -s -X DELETE "https://api.mygas.one/v1/user/wallets/7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU" \
-H "Authorization: Bearer $GW_TOKEN"import os
import requests
r = requests.delete(
"https://api.mygas.one/v1/user/wallets/7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
headers={"Authorization": f"Bearer {os.environ['GW_TOKEN']}"},
timeout=10,
)
print(r.json()["data"])const res = await fetch("https://api.mygas.one/v1/user/wallets/7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU", {
method: "DELETE",
headers: {
"Authorization": `Bearer ${process.env.GW_TOKEN}`,
},
});
const { data } = await res.json();
console.log(data);{
"success": true,
"data": {"unlinked": true, "walletsLinked": 1},
"ts": 1793615460000
}Set the payout address
Preview/v1/user/payout-addressSets the address that receives the $GGAS claim and future rewards. The address must be a linked EVM wallet. After the claim window opens, changing it requires a new signature.
Auth Bearer token (wallet sign-in)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
networkbody | string | Yes | Network for payouts. eth during Season 0. |
addressbody | string | Yes | A linked EVM wallet. |
curl -s -X POST "https://api.mygas.one/v1/user/payout-address" \
-H "Authorization: Bearer $GW_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"network": "eth",
"address": "0x5eF3a9c2B71d40E8a6F1c9D2b84E7A0c3F96d21B"
}'import os
import requests
r = requests.post(
"https://api.mygas.one/v1/user/payout-address",
headers={"Authorization": f"Bearer {os.environ['GW_TOKEN']}"},
json={
"network": "eth",
"address": "0x5eF3a9c2B71d40E8a6F1c9D2b84E7A0c3F96d21B",
},
timeout=10,
)
print(r.json()["data"])const res = await fetch("https://api.mygas.one/v1/user/payout-address", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.GW_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
network: "eth",
address: "0x5eF3a9c2B71d40E8a6F1c9D2b84E7A0c3F96d21B",
}),
});
const { data } = await res.json();
console.log(data);{
"success": true,
"data": {
"payoutAddress": "0x5eF3a9c2B71d40E8a6F1c9D2b84E7A0c3F96d21B",
"network": "eth",
"updatedAt": "2026-11-02T10:36:05Z"
},
"ts": 1793615460000
}Batching
Combines several calls into one transaction from a regular wallet through an EIP-7702 delegation. An approve and a swap sent as one batch pay the 21,000 gas base cost once. For the first batch on a network, the wallet signs an EIP-7702 authorization. Later batches reuse it. Planned for API v1 in Q1 2027.
Quote a batch
Planned/v1/batch/quoteSimulates the calls as one batch and as separate transactions and returns both costs. A quote expires after two minutes.
Auth Bearer token (wallet sign-in)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
networkbody | string | Yes | EVM network slug. |
frombody | string | Yes | Sender wallet. |
callsbody | array | Yes | Up to 10 calls, each with to, data and value in wei. |
The example assumes a base fee of 0.412 gwei, a 0.05 gwei tip and ETH at $3,412.50, as in the Current gas example.
curl -s -X POST "https://api.mygas.one/v1/batch/quote" \
-H "Authorization: Bearer $GW_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"network": "eth",
"from": "0x5eF3a9c2B71d40E8a6F1c9D2b84E7A0c3F96d21B",
"calls": [
{
"to": "0x6B1e4A3c9D2f8E0b5C7a1D4e9F3b2A6c8E0d1F47",
"data": "0x095ea7b30000000000000000000000009c4e2b1a7d3f5e8c6b0a4d2f1e3c5b7a9d8e6f4000000000000000000000000000000000000000000000000077359400",
"value": "0"
},
{
"to": "0x9c4E2b1a7D3f5E8C6b0A4d2F1e3C5b7A9d8E6f40",
"data": "0x3593564c3fc1626e53a13043b026c48bbf33feff9243a8f506b40928b5b7a767c76fb008",
"value": "0"
}
]
}'import os
import requests
r = requests.post(
"https://api.mygas.one/v1/batch/quote",
headers={"Authorization": f"Bearer {os.environ['GW_TOKEN']}"},
json={
"network": "eth",
"from": "0x5eF3a9c2B71d40E8a6F1c9D2b84E7A0c3F96d21B",
"calls": [
{
"to": "0x6B1e4A3c9D2f8E0b5C7a1D4e9F3b2A6c8E0d1F47",
"data": "0x095ea7b30000000000000000000000009c4e2b1a7d3f5e8c6b0a4d2f1e3c5b7a9d8e6f4000000000000000000000000000000000000000000000000077359400",
"value": "0",
},
{
"to": "0x9c4E2b1a7D3f5E8C6b0A4d2F1e3C5b7A9d8E6f40",
"data": "0x3593564c3fc1626e53a13043b026c48bbf33feff9243a8f506b40928b5b7a767c76fb008",
"value": "0",
},
],
},
timeout=10,
)
print(r.json()["data"])const res = await fetch("https://api.mygas.one/v1/batch/quote", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.GW_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
network: "eth",
from: "0x5eF3a9c2B71d40E8a6F1c9D2b84E7A0c3F96d21B",
calls: [
{
to: "0x6B1e4A3c9D2f8E0b5C7a1D4e9F3b2A6c8E0d1F47",
data: "0x095ea7b30000000000000000000000009c4e2b1a7d3f5e8c6b0a4d2f1e3c5b7a9d8e6f4000000000000000000000000000000000000000000000000077359400",
value: "0",
},
{
to: "0x9c4E2b1a7D3f5E8C6b0A4d2F1e3C5b7A9d8E6f40",
data: "0x3593564c3fc1626e53a13043b026c48bbf33feff9243a8f506b40928b5b7a767c76fb008",
value: "0",
},
],
}),
});
const { data } = await res.json();
console.log(data);{
"success": true,
"data": {
"quoteId": "bq_9f2c41",
"network": "eth",
"mode": "eip7702",
"delegate": "0x77020C1e3A5b9F4d2E8c6A0b1D3f5E7a9C2b4D61",
"needsAuthorization": true,
"gas": {"separate": 196400, "batched": 175300, "saved": 21100},
"feeUsd": {"separate": "0.3096", "batched": "0.2764", "saved": "0.0332"},
"expiresAt": "2026-11-02T10:33:00Z"
},
"ts": 1793615460000
}Submit a batch
Planned/v1/batch/submitSubmits a quoted batch. Include the signed EIP-7702 authorization if the quote returned needsAuthorization: true.
Auth Bearer token (wallet sign-in)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
quoteIdbody | string | Yes | Id from the quote. |
authorizationbody | object | No | Signed EIP-7702 authorization tuple. |
signaturebody | string | Yes | Wallet signature over the batch. |
curl -s -X POST "https://api.mygas.one/v1/batch/submit" \
-H "Authorization: Bearer $GW_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"quoteId": "bq_9f2c41",
"authorization": {
"chainId": 1,
"address": "0x77020C1e3A5b9F4d2E8c6A0b1D3f5E7a9C2b4D61",
"nonce": 12,
"yParity": 1,
"r": "0xf86bebb2737f6a6f0fb23c6f5da2cec255404e4fb440034d6608697a8d41bed4",
"s": "0x40e50454f31af3176813e02ea68ef786e4d3cea27d26934b484e73cf575dcad6"
},
"signature": "0xba2b0aee0ca923732881584d8c4fa2815d2802827283e0ad84173581569969e58b081006f7e3dfc967a64cb14028d512c9791e558e08baa7196b50ac2f86702824"
}'import os
import requests
r = requests.post(
"https://api.mygas.one/v1/batch/submit",
headers={"Authorization": f"Bearer {os.environ['GW_TOKEN']}"},
json={
"quoteId": "bq_9f2c41",
"authorization": {
"chainId": 1,
"address": "0x77020C1e3A5b9F4d2E8c6A0b1D3f5E7a9C2b4D61",
"nonce": 12,
"yParity": 1,
"r": "0xf86bebb2737f6a6f0fb23c6f5da2cec255404e4fb440034d6608697a8d41bed4",
"s": "0x40e50454f31af3176813e02ea68ef786e4d3cea27d26934b484e73cf575dcad6",
},
"signature": "0xba2b0aee0ca923732881584d8c4fa2815d2802827283e0ad84173581569969e58b081006f7e3dfc967a64cb14028d512c9791e558e08baa7196b50ac2f86702824",
},
timeout=10,
)
print(r.json()["data"])const res = await fetch("https://api.mygas.one/v1/batch/submit", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.GW_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
quoteId: "bq_9f2c41",
authorization: {
chainId: 1,
address: "0x77020C1e3A5b9F4d2E8c6A0b1D3f5E7a9C2b4D61",
nonce: 12,
yParity: 1,
r: "0xf86bebb2737f6a6f0fb23c6f5da2cec255404e4fb440034d6608697a8d41bed4",
s: "0x40e50454f31af3176813e02ea68ef786e4d3cea27d26934b484e73cf575dcad6",
},
signature: "0xba2b0aee0ca923732881584d8c4fa2815d2802827283e0ad84173581569969e58b081006f7e3dfc967a64cb14028d512c9791e558e08baa7196b50ac2f86702824",
}),
});
const { data } = await res.json();
console.log(data);{
"success": true,
"data": {
"txHash": "0xc1c099724caf4941d4072014b3ce107f80e222f828767efc2f91624a8940f1f8",
"status": "submitted",
"network": "eth"
},
"ts": 1793615460000
}Limit send
A Limit send order holds a signed transaction until the network fee drops to your limit. mygas.one tracks the base fee and broadcasts the transaction when base fee plus tip is at or below the limit. The maximum order lifetime is 72 hours. Planned for API v1 in Q1 2027.
Create an order
Planned/v1/limit-sendQueues a signed EIP-1559 transaction whose maxFeePerGas equals your limit. The transaction is not broadcast above that price.
Auth Bearer token (wallet sign-in)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
networkbody | string | Yes | EVM network slug. |
rawTxbody | string | Yes | Signed transaction, hex. |
maxFeeGweibody | string | Yes | Fee limit in gwei. Must equal maxFeePerGas of the transaction. |
expiresInbody | integer | No | Order lifetime in seconds, up to 259200. Default 21600. |
curl -s -X POST "https://api.mygas.one/v1/limit-send" \
-H "Authorization: Bearer $GW_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"network": "eth",
"rawTx": "0x02f8b136f99eee3692f09e2e8c662248b483b7ffc050fec94dbca3a0aac36098b2cc2bd818319478da6bd0c621de49f145fda9988c79fc35526f7eaed46725a2a7b860dcd6c8a1f8b46287cced9041dff02cee",
"maxFeeGwei": "0.40",
"expiresIn": 21600
}'import os
import requests
r = requests.post(
"https://api.mygas.one/v1/limit-send",
headers={"Authorization": f"Bearer {os.environ['GW_TOKEN']}"},
json={
"network": "eth",
"rawTx": "0x02f8b136f99eee3692f09e2e8c662248b483b7ffc050fec94dbca3a0aac36098b2cc2bd818319478da6bd0c621de49f145fda9988c79fc35526f7eaed46725a2a7b860dcd6c8a1f8b46287cced9041dff02cee",
"maxFeeGwei": "0.40",
"expiresIn": 21600,
},
timeout=10,
)
print(r.json()["data"])const res = await fetch("https://api.mygas.one/v1/limit-send", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.GW_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
network: "eth",
rawTx: "0x02f8b136f99eee3692f09e2e8c662248b483b7ffc050fec94dbca3a0aac36098b2cc2bd818319478da6bd0c621de49f145fda9988c79fc35526f7eaed46725a2a7b860dcd6c8a1f8b46287cced9041dff02cee",
maxFeeGwei: "0.40",
expiresIn: 21600,
}),
});
const { data } = await res.json();
console.log(data);{
"success": true,
"data": {
"id": "ls_4d81c2",
"status": "waiting",
"network": "eth",
"maxFeeGwei": "0.40",
"currentFeeGwei": "0.462",
"createdAt": "2026-11-02T10:31:00Z",
"expiresAt": "2026-11-02T16:31:00Z"
},
"ts": 1793615460000
}List orders
Planned/v1/limit-sendReturns your orders, newest first.
Auth Bearer token (wallet sign-in)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
statusquery | string | No | Filter by status. |
cursorquery | string | No | Page cursor. |
curl -s "https://api.mygas.one/v1/limit-send?status=waiting" \
-H "Authorization: Bearer $GW_TOKEN"import os
import requests
r = requests.get(
"https://api.mygas.one/v1/limit-send",
headers={"Authorization": f"Bearer {os.environ['GW_TOKEN']}"},
params={
"status": "waiting",
},
timeout=10,
)
print(r.json()["data"])const res = await fetch("https://api.mygas.one/v1/limit-send?status=waiting", {
headers: {
"Authorization": `Bearer ${process.env.GW_TOKEN}`,
},
});
const { data } = await res.json();
console.log(data);{
"success": true,
"data": [
{
"id": "ls_4d81c2",
"status": "waiting",
"network": "eth",
"maxFeeGwei": "0.40",
"expiresAt": "2026-11-02T16:31:00Z"
}
],
"page": {"cursor": null, "count": 1},
"ts": 1793615460000
}Get an order
Planned/v1/limit-send/{id}Returns one order. After broadcast, the response also includes the transaction hash, the fee paid and the saving compared with the fee at order creation.
Auth Bearer token (wallet sign-in)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
idpath | string | Yes | Order id. |
curl -s "https://api.mygas.one/v1/limit-send/ls_4d81c2" \
-H "Authorization: Bearer $GW_TOKEN"import os
import requests
r = requests.get(
"https://api.mygas.one/v1/limit-send/ls_4d81c2",
headers={"Authorization": f"Bearer {os.environ['GW_TOKEN']}"},
timeout=10,
)
print(r.json()["data"])const res = await fetch("https://api.mygas.one/v1/limit-send/ls_4d81c2", {
headers: {
"Authorization": `Bearer ${process.env.GW_TOKEN}`,
},
});
const { data } = await res.json();
console.log(data);{
"success": true,
"data": {
"id": "ls_4d81c2",
"status": "confirmed",
"network": "eth",
"maxFeeGwei": "0.40",
"sentFeeGwei": "0.381",
"txHash": "0x737443e210471948d33296c87009e8a7f770d9106fd287db7f1adbc60926f696",
"gasUsed": 150000,
"savedUsd": "0.0415",
"sentAt": "2026-11-03T02:47:12Z"
},
"ts": 1793615460000
}Cancel an order
Planned/v1/limit-send/{id}Cancels a waiting order. Orders already sent cannot be cancelled.
Auth Bearer token (wallet sign-in)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
idpath | string | Yes | Order id. |
curl -s -X DELETE "https://api.mygas.one/v1/limit-send/ls_4d81c2" \
-H "Authorization: Bearer $GW_TOKEN"import os
import requests
r = requests.delete(
"https://api.mygas.one/v1/limit-send/ls_4d81c2",
headers={"Authorization": f"Bearer {os.environ['GW_TOKEN']}"},
timeout=10,
)
print(r.json()["data"])const res = await fetch("https://api.mygas.one/v1/limit-send/ls_4d81c2", {
method: "DELETE",
headers: {
"Authorization": `Bearer ${process.env.GW_TOKEN}`,
},
});
const { data } = await res.json();
console.log(data);{
"success": true,
"data": {"id": "ls_4d81c2", "status": "cancelled"},
"ts": 1793615460000
}Refuel
Refuel sends native gas to wallets on any of the 50 networks from one balance. One quote can cover several networks. The unused part of the input amount is refunded. Planned for API v1 in Q1 2027.
Quote a refuel
Planned/v1/refuel/quotePrices each leg in the destination network's native coin. A quote expires after 60 seconds.
Auth Bearer token (wallet sign-in)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
frombody | object | Yes | network, token and amount to spend. |
tobody | array | Yes | Destination legs, each with network, amountUsd and recipient. |
senderbody | string | Yes | Paying wallet. |
curl -s -X POST "https://api.mygas.one/v1/refuel/quote" \
-H "Authorization: Bearer $GW_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"sender": "0x5eF3a9c2B71d40E8a6F1c9D2b84E7A0c3F96d21B",
"from": {
"network": "base",
"token": "USDC",
"amount": "25"
},
"to": [
{
"network": "monad",
"amountUsd": "10",
"recipient": "0x5eF3a9c2B71d40E8a6F1c9D2b84E7A0c3F96d21B"
},
{
"network": "sol",
"amountUsd": "10",
"recipient": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU"
}
]
}'import os
import requests
r = requests.post(
"https://api.mygas.one/v1/refuel/quote",
headers={"Authorization": f"Bearer {os.environ['GW_TOKEN']}"},
json={
"sender": "0x5eF3a9c2B71d40E8a6F1c9D2b84E7A0c3F96d21B",
"from": {
"network": "base",
"token": "USDC",
"amount": "25",
},
"to": [
{
"network": "monad",
"amountUsd": "10",
"recipient": "0x5eF3a9c2B71d40E8a6F1c9D2b84E7A0c3F96d21B",
},
{
"network": "sol",
"amountUsd": "10",
"recipient": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
},
],
},
timeout=10,
)
print(r.json()["data"])const res = await fetch("https://api.mygas.one/v1/refuel/quote", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.GW_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
sender: "0x5eF3a9c2B71d40E8a6F1c9D2b84E7A0c3F96d21B",
from: {
network: "base",
token: "USDC",
amount: "25",
},
to: [
{
network: "monad",
amountUsd: "10",
recipient: "0x5eF3a9c2B71d40E8a6F1c9D2b84E7A0c3F96d21B",
},
{
network: "sol",
amountUsd: "10",
recipient: "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
},
],
}),
});
const { data } = await res.json();
console.log(data);{
"success": true,
"data": {
"quoteId": "rq_77ab10",
"legs": [
{
"network": "monad",
"receive": "285.71",
"symbol": "MON",
"usd": "10.00",
"etaSeconds": 20
},
{
"network": "sol",
"receive": "0.0513",
"symbol": "SOL",
"usd": "10.00",
"etaSeconds": 15
}
],
"feeUsd": "0.42",
"refundUsd": "4.58",
"expiresAt": "2026-11-02T10:32:00Z"
},
"ts": 1793615460000
}Execute a refuel
Planned/v1/refuelExecutes a quote with a token permit signed by the sender. Track each leg by the returned id or on the private refuel channel.
Auth Bearer token (wallet sign-in)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
quoteIdbody | string | Yes | Id from the quote. |
permitbody | object | Yes | EIP-2612 permit for the input token. |
curl -s -X POST "https://api.mygas.one/v1/refuel" \
-H "Authorization: Bearer $GW_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"quoteId": "rq_77ab10",
"permit": {
"value": "25000000",
"deadline": 1793615580,
"v": 27,
"r": "0x7e7893f57fd14c1604d115cea325a65e19cbae530282bd36cb9d21f6be6abf0d",
"s": "0x7c1c1e21862ab8a18a8902073fec8df4f50947aaeb26c57d21fa5d328263dfe5"
}
}'import os
import requests
r = requests.post(
"https://api.mygas.one/v1/refuel",
headers={"Authorization": f"Bearer {os.environ['GW_TOKEN']}"},
json={
"quoteId": "rq_77ab10",
"permit": {
"value": "25000000",
"deadline": 1793615580,
"v": 27,
"r": "0x7e7893f57fd14c1604d115cea325a65e19cbae530282bd36cb9d21f6be6abf0d",
"s": "0x7c1c1e21862ab8a18a8902073fec8df4f50947aaeb26c57d21fa5d328263dfe5",
},
},
timeout=10,
)
print(r.json()["data"])const res = await fetch("https://api.mygas.one/v1/refuel", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.GW_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
quoteId: "rq_77ab10",
permit: {
value: "25000000",
deadline: 1793615580,
v: 27,
r: "0x7e7893f57fd14c1604d115cea325a65e19cbae530282bd36cb9d21f6be6abf0d",
s: "0x7c1c1e21862ab8a18a8902073fec8df4f50947aaeb26c57d21fa5d328263dfe5",
},
}),
});
const { data } = await res.json();
console.log(data);{
"success": true,
"data": {
"id": "rf_3e91d0",
"status": "pending",
"legs": [
{"network": "monad", "status": "pending"},
{"network": "sol", "status": "pending"}
]
},
"ts": 1793615460000
}Whole block markets
Validators sell future blocks in advance. Buyers bid for an entire block. Prices are in the network's native coin. Ethereum markets open on the Hoodi testnet in Q2 2027 and on mainnet in Q3 2027. Sellers post collateral. If a seller breaks the commitment for a sold block, the penalty is slashed from that collateral.
List block markets
Planned/v1/markets/blocksReturns upcoming slots with an open market, nearest first.
Auth API key
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
networkquery | string | Yes | Network slug. eth at launch. |
fromSlotquery | integer | No | First slot. Default: next slot. |
limitquery | integer | No | Number of results, up to 100. Default 20. |
curl -s "https://api.mygas.one/v1/markets/blocks?network=eth&limit=3" \
-H "X-GWEI-KEY: $GW_KEY"import os
import requests
r = requests.get(
"https://api.mygas.one/v1/markets/blocks",
headers={"X-GWEI-KEY": os.environ["GW_KEY"]},
params={
"network": "eth",
"limit": 3,
},
timeout=10,
)
print(r.json()["data"])const res = await fetch("https://api.mygas.one/v1/markets/blocks?network=eth&limit=3", {
headers: {
"X-GWEI-KEY": process.env.GW_KEY,
},
});
const { data } = await res.json();
console.log(data);{
"success": true,
"data": [
{
"marketId": "wb_eth_15565970",
"slot": 15565970,
"startsAt": "2026-11-02T10:34:23Z",
"status": "open",
"bestBid": "0.0041",
"bestAsk": "0.0046",
"last": "0.0043",
"unit": "ETH"
},
{
"marketId": "wb_eth_15565971",
"slot": 15565971,
"startsAt": "2026-11-02T10:34:35Z",
"status": "open",
"bestBid": "0.0039",
"bestAsk": "0.0045",
"last": "0.0042",
"unit": "ETH"
},
{
"marketId": "wb_eth_15565972",
"slot": 15565972,
"startsAt": "2026-11-02T10:34:47Z",
"status": "open",
"bestBid": "0.0040",
"bestAsk": "0.0047",
"last": null,
"unit": "ETH"
}
],
"page": {"cursor": "c2xvdDoxNTU2NTk3Mw", "count": 3},
"ts": 1793615460000
}Place an order
Planned/v1/ordersPlaces a buy or sell order on a block market. Sellers must be registered validators with enough collateral.
Auth Bearer token (wallet sign-in)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
marketIdbody | string | Yes | Market id. |
sidebody | string | Yes | buy or sell. |
typebody | string | Yes | limit or market. |
pricebody | string | No | Limit price in the native coin. |
quantitybody | string | Yes | 1 for a whole block. |
clientOrderIdbody | string | No | Client-assigned id, unique per account. |
curl -s -X POST "https://api.mygas.one/v1/orders" \
-H "Authorization: Bearer $GW_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"marketId": "wb_eth_15565970",
"side": "buy",
"type": "limit",
"price": "0.0044",
"quantity": "1",
"clientOrderId": "desk-0001"
}'import os
import requests
r = requests.post(
"https://api.mygas.one/v1/orders",
headers={"Authorization": f"Bearer {os.environ['GW_TOKEN']}"},
json={
"marketId": "wb_eth_15565970",
"side": "buy",
"type": "limit",
"price": "0.0044",
"quantity": "1",
"clientOrderId": "desk-0001",
},
timeout=10,
)
print(r.json()["data"])const res = await fetch("https://api.mygas.one/v1/orders", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.GW_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
marketId: "wb_eth_15565970",
side: "buy",
type: "limit",
price: "0.0044",
quantity: "1",
clientOrderId: "desk-0001",
}),
});
const { data } = await res.json();
console.log(data);{
"success": true,
"data": {
"orderId": "ord_8c21f7",
"clientOrderId": "desk-0001",
"marketId": "wb_eth_15565970",
"status": "open",
"side": "buy",
"price": "0.0044",
"createdAt": "2026-11-02T10:33:31Z"
},
"ts": 1793615460000
}List orders
Planned/v1/ordersReturns your orders in block and inclusion markets.
Auth Bearer token (wallet sign-in)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
statusquery | string | No | Filter by status. |
marketIdquery | string | No | Filter by market. |
curl -s "https://api.mygas.one/v1/orders?status=open" \
-H "Authorization: Bearer $GW_TOKEN"import os
import requests
r = requests.get(
"https://api.mygas.one/v1/orders",
headers={"Authorization": f"Bearer {os.environ['GW_TOKEN']}"},
params={
"status": "open",
},
timeout=10,
)
print(r.json()["data"])const res = await fetch("https://api.mygas.one/v1/orders?status=open", {
headers: {
"Authorization": `Bearer ${process.env.GW_TOKEN}`,
},
});
const { data } = await res.json();
console.log(data);{
"success": true,
"data": [
{
"orderId": "ord_8c21f7",
"marketId": "wb_eth_15565970",
"status": "open",
"side": "buy",
"price": "0.0044",
"filled": "0"
}
],
"page": {"cursor": null, "count": 1},
"ts": 1793615460000
}Cancel an order
Planned/v1/orders/{id}Cancels an open order. Orders on a slot that already started cannot be cancelled.
Auth Bearer token (wallet sign-in)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
idpath | string | Yes | Order id. |
curl -s -X DELETE "https://api.mygas.one/v1/orders/ord_8c21f7" \
-H "Authorization: Bearer $GW_TOKEN"import os
import requests
r = requests.delete(
"https://api.mygas.one/v1/orders/ord_8c21f7",
headers={"Authorization": f"Bearer {os.environ['GW_TOKEN']}"},
timeout=10,
)
print(r.json()["data"])const res = await fetch("https://api.mygas.one/v1/orders/ord_8c21f7", {
method: "DELETE",
headers: {
"Authorization": `Bearer ${process.env.GW_TOKEN}`,
},
});
const { data } = await res.json();
console.log(data);{
"success": true,
"data": {"orderId": "ord_8c21f7", "status": "cancelled"},
"ts": 1793615460000
}Inclusion preconf markets
An inclusion preconfirmation guarantees that one transaction is included in a given slot. The price is per unit of gas. The proposer signs a commitment when the request is accepted. If the transaction is valid and the proposer breaks the commitment, you are compensated from the proposer's collateral.
List inclusion markets
Planned/v1/markets/inclusionReturns slots that sell inclusion, with available gas and the current price.
Auth API key
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
networkquery | string | Yes | Network slug. |
limitquery | integer | No | Number of results, up to 100. Default 20. |
curl -s "https://api.mygas.one/v1/markets/inclusion?network=eth&limit=2" \
-H "X-GWEI-KEY: $GW_KEY"import os
import requests
r = requests.get(
"https://api.mygas.one/v1/markets/inclusion",
headers={"X-GWEI-KEY": os.environ["GW_KEY"]},
params={
"network": "eth",
"limit": 2,
},
timeout=10,
)
print(r.json()["data"])const res = await fetch("https://api.mygas.one/v1/markets/inclusion?network=eth&limit=2", {
headers: {
"X-GWEI-KEY": process.env.GW_KEY,
},
});
const { data } = await res.json();
console.log(data);{
"success": true,
"data": [
{
"marketId": "ip_eth_15565969",
"slot": 15565969,
"gasAvailable": 4200000,
"pricePerGas": "0.95",
"unit": "gwei",
"status": "open"
},
{
"marketId": "ip_eth_15565970",
"slot": 15565970,
"gasAvailable": 9800000,
"pricePerGas": "0.88",
"unit": "gwei",
"status": "open"
}
],
"page": {"cursor": null, "count": 2},
"ts": 1793615460000
}Buy a preconfirmation
Planned/v1/preconfRequests inclusion of a signed transaction in the next slot or a given slot, at or below your maximum price.
Auth Bearer token (wallet sign-in)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
networkbody | string | Yes | Network slug. |
slotbody | string or integer | No | next or a slot number. Default next. |
rawTxbody | string | Yes | Signed transaction, hex. |
maxPricePerGasbody | string | Yes | Maximum price per gas, in gwei. |
curl -s -X POST "https://api.mygas.one/v1/preconf" \
-H "Authorization: Bearer $GW_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"network": "eth",
"slot": "next",
"rawTx": "0x02f8b160d5d32cbe54014c2b54b95523cf6941fa1c257c6f561c5cb347611a3ce9d97dcbee500fe7ee5fc324bdb2e1142a21c402364f9572b85a8e48f687ab165c58ac5831be38cb8cb4ba2e751989a01749dd",
"maxPricePerGas": "1.20"
}'import os
import requests
r = requests.post(
"https://api.mygas.one/v1/preconf",
headers={"Authorization": f"Bearer {os.environ['GW_TOKEN']}"},
json={
"network": "eth",
"slot": "next",
"rawTx": "0x02f8b160d5d32cbe54014c2b54b95523cf6941fa1c257c6f561c5cb347611a3ce9d97dcbee500fe7ee5fc324bdb2e1142a21c402364f9572b85a8e48f687ab165c58ac5831be38cb8cb4ba2e751989a01749dd",
"maxPricePerGas": "1.20",
},
timeout=10,
)
print(r.json()["data"])const res = await fetch("https://api.mygas.one/v1/preconf", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.GW_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
network: "eth",
slot: "next",
rawTx: "0x02f8b160d5d32cbe54014c2b54b95523cf6941fa1c257c6f561c5cb347611a3ce9d97dcbee500fe7ee5fc324bdb2e1142a21c402364f9572b85a8e48f687ab165c58ac5831be38cb8cb4ba2e751989a01749dd",
maxPricePerGas: "1.20",
}),
});
const { data } = await res.json();
console.log(data);{
"success": true,
"data": {
"preconfId": "pc_51a9e3",
"slot": 15565969,
"status": "accepted",
"pricePerGas": "0.95",
"commitment": {
"proposer": "0x74de739988b886e7577496a2c8773e130f7eb19731662b5e803b61ba4168160adb59261ff2d3c425c8d99d19bdd0b6cc",
"signature": "0xb14f71010b93b7d946bf54074e3248c801bef750110c57513064d6d59291f0cde2e5738713a818d8962058765a6ca7cff00d796c25410335b400141212b62c376631129f34369aad80b891baf90d0d3bf16295d06910bf3f5fb85967f532f3ab"
}
},
"ts": 1793615460000
}Get a preconfirmation
Planned/v1/preconf/{id}Returns the status of a preconfirmation. After inclusion, the response also contains the block and transaction hash.
Auth Bearer token (wallet sign-in)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
idpath | string | Yes | Preconfirmation id. |
curl -s "https://api.mygas.one/v1/preconf/pc_51a9e3" \
-H "Authorization: Bearer $GW_TOKEN"import os
import requests
r = requests.get(
"https://api.mygas.one/v1/preconf/pc_51a9e3",
headers={"Authorization": f"Bearer {os.environ['GW_TOKEN']}"},
timeout=10,
)
print(r.json()["data"])const res = await fetch("https://api.mygas.one/v1/preconf/pc_51a9e3", {
headers: {
"Authorization": `Bearer ${process.env.GW_TOKEN}`,
},
});
const { data } = await res.json();
console.log(data);{
"success": true,
"data": {
"preconfId": "pc_51a9e3",
"status": "included",
"slot": 15565969,
"block": 26318444,
"txHash": "0x3cc2d0b698d5c7e41ba4ea5ee874ae7689447ab57a683536c4499d863386ce10",
"pricePerGas": "0.95"
},
"ts": 1793615460000
}Bundle submission
Buyers of a whole block submit ordered transaction bundles for that block.
Submit a bundle
Planned/v1/bundlesAdds an ordered bundle to a slot you bought. To replace a bundle before the slot starts, send it again with the same uuid.
Auth Bearer token (wallet sign-in)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
networkbody | string | Yes | Network slug. |
slotbody | integer | Yes | A slot you own. |
txsbody | array | Yes | Signed transactions in order. |
revertingTxHashesbody | array | No | Hashes of transactions allowed to revert. |
uuidbody | string | No | Replacement key. |
curl -s -X POST "https://api.mygas.one/v1/bundles" \
-H "Authorization: Bearer $GW_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"network": "eth",
"slot": 15565970,
"txs": [
"0x02f8b1cd79e048c07dd7753eda83d7c58dfe0d5a0cf318656b3e6f0bade65c3b188cc102ddb8379c7ce654",
"0x02f8b126f74bde94fb78c8d5f08b79affd2b49c12a4b0062983475eb46c5296f62e338d74ff1fe4f7f505a"
],
"revertingTxHashes": [],
"uuid": "7d5e2c1a-4b3f-4e8d-9a6c-0f1b2d3e4a5b"
}'import os
import requests
r = requests.post(
"https://api.mygas.one/v1/bundles",
headers={"Authorization": f"Bearer {os.environ['GW_TOKEN']}"},
json={
"network": "eth",
"slot": 15565970,
"txs": [
"0x02f8b1cd79e048c07dd7753eda83d7c58dfe0d5a0cf318656b3e6f0bade65c3b188cc102ddb8379c7ce654",
"0x02f8b126f74bde94fb78c8d5f08b79affd2b49c12a4b0062983475eb46c5296f62e338d74ff1fe4f7f505a",
],
"revertingTxHashes": [],
"uuid": "7d5e2c1a-4b3f-4e8d-9a6c-0f1b2d3e4a5b",
},
timeout=10,
)
print(r.json()["data"])const res = await fetch("https://api.mygas.one/v1/bundles", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.GW_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
network: "eth",
slot: 15565970,
txs: [
"0x02f8b1cd79e048c07dd7753eda83d7c58dfe0d5a0cf318656b3e6f0bade65c3b188cc102ddb8379c7ce654",
"0x02f8b126f74bde94fb78c8d5f08b79affd2b49c12a4b0062983475eb46c5296f62e338d74ff1fe4f7f505a",
],
revertingTxHashes: [],
uuid: "7d5e2c1a-4b3f-4e8d-9a6c-0f1b2d3e4a5b",
}),
});
const { data } = await res.json();
console.log(data);{
"success": true,
"data": {"bundleId": "bd_2f7a90", "slot": 15565970, "status": "accepted", "position": 1},
"ts": 1793615460000
}Realtime RPC
A JSON-RPC endpoint with the standard Ethereum methods and additional gwei_ methods. A realtime builder streams preconfirmed state between blocks, so an app gets the result of a transaction in well under a second. Beta in Q3 2027.
Send a transaction
Plannedeth_sendRawTransactionWorks as on a standard Ethereum node. Transactions sent to this endpoint go to the realtime builder and receive a preconfirmation once executed.
Endpoint https://rpc.mygas.one/realtime/eth
curl -s -X POST "https://rpc.mygas.one/realtime/eth" \
-H "X-GWEI-KEY: $GW_KEY" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_sendRawTransaction",
"params": [
"0x02f8b14261e5351d30b49895d1a0d1f13dce20c4fd32f640d0032634f087e51b429fe8110102c995f1abef543b5dfce8a981a049d7ccc7e90a88d519448fb2"
]
}'import os
import requests
r = requests.post(
"https://rpc.mygas.one/realtime/eth",
headers={"X-GWEI-KEY": os.environ["GW_KEY"]},
json={
"jsonrpc": "2.0",
"id": 1,
"method": "eth_sendRawTransaction",
"params": [
"0x02f8b14261e5351d30b49895d1a0d1f13dce20c4fd32f640d0032634f087e51b429fe8110102c995f1abef543b5dfce8a981a049d7ccc7e90a88d519448fb2",
],
},
timeout=10,
)
print(r.json()["data"])const res = await fetch("https://rpc.mygas.one/realtime/eth", {
method: "POST",
headers: {
"X-GWEI-KEY": process.env.GW_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
jsonrpc: "2.0",
id: 1,
method: "eth_sendRawTransaction",
params: [
"0x02f8b14261e5351d30b49895d1a0d1f13dce20c4fd32f640d0032634f087e51b429fe8110102c995f1abef543b5dfce8a981a049d7ccc7e90a88d519448fb2",
],
}),
});
const { data } = await res.json();
console.log(data);{
"jsonrpc": "2.0",
"id": 1,
"result": "0xef9ebdd25b001a3ff416d4a3baf69dad8199bfca8b6f3a6a9421cc1c93016f1c"
}Get a preconfirmation
Plannedgwei_getPreconfirmationReturns the preconfirmed receipt of a transaction, its sub-block number and the preconfirmation latency.
Endpoint https://rpc.mygas.one/realtime/eth
curl -s -X POST "https://rpc.mygas.one/realtime/eth" \
-H "X-GWEI-KEY: $GW_KEY" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "gwei_getPreconfirmation",
"params": [
"0xef9ebdd25b001a3ff416d4a3baf69dad8199bfca8b6f3a6a9421cc1c93016f1c"
]
}'import os
import requests
r = requests.post(
"https://rpc.mygas.one/realtime/eth",
headers={"X-GWEI-KEY": os.environ["GW_KEY"]},
json={
"jsonrpc": "2.0",
"id": 1,
"method": "gwei_getPreconfirmation",
"params": [
"0xef9ebdd25b001a3ff416d4a3baf69dad8199bfca8b6f3a6a9421cc1c93016f1c",
],
},
timeout=10,
)
print(r.json()["data"])const res = await fetch("https://rpc.mygas.one/realtime/eth", {
method: "POST",
headers: {
"X-GWEI-KEY": process.env.GW_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
jsonrpc: "2.0",
id: 1,
method: "gwei_getPreconfirmation",
params: [
"0xef9ebdd25b001a3ff416d4a3baf69dad8199bfca8b6f3a6a9421cc1c93016f1c",
],
}),
});
const { data } = await res.json();
console.log(data);{
"jsonrpc": "2.0",
"id": 1,
"result": {
"status": "preconfirmed",
"slot": 15565969,
"subBlock": 37,
"latencyMs": 84,
"receipt": {"status": "0x1", "gasUsed": "0x2b4f8", "logsCount": 3}
}
}Stream realtime state
Plannedgwei_subscribeRealtimeStateOpens a subscription over the WebSocket connection to the RPC. After each sub-block, it pushes balance and storage changes for the given addresses. Returns a subscription id.
Endpoint https://rpc.mygas.one/realtime/eth
curl -s -X POST "https://rpc.mygas.one/realtime/eth" \
-H "X-GWEI-KEY: $GW_KEY" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "gwei_subscribeRealtimeState",
"params": [
{
"addresses": [
"0x5eF3a9c2B71d40E8a6F1c9D2b84E7A0c3F96d21B"
]
}
]
}'import os
import requests
r = requests.post(
"https://rpc.mygas.one/realtime/eth",
headers={"X-GWEI-KEY": os.environ["GW_KEY"]},
json={
"jsonrpc": "2.0",
"id": 1,
"method": "gwei_subscribeRealtimeState",
"params": [
{
"addresses": ["0x5eF3a9c2B71d40E8a6F1c9D2b84E7A0c3F96d21B"],
},
],
},
timeout=10,
)
print(r.json()["data"])const res = await fetch("https://rpc.mygas.one/realtime/eth", {
method: "POST",
headers: {
"X-GWEI-KEY": process.env.GW_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
jsonrpc: "2.0",
id: 1,
method: "gwei_subscribeRealtimeState",
params: [
{
addresses: ["0x5eF3a9c2B71d40E8a6F1c9D2b84E7A0c3F96d21B"],
},
],
}),
});
const { data } = await res.json();
console.log(data);{
"jsonrpc": "2.0",
"id": 1,
"result": "0x9ce59a13059e417087c02d3236a0b1cc"
}Validator
Endpoints for validators and node operators that sell blockspace. Keys are registered with a BLS signature, and commitments are backed by collateral. The Commit-Boost module signs on the node. These endpoints manage registration and collateral. Testnet in Q2 2027.
Register validators
Planned/v1/validators/registerRegisters validator keys. Each key signs the registration message mygas.one validator registration · {pubkey} · {payoutAddress} · {timestamp} with its BLS key.
Auth Bearer token (wallet sign-in)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
pubkeysbody | array | Yes | Objects with pubkey and BLS signature, up to 100 per call. |
payoutAddressbody | string | Yes | Address that receives market proceeds. |
collateralPerSlotbody | string | No | Collateral reserved for each sold slot, in ETH. |
curl -s -X POST "https://api.mygas.one/v1/validators/register" \
-H "Authorization: Bearer $GW_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"pubkeys": [
{
"pubkey": "0x74de739988b886e7577496a2c8773e130f7eb19731662b5e803b61ba4168160adb59261ff2d3c425c8d99d19bdd0b6cc",
"signature": "0xfc6791ce680ce2b27c8af6666259bbc471fb3be24a0b80316f688d3e481a65c2011bef2c328a72c5e5b77518b1018f134a069e3fab8c3bfc5e740e61572b4e3c02eaa7f3b4a715e4e48dd74089a58f3aef3416f9386bd8773c9d51940ea4e095"
}
],
"payoutAddress": "0x5eF3a9c2B71d40E8a6F1c9D2b84E7A0c3F96d21B",
"collateralPerSlot": "0.05"
}'import os
import requests
r = requests.post(
"https://api.mygas.one/v1/validators/register",
headers={"Authorization": f"Bearer {os.environ['GW_TOKEN']}"},
json={
"pubkeys": [
{
"pubkey": "0x74de739988b886e7577496a2c8773e130f7eb19731662b5e803b61ba4168160adb59261ff2d3c425c8d99d19bdd0b6cc",
"signature": "0xfc6791ce680ce2b27c8af6666259bbc471fb3be24a0b80316f688d3e481a65c2011bef2c328a72c5e5b77518b1018f134a069e3fab8c3bfc5e740e61572b4e3c02eaa7f3b4a715e4e48dd74089a58f3aef3416f9386bd8773c9d51940ea4e095",
},
],
"payoutAddress": "0x5eF3a9c2B71d40E8a6F1c9D2b84E7A0c3F96d21B",
"collateralPerSlot": "0.05",
},
timeout=10,
)
print(r.json()["data"])const res = await fetch("https://api.mygas.one/v1/validators/register", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.GW_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
pubkeys: [
{
pubkey: "0x74de739988b886e7577496a2c8773e130f7eb19731662b5e803b61ba4168160adb59261ff2d3c425c8d99d19bdd0b6cc",
signature: "0xfc6791ce680ce2b27c8af6666259bbc471fb3be24a0b80316f688d3e481a65c2011bef2c328a72c5e5b77518b1018f134a069e3fab8c3bfc5e740e61572b4e3c02eaa7f3b4a715e4e48dd74089a58f3aef3416f9386bd8773c9d51940ea4e095",
},
],
payoutAddress: "0x5eF3a9c2B71d40E8a6F1c9D2b84E7A0c3F96d21B",
collateralPerSlot: "0.05",
}),
});
const { data } = await res.json();
console.log(data);{
"success": true,
"data": {
"registered": 1,
"pending": 0,
"rejected": [],
"payoutAddress": "0x5eF3a9c2B71d40E8a6F1c9D2b84E7A0c3F96d21B"
},
"ts": 1793615460000
}List validators
Planned/v1/validatorsReturns your registered keys with status, collateral and commitment history.
Auth Bearer token (wallet sign-in)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
statusquery | string | No | active, pending or exited. |
curl -s "https://api.mygas.one/v1/validators" \
-H "Authorization: Bearer $GW_TOKEN"import os
import requests
r = requests.get(
"https://api.mygas.one/v1/validators",
headers={"Authorization": f"Bearer {os.environ['GW_TOKEN']}"},
timeout=10,
)
print(r.json()["data"])const res = await fetch("https://api.mygas.one/v1/validators", {
headers: {
"Authorization": `Bearer ${process.env.GW_TOKEN}`,
},
});
const { data } = await res.json();
console.log(data);{
"success": true,
"data": [
{
"pubkey": "0x74de739988b886e7577496a2c8773e130f7eb19731662b5e803b61ba4168160adb59261ff2d3c425c8d99d19bdd0b6cc",
"status": "active",
"collateral": "1.50",
"collateralPerSlot": "0.05",
"slotsSold": 0,
"commitmentsKept": 0,
"commitmentsBroken": 0
}
],
"page": {"cursor": null, "count": 1},
"ts": 1793615460000
}Manage collateral
Planned/v1/validators/collateralDeposits or withdraws collateral. Collateral can be withdrawn after all sold slots it backs have passed.
Auth Bearer token (wallet sign-in)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
actionbody | string | Yes | deposit or withdraw. |
amountbody | string | Yes | Amount in ETH. |
curl -s -X POST "https://api.mygas.one/v1/validators/collateral" \
-H "Authorization: Bearer $GW_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"action": "deposit",
"amount": "1.0"
}'import os
import requests
r = requests.post(
"https://api.mygas.one/v1/validators/collateral",
headers={"Authorization": f"Bearer {os.environ['GW_TOKEN']}"},
json={
"action": "deposit",
"amount": "1.0",
},
timeout=10,
)
print(r.json()["data"])const res = await fetch("https://api.mygas.one/v1/validators/collateral", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.GW_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
action: "deposit",
amount: "1.0",
}),
});
const { data } = await res.json();
console.log(data);{
"success": true,
"data": {
"collateral": "2.50",
"locked": "0.00",
"available": "2.50",
"txHash": "0xbd1d6854575622f856469602d1ba9f20df4875b15b0be23b7ac193fe04072755"
},
"ts": 1793615460000
}x402 agentic payments
PlannedAn agent pays for an API request with one signature over HTTP, using the open x402 payment pattern based on status code 402. With mygas.one, the payment can include an inclusion preconfirmation, so the payment is preconfirmed in well under a second. Beta in Q3 2027.
- Request. The agent calls a paid resource without payment.
- 402. The server returns
402 Payment Requiredwith the accepted payment options in the body. Theextra.gweiInclusionfield requests preconfirmed settlement. - Pay. The agent signs a payment for the listed asset and amount and repeats the request with the base64-encoded payload in the
X-PAYMENTheader. - Settle. The facilitator verifies the signature, buys inclusion through mygas.one and settles on chain.
- Deliver. The server returns
200with the content and anX-PAYMENT-RESPONSEheader that contains the transaction and the preconfirmation.
# 1. Ask for the resource without paying
curl -i https://api.example.com/v1/quote
# 2. Retry with the signed payment payload
curl -i https://api.example.com/v1/quote \
-H "X-PAYMENT: eyJ4NDAyVmVyc2lvbiI6MSwic2NoZW1lIjoiZXhhY3QiLCJuZXR3b3JrIjoiYmFzZSJ9"import base64, json, requests
url = "https://api.example.com/v1/quote"
r = requests.get(url, timeout=10)
if r.status_code == 402:
option = r.json()["accepts"][0]
payment = sign_payment(option) # your wallet signs the exact amount
header = base64.b64encode(json.dumps(payment).encode()).decode()
r = requests.get(url, headers={"X-PAYMENT": header}, timeout=10)
print(r.status_code, r.headers.get("X-PAYMENT-RESPONSE"))const url = "https://api.example.com/v1/quote";
let res = await fetch(url);
if (res.status === 402) {
const { accepts } = await res.json();
const payment = await signPayment(accepts[0]); // your wallet signs the exact amount
res = await fetch(url, { headers: { "X-PAYMENT": btoa(JSON.stringify(payment)) } });
}
console.log(res.status, res.headers.get("X-PAYMENT-RESPONSE"));{
"x402Version": 1,
"error": "X-PAYMENT header is required",
"accepts": [
{
"scheme": "exact",
"network": "base",
"maxAmountRequired": "10000",
"resource": "https://api.example.com/v1/quote",
"description": "One market quote",
"mimeType": "application/json",
"payTo": "0x2B7d4E9a1C3f5A8b6D0e2F4c7A9b1D3e5F7a9C21",
"maxTimeoutSeconds": 60,
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"extra": {
"name": "USD Coin",
"version": "2",
"gweiInclusion": {"mode": "preconf", "slot": "next"}
}
}
]
}{
"success": true,
"transaction": "0x398003680e7e3b35183ef8333c4774ec50cd1c1bac7adac1a4b7d0b352ad6074",
"network": "base",
"payer": "0x5eF3a9c2B71d40E8a6F1c9D2b84E7A0c3F96d21B",
"gweiPreconf": {"id": "pc_6b20d4", "status": "preconfirmed", "latencyMs": 91}
}WebSocket
Gas, forecast and order updates over one connection.
Path
Connect to wss://ws.mygas.one/v1 (testnet: wss://ws.testnet.mygas.one/v1). Pass your API key in the key query parameter. The server closes a connection after 60 seconds without messages. Send a ping every 20 to 30 seconds.
wss://ws.mygas.one/v1?key=gk_live_your_key_hereMessage structure
A client message has an op, optional args and a client-chosen id. The server replies to each operation with an ack that has the same id, and sends events with type: "event".
| Field | Direction | Description |
|---|---|---|
op | client | subscribe, unsubscribe, auth, ping or query. |
args | client | Channels for subscriptions, or parameters for auth and query. |
id | both | Matches a request to its ack. |
type | server | ack, event, pong or error. |
channel | server | Event channel. |
data | server | Event or query payload. |
{
"op": "subscribe",
"args": ["gas.eth", "gas.base"],
"id": 1
}{
"type": "ack",
"id": 1,
"op": "subscribe",
"success": true,
"channels": ["gas.eth", "gas.base"]
}Commands
| Op | Args | Description |
|---|---|---|
subscribe | array of channels | Subscribes to each channel. Up to 50 per connection. |
unsubscribe | array of channels | Removes the subscriptions. |
auth | {"token": access token} | Enables private channels on this connection. Send again after a token refresh. |
ping | none | Keeps the connection open. The server replies with pong. |
query | {"method", "params"} | Single request equivalent to a REST read, such as points or gas. |
{
"op": "query",
"id": 7,
"args": {
"method": "points",
"params": {"address": "0x5eF3a9c2B71d40E8a6F1c9D2b84E7A0c3F96d21B"}
}
}{
"type": "ack",
"id": 7,
"op": "query",
"success": true,
"data": {"points": 68391, "grade": "RON 98"}
}Public channels
| Channel | Status | Pushes |
|---|---|---|
gas.{network} | Preview | Base fee, priority fee tiers and transfer cost on each new block. |
forecast.{network} | Preview | Updated 24-hour forecast, once per hour. |
markets.blocks.{network} | Planned | Order book and trades of whole block markets. |
markets.inclusion.{network} | Planned | Available gas and price in inclusion markets. |
{
"type": "event",
"channel": "gas.eth",
"data": {
"block": 26318443,
"baseFee": "0.405",
"priorityFee": {"slow": "0.010", "standard": "0.050", "fast": "0.200"},
"transferCostUsd": {"standard": "0.0326"}
},
"ts": 1793615472000
}Private channels
Send auth with an access token before subscribing.
| Channel | Status | Pushes |
|---|---|---|
points | Planned | Your receipt, when linked wallets change or totals are recomputed. |
limitSend | Planned | Status changes of your Limit send orders. |
refuel | Planned | Status of each refuel leg. |
orders | Planned | Fills and status changes of market orders and preconfirmations. |
{
"type": "event",
"channel": "limitSend",
"data": {"id": "ls_4d81c2", "status": "sent", "sentFeeGwei": "0.381"},
"ts": 1793673792000
}Example client
A client that subscribes to Ethereum and Base gas, sends ping to keep the connection open and prints each update.
# Interactive session with websocat
websocat "wss://ws.mygas.one/v1?key=$GW_KEY"
# then type:
# {"op":"subscribe","args":["gas.eth","gas.base"],"id":1}import asyncio, json, os
import websockets
URL = f"wss://ws.mygas.one/v1?key={os.environ['GW_KEY']}"
async def keepalive(ws):
while True:
await asyncio.sleep(25)
await ws.send(json.dumps({"op": "ping"}))
async def main():
async with websockets.connect(URL) as ws:
await ws.send(json.dumps({"op": "subscribe", "args": ["gas.eth", "gas.base"], "id": 1}))
asyncio.create_task(keepalive(ws))
async for raw in ws:
msg = json.loads(raw)
if msg.get("type") == "event":
print(msg["channel"], msg["data"]["baseFee"], "gwei")
asyncio.run(main())const ws = new WebSocket(`wss://ws.mygas.one/v1?key=${process.env.GW_KEY}`);
ws.onopen = () => {
ws.send(JSON.stringify({ op: "subscribe", args: ["gas.eth", "gas.base"], id: 1 }));
setInterval(() => ws.send(JSON.stringify({ op: "ping" })), 25000);
};
ws.onmessage = (e) => {
const msg = JSON.parse(e.data);
if (msg.type === "event") console.log(msg.channel, msg.data.baseFee, "gwei");
};Lookup tables
Error codes and enum values used by the API.
Error codes
| Code | HTTP | Meaning |
|---|---|---|
1000 | 500 | Internal error. Retry with backoff. |
1001 | 503 | Maintenance. Status updates are posted on our X account. |
1100 | 400 | Invalid parameter. |
1101 | 400 | Missing parameter. |
1102 | 400 | Invalid address for the given network. |
1103 | 400 | Unsupported network slug. |
1200 | 401 | Missing or unknown API key. |
1201 | 401 | Access token expired. Refresh it. |
1202 | 401 | Signature does not match the message or the address. |
1203 | 401 | Nonce expired or already used. |
1204 | 403 | Not allowed for this account. |
1300 | 429 | Rate limit reached. See Retry-After. |
1400 | 404 | Resource not found. |
1500 | 409 | Season is closed. Totals are final. |
1600 | 409 | Wallet already linked to an account. |
1601 | 409 | Wallet limit reached, 10 per account. |
1700 | 410 | Quote expired. Request a new one. |
1701 | 400 | Insufficient balance for the request. |
1702 | 400 | Transaction fee cap does not match maxFeeGwei. |
1800 | 409 | Market closed for this slot. |
1801 | 400 | Order rejected by risk checks. |
1802 | 400 | Collateral too low for this commitment. |
Network slugs
All 50 Season 0 networks. The group query value is l1, l2 (ApeChain, an L3, is listed under l2) or nx.
| Slug | Network | Group | Address format |
|---|---|---|---|
eth | Ethereum | L1 & sidechains | 0x + 40 hex |
bnb | BNB Chain | L1 & sidechains | 0x + 40 hex |
pol | Polygon PoS | L1 & sidechains | 0x + 40 hex |
avax | Avalanche C-Chain | L1 & sidechains | 0x + 40 hex |
gno | Gnosis | L1 & sidechains | 0x + 40 hex |
sonic | Sonic | L1 & sidechains | 0x + 40 hex |
bera | Berachain | L1 & sidechains | 0x + 40 hex |
sei | Sei | L1 & sidechains | 0x + 40 hex |
hype | HyperEVM | L1 & sidechains | 0x + 40 hex |
monad | Monad | L1 & sidechains | 0x + 40 hex |
kaia | Kaia | L1 & sidechains | 0x + 40 hex |
cro | Cronos | L1 & sidechains | 0x + 40 hex |
glmr | Moonbeam | L1 & sidechains | 0x + 40 hex |
ron | Ronin | L1 & sidechains | 0x + 40 hex |
flow | Flow EVM | L1 & sidechains | 0x + 40 hex |
core | Core | L1 & sidechains | 0x + 40 hex |
rsk | Rootstock | L1 & sidechains | 0x + 40 hex |
xpl | Plasma | L1 & sidechains | 0x + 40 hex |
arb | Arbitrum One | L2 | 0x + 40 hex |
op | OP Mainnet | L2 | 0x + 40 hex |
base | Base | L2 | 0x + 40 hex |
zks | zkSync Era | L2 | 0x + 40 hex |
linea | Linea | L2 | 0x + 40 hex |
scroll | Scroll | L2 | 0x + 40 hex |
mnt | Mantle | L2 | 0x + 40 hex |
celo | Celo | L2 | 0x + 40 hex |
zora | Zora | L2 | 0x + 40 hex |
mode | Mode | L2 | 0x + 40 hex |
metis | Metis | L2 | 0x + 40 hex |
taiko | Taiko | L2 | 0x + 40 hex |
manta | Manta Pacific | L2 | 0x + 40 hex |
frax | Fraxtal | L2 | 0x + 40 hex |
opbnb | opBNB | L2 | 0x + 40 hex |
nova | Arbitrum Nova | L2 | 0x + 40 hex |
ink | Ink | L2 | 0x + 40 hex |
uni | Unichain | L2 | 0x + 40 hex |
son | Soneium | L2 | 0x + 40 hex |
world | World Chain | L2 | 0x + 40 hex |
lisk | Lisk | L2 | 0x + 40 hex |
ape | ApeChain | L3 | 0x + 40 hex |
katana | Katana | L2 | 0x + 40 hex |
xlayer | X Layer | L2 | 0x + 40 hex |
sol | Solana | Non-EVM | Base58, 32-44 chars |
tron | Tron | Non-EVM | Base58, starts with T |
ton | TON | Non-EVM | EQ/UQ user-friendly or raw 0:hex |
sui | Sui | Non-EVM | 0x + 64 hex |
apt | Aptos | Non-EVM | 0x + 64 hex |
stark | Starknet | Non-EVM | 0x + up to 64 hex |
near | NEAR | Non-EVM | name.near or 64 hex |
btc | Bitcoin | Non-EVM | bc1…, 1… or 3… |
Limit send statuses
| Status | Meaning |
|---|---|
queued | Accepted, checks in progress. |
waiting | Waiting for the fee to drop to your limit. |
sent | Broadcast to the network. |
confirmed | Included in a block. |
expired | The limit was not reached before expiresAt. |
cancelled | Cancelled by you while waiting. |
failed | Rejected by the network, for example because of a used nonce. |
Order statuses
| Status | Meaning |
|---|---|
pending | Received and waiting to be placed on the order book. |
open | On the order book. |
partially_filled | Part of the quantity is filled. |
filled | Fully filled. |
cancelled | Cancelled by you. |
rejected | Rejected by risk or collateral checks. |
expired | The slot started before the order was filled. |
settled | The slot has passed. The commitment was kept or the buyer was compensated. |
Market types
| Type | Prefix | What is traded |
|---|---|---|
whole_block | wb_ | An entire future block of one slot. |
inclusion_preconf | ip_ | Guaranteed inclusion of one transaction in a slot, priced per gas. |
realtime | rt_ | Priority in the realtime builder stream. Planned after mainnet markets. |
Transaction types
Types used in point breakdowns and account history.
| Type | Meaning |
|---|---|
transfer | Plain transfer of the native coin. |
contract_call | Any call to a contract. |
contract_deploy | Contract creation. |
reverted | Failed transaction. Its fee counts toward points. |
batch_7702 | Batch sent through an EIP-7702 delegation. |
limit_send | Transaction sent by a Limit send order. |
refuel | Gas delivered by Refuel. |
preconf | Transaction included through a preconfirmation. |