|
| 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 | +// The trade condition statistics calculates the ratios of all the trading conditions over a specified trading period. |
| 22 | +syntax = "proto3"; |
| 23 | + |
| 24 | +import "systemathics/apis/type/shared/v1/constraints.proto"; |
| 25 | +import "systemathics/apis/type/shared/v1/identifier.proto"; |
| 26 | + |
| 27 | +package systemathics.apis.services.tick_analytics.v1; |
| 28 | + |
| 29 | +// Called to request tick by tick trade condition statistics. |
| 30 | +service TickTradeConditionStatisticsService |
| 31 | +{ |
| 32 | + // Gets tick by tick trade condition statistics |
| 33 | + rpc TickTradeConditionStatistics(TickTradeConditionStatisticsRequest) returns (stream TickTradeConditionStatisticsResponse); |
| 34 | +} |
| 35 | + |
| 36 | +// The required inputs to request the TickTradeConditionStatisticsService. |
| 37 | +message TickTradeConditionStatisticsRequest |
| 38 | +{ |
| 39 | + // [Mandatory] The instrument identifier: a ticker and exchange |
| 40 | + systemathics.apis.type.shared.v1.Identifier identifier = 1; |
| 41 | + |
| 42 | + // [Optional] The time constraints used to define the look-back period. |
| 43 | + // If empty, then all the available data is retrieved. |
| 44 | + systemathics.apis.type.shared.v1.Constraints constraints = 2; |
| 45 | +} |
| 46 | + |
| 47 | +// Contains the trade condition statistics. |
| 48 | +message TickTradeConditionStatisticsResponse |
| 49 | +{ |
| 50 | + // The trading condition value |
| 51 | + string value = 1; |
| 52 | + |
| 53 | + // The trading condition count |
| 54 | + int64 count = 2; |
| 55 | + |
| 56 | + // The total trades count |
| 57 | + int64 total = 3; |
| 58 | + |
| 59 | + // The trading condition percentage : count / total |
| 60 | + double percentage = 4; |
| 61 | +} |
0 commit comments