Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
取得特定 DEX 池子的詳細資訊
cURL
curl --request GET \ --url https://api.chainstream.io/v2/dexpools/{chain}/{poolAddress} \ --header 'Authorization: Bearer <token>'
import requests url = "https://api.chainstream.io/v2/dexpools/{chain}/{poolAddress}" headers = {"Authorization": "Bearer <token>"} response = requests.get(url, headers=headers) print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}}; fetch('https://api.chainstream.io/v2/dexpools/{chain}/{poolAddress}', 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://api.chainstream.io/v2/dexpools/{chain}/{poolAddress}", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "Authorization: Bearer <token>" ], ]); $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://api.chainstream.io/v2/dexpools/{chain}/{poolAddress}" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer <token>") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) }
HttpResponse<String> response = Unirest.get("https://api.chainstream.io/v2/dexpools/{chain}/{poolAddress}") .header("Authorization", "Bearer <token>") .asString();
require 'uri' require 'net/http' url = URI("https://api.chainstream.io/v2/dexpools/{chain}/{poolAddress}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer <token>' response = http.request(request) puts response.read_body
{ "chain": "sol", "createdBlockTimestamp": "2024-01-15T10:30:00.000Z", "feeRate": "0.003", "image": "https://ipfs.io/ipfs/bafkreid7667676767676767676767676767676767676767676767676767676767676767", "liquidityModel": 1, "poolAddress": "58oQChx4yWmvKdwLLZzBi4ChoCc2fqCUWBkwMihLYQo2", "programAddress": "whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc", "protocolFamily": "OrcaWhirpool", "protocolName": "OrcaWhirpool AMM V2", "tickSpacing": 64, "tokenAAddress": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "tokenALiquidity": { "amountInNative": "5000.123", "amountInUsd": "1000000.45", "decimals": 6, "priceNative": "0.005", "priceUsd": "1.0001", "tokenAddress": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "vaultAmount": "1000000000000" }, "tokenBAddress": "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB", "tokenBLiquidity": { "amountInNative": "5000.123", "amountInUsd": "1000000.45", "decimals": 6, "priceNative": "0.005", "priceUsd": "1.0001", "tokenAddress": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "vaultAmount": "1000000000000" }, "tokenCount": 2, "tvlInSol": "1000000.45", "tvlInUsd": "1000000.45", "type": 1, "version": 2 }
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
支援網路列表中的鏈名稱 Supported blockchain chains
sol
eth
bsc
池子地址
成功回應
DexPool detail
Chain identifier
Pool address
Token A address
Token B address
Creation block timestamp
Pool creator / initialize signer
Factory contract address
Fee rate
Image URL
Initial TVL in native token
Initial TVL in USD
Liquidity model
x >= 0
DEX program address
Protocol family
Protocol name
Tick spacing
Token selected as the display/enrichment row for pair-style pool lists.
Show child attributes
Token A liquidity
Token B liquidity
Token count
TVL in native token
TVL in USD
Pool type
Pool version
這個頁面有幫助嗎?