Developer Hub

Acquire an Access Token

Request and manage access tokens for Pyth Pro

This guide explains how to acquire an access token for Pyth Pro, which is required to authenticate websocket connections and subscribe to price updates.

Request Access Token

Please fill out this form to get in touch with our authorized distribution partners (Pyth Data Distributors) and obtain an access token.

Access tokens are required for all Pyth Pro websocket connections. Make sure to keep your token secure and do not share it publicly.

Using the Access Token

Once you receive your access token, use it to authenticate the websocket connection by passing it as an Authorization header with the value Bearer {token}.

Example Usage

import { PythLazerClient } from "@pythnetwork/pyth-lazer-sdk";

const client = await PythLazerClient.create(
  [
    "wss://pyth-lazer-0.dourolabs.app/v1/stream",
    "wss://pyth-lazer-1.dourolabs.app/v1/stream",
  ],
  "YOUR_ACCESS_TOKEN",
);

Next Steps

After acquiring your access token, you can proceed to subscribe to price feeds using the Pyth Pro websocket API.