Merge branch 'master' of bitbucket.org:bluetradesys/spark
This commit is contained in:
commit
f84426f505
5 files changed
+80
-52
No files matched your search
@@ -1,3 +1,4 @@
|
||||
build/
|
||||
.dir-locals.el
|
||||
*.pyc
|
||||
.vscode
|
||||
@@ -3,13 +3,12 @@ import "google/protobuf/descriptor.proto";
|
||||
package bts.api;
|
||||
option csharp_namespace="bts.api";
|
||||
|
||||
extend google.protobuf.MessageOptions {
|
||||
string message_description = 8500;
|
||||
}
|
||||
extend google.protobuf.ServiceOptions {
|
||||
string service_description = 8501;
|
||||
}
|
||||
extend google.protobuf.MethodOptions {
|
||||
string method_description = 8503;
|
||||
}
|
||||
extend google.protobuf.FieldOptions {
|
||||
bool key = 8502;
|
||||
string field_description = 8503;
|
||||
}
|
||||
Binary file not shown.
@@ -17,7 +17,8 @@ message HelloSubArgs {
|
||||
string name = 1;
|
||||
}
|
||||
service HelloService {
|
||||
rpc say_hello(HelloRequest) returns (HelloResponse);
|
||||
option (bts.api.service_description)="This is a service for saying hello!";
|
||||
rpc say_hello(HelloRequest) returns (HelloResponse) { option (bts.api.method_description)="send a friendly greeting."; }
|
||||
rpc greetings(HelloSubArgs) returns (stream HelloLog);
|
||||
rpc yell_hello(HelloRequest) returns (HelloResponse);
|
||||
}
|
||||
@@ -30,5 +31,5 @@ message ShoutResponse {
|
||||
}
|
||||
service ShoutService {
|
||||
option (bts.api.service_description) = "Makes input message louder";
|
||||
rpc upper(ShoutRequest) returns (ShoutResponse);
|
||||
rpc upper(ShoutRequest) returns (ShoutResponse) {option (bts.api.method_description)="Caps lock is cruise control for cool.";}
|
||||
}
|
||||
@@ -3,73 +3,100 @@ package bts.api;
|
||||
option csharp_namespace="bts.api";
|
||||
import "lib/api/apioptions.proto";
|
||||
|
||||
|
||||
message Exchange {
|
||||
enum type {
|
||||
SYNTHETIC = 0;
|
||||
CBOE = 205;
|
||||
CBOECFE = 207;
|
||||
GLBX = 301;
|
||||
ICE = 306;
|
||||
}
|
||||
//CLEANUP: collides with bts.api.Exchange
|
||||
enum Venue {
|
||||
BTS = 0;
|
||||
CBOE = 205;
|
||||
CBOECFE = 207;
|
||||
GLBX = 301;
|
||||
ICE = 306;
|
||||
}
|
||||
// Exchange data
|
||||
|
||||
enum Currency {
|
||||
USD = 0;
|
||||
EUR = 1;
|
||||
JPY = 2;
|
||||
GBP = 3;
|
||||
CHF = 4;
|
||||
CAD = 5;
|
||||
AUD = 6;
|
||||
NZD = 7;
|
||||
SEK = 8;
|
||||
NOK = 9;
|
||||
RUB = 10;
|
||||
SGD = 11;
|
||||
HKD = 12;
|
||||
INR = 13;
|
||||
RMB = 14;
|
||||
}
|
||||
|
||||
//CLEANUP: collides with bts.api.Side
|
||||
enum BuySell {
|
||||
BUY = 0;
|
||||
SELL = 1;
|
||||
}
|
||||
|
||||
message GLBXExchangeData {
|
||||
int64 exchange_id = 1;
|
||||
string security_desc = 2;
|
||||
uint64 exchange_id = 10;
|
||||
string security_desc = 20;
|
||||
}
|
||||
message CBOEExchangeData {
|
||||
int64 exchange_id = 1;
|
||||
string security_desc = 2;
|
||||
int64 exchange_id = 10;
|
||||
string security_desc = 20;
|
||||
}
|
||||
message CBOECFEExchangeData {
|
||||
int64 exchange_id = 1;
|
||||
string security_desc = 2;
|
||||
int64 exchange_id = 10;
|
||||
string security_desc = 20;
|
||||
}
|
||||
message ICEExchangeData {
|
||||
}
|
||||
|
||||
message FutureContract {
|
||||
string symbol = 1;
|
||||
uint32 expiration_year = 2;
|
||||
uint32 expiration_month = 3;
|
||||
uint32 expiration_day = 4;
|
||||
string symbol = 10;
|
||||
uint32 expiration_year = 20;
|
||||
uint32 expiration_month = 30;
|
||||
uint32 expiration_day = 40;
|
||||
}
|
||||
|
||||
message SpreadLeg {
|
||||
enum LegSide {
|
||||
BUY = 0;
|
||||
SELL = 1;
|
||||
}
|
||||
Security security = 1;
|
||||
double quantity = 2;
|
||||
double price_ratio = 3;
|
||||
LegSide side = 4;
|
||||
}
|
||||
message SpreadContract {
|
||||
bool is_synthetic = 1;
|
||||
repeated SpreadLeg legs = 2;
|
||||
message ContractLeg {
|
||||
Security security = 10;
|
||||
uint32 quantity = 20;
|
||||
BuySell side = 30;
|
||||
double price_multiplier = 40;
|
||||
}
|
||||
|
||||
message TickSpecification {
|
||||
double low_tick = 1;
|
||||
double price_break = 2;
|
||||
double high_tick = 3;
|
||||
message SpreadContract {
|
||||
repeated ContractLeg legs = 10;
|
||||
}
|
||||
|
||||
message SyntheticContract {
|
||||
string name = 1;
|
||||
repeated ContractLeg legs = 20;
|
||||
}
|
||||
|
||||
message ContractSpecification {
|
||||
double low_tick = 10;
|
||||
double price_break = 20;
|
||||
double high_tick = 30;
|
||||
double cash_per_point = 40;
|
||||
double price_multiplier = 50;
|
||||
}
|
||||
|
||||
message Security {
|
||||
uint32 id = 1 [(bts.api.key)=true];
|
||||
Exchange exchange = 2;
|
||||
TickSpecification tick = 3;
|
||||
uint32 id = 10 [(bts.api.key)=true];
|
||||
Venue exchange = 20;
|
||||
ContractSpecification contract_spec = 30;
|
||||
Currency currency = 40;
|
||||
oneof Contract {
|
||||
FutureContract future = 10;
|
||||
SpreadContract spread = 11;
|
||||
FutureContract future = 100;
|
||||
SpreadContract spread = 110;
|
||||
SyntheticContract synthetic = 120;
|
||||
}
|
||||
oneof ExchangeData {
|
||||
GLBXExchangeData glbx = 20;
|
||||
CBOEExchangeData cboe = 21;
|
||||
CBOECFEExchangeData cfe = 22;
|
||||
ICEExchangeData ice = 23;
|
||||
GLBXExchangeData glbx = 200;
|
||||
CBOEExchangeData cboe = 210;
|
||||
CBOECFEExchangeData cfe = 220;
|
||||
ICEExchangeData ice = 230;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user