Skip to main content
Every request to the DexUtils Pro API must include your API key. The API uses standard Bearer token authentication — you pass your key in the Authorization header, and the server validates it before processing the request. There are no cookies, sessions, or OAuth flows to manage.

How Authentication Works

Include the following header in every API request:
Replace YOUR_API_KEY with the key you generate from your DexUtils dashboard. The header is required on all endpoints — there are no public Pro API routes.

Get Your API Key

1

Log in to DexUtils

Go to dexutils.io and sign in to your account. Pro API key generation requires a Premium plan or an active Pro API subscription.
2

Open API Keys settings

Click your avatar in the top-right corner, then navigate to Settings → API Keys.
3

Generate a new key

Click Generate New Key, give the key a descriptive label (for example, production-bot or analytics-dashboard), and confirm.
4

Copy and store the key securely

Your key is displayed once. Copy it immediately and store it in a secrets manager or environment variable. You cannot retrieve the full key again after closing the dialog.

Code Examples

The examples below authenticate against the GET /networks endpoint, which lists all supported chains. Swap in any other endpoint path and add the appropriate query parameters or request body as needed.

Authentication Errors

If the API rejects your request due to an authentication problem, you’ll receive one of the following HTTP error responses: Each error response includes a JSON body with a code and message field. See the Error Codes reference for the full list of error shapes and recommended handling strategies.

Security Best Practices

Treat your API key like a password. A leaked key gives anyone unrestricted Pro API access billed to your account.
Never commit your API key to version control. Storing a key in source code — even in a private repository — is a common cause of credential leaks. Rotate any key that has been exposed immediately from Settings → API Keys.
Follow these practices to keep your key secure:
  • Use environment variables. Store your key in an environment variable such as DEXUTILS_API_KEY and read it at runtime. Never hard-code the value in your source files.
  • Keep keys server-side. Do not include your API key in client-side JavaScript, mobile app bundles, or any code that is shipped to end users.
  • Use one key per environment. Generate separate keys for development, staging, and production so you can revoke a single key without disrupting other environments.
  • Rotate keys proactively. Regularly regenerate keys for long-running projects, and immediately revoke any key you suspect has been compromised via Settings → API Keys.