From d527ca363aa93211efa74010973a7506c849b48e Mon Sep 17 00:00:00 2001 From: nidhi-singh02 Date: Tue, 11 Nov 2025 14:47:35 +0530 Subject: [PATCH 1/2] mention double endpoints and a note reg this --- .../price-feeds/pro/acquire-access-token.mdx | 5 ++++- pages/price-feeds/pro/getting-started.mdx | 5 ++++- .../pro/subscribe-price-updates.mdx | 19 ++++++++++++++++--- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/pages/price-feeds/pro/acquire-access-token.mdx b/pages/price-feeds/pro/acquire-access-token.mdx index a87266b7..305a4cd6 100644 --- a/pages/price-feeds/pro/acquire-access-token.mdx +++ b/pages/price-feeds/pro/acquire-access-token.mdx @@ -23,7 +23,10 @@ Once you receive your access token, use it to authenticate the websocket connect import { PythLazerClient } from "@pythnetwork/pyth-lazer-sdk"; const client = await PythLazerClient.create( - ["wss://pyth-lazer.dourolabs.app/v1/stream"], + [ + "wss://pyth-lazer-0.dourolabs.app/v1/stream", + "wss://pyth-lazer-1.dourolabs.app/v1/stream", + ], "YOUR_ACCESS_TOKEN" ); ``` diff --git a/pages/price-feeds/pro/getting-started.mdx b/pages/price-feeds/pro/getting-started.mdx index 646c0295..8d4ccea4 100644 --- a/pages/price-feeds/pro/getting-started.mdx +++ b/pages/price-feeds/pro/getting-started.mdx @@ -108,7 +108,10 @@ The main example code in `src/index.ts` demonstrates the core Pyth Pro integrati import { PythLazerClient } from "@pythnetwork/pyth-lazer-sdk"; const client = await PythLazerClient.create({ - urls: ["wss://pyth-lazer.dourolabs.app/v1/stream"], + urls: [ + "wss://pyth-lazer-0.dourolabs.app/v1/stream", + "wss://pyth-lazer-1.dourolabs.app/v1/stream", + ], token: process.env.ACCESS_TOKEN!, }); diff --git a/pages/price-feeds/pro/subscribe-price-updates.mdx b/pages/price-feeds/pro/subscribe-price-updates.mdx index ca3c0b88..826b10bd 100644 --- a/pages/price-feeds/pro/subscribe-price-updates.mdx +++ b/pages/price-feeds/pro/subscribe-price-updates.mdx @@ -12,7 +12,17 @@ Subscribing to prices is a three-step process: 2. **Configure** subscription parameters. 3. **Subscribe** to the prices via [websocket API](https://pyth-lazer.dourolabs.app/docs). -The websocket server is available at `wss://pyth-lazer.dourolabs.app/v1/stream{:bash}`. +The websocket servers are available at: + +- `wss://pyth-lazer-0.dourolabs.app/v1/stream` +- `wss://pyth-lazer-1.dourolabs.app/v1/stream` + + + **Redundancy Required**: For redundancy and to avoid potential interruptions + during deployments, you must connect to **both endpoints**. During + deployments, a single endpoint may briefly go down, so maintaining open + connections to both endpoints ensures continuous service availability. + @@ -68,13 +78,16 @@ To subscribe to the prices, send a request to the websocket server. The server w npm install --save @pythnetwork/pyth-lazer-sdk ``` -2. Then create a [`PythLazerClient`](https://github.com/pyth-network/pyth-crosschain/blob/main/lazer/sdk/js/src/client.ts#L32) object using the URL and the access token requested from our authorized distribution partners (Pyth Data Distributors) in the first step: +2. Then create a [`PythLazerClient`](https://github.com/pyth-network/pyth-crosschain/blob/main/lazer/sdk/js/src/client.ts#L32) object using both endpoint URLs and the access token requested from our authorized distribution partners (Pyth Data Distributors) in the first step: ```js copy import { PythLazerClient } from "@pythnetwork/pyth-lazer-sdk"; const client = await PythLazerClient.create( - ["wss://pyth-lazer.dourolabs.app/v1/stream"], + [ + "wss://pyth-lazer-0.dourolabs.app/v1/stream", + "wss://pyth-lazer-1.dourolabs.app/v1/stream", + ], "YOUR_ACCESS_TOKEN" ); ``` From 3e233fa8057b40958703cbad1f1b93ec4c05a2e0 Mon Sep 17 00:00:00 2001 From: nidhi-singh02 Date: Tue, 11 Nov 2025 18:53:38 +0530 Subject: [PATCH 2/2] nit changed wording and point to lazer client --- pages/price-feeds/pro/subscribe-price-updates.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pages/price-feeds/pro/subscribe-price-updates.mdx b/pages/price-feeds/pro/subscribe-price-updates.mdx index 826b10bd..9a550de4 100644 --- a/pages/price-feeds/pro/subscribe-price-updates.mdx +++ b/pages/price-feeds/pro/subscribe-price-updates.mdx @@ -18,10 +18,10 @@ The websocket servers are available at: - `wss://pyth-lazer-1.dourolabs.app/v1/stream` - **Redundancy Required**: For redundancy and to avoid potential interruptions - during deployments, you must connect to **both endpoints**. During - deployments, a single endpoint may briefly go down, so maintaining open - connections to both endpoints ensures continuous service availability. + **Redundancy Required**: For redundancy and to avoid interruptions during + deployments, you must connect to **both endpoints**. During deployments, a + single endpoint will briefly go down, so maintaining open connections to both + endpoints ensures continuous service availability. @@ -78,7 +78,7 @@ To subscribe to the prices, send a request to the websocket server. The server w npm install --save @pythnetwork/pyth-lazer-sdk ``` -2. Then create a [`PythLazerClient`](https://github.com/pyth-network/pyth-crosschain/blob/main/lazer/sdk/js/src/client.ts#L32) object using both endpoint URLs and the access token requested from our authorized distribution partners (Pyth Data Distributors) in the first step: +2. Then create a [`PythLazerClient`](https://github.com/pyth-network/pyth-crosschain/blob/main/lazer/sdk/js/src/client.ts#L51) object using both endpoint URLs and the access token requested from our authorized distribution partners (Pyth Data Distributors) in the first step: ```js copy import { PythLazerClient } from "@pythnetwork/pyth-lazer-sdk";