# Token Volume

### Endpoint

`GET /v1/tokens/volume`

### Description

This endpoint returns the total volume of a token over a given date range.

### Query Parameters

* `tokenId`: Required. The id of the token to get the volume for.
* `days`: Required. The number of days to get the volume for. Must be between 1 and 90.

### Headers

* x-api-key (required): A valid API key.

### Example

```rust
curl -X GET 'https://api.lynxcrypto.app/v1/tokens/volume?tokenId=0x52ec25e58a9e144ff002625bb2aa58cc6da24cb2:56&days=3'
-H 'x-api-key: <YOUR_API_KEY>'
```

### Response

A JSON object with the following structure:

```json
{
    "_id": "0x52ec25e58a9e144ff002625bb2aa58cc6da24cb2:56",
    "volume": 4143.572770831381
}
```

### Response Codes

* `200`: Success. Returns the USD price for the given token.
* `400`: Bad Request. The tokenId or days query string parameter is not provided or days is greater than 90 or less than 1.
* 403: Forbidden. The x-api-key header is not provided or is invalid.
* `404`: Not Found. No volume found within the given time range
