Gas Price
The /gas
endpoint lets you find out the gas price on a chain supported by Hypersonic with a simple ping.
https://api.hypersonic.exchange/v1/gas/{chain_name}
Request type: GET
Parameters
chain_name
Responses
200
Successful request.5xx
Service unavailable.
{
"success": true,
"data": {
"gas": {
"instant": 1923999,
"fast": 1763666,
"normal": 1603333
},
"eip1559Gas": {
"base": 603333,
"prio": [1000000000, 900000000, 800000000, 600000000],
"max": [1000603333, 900603333, 800603333, 600603333]
},
"blockNumber": 126688732
},
"timestamp": "2000-01-01T00:00:00.000Z"
}
Response Fields
success
: Boolean indicating if the request was successful.gas
: Object related to gasPrice includinginstant
,fast
&normal
values.eip1559Gas
: Object related to priorityFees includingbase
,prio
&max
values.blockNumber
: Current block number on the chain.timestamp
: UTC timestamp of the filled gas infos request.
Try it yourself
To ping the API using curl, you can use the following command:
curl https://api.hypersonic.exchange/v1/gas/optimism
This will send a GET
request to the infos endpoint and return the response.