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
Pyth Lazer provides a [websocket API (TODO: Prod)](https://pyth-lazer-staging.dourolabs.app/docs) to fetch price updates.
6
-
5
+
Pyth Lazer provides a [websocket API (TODO: Prod)](https://pyth-lazer-staging.dourolabs.app/docs) to fetch price updates.
7
6
8
7
This guide explains how to **fetch** price updates, explore various **properties** of these updates, and configure the channel for **update frequency**. (TODO: Rewrite maybe)
9
8
@@ -24,7 +23,6 @@ Please fill out [this form](https://tally.so/r/nP2lG5) to contact the Pyth team
24
23
25
24
Use the access token to authenticate the websocket connection as a `Bearer {token}{:bash}`.
26
25
27
-
28
26
### 2. Adjust subscription parameters
29
27
30
28
One can configure the request/subscription parameters to customize the received price updates. A sample request is shown below:
@@ -39,6 +37,7 @@ One can configure the request/subscription parameters to customize the received
39
37
channel: "fixed_rate@200ms",
40
38
});
41
39
```
40
+
42
41
Here:
43
42
44
43
-`subscriptionId` is an arbitrary numeric identifier one can choose for a subscription. It will eb returned back in response by the server. It doesn not affect the signed payload.
@@ -53,8 +52,8 @@ There are also a few other parameters one may use. Refer to the [API documentati
53
52
54
53
To subscribe to the price updates, one needs to send the request to the websocket server. The server will respond with a signed price update.
55
54
56
-
1. Pyth Lazer provides a [SDK](https://github.com/pyth-network/pyth-crosschain/tree/main/lazer/sdk/js) to seamlessly integrate the websocket API into your application.
57
-
It can be installed using the following command:
55
+
1. Pyth Lazer provides a [SDK](https://github.com/pyth-network/pyth-crosschain/tree/main/lazer/sdk/js) to seamlessly integrate the websocket API into your application.
The `verifyUpdate` function will verify the price update and return the payload and the verification fee. This call takes a fee which can be queried from `verification_fee()` function and passed to the `verifyUpdate` call. This fee is used to cover the cost of verifying the price update.
0 commit comments