GET /pipeline/v1/gas/suggestion/{chainId}
Auth X-Hub-Key from API_HUB_KEYExecute
GET /run/lifi/pipeline/v1/gas/suggestion/{chainId}Cache cached 1s, never served stale past that windowCost free · weight 0 · standard rate classSource billing freeGas-token suggestion for a chain, weighted by the transfer the user is planning.
Parameters
| name | in | type | description | |
|---|---|---|---|---|
chainId | path | str | required | Numeric chain id (1, 42161, 8453, …) example: 1 |
fromChain | query | str | optional | Source chain id of the pending transfer example: 1 |
fromToken | query | str | optional | Source token address of the pending transfer example: 0x0000000000000000000000000000000000000000 |
Response
type: object
pagination: none
sample: {
"recommended": "object",
"limit": "object",
"available": "bool",
"fromToken": "object",
"fromAmount": "str"
}
Safe request
Reads the credential from API_HUB_KEY; it never appears in the URL.
curl -sH "X-Hub-Key: $API_HUB_KEY" "https://openapihub.dev/run/lifi/pipeline/v1/gas/suggestion/{chainId}?chainId=1&fromChain=1&fromToken=0x0000000000000000000000000000000000000000"