# CoinGecko Coin Price by Token Addresses API

> Get one or more token prices using their token contract addresses

Source: https://www.sandbase.ai/model/coingecko/simple-token-price
API reference: https://www.sandbase.ai/model/coingecko/simple-token-price/docs

## Facts

- Provider: CoinGecko
- Type: Data API
- Endpoint: `POST https://api.sandbase.ai/v1/api/coingecko/simple-token-price`
- Price: $0.01 per call
- Free allowance: 100 calls per organization per UTC day, shared across eligible APIs
- Capabilities: api, coingecko, crypto
- Billing: pay per use from one SandBase balance; no provider account or subscription needed

## Call it

`POST https://api.sandbase.ai/v1/api/coingecko/simple-token-price` with `Authorization: Bearer $SANDBASE_API_KEY` and the parameters as a JSON body.

| Parameter | Type | Required | Allowed values |
| --- | --- | --- | --- |
| `id` | string | yes |  |
| `contract_addresses` | string | yes |  |
| `vs_currencies` | string | yes |  |
| `include_24hr_change` | boolean | no |  |
| `include_24hr_vol` | boolean | no |  |
| `include_last_updated_at` | boolean | no |  |
| `include_market_cap` | boolean | no |  |
| `precision` | string | no | full, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 |

## FAQ

### How do I use the CoinGecko Coin Price by Token Addresses API?

Send a POST request to https://api.sandbase.ai/v1/api/coingecko/simple-token-price with your SandBase API key in the Authorization header (Bearer) and the parameters as a JSON body. You can also try it in the Playground on this page without writing code.

### How much does the CoinGecko Coin Price by Token Addresses API cost?

$0.01 per call. Every organization gets 100 free calls per UTC day, shared across eligible SandBase APIs including this one; after that each call is billed at this price from your SandBase balance. There is no subscription.

### What parameters does the CoinGecko Coin Price by Token Addresses API accept?

Required: id (string), contract_addresses (string) and vs_currencies (string). Optional: include_24hr_change (boolean), include_24hr_vol (boolean), include_last_updated_at (boolean), include_market_cap (boolean) and precision (one of full, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18). The Parameters table and the Playground on this page list every field.

### What does the CoinGecko Coin Price by Token Addresses API return?

A JSON response returned in the same HTTP request (synchronous).

### Do I need a CoinGecko developer account or API key?

No. CoinGecko Coin Price by Token Addresses runs through SandBase, so one SandBase API key covers this endpoint and every other API and model in the catalog. You do not need to apply for CoinGecko API access separately.

## README

### CoinGecko Coin Price by Token Addresses API

Get one or more token prices using their token contract addresses

The response is the official CoinGecko API response, unchanged.

#### Request

```bash
curl -X POST "https://api.sandbase.ai/v1/run" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "coingecko/simple-token-price", "id": "ethereum", "contract_addresses": "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599", "vs_currencies": "usd"}'
```

#### Parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `id` | string | Yes | Asset platform's ID. *refers to [`/asset_platforms`](/reference/asset-platforms-list) |
| `contract_addresses` | string | Yes | Token contract addresses, comma-separated if querying more than 1 token |
| `include_24hr_change` | boolean | No | Include 24-hour change percentage. Default: false |
| `include_24hr_vol` | boolean | No | Include 24-hour trading volume. Default: false |
| `include_last_updated_at` | boolean | No | Include last updated price time as a UNIX timestamp. Default: false |
| `include_market_cap` | boolean | No | Include market capitalization. Default: false |
| `precision` | string | No | Decimal places for currency price value |
| `vs_currencies` | string | Yes | Target currency of coins, comma-separated if querying more than 1 currency. *refers to [`/simple/supported_vs_currencies`](/reference/simple-supported-currencie |

#### Pricing

Flat price per call. Failed calls are not charged.
