Trade
交易 - 列表
取得代幣交易列表
GET
/
v2
/
trade
/
{chain}
交易 - 列表
curl --request GET \
--url https://api.chainstream.io/v2/trade/{chain} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.chainstream.io/v2/trade/{chain}"
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/trade/{chain}', 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/trade/{chain}",
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/trade/{chain}"
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/trade/{chain}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chainstream.io/v2/trade/{chain}")
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{
"data": [
{
"accountOwnerAddress": "3xd4LGVWtYXLBspR6X5JWbW49NXmEehfPtX6Kqx98b4w",
"blockHeight": 332417228,
"blockTimestamp": 1717334400000,
"chain": "sol",
"poolAddress": "58oQChx4yWmvKdwLLZzBi4ChoCc2fqCUWBkwMihLYQo2",
"sideTokenAddress": "So11111111111111111111111111111111111111112",
"sideTokenAmount": "1",
"sideTokenAmountInNative": "150",
"sideTokenAmountInUsd": "150",
"sideTokenName": "Wrapped SOL",
"sideTokenPriceInNative": "1",
"sideTokenPriceInUsd": "150",
"sideTokenSymbol": "SOL",
"status": "SUCCEEDED",
"tokenAddress": "6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN",
"tokenAmount": "1000000",
"tokenAmountInNative": "100",
"tokenAmountInUsd": "8800000",
"tokenName": "TRUMP",
"tokenPriceInNative": "0.0001",
"tokenPriceInUsd": "8.80",
"tokenSymbol": "TRUMP",
"transactionSignature": "37XpPt9Ak6JiE1V3sftJDtdUsvR9FVFRqkZmoT3dp4BTD9pgyTWn1XgHH6R7NjuJ4pBMAgj8JvZtxQrf4s6NTC5F",
"type": "BUY",
"accountAddress": "<string>",
"addrType": 123,
"dexFeeInNative": "0.00025",
"dexFeeInUsd": "0.50",
"dexImage": "https://example.com/dex.png",
"dexProgramAddress": "whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc",
"dexProtocolFamily": "OrcaWhirpool",
"gasFee": 5000,
"gasFeeInNative": "0.000073",
"gasFeeInUsd": "0.011",
"historyBoughtAmount": "<string>",
"historySoldAmount": "<string>",
"historySoldIncome": "<string>",
"isOpenOrClose": 123,
"makerEventTags": [
"<string>"
],
"makerExchange": "<string>",
"makerName": "<string>",
"marketCapInUsd": "1500000.00",
"postBalance": "<string>",
"priorityFeeInNative": "0.000005",
"realizedProfitInUsd": "<string>",
"sideTokenImageUrl": "https://arweave.net/sol.png",
"tokenImageUrl": "https://arweave.net/token.png",
"totalTrade": 123,
"traderTags": [
"<string>"
],
"unrealizedProfitInUsd": "<string>"
}
],
"endCursor": "eyJpZCI6ImVuZCJ9",
"hasNext": false,
"hasPrev": false,
"startCursor": "eyJpZCI6InN0YXJ0In0=",
"total": 564094
}取得某條鏈上近期的 DEX 交易。可依代幣地址過濾以查看特定代幣的交易。回傳買賣方向、數量、價格及 DEX 資訊。
trade_get授權
bearer_authapi_key_auth
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
路徑參數
支援網路列表中的鏈名稱 Supported blockchain chains
可用選項:
sol, eth, bsc 查詢參數
分頁游標
每頁回傳結果數量
分頁方向(next 或 prev) Pagination direction
可用選項:
next, prev 代幣地址
錢包地址
池子地址
交易篩選的開始時間戳(Unix 秒級時間戳)
交易篩選的結束時間戳(Unix 秒級時間戳)
篩選此區塊高度之前的交易
篩選此區塊高度之後的交易
交易簽名/雜湊
交易類型篩選 Trade type
可用選項:
BUY, SELL 回應
200 - application/json
成功回應
Generic pagination response
Page data
Show child attributes
Show child attributes
Cursor for the end of current page
範例:
"eyJpZCI6ImVuZCJ9"
Whether there is a next page
範例:
false
Whether there is a previous page
範例:
false
Cursor for the start of current page
範例:
"eyJpZCI6InN0YXJ0In0="
Total number of items matching the query (not just the current page).
When None, the caller should treat it as unknown (backward-compatible).
範例:
564094
這個頁面有幫助嗎?
⌘I
交易 - 列表
curl --request GET \
--url https://api.chainstream.io/v2/trade/{chain} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.chainstream.io/v2/trade/{chain}"
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/trade/{chain}', 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/trade/{chain}",
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/trade/{chain}"
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/trade/{chain}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chainstream.io/v2/trade/{chain}")
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{
"data": [
{
"accountOwnerAddress": "3xd4LGVWtYXLBspR6X5JWbW49NXmEehfPtX6Kqx98b4w",
"blockHeight": 332417228,
"blockTimestamp": 1717334400000,
"chain": "sol",
"poolAddress": "58oQChx4yWmvKdwLLZzBi4ChoCc2fqCUWBkwMihLYQo2",
"sideTokenAddress": "So11111111111111111111111111111111111111112",
"sideTokenAmount": "1",
"sideTokenAmountInNative": "150",
"sideTokenAmountInUsd": "150",
"sideTokenName": "Wrapped SOL",
"sideTokenPriceInNative": "1",
"sideTokenPriceInUsd": "150",
"sideTokenSymbol": "SOL",
"status": "SUCCEEDED",
"tokenAddress": "6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN",
"tokenAmount": "1000000",
"tokenAmountInNative": "100",
"tokenAmountInUsd": "8800000",
"tokenName": "TRUMP",
"tokenPriceInNative": "0.0001",
"tokenPriceInUsd": "8.80",
"tokenSymbol": "TRUMP",
"transactionSignature": "37XpPt9Ak6JiE1V3sftJDtdUsvR9FVFRqkZmoT3dp4BTD9pgyTWn1XgHH6R7NjuJ4pBMAgj8JvZtxQrf4s6NTC5F",
"type": "BUY",
"accountAddress": "<string>",
"addrType": 123,
"dexFeeInNative": "0.00025",
"dexFeeInUsd": "0.50",
"dexImage": "https://example.com/dex.png",
"dexProgramAddress": "whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc",
"dexProtocolFamily": "OrcaWhirpool",
"gasFee": 5000,
"gasFeeInNative": "0.000073",
"gasFeeInUsd": "0.011",
"historyBoughtAmount": "<string>",
"historySoldAmount": "<string>",
"historySoldIncome": "<string>",
"isOpenOrClose": 123,
"makerEventTags": [
"<string>"
],
"makerExchange": "<string>",
"makerName": "<string>",
"marketCapInUsd": "1500000.00",
"postBalance": "<string>",
"priorityFeeInNative": "0.000005",
"realizedProfitInUsd": "<string>",
"sideTokenImageUrl": "https://arweave.net/sol.png",
"tokenImageUrl": "https://arweave.net/token.png",
"totalTrade": 123,
"traderTags": [
"<string>"
],
"unrealizedProfitInUsd": "<string>"
}
],
"endCursor": "eyJpZCI6ImVuZCJ9",
"hasNext": false,
"hasPrev": false,
"startCursor": "eyJpZCI6InN0YXJ0In0=",
"total": 564094
}
