Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data Streams - report schemas update #1756

Merged
merged 1 commit into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/content/data-streams/reference/interfaces.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ title: "Interfaces"

import { Aside, CodeSample } from "@components"

<Aside type="note" title="Mainnet Early Access">
Chainlink Data Streams is available on Arbitrum Sepolia and in Early Access on Arbitrum Mainnet.{" "}
<Aside type="note" title="Mainnet Access">
Chainlink Data Streams is available on Arbitrum Mainnet and Arbitrum Sepolia.
</Aside>

<Aside type="note" title="Talk to an expert">
<a href="https://chainlinkcommunity.typeform.com/datastreams?#ref_id=docs">Contact us</a> to talk to an expert about
integrating Chainlink Data Streams with your applications.
</Aside>
Expand Down
29 changes: 18 additions & 11 deletions src/content/data-streams/reference/report-schema.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ title: "Report Schema Reference"

import { Aside } from "@components"

<Aside type="note" title="Mainnet Early Access">
Chainlink Data Streams is available on Arbitrum Sepolia and in Early Access on Arbitrum Mainnet.{" "}
<Aside type="note" title="Mainnet Access">
Chainlink Data Streams is available on Arbitrum Mainnet and Arbitrum Sepolia.
</Aside>

<Aside type="note" title="Talk to an expert">
<a href="https://chainlinkcommunity.typeform.com/datastreams?#ref_id=docs">Contact us</a> to talk to an expert about
integrating Chainlink Data Streams with your applications.
</Aside>
Expand All @@ -18,17 +21,21 @@ Data Streams can deliver a broad array of information in each report. The values

Streams with the `Basic` schema have the following values specifically applicable to market pricing data:

- `feedID`: The unique identifier for the stream
- `validFromTimestamp`: The earliest timestamp during which the price is valid
- `observationsTimestamp`: The latest timestamp during which the price is valid
- `nativeFee`: The cost to verify this report when paying with the blockchain's native token
- `linkFee`: The cost to verify this report when paying with LINK
- `expiresAt`: The expiration date of this report
- `price`: The DON's concensus median price for this report carried to 8 decimal places
| Value | Type | Description |
| ----------------------- | --------- | ----------------------------------------------------------------------------- |
| `feedID` | `bytes32` | The unique identifier for the stream |
| `validFromTimestamp` | `uint32` | The earliest timestamp during which the price is valid |
| `observationsTimestamp` | `uint32` | The latest timestamp during which the price is valid |
| `nativeFee` | `uint192` | The cost to verify this report when paying with the blockchain's native token |
| `linkFee` | `uint192` | The cost to verify this report when paying with LINK |
| `expiresAt` | `uint32` | The expiration date of this report |
| `price` | `int192` | The DON's consensus median price for this report carried to 8 decimal places |

## Premium schema

The `Premium` schema includes all values from the `Basic` schema, and also includes `bid` and `ask` values:

- `bid`: The simulated price impact of a buy order up to the X% depth of liquidity usage
- `ask`: Simulated price impact of a sell order up to the X% depth of liquidity usage
| Value | Type | Description |
| ----- | -------- | ------------------------------------------------------------------------------- |
| `bid` | `int192` | The simulated price impact of a buy order up to the X% depth of liquidity usage |
| `ask` | `int192` | Simulated price impact of a sell order up to the X% depth of liquidity usage |
2 changes: 1 addition & 1 deletion src/features/data-streams/common/gettingStarted.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ The retrieved price is stored as a variable in the contract and emitted in the l

1. On the **Deploy & Run Transactions** tab in Remix, expand the details of your upkeep contract in the **Deployed Contracts** section.

1. Click the `last_retrieved_price` getter function to view the retrieved price. The answer on the ETH/USD feed uses 18 decimal places, so an answer of `248412100000000000` indicates an ETH/USD price of 2484.121. Each feed uses a different number of decimal places for answers. See the [Stream IDs](/data-streams/stream-ids) page for more information.
1. Click the `last_retrieved_price` getter function to view the retrieved price. The answer on the ETH/USD stream uses 18 decimal places, so an answer of `248412100000000000` indicates an ETH/USD price of 2484.121. Each stream uses a different number of decimal places for answers. See the [Stream IDs](/data-streams/stream-ids) page for more information.

<ClickToZoom
src="/images/data-streams/getting-started/deployed-upkeep-2.webp"
Expand Down
Loading