# API Reference

### Base URL

{% code title="API Base URL" %}

```
https://wdk-api.tether.io
```

{% endcode %}

***

### Authentication

All requests require a valid API key in the `x-api-key` header:

{% code title="Authentication Header" %}

```http
x-api-key: your-api-key-here
```

{% endcode %}

{% hint style="info" %}
**Don't have an API key yet?** Request one by following the steps in our [Get Started](https://docs.wdk.tether.io/tools/indexer-api/get-started) guide.
{% endhint %}

***

### Rate Limiting

| Endpoint                                                  | Limit           |
| --------------------------------------------------------- | --------------- |
| `GET /api/v1/health`                                      | 10 req / 1 hour |
| `GET /api/v1/:blockchain/:token/:address/token-balances`  | 4 req / 10s     |
| `GET /api/v1/:blockchain/:token/:address/token-transfers` | 8 req / 10s     |
| `POST /api/v1/batch/token-transfers`                      | 8 req / 10s     |
| `POST /api/v1/batch/token-balances`                       | 4 req / 10s     |

***

### API Endpoints

{% openapi src="<https://1705527907-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F35cNSL3foZ7T6bD7C8uL%2Fuploads%2Fgit-blob-11f233c1a831e76cd57fe86c4267b3eb8aefd2f5%2Fopenapi.json?alt=media>" path="/api/v1/health" method="get" %}
[openapi.json](https://1705527907-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F35cNSL3foZ7T6bD7C8uL%2Fuploads%2Fgit-blob-11f233c1a831e76cd57fe86c4267b3eb8aefd2f5%2Fopenapi.json?alt=media)
{% endopenapi %}

***

{% openapi src="<https://1705527907-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F35cNSL3foZ7T6bD7C8uL%2Fuploads%2Fgit-blob-11f233c1a831e76cd57fe86c4267b3eb8aefd2f5%2Fopenapi.json?alt=media>" path="/api/v1/{blockchain}/{token}/{address}/token-transfers" method="get" %}
[openapi.json](https://1705527907-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F35cNSL3foZ7T6bD7C8uL%2Fuploads%2Fgit-blob-11f233c1a831e76cd57fe86c4267b3eb8aefd2f5%2Fopenapi.json?alt=media)
{% endopenapi %}

***

{% openapi src="<https://1705527907-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F35cNSL3foZ7T6bD7C8uL%2Fuploads%2Fgit-blob-11f233c1a831e76cd57fe86c4267b3eb8aefd2f5%2Fopenapi.json?alt=media>" path="/api/v1/{blockchain}/{token}/{address}/token-balances" method="get" %}
[openapi.json](https://1705527907-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F35cNSL3foZ7T6bD7C8uL%2Fuploads%2Fgit-blob-11f233c1a831e76cd57fe86c4267b3eb8aefd2f5%2Fopenapi.json?alt=media)
{% endopenapi %}

***

{% openapi src="<https://1705527907-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F35cNSL3foZ7T6bD7C8uL%2Fuploads%2Fgit-blob-11f233c1a831e76cd57fe86c4267b3eb8aefd2f5%2Fopenapi.json?alt=media>" path="/api/v1/batch/token-transfers" method="post" %}
[openapi.json](https://1705527907-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F35cNSL3foZ7T6bD7C8uL%2Fuploads%2Fgit-blob-11f233c1a831e76cd57fe86c4267b3eb8aefd2f5%2Fopenapi.json?alt=media)
{% endopenapi %}

***

{% openapi src="<https://1705527907-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F35cNSL3foZ7T6bD7C8uL%2Fuploads%2Fgit-blob-11f233c1a831e76cd57fe86c4267b3eb8aefd2f5%2Fopenapi.json?alt=media>" path="/api/v1/batch/token-balances" method="post" %}
[openapi.json](https://1705527907-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F35cNSL3foZ7T6bD7C8uL%2Fuploads%2Fgit-blob-11f233c1a831e76cd57fe86c4267b3eb8aefd2f5%2Fopenapi.json?alt=media)
{% endopenapi %}

***

### Error Handling

The API returns standard HTTP error codes:

| Status Code | Description                             |
| ----------- | --------------------------------------- |
| 400         | Bad Request - Invalid parameters        |
| 401         | Unauthorized - Invalid API key          |
| 404         | Not Found - Resource not found          |
| 429         | Too Many Requests - Rate limit exceeded |
| 500         | Internal Server Error                   |

#### Error Response Format

{% code title="Error Response" lineNumbers="true" %}

```json
{
  "error": "error_type",
  "message": "Detailed error message"
}
```

{% endcode %}

***

### Next Steps

* [**Get Started**](https://docs.wdk.tether.io/tools/indexer-api/get-started) - Quick start guide with setup instructions
* [**React Native Starter**](https://docs.wdk.tether.io/examples-and-starters/react-native-starter) - See it in action

***

### Need Help?

<table data-view="cards"><thead><tr><th></th><th></th><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><i class="fa-discord">:discord:</i></td><td><strong>Discord Community</strong></td><td>Connect with developers, ask questions, share your projects</td><td><a href="https://discord.gg/arYXDhHB2w" class="button primary">Join Community</a></td><td><a href="https://discord.gg/arYXDhHB2w">https://discord.gg/arYXDhHB2w</a></td></tr><tr><td><i class="fa-github">:github:</i></td><td><strong>GitHub Issues</strong></td><td>Report bugs, request features, and get technical help</td><td><a href="https://github.com/tetherto/wdk-core" class="button secondary">Open an Issue</a></td><td><a href="https://github.com/tetherto/wdk-core">https://github.com/tetherto/wdk-core</a></td></tr><tr><td><i class="fa-envelope">:envelope:</i></td><td><strong>Email Contact</strong></td><td>For sensitive or private matters, contact our team directly</td><td><a href="mailto:wallet-info.tether.io" class="button secondary">Send an email</a></td><td><a href="mailto:wallet-info.tether.io">mailto:wallet-info.tether.io</a></td></tr></tbody></table>
