Authentication
All /v1/* endpoints require authentication via API Key or Bearer Token. Developer dashboard coming soon. If you need an API Key in the meantime, contact us.
auth.visiondynamics.ch, whereas all other indexer functions use api.zerascan.io.Header format: Authorization: Api-Key YOUR_KEY or Authorization: Bearer YOUR_TOKEN.
Usage Statistics & Advanced Bearers
The getKeyUsageStats (or getAnalytics) endpoint returns a comprehensive breakdown of your API key's consumption.
If your core API Key has Advanced Bearers enabled, the analytics payload (entries array) will explicitly group creditsUsed and requestCount by the individual bearerUUID. This allows enterprise users to issue many distinct bearers to their clients and independently track their consumption against the master key's CPM.
(Note: The upcoming Developer Dashboard will feature full graphical support for managing tokens, bearers, and analytics as described)
Create Bearer Token
https://auth.visiondynamics.ch/authGenerate a short-lived JWT bearer token from a valid API key and secret. This natively talks to the vd-auth server.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| request | string | REQUIRED | — | Must be 'createBearer' |
| apiKey | string | REQUIRED | — | Your master API key. |
| apiSecret | string | REQUIRED | — | Your API secret. |
| expiresInSeconds | integer | REQUIRED | — | Token lifetime in seconds. |
| cps | integer | REQUIRED | — | Credits Per Second — refill rate for the bearer's token bucket. |
| cbs | integer | REQUIRED | — | Credits Burst Size — maximum bucket capacity for the bearer. |
| cpm | integer | REQUIRED | — | Credits Per Month — maximum monthly credit allocation for the bearer. |
| scopes | string | optional | — | Comma-separated permission scopes (e.g. 'indexer,dex'). Defaults to parent key scopes. |
| subject | string | optional | — | Label for what this bearer represents (e.g. 'my-trading-bot', 'analytics-service'). |
| audience | string | optional | — | Intended recipient or service this bearer is scoped to (e.g. 'indexer', 'dex'). |
🪙 Usage & Credits
Revoke Bearer Token
https://auth.visiondynamics.ch/authImmediately invalidates a bearer token via dual-layer invalidation (database + Redis cache).
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| request | string | REQUIRED | — | Must be 'revokeBearer' |
| apiKey | string | REQUIRED | — | Your master API key. |
| apiSecret | string | REQUIRED | — | Your API secret. |
| bearerToken | string | REQUIRED | — | The JWT token string. |
🪙 Usage & Credits
Usage Statistics
https://auth.visiondynamics.ch/authGives access to full historical analytics. You must authenticate using your master `apiKey` and `apiSecret`. You can explicitly filter consumption for a specific bearer by using the `bearerUUID` parameter.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| request | string | REQUIRED | — | Must be 'getAnalytics' |
| apiKey | string | REQUIRED | — | Your master API key. |
| apiSecret | string | REQUIRED | — | Your API secret. |
| bearerUUID | string | optional | — | Filter history exclusively to a specific bearer UUID. |
| scope | string | optional | — | Filter by permission scope. |
| action | string | optional | — | Filter by endpoint action label. |
| from | integer | optional | — | Unix timestamp start boundary. |
| to | integer | optional | — | Unix timestamp end boundary. |
🪙 Usage & Credits
List Active Bearer Tokens
https://auth.visiondynamics.ch/authQuery all active Bearer tokens tied to an API key, including their scopes, UUIDs, and expiration limits. Critical for Advanced Bearer administration.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| request | string | REQUIRED | — | Must be 'getBearers' |
| apiKey | string | REQUIRED | — | Your master API key. |
| apiSecret | string | REQUIRED | — | Your API secret. |
🪙 Usage & Credits
Authentication & Rate Limit Errors
The authentication layer returns precise error codes to help you diagnose token and quota issues:
Errors
| Status | Condition |
|---|---|
| 401 (invalid_auth / api_key_invalid) | Your key or token is malformed, missing, or unrecognized. |
| 401 (api_key_disabled) | Your API key was administratively disabled. |
| 401 (token_invalid) | The bearer token signature failed validation. |
| 401 (insufficient_scope) | Your credential lacks permission for this endpoint. |
| 402 (credits_exhausted) | Scope Limits: You have depleted your specific credit pool for this endpoint group. |
| 429 (rate_limit_exceeded) | CPS/BPS Limits: You are sending requests too fast. Slow down and let your Token Bucket refill. |
| 429 (monthly_limit_exceeded) | CPM Limits: You have reached your maximum monthly credit allocation (CPM). |