DH
4 min read·Updated 2026-06-14

Authentication

Obtain a developer key and send it in the X-API-Key header on every request.

How authentication works

Every request to the API is authenticated with a developer key sent in the X-API-Key header. Keys are scoped to your account and can be rotated at any time. There is no OAuth flow and no per-request signing.

Transport

Send the key in the X-API-Key header on every call. Query-string keys are not accepted.

X-API-Key

Rejection

A missing, malformed, or revoked key returns 401 Unauthorized.

401

Get a developer key

Request a developer key from the DexHunt dashboard. Once issued, store it in your server environment — for example as HLSCAN_API_KEY — and read it at runtime. Do not commit it to source control.

Keep keys server-side

The developer key grants full read access to your plan's data. Keep it in a secret manager or environment variable, never in client code.

Send the key

Add the X-API-Key header to every request. The example below confirms the key works by calling the networks endpoint.

Authenticated request
bash
curl -sS "https://api.dexhunt.app/v1/networks" \
  -H "X-API-Key: $HLSCAN_API_KEY"

A successful call returns 200 with the list of available networks. Reuse the same header for every other endpoint.

Authentication failures

When a key is missing, malformed, or revoked, the API responds with 401 Unauthorized and a JSON error body. Do not retry a 401 — fix the credential first.

401 Unauthorized
json
{
  "error": "unauthorized",
  "message": "Missing or invalid API key"
}