Skip to content

Commit d6973ed

Browse files
author
Build System
committed
'Protobuf files change'
1 parent b1ff9d2 commit d6973ed

8 files changed

Lines changed: 459 additions & 1 deletion

File tree

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
// Copyright (c) 2021 Systemathics
2+
//
3+
// Permission is hereby granted, free of charge, to any person obtaining a copy
4+
// of this software and associated documentation files (the "Software"), to deal
5+
// in the Software without restriction, including without limitation the rights
6+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
// copies of the Software, and to permit persons to whom the Software is
8+
// furnished to do so, subject to the following conditions:
9+
//
10+
// The above copyright notice and this permission notice shall be included in all
11+
// copies or substantial portions of the Software.
12+
//
13+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
// SOFTWARE.
20+
21+
// Raw tick by tick data extraction in provider format for a given watchlist and a specific look-back period. This can be useful to:
22+
// <br>- Audit provider raw data reception and completion
23+
// <br>- Compare provider data formats
24+
// <br>- Compare raw provider format data to normalized data
25+
syntax = "proto3";
26+
27+
import "google/protobuf/timestamp.proto";
28+
29+
import "systemathics/apis/type/shared/v1/constraints.proto";
30+
import "systemathics/apis/type/shared/v1/level.proto";
31+
import "systemathics/apis/type/shared/v1/identifier.proto";
32+
import "systemathics/apis/type/shared/v1/keys.proto";
33+
import "systemathics/apis/type/shared/v2/raw.proto";
34+
35+
package systemathics.apis.services.tick.v2;
36+
37+
// Called to request tick by tick raw data.
38+
service TickRawService
39+
{
40+
// Gets tick by tick historical data
41+
rpc TickRaw(TickRawRequest) returns (stream TickRawResponse);
42+
}
43+
44+
// The required inputs to request the TickRawService.
45+
message TickRawRequest
46+
{
47+
// [Mandatory] The instrument identifiers: a list of tickers and exchanges
48+
repeated systemathics.apis.type.shared.v1.Identifier identifiers = 1;
49+
50+
// [Optional] The time constraints used to define the look-back period.
51+
// If empty, then all the available data is retrieved.
52+
systemathics.apis.type.shared.v1.Constraints constraints = 2;
53+
54+
// [Mandatory] The stream level (Level 1 or Level 1 and 2)
55+
systemathics.apis.type.shared.v1.Level level = 3;
56+
}
57+
58+
// Represents the RAW response
59+
message TickRawResponse
60+
{
61+
oneof payload
62+
{
63+
// The trade data
64+
systemathics.apis.type.shared.v2.Raw raw = 1;
65+
66+
// The mapping data
67+
systemathics.apis.type.shared.v1.Keys mapping = 2;
68+
}
69+
}
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
// Copyright (c) 2021 Systemathics
2+
//
3+
// Permission is hereby granted, free of charge, to any person obtaining a copy
4+
// of this software and associated documentation files (the "Software"), to deal
5+
// in the Software without restriction, including without limitation the rights
6+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
// copies of the Software, and to permit persons to whom the Software is
8+
// furnished to do so, subject to the following conditions:
9+
//
10+
// The above copyright notice and this permission notice shall be included in all
11+
// copies or substantial portions of the Software.
12+
//
13+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
// SOFTWARE.
20+
21+
// Normalized tick by tick data extraction for a given watchlist and a specific look-back period. This can be useful to:
22+
// <br>- Get specific historical dataset such as trades, top of book data...
23+
// <br>- Compute analytics on the top of preselected tick by tick data dataset
24+
// <br>- Feed best execution reports for a given watchlist over the time
25+
syntax = "proto3";
26+
27+
import "google/protobuf/timestamp.proto";
28+
29+
import "systemathics/apis/type/shared/v1/constraints.proto";
30+
import "systemathics/apis/type/shared/v1/mappings.proto";
31+
import "systemathics/apis/type/shared/v1/level.proto";
32+
import "systemathics/apis/type/shared/v1/identifier.proto";
33+
import "systemathics/apis/type/shared/v2/market_fields_updates.proto";
34+
import "systemathics/apis/type/shared/v2/mbl_market_book_updates.proto";
35+
import "systemathics/apis/type/shared/v2/mbo_market_book_updates.proto";
36+
37+
package systemathics.apis.services.tick.v2;
38+
39+
// Called to request tick by tick normalized historical data.
40+
service TickUpdatesService
41+
{
42+
// Get tick by tick normalized historical Updates
43+
rpc TickUpdates(TickUpdatesRequest) returns (stream TickUpdatesResponse);
44+
}
45+
46+
// The required inputs to request the TickUpdatesService.
47+
message TickUpdatesRequest
48+
{
49+
// [Mandatory] The instrument identifier: a ticker and exchange
50+
repeated systemathics.apis.type.shared.v1.Identifier identifiers = 1;
51+
52+
// [Mandatory] Level representing either Trades only(Level 1) or Trades + Book (Level 1 and Level 2)
53+
systemathics.apis.type.shared.v1.Level level = 2;
54+
55+
// [Optional] The time constraints used to define the look-back period.
56+
// If empty, then all the available data is retrieved.
57+
systemathics.apis.type.shared.v1.Constraints constraints = 3;
58+
59+
// [Optional] The corporate action adjustment, by default the value is set to false
60+
bool adjustment = 4;
61+
}
62+
63+
// Contains the tick by tick normalized historical data: event source, timestamp and payload.
64+
message TickUpdatesResponse
65+
{
66+
// Event source: short code for instrument identifier
67+
uint32 event_source = 1;
68+
69+
// Timestamp from the market
70+
google.protobuf.Timestamp time_stamp = 2;
71+
72+
// Payload: that can be a mapping (event source and instrument identifier), some fields update or some books update
73+
oneof payload
74+
{
75+
// Some fields update
76+
systemathics.apis.type.shared.v2.MarketFieldsUpdates fields_updates = 3;
77+
78+
// Some MBL books update
79+
systemathics.apis.type.shared.v2.MblMarketBookUpdates mbl_book_updates = 4;
80+
81+
// Some MBO books update
82+
systemathics.apis.type.shared.v2.MboMarketBookUpdates mbo_book_updates = 5;
83+
84+
// Event source and instrument identifier mapping. It's sent once when streaming begins.
85+
systemathics.apis.type.shared.v1.Mappings mappings = 6;
86+
}
87+
}

