idstring必填
Exchange ID. *refers to [`/exchanges/list`](/reference/exchanges-list).
預設:"binance"
https://api.sandbase.ai/v1/api/coingecko/exchanges-by-idGet exchange's data (name, year established, country, ...), exchange volume in BTC and top 100 tickers based on exchange's ID
您的輸出會顯示在這裡
完成輸入後,點擊執行。
Returns profile data for one crypto exchange on CoinGecko, including its country, year established, 24-hour BTC trading volume and trust score. It also returns a list of the exchange's tickers with last traded values and volumes. The input is an exchange id, such as binance.
trust_score, trust_score_rank and trade_volume_24h_btc.curl -X POST "https://api.sandbase.ai/v1/api/coingecko/exchanges-by-id" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"id": "binance"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Exchange ID. *refers to /exchanges/list. |
dex_pair_format | string | No | Set to symbol to display DEX pair base and target as symbols. Default: contract_address |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"alert_notice": "",
"centralized": true,
"coins": 521,
"country": "Cayman Islands",
"description": "One of the world’s largest cryptocurrency exchanges by trading volume, offering …",
"facebook_url": "https://www.facebook.com/binanceexchange",
"has_trading_incentive": false,
"image": "https://coin-images.coingecko.com/markets/images/52/small/binance.jpg?1706864274",
"name": "Binance",
"other_url_1": "https://medium.com/binanceexchange",
"other_url_2": "https://steemit.com/@binanceexchange",
"pairs": 1377
}
| Field | Meaning |
|---|---|
name / country / year_established / centralized | Exchange name, country, the year it was established, and whether it is a centralized exchange (true) or not. |
trade_volume_24h_btc | Trading volume of the exchange over 24 hours, shown in BTC. |
trust_score / trust_score_rank | The exchange's trust score and its rank by that score. |
coins / pairs | Number of coins and number of trading pairs listed on the exchange. |
public_notice / alert_notice | Notices about the exchange. They can be empty strings, and long text may be cut. |
tickers[].base / tickers[].target | The base and target of each trading pair, for example BTC and USDT. |
tickers[].last / tickers[].volume | Last traded value of the pair and its trading volume. |
tickers[].converted_last / tickers[].converted_volume | Last traded value and volume converted to btc, eth and usd. |
tickers[].coin_id / tickers[].target_coin_id | CoinGecko coin IDs for the base and target coins. |
status_updates[].created_at / status_updates[].description | Time and text of a past status update posted for the exchange. |
id values from CoinGecko Exchanges List (ID Map).dex_pair_format to symbol to show DEX pair base and target as symbols instead of contract addresses.last_traded_at and status_updates[].created_at use ISO 8601 format.coin_id values from tickers with CoinGecko Coin Data by ID to look up each coin. For a longer ticker list, call CoinGecko Exchange Tickers by ID.$0.008 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
開始建置
具備統一驗證與用量追蹤的平台 API 端點。
curl -X POST "https://api.sandbase.ai/v1/api/coingecko/exchanges-by-id" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"id": "binance"
}'請將您的 SandBase API 金鑰設定在伺服器環境中。請求使用 Bearer 驗證。
export SANDBASE_API_KEY="YOUR_API_KEY"請將金鑰保留在伺服器端,不要在瀏覽器程式碼中公開。
idstring必填Exchange ID. *refers to [`/exchanges/list`](/reference/exchanges-list).
預設:"binance"
dex_pair_formatstringSet to `symbol` to display DEX pair base and target as symbols. Default: `contract_address`
可能值:contract_address, symbol
這是此 API 的已儲存範例回應;檢視時不會發出即時請求。
尚未發布已儲存回應。請在 Playground 中執行 API 以檢視其回應。
探索更多
| API | 價格 | 回應 |
|---|---|---|
CoinGecko | 每次呼叫 $0.008 | JSON |
CoinGecko | 每次呼叫 $0.008 | JSON |
CoinGecko | 每次呼叫 $0.008 | JSON |
CoinGecko | 每次呼叫 $0.008 | JSON |
CoinGecko | 每次呼叫 $0.008 | JSON |
CoinGecko | 每次呼叫 $0.008 | JSON |
問題
使用 POST 請求將您的 SandBase API 金鑰放在 Authorization 標頭(Bearer)中,並以 JSON 主體傳入參數,即可呼叫 https://api.sandbase.ai/v1/api/coingecko/exchanges-by-id。您也可以直接在本頁的 Playground 試用,不必撰寫程式碼。
每次 $0.008,並從您的 SandBase 餘額中扣款。您只會為實際發出的呼叫付費;沒有訂閱方案。
必要:id (string)。 選填:dex_pair_format(contract_address, symbol 之一)。 本頁的 Parameters 表格與 Playground 會列出每個欄位。
在同一個 HTTP 請求中回傳的 JSON 回應(同步)。 本頁的 README 包含範例回應。
不需要。CoinGecko Exchange Data by ID 是透過 SandBase 運作,因此一組 SandBase API 金鑰即可使用此端點以及目錄中的其他所有 API 和模型。您不需要另外申請 CoinGecko API 存取權。