Skip to main content
Use an API key generated in the Oracle Dashboard to read your organization’s oracle configuration, feeds, historical updates, gas costs, and transactions.
Dashboard API keys authenticate requests to the DIA Indexer API. They are not used with the dashboard’s internal /api/oracle/* routes.

Base URL

All authenticated requests send the API key in the X-Api-Key header:
Treat the API key as a secret. Store it in a server-side environment variable or secret manager. Never commit it to source control or expose it in frontend JavaScript, browser storage, mobile applications, query strings, screenshots, or logs.

Generate and store a key

  1. Open Oracle Dashboard → Settings → API Key.
  2. Select Generate API key.
  3. Copy the key immediately. It is displayed only once.
  4. Store it in your deployment’s secret manager.
For local development, set environment variables in your shell:
Do not put the real key in an .env file that is committed to Git.

Make your first request

List the oracles available to the authenticated organization.
Example response:
Use this response to discover the exact network_name, address, and oracle_id needed by the other endpoints.

Endpoint reference

Path conventions

  • Use the exact blockchain name returned as network_name, such as Ethereum, Base, or Arbitrum.
  • EVM addresses should be EIP-55 checksum compliant.
  • Use the feed identifier returned by the oracle-detail endpoint.
  • Write slash-based pairs in API-safe dash notation: ETH/USD becomes ETH-USD in a URL path.
  • Typed feed identifiers retain their notation, for example denominator:wBTC or fairValue:wBTC.
  • Do not double-encode feed identifiers. For example, do not send ETH%252FUSD.

Get oracle details

Example response:
heartbeat is expressed in milliseconds. price_deviation is a fraction: 0.002 means 0.2%.

Get feed details

For a slash-based pair, use dash notation in the URL:
For a typed feed, retain the colon:
The response includes the latest value, update configuration, source pairs, DEX pools, and configured guardians:

Get historical updates

end_time must be later than start_time. Example response:

Get gas-cost history

Example response:

Get transactions

Example response:
Pass next back unchanged to retrieve the following page:

Errors

Errors are returned with an HTTP status and a JSON body. Authentication errors use an error field:
Endpoint validation and data errors can use errorcode and errormessage:
Log the HTTP status, request path, and response body when diagnosing an error, but never log the X-Api-Key header.

Revoke or rotate a key

Revoke keys from Oracle Dashboard → Settings → API Key. Revocation applies to subsequent API requests. If key generation reports that the maximum number of keys has been reached, revoke an existing key before requesting another one. For rotation without downtime:
  1. Generate and securely store the replacement key.
  2. Update every server or secret store that uses the old key.
  3. Confirm requests succeed with the replacement key.
  4. Revoke the old key.
Use separate secrets for development and production. Rotate a key immediately if it appears in logs, screenshots, source control, or browser code.