> ## Documentation Index
> Fetch the complete documentation index at: https://docs.b3.fun/llms.txt
> Use this file to discover all available pages before exploring further.

# Get token price

Get price in USD for given token(s)

` GET /insights/v1/tokens/price `

Get token price

Get price in USD for given token(s)

## Servers

- ` https://data-api.b3.fun/ ` — B3 Data API - Multi-Chain Proxy

## Parameters

### ` chain ` (query, optional)

Use chain_id instead

- ` value `: type ` array `

  - example: ` [20,56,1] `

  - ` array item `: type ` number `

Example:

```json
[
  20,
  56,
  1
]
```

### ` chain_id ` (query, optional)

The chain ID(s) to request the data for. You can specify multiple chain IDs, up to a maximum of 55. Use repeated query parameters, e.g., `?chain_id=20&chain_id=56`. Optional, because a single chain can as well be specified as a subdomain

- ` value `: type ` array `

  - example: ` [20,56,1] `

  - ` array item `: type ` number `

Example:

```json
[
  20,
  56,
  1
]
```

### ` address ` (query, optional)

- ` value `: type ` unknown ` — The address of the token to get the price for

  - example: ` ["0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"] `

  - ` anyOf alternative 1 `: type ` array `

    - ` array item `: type ` string `

      - Title: address (hex or ENS)

      - example: ` "vitalik.eth" `

  - ` anyOf alternative 2 `: type ` string `

    - Title: address (hex or ENS)

    - example: ` "vitalik.eth" `

Example:

```json
[
  "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"
]
```

### ` symbol ` (query, optional)

- ` value `: type ` unknown ` — The symbol of the token to get the price for

  - example: ` ["ETH","USDC"] `

  - ` anyOf alternative 1 `: type ` array `

    - ` array item `: type ` string `

  - ` anyOf alternative 2 `: type ` string `; nullable

  - ` anyOf alternative 3 `: type ` unknown `; nullable

Example:

```json
[
  "ETH",
  "USDC"
]
```

### ` timestamp ` (query, optional)

- ` value `: type ` integer ` — Timestamp in seconds or milliseconds

  - minimum: ` 0 `

### ` include_historical_prices ` (query, optional)

- ` value `: type ` string ` — Whether to include historical token prices

  - enum: ` ["true","false"] `

  - default: ` "false" `

  - example: ` "true" `

Example:

```json
"true"
```

### ` include_holders ` (query, optional)

- ` value `: type ` string ` — Whether to include the number of holders

  - enum: ` ["true","false"] `

  - default: ` "false" `

  - example: ` "true" `

Example:

```json
"true"
```

## Responses

### ` 200 ` — Successful response

Content type: ` application/json `

- ` value `: type ` object `

  - Required fields: ` data `

  - ` data `: type ` array `

    - ` array item `: type ` object `

      - Required fields: ` chain_id `, ` address `, ` price_usd `, ` price_usd_cents `, ` percent_change_24h `, ` volume_24h_usd `, ` volume_change_24h `, ` market_cap_usd `

      - ` chain_id `: type ` number ` — The chain ID of a relevant entry

        - example: ` 1 `

      - ` address `: type ` string `

        - Title: address (hex or ENS)

        - example: ` "vitalik.eth" `

      - ` symbol `: type ` string `

      - ` price_usd `: type ` number ` — Precise price in USD

      - ` price_usd_cents `: type ` number ` — Price in USD cents

      - ` percent_change_24h `: type ` number ` — Percent change in price over the last 24 hours

      - ` volume_24h_usd `: type ` number ` — Volume in USD over the last 24 hours

      - ` volume_change_24h `: type ` number ` — Percent change in volume over the last 24 hours

      - ` market_cap_usd `: type ` number ` — Market cap in USD

      - ` historical_prices `: type ` array `

        - ` array item `: type ` object `

          - Required fields: ` date `, ` price_usd `, ` price_usd_cents `

          - ` date `: type ` string ` — Date of price

          - ` price_usd `: type ` number ` — Price in USD

          - ` price_usd_cents `: type ` number ` — Price in USD cents

      - ` holders `: type ` number ` — Number of holders

### ` 400 ` — Bad request

### ` 500 ` — Internal server error

## Request examples

### cURL

```curl
curl -X GET 'https://data-api.b3.fun//insights/v1/tokens/price'
```

### JavaScript

```javascript
const response = await fetch('https://data-api.b3.fun//insights/v1/tokens/price', {
  method: 'GET'
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

response = requests.get('https://data-api.b3.fun//insights/v1/tokens/price')
print(response.json())
```