github.com/InjectiveLabs/sdk-go@v1.53.0/exchange/oracle_rpc/pb/injective_oracle_rpc.proto (about)

     1  // Code generated with goa v3.7.0, DO NOT EDIT.
     2  //
     3  // InjectiveOracleRPC protocol buffer definition
     4  //
     5  // Command:
     6  // $ goa gen github.com/InjectiveLabs/injective-indexer/api/design -o ../
     7  
     8  syntax = "proto3";
     9  
    10  package injective_oracle_rpc;
    11  
    12  option go_package = "/injective_oracle_rpcpb";
    13  
    14  // InjectiveOracleRPC defines gRPC API of Exchange Oracle provider.
    15  service InjectiveOracleRPC {
    16  	// List all oracles
    17  	rpc OracleList (OracleListRequest) returns (OracleListResponse);
    18  	// Gets the price of the oracle
    19  	rpc Price (PriceRequest) returns (PriceResponse);
    20  	// StreamPrices streams new price changes for a specified oracle. If no oracles
    21  // are provided, all price changes are streamed.
    22  	rpc StreamPrices (StreamPricesRequest) returns (stream StreamPricesResponse);
    23  	// StreamPrices streams new price changes markets
    24  	rpc StreamPricesByMarkets (StreamPricesByMarketsRequest) returns (stream StreamPricesByMarketsResponse);
    25  }
    26  
    27  message OracleListRequest {
    28  }
    29  
    30  message OracleListResponse {
    31  	repeated Oracle oracles = 1;
    32  }
    33  
    34  message Oracle {
    35  	// The symbol of the oracle asset.
    36  	string symbol = 1;
    37  	// Oracle base currency
    38  	string base_symbol = 2;
    39  	// Oracle quote currency
    40  	string quote_symbol = 3;
    41  	// Oracle Type
    42  	string oracle_type = 4;
    43  	// The price of the oracle asset
    44  	string price = 5;
    45  }
    46  
    47  message PriceRequest {
    48  	// Oracle base currency
    49  	string base_symbol = 1;
    50  	// Oracle quote currency
    51  	string quote_symbol = 2;
    52  	// Oracle Type
    53  	string oracle_type = 3;
    54  	// OracleScaleFactor
    55  	uint32 oracle_scale_factor = 4;
    56  }
    57  
    58  message PriceResponse {
    59  	// The price of the oracle asset
    60  	string price = 1;
    61  }
    62  
    63  message StreamPricesRequest {
    64  	// Oracle base currency
    65  	string base_symbol = 1;
    66  	// Oracle quote currency
    67  	string quote_symbol = 2;
    68  	// Oracle Type
    69  	string oracle_type = 3;
    70  }
    71  
    72  message StreamPricesResponse {
    73  	// The price of the oracle asset
    74  	string price = 1;
    75  	// Operation timestamp in UNIX millis.
    76  	sint64 timestamp = 2;
    77  }
    78  
    79  message StreamPricesByMarketsRequest {
    80  	// marketIDs to stream price for, empty to listen for all prices
    81  	repeated string market_ids = 1;
    82  }
    83  
    84  message StreamPricesByMarketsResponse {
    85  	// The price of the oracle asset
    86  	string price = 1;
    87  	// Operation timestamp in UNIX millis.
    88  	sint64 timestamp = 2;
    89  	// marketID that the price has been updated
    90  	string market_id = 3;
    91  }