Skip to content
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
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 25 additions & 11 deletions lazer/publisher_sdk/proto/state.proto
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,7 @@ message Feed {
// [required] Feed kind.
optional FeedKind kind = 108;
// [required] Current aggregated data of the feed.
optional FeedDataFields aggregated_data = 109;

optional FeedAggregateData aggregated_data = 109;

// [required] Feed status in the current shard. Disabled feeds will not be visible in
// the consumer API for the current shard. This setting should only be used
Expand All @@ -136,8 +135,6 @@ message Feed {
// [optional] If present, the aggregator will disable the feed in the current shard
// at the specified instant.
optional google.protobuf.Timestamp disable_in_shard_timestamp = 203;

// TODO: list of permissioned publisher IDs.
}

// A part of the feed state related to a particular publisher.
Expand All @@ -154,21 +151,30 @@ message FeedPublisherState {
optional google.protobuf.Timestamp last_publisher_timestamp = 3;
// [optional] Data of the last update received from this publisher to this feed.
// Can be absent if no update was ever received or if the last update was deemed no longer relevant.
optional FeedData last_feed_data = 4;
optional FeedPublisherData last_feed_data = 4;
}

// Data provided by a publisher for a certain feed.
message FeedData {
message FeedPublisherData {
// [optional] Best executable price. Can be absent if no data is available. Never present for funding rate feeds.
optional int64 price = 1;
// [optional] Best bid price. Can be absent if no data is available. Never present for funding rate feeds.
optional int64 best_bid_price = 2;
// [optional] Best ask price. Can be absent if no data is available. Never present for funding rate feeds.
optional int64 best_ask_price = 3;
// [optional] Funding rate. Can be absent if no data is available. Can only be present for funding rate feeds.
optional int64 funding_rate = 4;
// [optional] Funding rate interval. Can be absent if no data is available. Can only be present for funding rate feeds.
optional google.protobuf.Duration funding_rate_interval = 5;
// [required] Timestamp provided by the source of data that the publisher uses (e.g. an exchange).
// If no such timestamp is available, it should be set to the same value as `publisher_timestamp`.
optional google.protobuf.Timestamp source_timestamp = 1;
optional google.protobuf.Timestamp source_timestamp = 6;
// [required] Timestamp of the publisher.
optional google.protobuf.Timestamp publisher_timestamp = 2;
// [required] Values of the data fields.
optional FeedDataFields fields = 3;
optional google.protobuf.Timestamp publisher_timestamp = 7;
}

message FeedDataFields {
// Aggregate data derived from all accepted publisher updates.
message FeedAggregateData {
// [optional] Best executable price. Can be absent if no data is available. Never present for funding rate feeds.
optional int64 price = 1;
// [optional] Best bid price. Can be absent if no data is available. Never present for funding rate feeds.
Expand All @@ -179,6 +185,14 @@ message FeedDataFields {
optional int64 funding_rate = 4;
// [optional] Funding rate interval. Can be absent if no data is available. Can only be present for funding rate feeds.
optional google.protobuf.Duration funding_rate_interval = 5;
// [optional] Timestamp of the funding. Can be absent if no data is available.
// Can only be present for funding rate feeds.
optional google.protobuf.Timestamp funding_timestamp = 6;
// [required] Number of publishers that were included in the aggregate.
optional uint64 publisher_count = 7;
// [optional] Confidence interval for the `price` field. Can be absent if no data is available.
// Never present for funding rate feeds.
optional int64 confidence = 8;
}

// State associated with a governance source.
Expand Down
2 changes: 1 addition & 1 deletion lazer/publisher_sdk/rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pyth-lazer-publisher-sdk"
version = "0.16.1"
version = "0.17.0"
edition = "2021"
description = "Pyth Lazer Publisher SDK types."
license = "Apache-2.0"
Expand Down