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: src/content/data-streams/tutorials/go-sdk-stream.mdx
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -390,6 +390,16 @@ When HA mode is enabled, the SDK maintains at least 2 concurrent connections to
390
390
391
391
See more details about HA mode in the [SDK Reference](/data-streams/reference/data-streams-api/go-sdk#high-availability-ha-mode).
392
392
393
+
### Subscribing to multiple streams
394
+
395
+
You can subscribe to multiple streams by providing additional stream IDs as command-line arguments:
396
+
397
+
```bash
398
+
go run stream.go 0x000359843a543ee2fe414dc14c7e7920ef10f4372990b79d6361cdc0dd1ba782 0x00036fe43f87884450b4c7e093cd5ed99cac6640d8c2000e6afc02c8838d0265
399
+
```
400
+
401
+
This will subscribe to both ETH/USD and BTC/USD streams.
402
+
393
403
### Payload for onchain verification
394
404
395
405
In this tutorial, you logged and decoded the `full_report` payloads to extract the report data. However, in a production environment, you should verify the data to ensure its integrity and authenticity.
Copy file name to clipboardExpand all lines: src/content/data-streams/tutorials/rust-sdk-stream.mdx
+2-50Lines changed: 2 additions & 50 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -329,6 +329,8 @@ The example above demonstrates streaming data from a single crypto stream. For p
329
329
330
330
When HA mode is enabled and multiple WebSocket origins are provided, the Stream will maintain concurrent connections to different instances. This ensures high availability, fault tolerance, and minimizes the risk of report gaps.
331
331
332
+
#### Subscribing to multiple streams
333
+
332
334
You can subscribe to multiple streams by providing additional stream IDs as command-line arguments:
333
335
334
336
```bash
@@ -365,56 +367,6 @@ For descriptions and data types of other report schemas, see the [Report Schema
365
367
366
368
High Availability (HA) mode creates multiple WebSocket connections to different origin endpoints for improved reliability. When enabled, the SDK automatically handles failover, deduplicates reports, and provides connection-level metrics.
367
369
368
-
#### Enabling HA mode
369
-
370
-
To enable HA mode in your streaming application, make these changes to the basic example:
371
-
372
-
1. Add multiple WebSocket endpoints and enable HA mode in the client configuration. You also must use a mainnet endpoint, as HA mode is not currently supported on testnet.
See more details about HA mode in the [SDK Reference](/rust-sdk#websocket-features).
417
-
418
370
### Payload for onchain verification
419
371
420
372
In this tutorial, you logged and decoded the `full_report` payloads to extract the report data. However, in a production environment, you should verify the data to ensure its integrity and authenticity.
This will subscribe to both ETH/USD and BTC/USD streams.
420
+
411
421
### Payload for onchain verification
412
422
413
423
In this tutorial, you logged and decoded the `full_report` payloads to extract the report data. However, in a production environment, you should verify the data to ensure its integrity and authenticity.
0 commit comments