跳转到主要内容
GET
/
v1
/
gas
/
suggestion
/
{chain}
Get a gas suggestion for the specified chain
curl --request GET \
  --url https://li.quest/v1/gas/suggestion/{chain}

请求头

x-lifi-api-key
string

Authentication header, contact support if you want to get registered.

路径参数

chain
string
必填

Chain from which gas prices should be shown (can be a chain id or a chain key)

查询参数

fromChain
string

If fromChain and fromToken are specified, the result will contain information about how much fromToken amount the user has to send to receive the suggested gas amount on the requested chain.

fromToken
string

If fromChain and fromToken are specified, the result will contain information about how much fromToken amount the user has to send to receive the suggested gas amount on the requested chain.

响应

200

{ "available": true, "recommended": { "token": { "address": "0x0000000000000000000000000000000000000000", "chainId": 137, "symbol": "MATIC", "decimals": 18, "name": "MATIC", "priceUSD": "1.219821", "logoURI": "https://static.debank.com/image/matic_token/logo_url/matic/6f5a6b6f0732a7a235131bd7804d357c.png", "coinKey": "MATIC" }, "amount": "190510922050970750", "amountUsd": "0.23" }, "limit": { "token": { "address": "0x0000000000000000000000000000000000000000", "chainId": 137, "symbol": "MATIC", "decimals": 18, "name": "MATIC", "priceUSD": "1.219821", "logoURI": "https://static.debank.com/image/matic_token/logo_url/matic/6f5a6b6f0732a7a235131bd7804d357c.png", "coinKey": "MATIC" }, "amount": "1639584824330782959", "amountUsd": "2" }, "fromToken": { "address": "eth", "symbol": "ETH", "decimals": 18, "chainId": 1, "name": "ETH", "coinKey": "ETH", "priceUSD": "1622.39", "logoURI": "https://static.debank.com/image/token/logo_url/eth/935ae4e4d1d12d59a99717a24f2540b5.png" }, "fromAmount": "141766159801281" }