From 1f48d3113f57cff42527f84ad3d49e78cf522790 Mon Sep 17 00:00:00 2001 From: Karim <98668332+khadni@users.noreply.github.com> Date: Thu, 19 Jun 2025 15:53:10 -0500 Subject: [PATCH] nit update --- .../data-streams/tutorials/api-rwa-go.mdx | 48 +++++++++---------- .../data-streams/tutorials/api-rwa-rust.mdx | 30 ++++++------ .../data-streams/tutorials/ws-rwa-go.mdx | 38 +++++++-------- .../data-streams/tutorials/ws-rwa-rust.mdx | 42 ++++++++-------- 4 files changed, 77 insertions(+), 81 deletions(-) diff --git a/src/content/data-streams/tutorials/api-rwa-go.mdx b/src/content/data-streams/tutorials/api-rwa-go.mdx index 2bd849de188..e46d0e0cb34 100644 --- a/src/content/data-streams/tutorials/api-rwa-go.mdx +++ b/src/content/data-streams/tutorials/api-rwa-go.mdx @@ -107,7 +107,7 @@ You'll start with the set up of your Go project. Next, you'll fetch and decode r func main() { // Validate command-line arguments if len(os.Args) < 2 { - fmt.Printf("Usage: go run main.go [FeedID]\nExample: go run main.go 0x000434a5b30cafe7e853832a458ea1591dc2f5fb5e4cf80b9979b8248065a7ea\n") + fmt.Printf("Usage: go run main.go [FeedID]\nExample: go run main.go [FEED_ID]\n") os.Exit(1) } feedIDInput := os.Args[1] @@ -216,21 +216,21 @@ You'll start with the set up of your Go project. Next, you'll fetch and decode r See the [SDK Reference](/data-streams/reference/go-sdk#config-struct) page for more configuration options. -1. For this example, you will read from the AUD/USD stream. This stream ID is . See the [Data Streams RWA streams](/data-streams/rwa-streams) page for a complete list of available Real World Assets. +1. For this example, you will read from an RWA stream. See the [Data Streams RWA streams](/data-streams/rwa-streams) page for a complete list of available Real World Assets. - Execute your application: + Execute your application. Replace `[STREAM_ID]` with your stream ID. ```bash - go run single-stream.go 0x000434a5b30cafe7e853832a458ea1591dc2f5fb5e4cf80b9979b8248065a7ea + go run single-stream.go [STREAM_ID] ``` Expect output similar to the following in your terminal: ```bash - 2024-12-14T17:50:49-05:00 Raw report data: {"fullReport":"0x0006aee203ef23a892e75b579f8c3f26fd933d9ca45de95c2f8ac470f4ddcd76000000000000000000000000000000000000000000000000000000000b75880c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000026001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000434a5b30cafe7e853832a458ea1591dc2f5fb5e4cf80b9979b8248065a7ea00000000000000000000000000000000000000000000000000000000675e0bc900000000000000000000000000000000000000000000000000000000675e0bc90000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000675f5d4900000000000000000000000000000000000000000000000008d460e8b7e50000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000023f21e9d219ae8e279d13a36b09a439ed71c0d1118561a93987c665fbad13cb6e37bd3763d7ef840b05fda0671b01f26f3c073bef1f3b53fcd9429836ba25eae600000000000000000000000000000000000000000000000000000000000000026bd87b2293422e41ec242088d8feedbe126474b791a85e54450af84e21d017fd59158fbe4adf47dcabe54c11a8ca606659e060839474545eb9b13bf5e7c902df","feedID":"0x000434a5b30cafe7e853832a458ea1591dc2f5fb5e4cf80b9979b8248065a7ea","validFromTimestamp":1734216649,"observationsTimestamp":1734216649} + 2024-12-14T17:50:49-05:00 Raw report data: {"fullReport":"0x...","feedID":"[STREAM_ID]","validFromTimestamp":1734216649,"observationsTimestamp":1734216649} 2024-12-14T17:50:49-05:00 - Decoded Report for Stream ID 0x000434a5b30cafe7e853832a458ea1591dc2f5fb5e4cf80b9979b8248065a7ea: + Decoded Report for Stream ID [STREAM_ID]: ------------------------------------------ Observations Timestamp: 1734216649 Benchmark Price : 636240000000000000 @@ -246,16 +246,16 @@ You'll start with the set up of your Go project. Next, you'll fetch and decode r The decoded report details include: -| Attribute | Value | Description | -| ------------------------ | -------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Stream ID` | `0x000434a5b30cafe7e853832a458ea1591dc2f5fb5e4cf80b9979b8248065a7ea` | The unique identifier for the stream. In this example, the stream is for AUD/USD. | -| `Observations Timestamp` | `1734216649` | The timestamp indicating when the data was captured. | -| `Benchmark Price` | `636240000000000000` | The observed price in the report, with 18 decimals. For readability: `0.63624` USD per AUD. | -| `Valid From Timestamp` | `1734216649` | The start validity timestamp for the report, indicating when the data becomes relevant. | -| `Expires At` | `1734303049` | The expiration timestamp of the report, indicating the point at which the data becomes outdated. | -| `Link Fee` | `0` | The fee to pay in LINK tokens for the onchain verification of the report data. With 18 decimals. **Note:** This example fee is not indicative of actual fees. | -| `Native Fee` | `0` | The fee to pay in the native blockchain token (e.g., ETH on Ethereum) for the onchain verification of the report data. With 18 decimals. **Note:** This example fee is not indicative of actual fees. | -| `Market Status` | `1` | The DON's consensus on whether the market is currently open. Possible values: `0` (`Unknown`), `1` (`Closed`), `2` (`Open`). | +| Attribute | Value | Description | +| ------------------------ | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Stream ID` | `[STREAM_ID]` | The unique identifier for the stream. | +| `Observations Timestamp` | `1734216649` | The timestamp indicating when the data was captured. | +| `Benchmark Price` | `636240000000000000` | The observed price in the report, with 18 decimals. For readability: `0.63624` USD per AUD. | +| `Valid From Timestamp` | `1734216649` | The start validity timestamp for the report, indicating when the data becomes relevant. | +| `Expires At` | `1734303049` | The expiration timestamp of the report, indicating the point at which the data becomes outdated. | +| `Link Fee` | `0` | The fee to pay in LINK tokens for the onchain verification of the report data. With 18 decimals. **Note:** This example fee is not indicative of actual fees. | +| `Native Fee` | `0` | The fee to pay in the native blockchain token (e.g., ETH on Ethereum) for the onchain verification of the report data. With 18 decimals. **Note:** This example fee is not indicative of actual fees. | +| `Market Status` | `1` | The DON's consensus on whether the market is currently open. Possible values: `0` (`Unknown`), `1` (`Closed`), `2` (`Open`). | #### Payload for onchain verification @@ -292,9 +292,7 @@ production environment, you should verify the data to ensure its integrity and a // Validate command-line arguments if len(os.Args) < 3 { fmt.Printf("Usage: go run multiple-streams.go [StreamID1] [StreamID2] ...\n"+ - "Example: go run multiple-streams.go "+ - "0x000434a5b30cafe7e853832a458ea1591dc2f5fb5e4cf80b9979b8248065a7ea "+ - "0x0004b9905d8337c34e00f8dbe31619428bac5c3937e73e6af75c71780f1770ce\n") + "Example: go run multiple-streams.go [STREAM_ID_1] [STREAM_ID_2]\n") os.Exit(1) } @@ -401,19 +399,19 @@ production environment, you should verify the data to ensure its integrity and a export API_SECRET="" ``` -1. For this example, you will read from the AUD/USD and EUR/USD RWA streams. Run your application: +1. For this example, you will read from two RWA streams. Run your application. Replace `[STREAM_ID_1]` and `[STREAM_ID_2]` with your stream IDs. ```bash - go run multiple-streams.go 0x000434a5b30cafe7e853832a458ea1591dc2f5fb5e4cf80b9979b8248065a7ea 0x0004b9905d8337c34e00f8dbe31619428bac5c3937e73e6af75c71780f1770ce + go run multiple-streams.go [STREAM_ID_1] [STREAM_ID_2] ``` Expect to see output similar to the following in your terminal: ```bash - 2024-12-14T17:53:30-05:00 Raw report data for Stream ID 0x000434a5b30cafe7e853832a458ea1591dc2f5fb5e4cf80b9979b8248065a7ea: {"fullReport":"0x0006aee203ef23a892e75b579f8c3f26fd933d9ca45de95c2f8ac470f4ddcd76000000000000000000000000000000000000000000000000000000000b75a101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000026000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000434a5b30cafe7e853832a458ea1591dc2f5fb5e4cf80b9979b8248065a7ea00000000000000000000000000000000000000000000000000000000675e0c6900000000000000000000000000000000000000000000000000000000675e0c690000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000675f5de900000000000000000000000000000000000000000000000008d460e8b7e500000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000255d50eabaa1620b13c01d671b4b8478cbbf3c00a66c96652de0a4abd033447d4077c56723b911f683224b08615cb37103422a0c72f10930f2b2cf5d69ffa7a4100000000000000000000000000000000000000000000000000000000000000022139022d94d5ba9a5d7257866ab5ac2a892de57532a6d15f4d3bb4e0616fc89f26fcf652f60f3227466f986db7a494fdb2e71e7921eaedbfa7e6248220770373","feedID":"0x000434a5b30cafe7e853832a458ea1591dc2f5fb5e4cf80b9979b8248065a7ea","validFromTimestamp":1734216809,"observationsTimestamp":1734216809} + 2024-12-14T17:53:30-05:00 Raw report data for Stream ID [STREAM_ID_1]: {"fullReport":"0x...","feedID":"[STREAM_ID_1]","validFromTimestamp":1734216809,"observationsTimestamp":1734216809} - Decoded Report for Stream ID 0x000434a5b30cafe7e853832a458ea1591dc2f5fb5e4cf80b9979b8248065a7ea: + Decoded Report for Stream ID [STREAM_ID_1]: ------------------------------------------ Observations Timestamp: 1734216809 Benchmark Price : 636240000000000000 @@ -423,10 +421,10 @@ production environment, you should verify the data to ensure its integrity and a Native Fee : 0 Market Status : 1 ------------------------------------------ - 2024-12-14T17:53:30-05:00 Raw report data for Stream ID 0x0004b9905d8337c34e00f8dbe31619428bac5c3937e73e6af75c71780f1770ce: {"fullReport":"0x00062f2fdc48a5bb737dad7fac44e3d35f5d0a0c43091fea90011dbcd3ca39ff000000000000000000000000000000000000000000000000000000000d25a501000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000260000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000004b9905d8337c34e00f8dbe31619428bac5c3937e73e6af75c71780f1770ce00000000000000000000000000000000000000000000000000000000675e0c6900000000000000000000000000000000000000000000000000000000675e0c690000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000675f5de90000000000000000000000000000000000000000000000000e933ccf7f5aa00000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002266357ecc8bccb8199db1d62be6b26ff251e51d821abac59095ffa3bd53f2b671ba72e1f0157b7269578f24574d75f21f4e16340e924a39966385a9204c7f5c5000000000000000000000000000000000000000000000000000000000000000258e69e20a244ec3dc6bcb309d08479656b37160e2210dd7278b6be12296456184d3871968c7511af5beec82528e6f8a9caedffd12f93ca65425850a400343299","feedID":"0x0004b9905d8337c34e00f8dbe31619428bac5c3937e73e6af75c71780f1770ce","validFromTimestamp":1734216809,"observationsTimestamp":1734216809} + 2024-12-14T17:53:30-05:00 Raw report data for Stream ID [STREAM_ID_2]: {"fullReport":"0x...","feedID":"[STREAM_ID_2]","validFromTimestamp":1734216809,"observationsTimestamp":1734216809} - Decoded Report for Stream ID 0x0004b9905d8337c34e00f8dbe31619428bac5c3937e73e6af75c71780f1770ce: + Decoded Report for Stream ID [STREAM_ID_2]: ------------------------------------------ Observations Timestamp: 1734216809 Benchmark Price : 1050250000000000000 diff --git a/src/content/data-streams/tutorials/api-rwa-rust.mdx b/src/content/data-streams/tutorials/api-rwa-rust.mdx index a2946f20366..92477b5d700 100644 --- a/src/content/data-streams/tutorials/api-rwa-rust.mdx +++ b/src/content/data-streams/tutorials/api-rwa-rust.mdx @@ -156,21 +156,21 @@ You'll start with the set up of your Rust project. Next, you'll fetch and decode Replace `` and `` with your API credentials. -1. For this example, you will read from the AUD/USD stream. This stream ID is . See the [Data Streams RWA streams](/data-streams/rwa-streams) page for a complete list of available Real World Assets. +1. For this example, you will read from an RWA stream. See the [Data Streams RWA streams](/data-streams/rwa-streams) page for a complete list of available Real World Assets. - Build and run your application: + Build and run your application. Replace `[STREAM_ID]` with your stream ID. ```bash - cargo run -- 0x000434a5b30cafe7e853832a458ea1591dc2f5fb5e4cf80b9979b8248065a7ea + cargo run -- [STREAM_ID] ``` Expect output similar to the following in your terminal: ```bash - Raw report data: Report { feed_id: 0x000434a5b30cafe7e853832a458ea1591dc2f5fb5e4cf80b9979b8248065a7ea, valid_from_timestamp: 1734125487, observations_timestamp: 1734125487, full_report: "0x0006aee203ef23a892e75b579f8c3f26fd933d9ca45de95c2f8ac470f4ddcd76000000000000000000000000000000000000000000000000000000000b3df40a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000434a5b30cafe7e853832a458ea1591dc2f5fb5e4cf80b9979b8248065a7ea00000000000000000000000000000000000000000000000000000000675ca7af00000000000000000000000000000000000000000000000000000000675ca7af0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000675df92f00000000000000000000000000000000000000000000000008d2f51c75fc000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002a98627fc63e8af57652d69149a23df6fe4d1bccdfcd013a4a9c0faafb4ab3830bdfb30e2d6c6d3f894b5ed7b4761f9236431548efa15f100fd5a61804cef21c0000000000000000000000000000000000000000000000000000000000000000266dc0c7d18ccc26c566df4820fd68cca5a076215d982c74abf7ae089bc24d3520716cfefdd127f522a2f98f90227926ed786479977d99ac9f91d5c99120e3cb3" } + Raw report data: Report { feed_id: [STREAM_ID], valid_from_timestamp: 1734125487, observations_timestamp: 1734125487, full_report: "0x..." } - Decoded Report for Stream ID 0x000434a5b30cafe7e853832a458ea1591dc2f5fb5e4cf80b9979b8248065a7ea: + Decoded Report for Stream ID [STREAM_ID]: ------------------------------------------ Observations Timestamp: 1734125487 Benchmark Price : 635840000000000000 @@ -186,16 +186,16 @@ You'll start with the set up of your Rust project. Next, you'll fetch and decode The decoded report details include: -| Attribute | Value | Description | -| ------------------------ | -------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Stream ID` | `0x000434a5b30cafe7e853832a458ea1591dc2f5fb5e4cf80b9979b8248065a7ea` | The unique identifier for the stream. In this example, the stream is for AUD/USD. | -| `Observations Timestamp` | `1734125487` | The timestamp indicating when the data was captured. | -| `Benchmark Price` | `635840000000000000` | The observed price in the report, with 18 decimals. For readability: `0.63584` USD per AUD. | -| `Valid From Timestamp` | `1734125487` | The start validity timestamp for the report, indicating when the data becomes relevant. | -| `Expires At` | `1734211887` | The expiration timestamp of the report, indicating the point at which the data becomes outdated. | -| `Link Fee` | `0` | The fee to pay in LINK tokens for the onchain verification of the report data. With 18 decimals. **Note:** This example fee is not indicative of actual fees. | -| `Native Fee` | `0` | The fee to pay in the native blockchain token (e.g., ETH on Ethereum) for the onchain verification of the report data. With 18 decimals. **Note:** This example fee is not indicative of actual fees. | -| `Market Status` | `2` | The DON's consensus on whether the market is currently open. Possible values: `0` (`Unknown`), `1` (`Closed`), `2` (`Open`). | +| Attribute | Value | Description | +| ------------------------ | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Stream ID` | `[STREAM_ID]` | The unique identifier for the stream. | +| `Observations Timestamp` | `1734125487` | The timestamp indicating when the data was captured. | +| `Benchmark Price` | `635840000000000000` | The observed price in the report, with 18 decimals. For readability: `0.63584` USD per AUD. | +| `Valid From Timestamp` | `1734125487` | The start validity timestamp for the report, indicating when the data becomes relevant. | +| `Expires At` | `1734211887` | The expiration timestamp of the report, indicating the point at which the data becomes outdated. | +| `Link Fee` | `0` | The fee to pay in LINK tokens for the onchain verification of the report data. With 18 decimals. **Note:** This example fee is not indicative of actual fees. | +| `Native Fee` | `0` | The fee to pay in the native blockchain token (e.g., ETH on Ethereum) for the onchain verification of the report data. With 18 decimals. **Note:** This example fee is not indicative of actual fees. | +| `Market Status` | `2` | The DON's consensus on whether the market is currently open. Possible values: `0` (`Unknown`), `1` (`Closed`), `2` (`Open`). | #### Payload for onchain verification diff --git a/src/content/data-streams/tutorials/ws-rwa-go.mdx b/src/content/data-streams/tutorials/ws-rwa-go.mdx index 286bd99d358..bcc8eac8ac3 100644 --- a/src/content/data-streams/tutorials/ws-rwa-go.mdx +++ b/src/content/data-streams/tutorials/ws-rwa-go.mdx @@ -221,21 +221,21 @@ In this tutorial, you'll learn how to use the [Data Streams SDK](/data-streams/r See the [SDK Reference](/data-streams/reference/go-sdk#config-struct) page for more configuration options. -1. For this example, you'll subscribe to the AUD/USD RWA streams. This stream ID is . See the [RWA Streams](/data-streams/rwa-streams) page for a complete list of available Real World Assets. +1. For this example, you'll subscribe to an RWA stream. See the [RWA Streams](/data-streams/rwa-streams) page for a complete list of available Real World Assets. - Execute your application: + Execute your application. Replace `[STREAM_ID]` with your stream ID. ```bash - go run stream.go 0x000434a5b30cafe7e853832a458ea1591dc2f5fb5e4cf80b9979b8248065a7ea + go run stream.go [STREAM_ID] ``` Expect output similar to the following in your terminal: ```bash - 2024-10-24T12:52:50-05:00 Raw report data: {"fullReport":"0x0006aee203ef23a892e75b579f8c3f26fd933d9ca45de95c2f8ac470f4ddcd7600000000000000000000000000000000000000000000000000000000015de214000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000026001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000434a5b30cafe7e853832a458ea1591dc2f5fb5e4cf80b9979b8248065a7ea00000000000000000000000000000000000000000000000000000000671a897200000000000000000000000000000000000000000000000000000000671a89720000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000671bdaf20000000000000000000000000000000000000000000000000936a5885261c000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000029bb0fa88b2783870c74deae7db07a588344b1ef32a58dd00589c5ebc24b1b978075d1fa41ce8670633be03f555d297ff4b005b19c58577bc70e68803160b4120000000000000000000000000000000000000000000000000000000000000000238ea2b71402354ebabb4d9be738a83d13e4f67512d13bf8ee078b6a6f2851cdf1fc20d5eb054527ec82dadcd1206dd1d36009db1e95c9ac88defc1d54cab0826","feedID":"0x000434a5b30cafe7e853832a458ea1591dc2f5fb5e4cf80b9979b8248065a7ea","validFromTimestamp":1729792370,"observationsTimestamp":1729792370} + 2024-10-24T12:52:50-05:00 Raw report data: {"fullReport":"0x...","feedID":"[STREAM_ID]","validFromTimestamp":1729792370,"observationsTimestamp":1729792370} 2024-10-24T12:52:50-05:00 - --- Report Stream ID: 0x000434a5b30cafe7e853832a458ea1591dc2f5fb5e4cf80b9979b8248065a7ea --- + --- Report Stream ID: [STREAM_ID] --- ------------------------------------------ Observations Timestamp : 1729792370 Benchmark Price : 663900000000000000 @@ -251,10 +251,10 @@ In this tutorial, you'll learn how to use the [Data Streams SDK](/data-streams/r accepted: 1, deduplicated: 0, total_received 1, partial_reconnects: 0, full_reconnects: 0, configured_connections: 1, active_connections 1 -------------------------------------------------------------------------------------------------------------------------------------------- - 2024-10-24T12:52:51-05:00 Raw report data: {"fullReport":"0x0006aee203ef23a892e75b579f8c3f26fd933d9ca45de95c2f8ac470f4ddcd7600000000000000000000000000000000000000000000000000000000015de218000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000026000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000434a5b30cafe7e853832a458ea1591dc2f5fb5e4cf80b9979b8248065a7ea00000000000000000000000000000000000000000000000000000000671a897300000000000000000000000000000000000000000000000000000000671a89730000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000671bdaf30000000000000000000000000000000000000000000000000936aa14799b100000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002d8e3d2f04c9de178bc958eecdd747c975248fa2fd8745485ff05105d0f99abdc11caf5d40d80e6d832dce82748fb688ecc967654a09b5ba45bc6b62d7023aa9600000000000000000000000000000000000000000000000000000000000000021837177262094c1183fff139f494c2923f308851f722d80d7793a4d0ea855bec26f35f8112eae664484d16cccfacf15c8710bc44397f0bd1ca0869241a6156f9","feedID":"0x000434a5b30cafe7e853832a458ea1591dc2f5fb5e4cf80b9979b8248065a7ea","validFromTimestamp":1729792371,"observationsTimestamp":1729792371} + 2024-10-24T12:52:51-05:00 Raw report data: {"fullReport":"0x...","feedID":"[STREAM_ID]","validFromTimestamp":1729792371,"observationsTimestamp":1729792371} 2024-10-24T12:52:51-05:00 - --- Report Stream ID: 0x000434a5b30cafe7e853832a458ea1591dc2f5fb5e4cf80b9979b8248065a7ea --- + --- Report Stream ID: [STREAM_ID] --- ------------------------------------------ Observations Timestamp : 1729792371 Benchmark Price : 663905000000000000 @@ -270,10 +270,10 @@ In this tutorial, you'll learn how to use the [Data Streams SDK](/data-streams/r accepted: 2, deduplicated: 0, total_received 2, partial_reconnects: 0, full_reconnects: 0, configured_connections: 1, active_connections 1 -------------------------------------------------------------------------------------------------------------------------------------------- - 2024-10-24T12:52:52-05:00 Raw report data: {"fullReport":"0x0006aee203ef23a892e75b579f8c3f26fd933d9ca45de95c2f8ac470f4ddcd7600000000000000000000000000000000000000000000000000000000015de303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000026000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000434a5b30cafe7e853832a458ea1591dc2f5fb5e4cf80b9979b8248065a7ea00000000000000000000000000000000000000000000000000000000671a897400000000000000000000000000000000000000000000000000000000671a89740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000671bdaf40000000000000000000000000000000000000000000000000936a5885261c0000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000286acd46943638d6999878133ce893f42720070ec0937b28cbd69c07b243f3f4130627d493403bbf6a3c914cd0bdf54d254490a084e23201d3bcd19797e94162e00000000000000000000000000000000000000000000000000000000000000022cac7476948bbda325c2e73ac86a7b66fd35daada10d7aa9d71f9d737376573407171b150dcc244d88ecc3f94e99668debdc046c564b2343f8e8590a9d8a92cc","feedID":"0x000434a5b30cafe7e853832a458ea1591dc2f5fb5e4cf80b9979b8248065a7ea","validFromTimestamp":1729792372,"observationsTimestamp":1729792372} + 2024-10-24T12:52:52-05:00 Raw report data: {"fullReport":"0x...","feedID":"[STREAM_ID]","validFromTimestamp":1729792372,"observationsTimestamp":1729792372} 2024-10-24T12:52:52-05:00 - --- Report Stream ID: 0x000434a5b30cafe7e853832a458ea1591dc2f5fb5e4cf80b9979b8248065a7ea --- + --- Report Stream ID: [STREAM_ID] --- ------------------------------------------ Observations Timestamp : 1729792372 Benchmark Price : 663900000000000000 @@ -296,16 +296,16 @@ In this tutorial, you'll learn how to use the [Data Streams SDK](/data-streams/r The decoded report details include: -| Attribute | Value | Description | -| ------------------------ | -------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Stream ID` | `0x000434a5b30cafe7e853832a458ea1591dc2f5fb5e4cf80b9979b8248065a7ea` | The unique identifier for the stream. In this example, the stream is for AUD/USD. | -| `Observations Timestamp` | `1729792372` | The timestamp indicating when the data was captured. | -| `Benchmark Price` | `663900000000000000` | The observed price in the report, with 18 decimals. For readability: `0.6639` USD per EUR. | -| `Valid From Timestamp` | `1729792372` | The start validity timestamp for the report, indicating when the data becomes relevant. | -| `Expires At` | `1729878772` | The expiration timestamp of the report, indicating the point at which the data becomes outdated. | -| `Link Fee` | `0` | The fee to pay in LINK tokens for the onchain verification of the report data. With 18 decimals. **Note:** This example fee is not indicative of actual fees. | -| `Native Fee` | `0` | The fee to pay in the native blockchain token (e.g., ETH on Ethereum) for the onchain verification of the report data. With 18 decimals. **Note:** This example fee is not indicative of actual fees. | -| `Market Status` | `2` | The DON's consensus on whether the market is currently open. Possible values: `0` (`Unknown`), `1` (`Closed`), `2` (`Open`). | +| Attribute | Value | Description | +| ------------------------ | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Stream ID` | `[STREAM_ID]` | The unique identifier for the stream. | +| `Observations Timestamp` | `1729792372` | The timestamp indicating when the data was captured. | +| `Benchmark Price` | `663900000000000000` | The observed price in the report, with 18 decimals. | +| `Valid From Timestamp` | `1729792372` | The start validity timestamp for the report, indicating when the data becomes relevant. | +| `Expires At` | `1729878772` | The expiration timestamp of the report, indicating the point at which the data becomes outdated. | +| `Link Fee` | `0` | The fee to pay in LINK tokens for the onchain verification of the report data. With 18 decimals. **Note:** This example fee is not indicative of actual fees. | +| `Native Fee` | `0` | The fee to pay in the native blockchain token (e.g., ETH on Ethereum) for the onchain verification of the report data. With 18 decimals. **Note:** This example fee is not indicative of actual fees. | +| `Market Status` | `2` | The DON's consensus on whether the market is currently open. Possible values: `0` (`Unknown`), `1` (`Closed`), `2` (`Open`). | #### Payload for onchain verification diff --git a/src/content/data-streams/tutorials/ws-rwa-rust.mdx b/src/content/data-streams/tutorials/ws-rwa-rust.mdx index 0c4ab92a5c6..d254bbb5650 100644 --- a/src/content/data-streams/tutorials/ws-rwa-rust.mdx +++ b/src/content/data-streams/tutorials/ws-rwa-rust.mdx @@ -192,12 +192,12 @@ In this tutorial, you'll learn how to use the [Data Streams SDK](/data-streams/r Replace `` and `` with your API credentials. -1. For this example, you'll subscribe to the AUD/USD Data Streams RWA stream. This stream ID is . See the [RWA Streams](/data-streams/rwa-streams) page for a complete list of available real-world assets. +1. For this example, you'll subscribe to an RWA stream. See the [RWA Streams](/data-streams/rwa-streams) page for a complete list of available real-world assets. - Build and run your application: + Build and run your application. Replace `[STREAM_ID]` with your stream ID. ```bash - cargo run -- 0x000434a5b30cafe7e853832a458ea1591dc2f5fb5e4cf80b9979b8248065a7ea + cargo run -- [STREAM_ID] ``` Expect output similar to the following in your terminal: @@ -208,10 +208,10 @@ In this tutorial, you'll learn how to use the [Data Streams SDK](/data-streams/r 2024-12-13T23:37:17.054896Z INFO data_streams_sdk::stream::monitor_connection: Responding with pong: [49] 2024-12-13T23:37:17.199112Z INFO data_streams_sdk::stream::monitor_connection: Received new report from Data Streams Endpoint. 2024-12-13T23:37:17.199304Z INFO my_data_streams_project: - Raw report data: Report { feed_id: 0x000434a5b30cafe7e853832a458ea1591dc2f5fb5e4cf80b9979b8248065a7ea, valid_from_timestamp: 1734133037, observations_timestamp: 1734133037, full_report: "0x0006aee203ef23a892e75b579f8c3f26fd933d9ca45de95c2f8ac470f4ddcd76000000000000000000000000000000000000000000000000000000000b42b108000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000434a5b30cafe7e853832a458ea1591dc2f5fb5e4cf80b9979b8248065a7ea00000000000000000000000000000000000000000000000000000000675cc52d00000000000000000000000000000000000000000000000000000000675cc52d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000675e16ad00000000000000000000000000000000000000000000000008d4182644500000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000021521eae32097ed41bc3dad69f365da1979d155b574cc84e4dfb9e7970821d6bc40fac4c300b09b7cfae106f1008b4bec83edd27f20c5a3ad6b2c736e0765ecc500000000000000000000000000000000000000000000000000000000000000024941c68ad5a7d69e92fc927633634cd6cf478f7c11e3c3408341b462dac292ce66cc18bf09c30ad1df589dbfc0a19172a4719bb51efe83450ce14d959bccf541" } + Raw report data: Report { feed_id: [STREAM_ID], valid_from_timestamp: 1734133037, observations_timestamp: 1734133037, full_report: "0x..." } 2024-12-13T23:37:17.199585Z INFO my_data_streams_project: - --- Report Stream ID: 0x000434a5b30cafe7e853832a458ea1591dc2f5fb5e4cf80b9979b8248065a7ea --- + --- Report Stream ID: [STREAM_ID] --- ------------------------------------------ Observations Timestamp : 1734133037 Benchmark Price : 636160000000000000 @@ -235,10 +235,10 @@ In this tutorial, you'll learn how to use the [Data Streams SDK](/data-streams/r -------------------------------------------------------------------------------------------------------------------------------------------- 2024-12-13T23:37:18.215222Z INFO data_streams_sdk::stream::monitor_connection: Received new report from Data Streams Endpoint. 2024-12-13T23:37:18.21587Z INFO my_data_streams_project: - Raw report data: Report { feed_id: 0x000434a5b30cafe7e853832a458ea1591dc2f5fb5e4cf80b9979b8248065a7ea, valid_from_timestamp: 1734133038, observations_timestamp: 1734133038, full_report: "0x0006aee203ef23a892e75b579f8c3f26fd933d9ca45de95c2f8ac470f4ddcd76000000000000000000000000000000000000000000000000000000000b42b10c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000434a5b30cafe7e853832a458ea1591dc2f5fb5e4cf80b9979b8248065a7ea00000000000000000000000000000000000000000000000000000000675cc52e00000000000000000000000000000000000000000000000000000000675cc52e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000675e16ae00000000000000000000000000000000000000000000000008d4182644500000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000026a76e4abe53b8f3f7f0ca1628335a0da840d28502ea2c44e67951b17b8cc74da781aa786d5503c09043c29d0db71db2b0de3b5b5302a9050b7acdf93fdf4a36f00000000000000000000000000000000000000000000000000000000000000027d06597171eceea257fc1eaa222d4b47a0b5d227e8bf746031e9061806e55b2778fa8c6e10a574d7f9a4e192090f71769468eb3e626b3354e6cdaadff120e170" } + Raw report data: Report { feed_id: [STREAM_ID], valid_from_timestamp: 1734133038, observations_timestamp: 1734133038, full_report: "0x..." } 2024-12-13T23:37:18.216946Z INFO my_data_streams_project: - --- Report Stream ID: 0x000434a5b30cafe7e853832a458ea1591dc2f5fb5e4cf80b9979b8248065a7ea --- + --- Report Stream ID: [STREAM_ID] --- ------------------------------------------ Observations Timestamp : 1734133038 Benchmark Price : 636160000000000000 @@ -280,30 +280,28 @@ The example above demonstrates streaming data from a single RWA stream. For prod 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. -You can subscribe to multiple streams by providing additional stream IDs as command-line arguments: +You can subscribe to multiple streams by providing additional stream IDs as command-line arguments. Replace `[STREAM_ID_1]` and `[STREAM_ID_2]` with your stream IDs. ```bash -cargo run -- \ - 0x000434a5b30cafe7e853832a458ea1591dc2f5fb5e4cf80b9979b8248065a7ea \ - 0x0004f41f3d47d2c15f817309d905d4508e809c98b1eafc7b6cdc2a6c8ec23f3f +cargo run -- [STREAM_ID_1] [STREAM_ID_2] ``` -This will subscribe to both AUD/USD and EUR/USD streams. +This will subscribe to both streams. #### Decoded report details The decoded report details include: -| Attribute | Value | Description | -| ------------------------ | -------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Stream ID` | `0x000434a5b30cafe7e853832a458ea1591dc2f5fb5e4cf80b9979b8248065a7ea` | The unique identifier for the stream. In this example, the stream is for AUD/USD. | -| `Observations Timestamp` | `1734133037` | The timestamp indicating when the data was captured. | -| `Benchmark Price` | `636160000000000000` | The observed price in the report, with 18 decimals. For readability: `0.63616` USD per AUD. | -| `Valid From Timestamp` | `1734133037` | The start validity timestamp for the report, indicating when the data becomes relevant. | -| `Expires At` | `1734219437` | The expiration timestamp of the report, indicating the point at which the data becomes outdated. | -| `Link Fee` | `0` | The fee to pay in LINK tokens for the onchain verification of the report data. With 18 decimals. **Note:** This example fee is not indicative of actual fees. | -| `Native Fee` | `0` | The fee to pay in the native blockchain token (e.g., ETH on Ethereum) for the onchain verification of the report data. With 18 decimals. **Note:** This example fee is not indicative of actual fees. | -| `Market Status` | `1` | The DON's consensus on whether the market is currently open. Possible values: `0` (`Unknown`), `1` (`Closed`), `2` (`Open`). In this case, the market is closed. | +| Attribute | Value | Description | +| ------------------------ | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Stream ID` | `[STREAM_ID]` | The unique identifier for the stream. | +| `Observations Timestamp` | `1734133037` | The timestamp indicating when the data was captured. | +| `Benchmark Price` | `636160000000000000` | The observed price in the report, with 18 decimals. For readability: `0.63616` USD per AUD. | +| `Valid From Timestamp` | `1734133037` | The start validity timestamp for the report, indicating when the data becomes relevant. | +| `Expires At` | `1734219437` | The expiration timestamp of the report, indicating the point at which the data becomes outdated. | +| `Link Fee` | `0` | The fee to pay in LINK tokens for the onchain verification of the report data. With 18 decimals. **Note:** This example fee is not indicative of actual fees. | +| `Native Fee` | `0` | The fee to pay in the native blockchain token (e.g., ETH on Ethereum) for the onchain verification of the report data. With 18 decimals. **Note:** This example fee is not indicative of actual fees. | +| `Market Status` | `1` | The DON's consensus on whether the market is currently open. Possible values: `0` (`Unknown`), `1` (`Closed`), `2` (`Open`). In this case, the market is closed. | #### Payload for onchain verification