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 free

Gas-token suggestion for a chain, weighted by the transfer the user is planning.

Parameters

nameintypedescription
chainIdpathstrrequiredNumeric chain id (1, 42161, 8453, …)
example: 1
fromChainquerystroptionalSource chain id of the pending transfer
example: 1
fromTokenquerystroptionalSource 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"