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
เอาต์พุตของคุณจะแสดงที่นี่
กรอกอินพุตให้ครบ แล้วคลิก Run
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.
เริ่มสร้าง
เอ็นด์พอยต์ของ Platform 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 key ของคุณในสภาพแวดล้อมฝั่งเซิร์ฟเวอร์ คำขอจะใช้การยืนยันตัวตนแบบ Bearer
export SANDBASE_API_KEY="YOUR_API_KEY"เก็บ 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 นี้; จะไม่มีการส่งคำขอจริงเมื่อเปิดดู
ยังไม่มีการเผยแพร่การตอบกลับที่บันทึกไว้ ให้รัน API ใน Playground เพื่อดูการตอบกลับ
สำรวจเพิ่มเติม
| 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 ไปที่ https://api.sandbase.ai/v1/api/coingecko/exchanges-by-id โดยใส่ SandBase API key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน Playground บนหน้านี้โดยไม่ต้องเขียนโค้ด
$0.008 ต่อครั้ง คิดจากยอดคงเหลือ SandBase ของคุณ คุณจะถูกเรียกเก็บเฉพาะคำขอที่คุณส่งเท่านั้น ไม่มีค่าสมาชิกรายเดือน
ที่ต้องระบุ: id (string). ตัวเลือก: dex_pair_format (หนึ่งใน contract_address, symbol). ตาราง Parameters และ Playground ในหน้านี้แสดงทุกฟิลด์
การตอบกลับ JSON ที่ส่งกลับในคำขอ HTTP เดียวกัน (แบบซิงโครนัส) README บนหน้านี้มีตัวอย่างการตอบกลับ
ไม่จำเป็น CoinGecko Exchange Data by ID ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง CoinGecko API แยกต่างหาก