|
| 1 | +syntax = "proto3"; |
| 2 | + |
| 3 | +import "google/protobuf/timestamp.proto"; |
| 4 | + |
| 5 | +package pyth_lazer_transaction; |
| 6 | + |
| 7 | +// PublisherUpdate contains an array of individual updates and a timestamp |
| 8 | +message PublisherUpdate { |
| 9 | + // Array of updates, each of which target a single feed |
| 10 | + repeated FeedUpdate updates = 1; |
| 11 | + |
| 12 | + // ID of the Publisher that is sending the update |
| 13 | + // Should match ID stored in Pyth Lazer |
| 14 | + optional uint32 publisher_id = 2; |
| 15 | + |
| 16 | + // Timestamp when this message was created |
| 17 | + optional google.protobuf.Timestamp publisher_timestamp = 3; |
| 18 | +} |
| 19 | + |
| 20 | +// Update to a feed. May contain different types of data depending on what kind of update it is |
| 21 | +message FeedUpdate { |
| 22 | + // Feed which the update should be applied to |
| 23 | + // Should match a feed id recognized by PythLazer |
| 24 | + optional uint32 feed_id = 1; |
| 25 | + |
| 26 | + // Timestamp when this data was first acquired or generated |
| 27 | + optional google.protobuf.Timestamp source_timestamp = 2; |
| 28 | + |
| 29 | + // one of the valid updates allowed by publishers for a lazer feed |
| 30 | + oneof update { |
| 31 | + PriceUpdate price_update = 3; |
| 32 | + FundingRateUpdate funding_rate_update = 4; |
| 33 | + }; |
| 34 | +} |
| 35 | + |
| 36 | +message PriceUpdate { |
| 37 | + // Price for the symbol as an integer |
| 38 | + // Should be produced with a matching exponent to the configured exponent value in PythLazer |
| 39 | + // May be missing if no price data is available |
| 40 | + optional int64 price = 1; |
| 41 | + |
| 42 | + // Best Bid Price for the symbol as an integer |
| 43 | + // Should be produced with a matching exponent to the configured exponent value in PythLazer |
| 44 | + // May be missing if no data is available |
| 45 | + optional int64 best_bid_price = 2; |
| 46 | + |
| 47 | + // Best Ask Price for the symbol as an integer |
| 48 | + // Should be produced with a matching exponent to the configured exponent value in PythLazer |
| 49 | + // May be missing if no data is available |
| 50 | + optional int64 best_ask_price = 3; |
| 51 | +} |
| 52 | + |
| 53 | +message FundingRateUpdate { |
| 54 | + // Price for which the funding rate applies to |
| 55 | + optional int64 price = 1; |
| 56 | + |
| 57 | + // Perpetual Future funding rate |
| 58 | + optional int64 rate = 2; |
| 59 | +} |
0 commit comments