src/systemathics/apis/type/shared/v1/trade_and_book.proto

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,4 @@ message TradeAndBook
4242

4343
// The book
4444
BookLimit book = 4;
45-
4645
}
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
// Copyright (c) 2021 Systemathics
2+
//
3+
// Permission is hereby granted, free of charge, to any person obtaining a copy
4+
// of this software and associated documentation files (the "Software"), to deal
5+
// in the Software without restriction, including without limitation the rights
6+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
// copies of the Software, and to permit persons to whom the Software is
8+
// furnished to do so, subject to the following conditions:
9+
//
10+
// The above copyright notice and this permission notice shall be included in all
11+
// copies or substantial portions of the Software.
12+
//
13+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
// SOFTWARE.
20+
21+
// Represents market data field types for time and sales. This excludes book updates, to learn more about market book updates please refer to <a href="#systemathics/apis/type/v1/market_book_updates.proto">the dedicated section</a>.
22+
syntax = "proto3";
23+
24+
25+
package systemathics.apis.type.shared.v2;
26+
27+
// Contains the field tyoes for <a href="#systemathics/apis/type/v1/market_fields_updates.proto">a market field update</a>.
28+
enum Field
29+
{
30+
// The unspecfied field
31+
FIELD_UNSPECIFIED = 0;
32+
// The open price (associated value type is double)
33+
FIELD_OPEN_PRICE = 1;
34+
// The open size (associated value type is long)
35+
FIELD_OPEN_SIZE = 2;
36+
// The close price (associated value type is double)
37+
FIELD_CLOSE_PRICE = 3;
38+
// The close size (associated value type is long)
39+
FIELD_CLOSE_SIZE = 4;
40+
// The low price (associated value type is double)
41+
FIELD_LOW_PRICE = 5;
42+
// The low size (associated value type is long)
43+
FIELD_LOW_SIZE = 6;
44+
// The high price (associated value type is double)
45+
FIELD_HIGH_PRICE = 7;
46+
// The high size (associated value type is long)
47+
FIELD_HIGH_SIZE = 8;
48+
// The last trade price (associated value type is double)
49+
FIELD_TRADE_PRICE = 9;
50+
// The last trade size (associated value type is long)
51+
FIELD_TRADE_SIZE = 10;
52+
// The trading condition (associated value type is string)
53+
FIELD_TRADING_CONDITION = 11;
54+
// The trade count (associated value type is long)
55+
FIELD_TRADE_COUNT = 12;
56+
// The last otc trade price (associated value type is double)
57+
FIELD_TRADE_OTC_PRICE = 13;
58+
// The last otc trade size (associated value type is long)
59+
FIELD_TRADE_OTC_SIZE = 14;
60+
// The otc trade count (associated value type is long)
61+
FIELD_TRADE_OTC_COUNT = 15;
62+
// The daily volume (associated value type is long)
63+
FIELD_VOLUME = 16;
64+
// The official vwap (associated value type is double)
65+
FIELD_VWAP_OFFICIAL = 17;
66+
// The electronic vwap (associated value type is double)
67+
FIELD_VWAP_ELECTRONIC = 18;
68+
// The theoretical price (associated value type is double)
69+
FIELD_THEORETICAL_PRICE = 19;
70+
// The theoretical size (associated value type is long)
71+
FIELD_THEORETICAL_SIZE = 20;
72+
// The upper price (associated value type is double)
73+
FIELD_UPPER_PRICE = 21;
74+
// The lower price (associated value type is double)
75+
FIELD_LOWER_PRICE = 22;
76+
// The variation (associated value type is double)
77+
FIELD_VARIATION = 23;
78+
// The percentage variation (associated value type is double)
79+
FIELD_VARIATION_PERCENTAGE = 24;
80+
// The trade id (associated value type is string)
81+
FIELD_TRADE_ID = 25;
82+
}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
// Copyright (c) 2021 Systemathics
2+
//
3+
// Permission is hereby granted, free of charge, to any person obtaining a copy
4+
// of this software and associated documentation files (the "Software"), to deal
5+
// in the Software without restriction, including without limitation the rights
6+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
// copies of the Software, and to permit persons to whom the Software is
8+
// furnished to do so, subject to the following conditions:
9+
//
10+
// The above copyright notice and this permission notice shall be included in all
11+
// copies or substantial portions of the Software.
12+
//
13+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
// SOFTWARE.
20+
21+
// Represents the times and sales market data.
22+
syntax = "proto3";
23+
24+
25+
import "systemathics/apis/type/shared/v1/action.proto";
26+
import "systemathics/apis/type/shared/v2/field.proto";
27+
28+
package systemathics.apis.type.shared.v2;
29+
30+
// Represents market field updates.
31+
message MarketFieldsUpdates
32+
{
33+
// If is a snapshot, previous data must be cleared, otherwise it's incremental
34+
bool is_snapshot = 1;
35+
36+
// The market book updates: an array of MarketFieldUpdate objects
37+
repeated MarketFieldUpdate updates = 2;
38+
}
39+
40+
// Represents a market field update
41+
message MarketFieldUpdate
42+
{
43+
// Action on market field update
44+
systemathics.apis.type.shared.v1.Action action = 1;
45+
46+
// Field of market field update
47+
Field field = 2;
48+
49+
// Value of the market field update
50+
oneof value
51+
{
52+
// long value (depends of the field)
53+
int64 long_value = 3;
54+
55+
// double value (depends of the field)
56+
double double_value = 4;
57+
58+
// string value (depends of the field)
59+
string string_value = 5;
60+
}
61+
}
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
// Copyright (c) 2021 Systemathics
2+
//
3+
// Permission is hereby granted, free of charge, to any person obtaining a copy
4+
// of this software and associated documentation files (the "Software"), to deal
5+
// in the Software without restriction, including without limitation the rights
6+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
// copies of the Software, and to permit persons to whom the Software is
8+
// furnished to do so, subject to the following conditions:
9+
//
10+
// The above copyright notice and this permission notice shall be included in all
11+
// copies or substantial portions of the Software.
12+
//
13+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
// SOFTWARE.
20+
21+
// Represents the book market data.
22+
syntax = "proto3";
23+
24+
25+
import "google/protobuf/wrappers.proto";
26+
27+
import "systemathics/apis/type/shared/v1/action.proto";
28+
import "systemathics/apis/type/shared/v1/side.proto";
29+
30+
package systemathics.apis.type.shared.v2;
31+
32+
// Contains MBL market book updates data.
33+
message MblMarketBookUpdates
34+
{
35+
// If is a snapshot, previous data must be cleared, otherwise it's incremental
36+
bool is_snapshot = 1;
37+
38+
// The market book updates: an array of MarketBookUpdate objects
39+
repeated systemathics.apis.type.shared.v2.MblMarketBookUpdate updates = 2;
40+
}
41+
42+
// Represents a MBL market book update.
43+
message MblMarketBookUpdate
44+
{
45+
// Action of the market book update
46+
systemathics.apis.type.shared.v1.Action action = 1;
47+
48+
// Side of the market book update
49+
systemathics.apis.type.shared.v1.Side side = 2;
50+
51+
// Depth of the market book update
52+
uint32 depth = 3;
53+
54+
// Size of the market book update
55+
google.protobuf.Int64Value size = 4;
56+
57+
// Price of the market book update
58+
google.protobuf.DoubleValue price = 5;
59+
}

0 commit comments

Comments
 (0)