> This page is for Datasets.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.immix.xyz/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.immix.xyz/_mcp/server.

# Get an exchange's coverage

GET https://datasets.immix.xyz/v1/coverage/{exchange}

One exchange: each closed day with its status, and for each family and symbol the first and last day with a file, how many days have one and their bytes. Use it to size a download before you start. It is written when a day closes, so it can be a day's close behind the manifests and is never ahead of them.

Reference: https://docs.immix.xyz/datasets/reference/http-api/coverage/get-exchange

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `exchange` (string, required) — The exchange code, as `/coverage` lists it.

### Headers

- `X-Request-Id` (string, optional) — Your own id for the request: 8 to 128 of `[A-Za-z0-9._-]`. It becomes the request's id and is echoed on the response. A value off that grammar is replaced with a fresh id, never refused.

## Response

### 200

The exchange's coverage.

- `contract_version` (string, required) — The file contract version of the publisher that wrote this.
- `exchange` (string, required) — The exchange code.
- `first_day` (string, required) — The first closed day.
- `published_through` (string, required) — The last closed day this object holds. It can be behind the day manifests, never ahead of them: a day a backfill or a repair closed reaches it at the exchange's next live close. The day's manifest is the authority.
- `days` (map from string to CoverageDay, required) — Each closed day this object holds, keyed by the day. A day missing here is either not published or not yet folded in: its manifest says which.
- `families` (map from string to map from string to CoverageSymbol, required) — Each family with a file on any closed day, keyed by the family; under it, each symbol with such a file, keyed by the canonical symbol.

## Errors

### 401 Get Exchange Coverage Request Unauthorized Error

`UNAUTHENTICATED`: no key was sent, or the key does not exist, was deleted or carries the wrong secret.

- `error` (ErrorBody, required)
- `currentVersion` (string, optional) — On a 412 `VERSION_CONFLICT` from a conditional write that met a row: the row's current version (the `ETag` carries the same token); re-read, reapply, retry. Absent from every other response, a 412 for a row that no longer exists included.

### 403 Get Exchange Coverage Request Forbidden Error

`FORBIDDEN_PRINCIPAL`: the key is disabled. `CUSTOMER_NOT_ACTIVE`: your customer account is disabled.

- `error` (ErrorBody, required)
- `currentVersion` (string, optional) — On a 412 `VERSION_CONFLICT` from a conditional write that met a row: the row's current version (the `ETag` carries the same token); re-read, reapply, retry. Absent from every other response, a 412 for a row that no longer exists included.

### 404 Get Exchange Coverage Request Not Found Error

`NOT_FOUND`: the path names nothing the dataset holds.

- `error` (ErrorBody, required)
- `currentVersion` (string, optional) — On a 412 `VERSION_CONFLICT` from a conditional write that met a row: the row's current version (the `ETag` carries the same token); re-read, reapply, retry. Absent from every other response, a 412 for a row that no longer exists included.

### 429 Get Exchange Coverage Request Too Many Requests Error

`RATE_LIMITED`: too many requests from this key; wait `Retry-After` seconds.

- `error` (ErrorBody, required)
- `currentVersion` (string, optional) — On a 412 `VERSION_CONFLICT` from a conditional write that met a row: the row's current version (the `ETag` carries the same token); re-read, reapply, retry. Absent from every other response, a 412 for a row that no longer exists included.

### 503 Get Exchange Coverage Request Service Unavailable Error

`SERVICE_UNAVAILABLE`: the service cannot reach its store or the dataset right now. Nothing about your request is wrong: retry after a short pause.

- `error` (ErrorBody, required)
- `currentVersion` (string, optional) — On a 412 `VERSION_CONFLICT` from a conditional write that met a row: the row's current version (the `ETag` carries the same token); re-read, reapply, retry. Absent from every other response, a 412 for a row that no longer exists included.

## Types

### CoverageDay

One closed day of an exchange.

- `status` (string, required) — `ok`, or `partial` when hours of the day failed.
- `manifest_sha256` (string, required) — SHA-256 of the day's manifest as stored when this was written.
- `gaps` (integer, required) — How many gaps the day's manifest lists. The gaps themselves are in the manifest: the count says which days to read.
- `failed_hours` (list of integer, required) — The hours of the day, 0 to 23, that failed. Empty on an `ok` day.

### CoverageSymbol

One symbol's files of one family.

- `first_day` (string, required) — The first closed day with a file.
- `last_day` (string, required) — The last closed day with a file.
- `days` (integer, required) — How many closed days have a file. A file exists only if it has rows, so a count below the span from `first_day` to `last_day` means days without one: a quiet day, unless that day's manifest lists a gap or a failed hour that covers the symbol.
- `bytes` (long, required) — The stored bytes of those files, summed: what fetching every day of this family and symbol transfers, and counts.

### ErrorBody

- `code` (string, required) — Machine-readable, UPPER_SNAKE and append-only; tolerate codes you don't know. Branch on this, never on the message.
- `message` (string, required) — For display only; its wording may change at any time.
- `retryable` (boolean, required) — Whether sending the identical request again, after `Retry-After` or a short pause, can succeed with nothing else changed. `false` where something must change first: the request, the caller's standing, or the platform's own records or deployment.
- `requestId` (string, required) — The request's id, also sent as X-Request-Id; quote it to support.

## Examples

**Response**

```json
{
  "contract_version": "2.4.0",
  "exchange": "OKX",
  "first_day": "2026-09-30",
  "published_through": "2026-11-12",
  "days": {
    "key": {
      "status": "ok",
      "manifest_sha256": "manifest_sha256",
      "gaps": 25,
      "failed_hours": [
        1
      ]
    }
  },
  "families": {
    "key": {
      "key": {
        "first_day": "2026-09-30",
        "last_day": "2026-11-12",
        "days": 44,
        "bytes": 1234567890
      }
    }
  }
}
```

**SDK Code**

```python
import requests

url = "https://datasets.immix.xyz/v1/coverage/OKX"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://datasets.immix.xyz/v1/coverage/OKX';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://datasets.immix.xyz/v1/coverage/OKX"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://datasets.immix.xyz/v1/coverage/OKX")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://datasets.immix.xyz/v1/coverage/OKX")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://datasets.immix.xyz/v1/coverage/OKX', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://datasets.immix.xyz/v1/coverage/OKX");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://datasets.immix.xyz/v1/coverage/OKX")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```