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.
特定の流動性プールの OHLCV ローソク足データを取得
cURL
curl --request GET \ --url https://api.chainstream.io/v2/token/{chain}/pool/{poolAddress}/candles \ --header 'Authorization: Bearer <token>'
import requests url = "https://api.chainstream.io/v2/token/{chain}/pool/{poolAddress}/candles" 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/token/{chain}/pool/{poolAddress}/candles', 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/token/{chain}/pool/{poolAddress}/candles", 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/token/{chain}/pool/{poolAddress}/candles" 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/token/{chain}/pool/{poolAddress}/candles") .header("Authorization", "Bearer <token>") .asString();
require 'uri' require 'net/http' url = URI("https://api.chainstream.io/v2/token/{chain}/pool/{poolAddress}/candles") 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
[ { "close": "51.2", "high": "51.8", "low": "50.1", "open": "50.5", "timestamp": 1709251200000, "volume": "1000000", "trades": 128, "volumeInTokenAmount": "42000.5" } ]
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
サポートされているネットワークに記載されているチェーン名 Supported blockchain chains
sol
eth
bsc
プールアドレス
ローソク足データの時間解像度 Candle resolution
1s
15s
30s
1m
3m
5m
15m
30m
1h
2h
4h
6h
8h
12h
1d
3d
1w
1M
価格タイプ:usd(デフォルト)またはネイティブトークン価格 Price type for candle data
usd
native
開始タイムスタンプ(Unix エポック秒)
終了タイムスタンプ(Unix エポック秒)
返すローソク足の数
プールローソク足を取得
Close price
"51.2"
High price
"51.8"
Low price
"50.1"
Open price
"50.5"
Timestamp
1709251200000
Volume in USD or native currency (depending on priceType)
"1000000"
Number of trades (swaps) in this candle bar
128
Base token quantity (e.g. number of CAKE or SOL tokens traded)
"42000.5"
このページは役に立ちましたか?