You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lazer/sdk/js/examples/index.ts
+8-1Lines changed: 8 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -6,13 +6,14 @@ import { PythLazerClient } from "../src/index.js";
6
6
// Ignore debug messages
7
7
console.debug=()=>{};
8
8
9
-
constclient=newPythLazerClient(
9
+
constclient=awaitPythLazerClient.create(
10
10
["wss://pyth-lazer.dourolabs.app/v1/stream"],
11
11
"access_token",
12
12
3,// Optionally specify number of parallel redundant connections to reduce the chance of dropped messages. The connections will round-robin across the provided URLs. Default is 3.
13
13
console// Optionally log socket operations (to the console in this case.)
14
14
);
15
15
16
+
// Read and process messages from the Lazer stream
* @param urls - List of WebSocket URLs of the Pyth Lazer service
38
38
* @param token - The access token for authentication
39
-
* @param numConnections - The number of parallel WebSocket connections to establish (default: 3). A higher number gives a more reliable stream.
39
+
* @param numConnections - The number of parallel WebSocket connections to establish (default: 3). A higher number gives a more reliable stream. The connections will round-robin across the provided URLs.
40
40
* @param logger - Optional logger to get socket level logs. Compatible with most loggers such as the built-in console and `bunyan`.
0 commit comments