List Coins

351 words · 2 min read

Overview

This documentation describes how to use the List Coins endpoint to retrieve a list of all supported cryptocurrencies, including their names, symbols, and last update times.

Endpoint

GET /api/v2/list-coins

Retrieve a list of all supported coins along with their associated symbols and the date and time each coin’s data was last updated.

Base URL

https://api.guavy.com

Full Endpoint Example

https://api.guavy.com/api/v2/list-coins

Authentication

This API requires authentication using a Bearer token. Include your API key in the request header as shown below.

Request Headers

HeaderDescription
AuthorizationBearer token for API authentication.

Example Header

-H "Authorization: Bearer YOUR-API-KEY"

Response Format

The response returns data in JSON format, containing details of each supported cryptocurrency.

Example Response

{
  "Success": [
    {
      "name": "michi (SOL)",
      "symbol": "$MICHI",
      "last_updated": "2024-10-27T08:14:00.000Z"
    },
    {
      "name": "0x0.ai",
      "symbol": "0x0",
      "last_updated": "2024-10-27T08:15:00.000Z"
    },
    {
      "name": "SATS",
      "symbol": "1000SATS",
      "last_updated": "2024-10-27T08:10:00.000Z"
    },
    {
      "name": "1inch Network",
      "symbol": "1INCH",
      "last_updated": "2024-10-27T08:11:00.000Z"
    },
    {
      "name": "Aave",
      "symbol": "AAVE",
      "last_updated": "2024-10-27T08:08:00.000Z"
    }
    // Additional coins...
  ]
}

Field Descriptions

FieldTypeDescription
namestringThe full name of the coin, including any network or category details.
symbolstringThe symbol associated with the coin.
last_updatedstringThe date and time of the last update for this coin, in ISO 8601 format.

Code Examples

cURL

curl -X GET "https://api.guavy.com/api/v2/list-coins" \
-H "Authorization: Bearer YOUR-API-KEY"

Python (requests library)

import requests

url = "https://api.guavy.com/api/v2/list-coins"
headers = {
    "Authorization": "Bearer YOUR-API-KEY"
}
response = requests.get(url, headers=headers)

if response.status_code == 200:
    data = response.json()
    print(data)
else:
    print("Failed to retrieve data:", response.status_code)

JavaScript (fetch API)

fetch("https://api.guavy.com/api/v2/list-coins", {
  method: "GET",
  headers: {
    "Authorization": "Bearer YOUR-API-KEY",
  },
})
  .then((response) => response.json())
  .then((data) => console.log(data))
  .catch((error) => console.error("Error:", error));