idstringbắt buộc
Exchange ID or derivative exchange ID. *refers to [`/exchanges/list`](/reference/exchanges-list) or [`/derivatives/exchanges/list`](/reference/derivatives-exchanges-list).
Mặc định: "binance"
https://api.sandbase.ai/v1/api/coingecko/api-volume-chartGet the historical volume chart data with time in UNIX and trading volume data in BTC based on exchange's ID
Đầu ra của bạn sẽ xuất hiện ở đây
Hoàn tất đầu vào, rồi nhấp Run.
Returns a time series of trading volume for one exchange on CoinGecko. It needs an exchange id and a days value, and returns volume in BTC for each timestamp.
binance on a line chart.curl -X POST "https://api.sandbase.ai/v1/api/coingecko/api-volume-chart" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"id": "binance", "days": "1"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
days | string | Yes | Data up to number of days ago. |
id | string | Yes | Exchange ID or derivative exchange ID. *refers to /exchanges/list or /derivatives/exchanges/list. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
[
[
1793604600000
]
]
| Field | Meaning |
|---|---|
[][0] | Timestamp of the data point. The value is a UNIX time in milliseconds, for example 1793604600000. |
[][1] | Trading volume of the exchange at that timestamp, returned as a string, for example "50120.06192454506". The API description states the volume is in BTC. Parse it as a number before doing math. |
[timestamp, volume] pairs, not an object. Points are in time order.id from CoinGecko Exchanges List (ID Map). Derivative exchange IDs also work.days must be one of 1, 7, 14, 30, 90, 180 or 365. Send it as a string.$0.008 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
Bắt đầu xây dựng
Endpoint API của nền tảng với xác thực và theo dõi mức sử dụng thống nhất.
curl -X POST "https://api.sandbase.ai/v1/api/coingecko/api-volume-chart" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"id": "binance",
"days": "1"
}'Đặt SandBase API key của bạn trong môi trường máy chủ. Các request sử dụng xác thực Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Giữ key của bạn trên máy chủ. Không hiển thị trong mã chạy trên trình duyệt.
idstringbắt buộcExchange ID or derivative exchange ID. *refers to [`/exchanges/list`](/reference/exchanges-list) or [`/derivatives/exchanges/list`](/reference/derivatives-exchanges-list).
Mặc định: "binance"
daysstringbắt buộcData up to number of days ago.
Mặc định: "1"
Giá trị có thể dùng: 1, 7, 14, 30, 90, 180, 365
Đây là phản hồi ví dụ đã lưu cho API này; không có request thực nào được gửi khi xem mục này.
Chưa có phản hồi đã lưu nào được công bố. Chạy API trong Playground để xem phản hồi.
Khám phá thêm
| API | Giá | Phản hồi |
|---|---|---|
CoinGecko | $0.008 mỗi lần gọi | JSON |
CoinGecko | $0.008 mỗi lần gọi | JSON |
CoinGecko | $0.008 mỗi lần gọi | JSON |
CoinGecko | $0.008 mỗi lần gọi | JSON |
CoinGecko | $0.008 mỗi lần gọi | JSON |
CoinGecko | $0.008 mỗi lần gọi | JSON |
Câu hỏi
Gửi yêu cầu POST đến https://api.sandbase.ai/v1/api/coingecko/api-volume-chart với khóa API SandBase của bạn trong tiêu đề Authorization (Bearer) và các tham số trong phần thân JSON. Bạn cũng có thể thử trực tiếp trong Playground trên trang này mà không cần viết code.
$0.008 mỗi lần gọi, được tính từ số dư SandBase của bạn. Bạn chỉ bị tính phí cho các lần gọi bạn thực hiện; không có gói đăng ký.
Bắt buộc: id (string) và days (một trong số 1, 7, 14, 30, 90, 180, 365). Bảng Parameters và Playground trên trang này liệt kê mọi trường.
Phản hồi JSON được trả về trong cùng một yêu cầu HTTP (đồng bộ). README trên trang này có ví dụ phản hồi.
Không. CoinGecko Exchange Volume Chart by ID chạy thông qua SandBase, nên chỉ cần một API key SandBase là đủ cho endpoint này và mọi API cùng model khác trong danh mục. Bạn không cần đăng ký riêng để có quyền truy cập API của CoinGecko.