From 610832271a05e7b4f0462a2e26071fd2b919c6b2 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 12 Sep 2025 16:44:25 +0000 Subject: [PATCH 1/3] 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 --- pages/lazer/_meta.json | 1 + pages/lazer/acquire-access-token.mdx | 32 +++++++++++++++++++++++++ pages/lazer/subscribe-price-updates.mdx | 2 +- 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 pages/lazer/acquire-access-token.mdx diff --git a/pages/lazer/_meta.json b/pages/lazer/_meta.json index d913535e..15bf7d81 100644 --- a/pages/lazer/_meta.json +++ b/pages/lazer/_meta.json @@ -16,6 +16,7 @@ "type": "separator" }, + "acquire-access-token": "Acquire an Access Token", "subscribe-price-updates": "Subscribe to Price Updates", "integrate-as-consumer": "Integrate as a Consumer", "integrate-as-publisher": "Integrate as a Publisher", diff --git a/pages/lazer/acquire-access-token.mdx b/pages/lazer/acquire-access-token.mdx new file mode 100644 index 00000000..c86ddacb --- /dev/null +++ b/pages/lazer/acquire-access-token.mdx @@ -0,0 +1,32 @@ +import { Callout } from "nextra/components"; + +# Acquire an Access Token + +This guide explains how to acquire an access token for Pyth Lazer, which is required to authenticate websocket connections and subscribe to price updates. + +## Request Access Token + +Please fill out [this form](https://tally.so/r/nP2lG5) to contact the Pyth team and get the access token. + + +Access tokens are required for all Pyth Lazer 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 + +```js copy +import { PythLazerClient } from "@pythnetwork/pyth-lazer-sdk"; + +const client = await PythLazerClient.create( + ["wss://pyth-lazer.dourolabs.app/v1/stream"], + "YOUR_ACCESS_TOKEN" +); +``` + +## Next Steps + +After acquiring your access token, you can proceed to [subscribe to price updates](./subscribe-price-updates.mdx) using the Pyth Lazer websocket API. diff --git a/pages/lazer/subscribe-price-updates.mdx b/pages/lazer/subscribe-price-updates.mdx index 06ecb029..3db5a556 100644 --- a/pages/lazer/subscribe-price-updates.mdx +++ b/pages/lazer/subscribe-price-updates.mdx @@ -6,7 +6,7 @@ This guide explains how to subscribe to price updates from Pyth Lazer. This guid Subscribing to price updates is a three-step process: -1. **Acquire** an access token. +1. **Acquire** an access token (see [Acquire an Access Token](./acquire-access-token.mdx)). 2. **Configure** subscription parameters. 3. **Subscribe** to the price updates via [websocket API](https://pyth-lazer.dourolabs.app/docs). From 01d1eca70a09c62fde715cf6b86ff20f9472fbd8 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 12 Sep 2025 16:48:29 +0000 Subject: [PATCH 2/3] Remove cross-reference link from Subscribe to Price Updates - Address PR feedback from jayantk to undo the cross-reference change - Keep the original text: '1. **Acquire** an access token.' Co-Authored-By: Jayant --- pages/lazer/subscribe-price-updates.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/lazer/subscribe-price-updates.mdx b/pages/lazer/subscribe-price-updates.mdx index 3db5a556..06ecb029 100644 --- a/pages/lazer/subscribe-price-updates.mdx +++ b/pages/lazer/subscribe-price-updates.mdx @@ -6,7 +6,7 @@ This guide explains how to subscribe to price updates from Pyth Lazer. This guid Subscribing to price updates is a three-step process: -1. **Acquire** an access token (see [Acquire an Access Token](./acquire-access-token.mdx)). +1. **Acquire** an access token. 2. **Configure** subscription parameters. 3. **Subscribe** to the price updates via [websocket API](https://pyth-lazer.dourolabs.app/docs). From d2c1cc993005cf4b36eaf89db2c89b812126c850 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 12 Sep 2025 16:52:35 +0000 Subject: [PATCH 3/3] Fix prettier formatting in acquire-access-token.mdx - Apply prettier formatting to Callout component text - Break long line into multiple lines with proper indentation - Resolves pre-commit CI failure Co-Authored-By: Jayant --- pages/lazer/acquire-access-token.mdx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pages/lazer/acquire-access-token.mdx b/pages/lazer/acquire-access-token.mdx index c86ddacb..5e3e9334 100644 --- a/pages/lazer/acquire-access-token.mdx +++ b/pages/lazer/acquire-access-token.mdx @@ -9,7 +9,8 @@ This guide explains how to acquire an access token for Pyth Lazer, which is requ Please fill out [this form](https://tally.so/r/nP2lG5) to contact the Pyth team and get the access token. -Access tokens are required for all Pyth Lazer websocket connections. Make sure to keep your token secure and do not share it publicly. + Access tokens are required for all Pyth Lazer websocket connections. Make sure + to keep your token secure and do not share it publicly. ## Using the Access Token