Skip to content
This repository was archived by the owner on Nov 28, 2025. It is now read-only.

Commit 6108322

Browse files
devin-ai-integration[bot]Jayant
andcommitted
Add 'Acquire an Access Token' page to Lazer how-to guides
- Create new standalone guide for acquiring Pyth Lazer access tokens - Extract content from Subscribe to Price Updates guide - Add navigation entry in _meta.json under How-To Guides section - Update Subscribe to Price Updates to reference new standalone guide - Include form link, security callout, usage instructions, and code example Co-Authored-By: Jayant <[email protected]>
1 parent 8b5f736 commit 6108322

File tree

3 files changed

+34
-1
lines changed

3 files changed

+34
-1
lines changed

pages/lazer/_meta.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"type": "separator"
1717
},
1818

19+
"acquire-access-token": "Acquire an Access Token",
1920
"subscribe-price-updates": "Subscribe to Price Updates",
2021
"integrate-as-consumer": "Integrate as a Consumer",
2122
"integrate-as-publisher": "Integrate as a Publisher",
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import { Callout } from "nextra/components";
2+
3+
# Acquire an Access Token
4+
5+
This guide explains how to acquire an access token for Pyth Lazer, which is required to authenticate websocket connections and subscribe to price updates.
6+
7+
## Request Access Token
8+
9+
Please fill out [this form](https://tally.so/r/nP2lG5) to contact the Pyth team and get the access token.
10+
11+
<Callout type="info">
12+
Access tokens are required for all Pyth Lazer websocket connections. Make sure to keep your token secure and do not share it publicly.
13+
</Callout>
14+
15+
## Using the Access Token
16+
17+
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}`.
18+
19+
### Example Usage
20+
21+
```js copy
22+
import { PythLazerClient } from "@pythnetwork/pyth-lazer-sdk";
23+
24+
const client = await PythLazerClient.create(
25+
["wss://pyth-lazer.dourolabs.app/v1/stream"],
26+
"YOUR_ACCESS_TOKEN"
27+
);
28+
```
29+
30+
## Next Steps
31+
32+
After acquiring your access token, you can proceed to [subscribe to price updates](./subscribe-price-updates.mdx) using the Pyth Lazer websocket API.

pages/lazer/subscribe-price-updates.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This guide explains how to subscribe to price updates from Pyth Lazer. This guid
66

77
Subscribing to price updates is a three-step process:
88

9-
1. **Acquire** an access token.
9+
1. **Acquire** an access token (see [Acquire an Access Token](./acquire-access-token.mdx)).
1010
2. **Configure** subscription parameters.
1111
3. **Subscribe** to the price updates via [websocket API](https://pyth-lazer.dourolabs.app/docs).
1212

0 commit comments

Comments
 (0)