Skip to content

Commit 9236a8a

Browse files
chore(lazer): mention double endpoints in the docs and a note reg this (#941)
* mention double endpoints and a note reg this * nit changed wording and point to lazer client
1 parent eb8a18b commit 9236a8a

File tree

3 files changed

+24
-5
lines changed

3 files changed

+24
-5
lines changed

pages/price-feeds/pro/acquire-access-token.mdx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ Once you receive your access token, use it to authenticate the websocket connect
2323
import { PythLazerClient } from "@pythnetwork/pyth-lazer-sdk";
2424

2525
const client = await PythLazerClient.create(
26-
["wss://pyth-lazer.dourolabs.app/v1/stream"],
26+
[
27+
"wss://pyth-lazer-0.dourolabs.app/v1/stream",
28+
"wss://pyth-lazer-1.dourolabs.app/v1/stream",
29+
],
2730
"YOUR_ACCESS_TOKEN"
2831
);
2932
```

pages/price-feeds/pro/getting-started.mdx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,10 @@ The main example code in `src/index.ts` demonstrates the core Pyth Pro integrati
108108
import { PythLazerClient } from "@pythnetwork/pyth-lazer-sdk";
109109

110110
const client = await PythLazerClient.create({
111-
urls: ["wss://pyth-lazer.dourolabs.app/v1/stream"],
111+
urls: [
112+
"wss://pyth-lazer-0.dourolabs.app/v1/stream",
113+
"wss://pyth-lazer-1.dourolabs.app/v1/stream",
114+
],
112115
token: process.env.ACCESS_TOKEN!,
113116
});
114117

pages/price-feeds/pro/subscribe-price-updates.mdx

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,17 @@ Subscribing to prices is a three-step process:
1212
2. **Configure** subscription parameters.
1313
3. **Subscribe** to the prices via [websocket API](https://pyth-lazer.dourolabs.app/docs).
1414

15-
The websocket server is available at `wss://pyth-lazer.dourolabs.app/v1/stream{:bash}`.
15+
The websocket servers are available at:
16+
17+
- `wss://pyth-lazer-0.dourolabs.app/v1/stream`
18+
- `wss://pyth-lazer-1.dourolabs.app/v1/stream`
19+
20+
<Callout type="warning" emoji="⚠️">
21+
**Redundancy Required**: For redundancy and to avoid interruptions during
22+
deployments, you must connect to **both endpoints**. During deployments, a
23+
single endpoint will briefly go down, so maintaining open connections to both
24+
endpoints ensures continuous service availability.
25+
</Callout>
1626

1727
<Steps>
1828

@@ -68,13 +78,16 @@ To subscribe to the prices, send a request to the websocket server. The server w
6878
npm install --save @pythnetwork/pyth-lazer-sdk
6979
```
7080

71-
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:
81+
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:
7282

7383
```js copy
7484
import { PythLazerClient } from "@pythnetwork/pyth-lazer-sdk";
7585

7686
const client = await PythLazerClient.create(
77-
["wss://pyth-lazer.dourolabs.app/v1/stream"],
87+
[
88+
"wss://pyth-lazer-0.dourolabs.app/v1/stream",
89+
"wss://pyth-lazer-1.dourolabs.app/v1/stream",
90+
],
7891
"YOUR_ACCESS_TOKEN"
7992
);
8093
```

0 commit comments

Comments
 (0)