-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
syntax = "proto3"; | ||
|
||
// Import additional EVM data types types. | ||
import "types.proto"; | ||
|
||
package valorem.trade.v1; | ||
|
||
// The FeaturedInstruments service offers live streams of the featured instruments for provided asset pairs. | ||
service FeaturedInstruments { | ||
// Streams the featured option types for specified asset pairs. Option types are returned for a pair on the stream | ||
// roughly once per block. | ||
rpc GetOptionTypes (OptionTypesRequest) returns (stream OptionTypes); | ||
} | ||
|
||
message OptionTypesRequest { | ||
// List of asset pairs to get featured options for. | ||
repeated OptionTypes option_types = 1; | ||
} | ||
|
||
message OptionTypes { | ||
// The specific chain on which the tokens are located. | ||
uint64 chain_id = 1; | ||
|
||
// Pair of ERC20 tokens to retrieve all featured options for. | ||
AssetPair asset_pair = 2; | ||
|
||
// List of featured option types encoded as option_ids, along with a flag to determine if the option already exists | ||
// with the clearing house. | ||
// Reused message, leave empty for requests. | ||
repeated OptionId option_id = 5; | ||
} | ||
|
||
// Underlying and exercise ERC20 asset pair for which to retrieve instruments for. | ||
// Note the order of tokens does not matter here. | ||
message AssetPair { | ||
H160 token1 = 1; | ||
H160 token2 = 2; | ||
} | ||
|
||
// Option id with created flag. | ||
message OptionId { | ||
// Option type encoded as option_id. | ||
H256 option_id = 1; | ||
|
||
// True if option type already exists with the clearing house. | ||
bool created = 2; | ||
} |