Skip to content

Commit 1cd62f6

Browse files
committed
add 1s channel and other comments
1 parent 45ddfa8 commit 1cd62f6

File tree

1 file changed

+38
-20
lines changed

1 file changed

+38
-20
lines changed

pages/lazer/payload-reference.mdx

Lines changed: 38 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,22 @@ A Lazer payload is a real-time data update containing financial market informati
1616

1717
## Stream Response Structure
1818

19+
<Callout type="info">
20+
**Customizable Payload**: The payload structure is customizable based on the
21+
properties you request in your subscription. Only the fields you specify will
22+
be included in the response. See [Available Properties by Feed
23+
Types](#available-properties-by-feed-types) for details on what you can
24+
request.
25+
</Callout>
26+
1927
When you receive a `StreamUpdated` message from Lazer, it contains the following structure:
2028

2129
### Top-Level Response Fields
2230

2331
| Field | Type | Description |
2432
| ---------------- | --------------- | ------------------------------------------------------ |
2533
| `type` | `string` | Always `"streamUpdated"` for price updates |
26-
| `subscriptionId` | `number` | Your subscription identifier |
34+
| `subscriptionId` | `number` | Your subscription identifier, provided by the user |
2735
| `parsed` | `ParsedPayload` | Human-readable price data (when `parsed: true`) |
2836
| `evm` | `BinaryData` | EVM-compatible binary payload (when requested) |
2937
| `solana` | `BinaryData` | Solana-compatible binary payload (when requested) |
@@ -32,18 +40,18 @@ When you receive a `StreamUpdated` message from Lazer, it contains the following
3240

3341
### Parsed Payload Structure
3442

35-
The `parsed` object contains human-readable price data:
43+
The `parsed` object contains human-readable price data (if `parsed` is requested):
3644

3745
| Field | Type | Description |
3846
| ------------- | ------------------ | ---------------------------------------------------------- |
3947
| `timestampUs` | `string` | Unix timestamp in microseconds when the data was generated |
4048
| `priceFeeds` | `Array<PriceFeed>` | Array of price feed data objects |
4149

42-
## How Does a Price Feed Look?
50+
## What does a price feed update look like?
4351

4452
Each price feed in the `priceFeeds` array represents real-time market data for a specific trading pair (e.g., BTC/USD, ETH/USD). Think of a price feed as a comprehensive snapshot of market conditions for that asset.
4553

46-
Here's what a typical price feed looks like in a Lazer response:
54+
Here's what a typical StreamUpdated response that contains a PriceFeed looks like::
4755

4856
```json
4957
{
@@ -60,6 +68,15 @@ Here's what a typical price feed looks like in a Lazer response:
6068
"publisherCount": 9,
6169
"exponent": -8,
6270
"confidence": 1373488286
71+
},
72+
{
73+
"priceFeedId": 2,
74+
"price": "448480908040",
75+
"bestBidPrice": "448475995765",
76+
"bestAskPrice": "448508987987",
77+
"publisherCount": 12,
78+
"exponent": -8,
79+
"confidence": 106965585
6380
}
6481
]
6582
},
@@ -71,9 +88,10 @@ Here's what a typical price feed looks like in a Lazer response:
7188
```
7289

7390
<Callout type="warning">
74-
**Important**: Price values are in mantissa format. To get the actual price,
75-
use: `actual_price = mantissa × 10^exponent`. For example: `1006900000000 ×
76-
10^(-8) = $10,069.00`
91+
**Important**: The price is stored in two parts: an integer mantissa value
92+
(the price field) and a power-of-ten exponent. The actual decimal
93+
representation of the price is given by: `decimal_price = price ×
94+
10^exponent`. For example: `1006900000000 × 10^(-8) = $10,069.00`
7795
</Callout>
7896

7997
## Property Specifications
@@ -193,21 +211,17 @@ Based on the [API documentation](https://pyth-lazer.dourolabs.app/docs), you can
193211
- `fundingTimestamp` - Most recent funding rate timestamp
194212
- `fundingRateInterval` - Duration between funding updates
195213

196-
<Callout type="info">
197-
**Subscription Flexibility**: You only receive the properties you request in
198-
your subscription, optimizing bandwidth and processing.
199-
</Callout>
200-
201214
## Subscription Channels
202215

203216
Lazer offers multiple delivery channels to match your latency and frequency requirements:
204217

205-
| Channel | Description | Use Cases |
206-
| ------------------ | --------------------------------------- | ------------------------------------------- |
207-
| `real_time` | Updates sent immediately when available | High-frequency trading, real-time analytics |
208-
| `fixed_rate@1ms` | Updates every 1 millisecond | Ultra-low latency applications |
209-
| `fixed_rate@50ms` | Updates every 50 milliseconds | Low-latency trading systems |
210-
| `fixed_rate@200ms` | Updates every 200 milliseconds | Standard trading applications |
218+
| Channel | Description | Use Cases |
219+
| ------------------ | ---------------------------------------------------------------------------------------------- | ------------------------------------------- |
220+
| `real_time` | Updates sent immediately when new price is available (no faster than 1ms, no slower than 50ms) | High-frequency trading, real-time analytics |
221+
| `fixed_rate@1ms` | Updates every 1 millisecond | Ultra-low latency applications |
222+
| `fixed_rate@50ms` | Updates every 50 milliseconds | Low-latency trading systems |
223+
| `fixed_rate@200ms` | Updates every 200 milliseconds | Standard trading applications |
224+
| `fixed_rate@1s` | Updates every 1 second | General applications, dashboards |
211225

212226
## Signature Schemes and Binary Formats
213227

@@ -257,6 +271,10 @@ Lazer provides multiple cryptographic formats to support different blockchain ec
257271
</div>
258272

259273
<Callout type="info">
260-
**How to Choose**: Use `evm` for Ethereum-compatible chains, `solana` for
261-
Solana, `leEcdsa` for custom implementations, and `leUnsigned` for off-chain.
274+
**How to Choose**: Select the optimal signing algorithm for your use case.
275+
These formats are not blockchain-specific - for example, the `solana` format
276+
(Ed25519) has been used on non-SVM blockchains when Ed25519 was the most
277+
efficient algorithm for that specific chain. Choose `evm` for secp256k1 ECDSA,
278+
`solana` for Ed25519, `leEcdsa` for little-endian secp256k1, and `leUnsigned`
279+
for off-chain use.
262280
</Callout>

0 commit comments

Comments
 (0)