跳转到主要内容
GET
/
v1
/
gas
/
status
Get status information about a lifuel transaction
curl --request GET \
  --url https://li.quest/v1/gas/status
import requests

url = "https://li.quest/v1/gas/status"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://li.quest/v1/gas/status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://li.quest/v1/gas/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://li.quest/v1/gas/status"

req, _ := http.NewRequest("GET", url, nil)

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://li.quest/v1/gas/status")
.asString();
require 'uri'
require 'net/http'

url = URI("https://li.quest/v1/gas/status")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
{
  "sending": {
    "txHash": "0x74546ce8aac58d33c212474293dcfeeadecef115847da75131a2ff6692e03b96",
    "txLink": "https://polygonscan.com/tx/0x74546ce8aac58d33c212474293dcfeeadecef115847da75131a2ff6692e03b96",
    "amount": "10000",
    "token": {
      "address": "0x8f3cf7ad23cd3cadbd9735aff958023239c6a063",
      "symbol": "DAI",
      "decimals": 18,
      "chainId": 137,
      "name": "(PoS) Dai Stablecoin",
      "coinKey": "DAI",
      "priceUSD": "1",
      "logoURI": "https://static.debank.com/image/matic_token/logo_url/0x8f3cf7ad23cd3cadbd9735aff958023239c6a063/549c4205dbb199f1b8b03af783f35e71.png"
    },
    "chainId": 137,
    "block": 39397739
  },
  "receiving": {
    "txHash": "0x74546ce8aac58d33c212474293dcfeeadecef115847da75131a2ff6692e03b96",
    "txLink": "https://polygonscan.com/tx/0x74546ce8aac58d33c212474293dcfeeadecef115847da75131a2ff6692e03b96",
    "amount": "10000",
    "token": {
      "address": "0x8f3cf7ad23cd3cadbd9735aff958023239c6a063",
      "symbol": "DAI",
      "decimals": 18,
      "chainId": 137,
      "name": "(PoS) Dai Stablecoin",
      "coinKey": "DAI",
      "priceUSD": "1",
      "logoURI": "https://static.debank.com/image/matic_token/logo_url/0x8f3cf7ad23cd3cadbd9735aff958023239c6a063/549c4205dbb199f1b8b03af783f35e71.png"
    },
    "chainId": 137,
    "block": 39397739
  }
}

请求头

x-lifi-api-key
string

Authentication header, register in the LI.FI Partner Portal (https://portal.li.fi/ ) to get your API Key.

查询参数

txHash
string
必填

The transaction hash that started the gas refilling process

响应

200 - application/json

The status of a lifuel operation

status
enum<string>
可用选项:
NOT_FOUND,
PENDING,
DONE
sending
object
receiving
object