-
Notifications
You must be signed in to change notification settings - Fork 1
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
Build System
committed
Mar 18, 2024
1 parent
3ea04d8
commit cfd161b
Showing
17 changed files
with
751 additions
and
28 deletions.
There are no files selected for viewing
136 changes: 136 additions & 0 deletions
136
src/systemathics/apis/services/daily/v1/daily_market_data.proto
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,136 @@ | ||
// Copyright (c) 2021 Systemathics | ||
// | ||
// Permission is hereby granted, free of charge, to any person obtaining a copy | ||
// of this software and associated documentation files (the "Software"), to deal | ||
// in the Software without restriction, including without limitation the rights | ||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
// copies of the Software, and to permit persons to whom the Software is | ||
// furnished to do so, subject to the following conditions: | ||
// | ||
// The above copyright notice and this permission notice shall be included in all | ||
// copies or substantial portions of the Software. | ||
// | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
// SOFTWARE. | ||
|
||
// This service provides access to an daily marketdata market data service, | ||
// enabling users to retrieve historical market data for various financial instruments. | ||
// MarketData represents a comprehensive aggregation of all pertinent market information, | ||
// encompassing various data points such as bar data, best limit data, Greeks, and more. | ||
syntax = "proto3"; | ||
|
||
|
||
import "google/api/annotations.proto"; | ||
import "google/type/date.proto"; | ||
|
||
import "systemathics/apis/type/shared/v1/identifier.proto"; | ||
import "systemathics/apis/type/shared/v1/date_interval.proto"; | ||
|
||
package systemathics.apis.services.daily.v1; | ||
|
||
// Called to request daily MarketData data. | ||
service DailyMarketDataService | ||
{ | ||
// Gets daily historical marketdata | ||
rpc DailyMarketData(DailyMarketDataRequest) returns (DailyMarketDataResponse) | ||
{ | ||
option (google.api.http) = { | ||
get: "/v1/daily/marketdata" | ||
}; | ||
} | ||
} | ||
|
||
// The required input to request the DailyMarketDataService | ||
message DailyMarketDataRequest | ||
{ | ||
// [Mandatory] The instrument identifier: a ticker and exchange | ||
systemathics.apis.type.shared.v1.Identifier identifier = 1; | ||
|
||
// [Optional] The date interval used to define the look-back period. | ||
// If empty, then all the available data is retrieved. | ||
systemathics.apis.type.shared.v1.DateInterval date_interval = 2; | ||
} | ||
|
||
// Represents a daily marketdata response. | ||
message DailyMarketDataResponse | ||
{ | ||
// The daily marketdata : an array of DailyMarketData objects | ||
repeated DailyMarketData data = 1; | ||
} | ||
|
||
// Contains the daily marketdatas information. | ||
message DailyMarketData | ||
{ | ||
// Date of the marketdata | ||
google.type.Date date = 1; | ||
|
||
// Open price of the sampling period | ||
double open = 2; | ||
|
||
// Highest price of the sampling period | ||
double high = 3; | ||
|
||
// Lowest price of the sampling period | ||
double low = 4; | ||
|
||
// Close price of the sampling period | ||
double close = 5; | ||
|
||
// Total traded volume of the sampling period | ||
double volume = 6; | ||
|
||
// The best bid price of the sampling period | ||
double BidPrice = 7; | ||
|
||
// The best bid size of the sampling period | ||
double BidSize = 8; | ||
|
||
// The best ask price of the sampling period | ||
double AskPrice = 9; | ||
|
||
// The best ask size of the sampling period | ||
double AskSize = 10; | ||
|
||
// Measures the sensitivity of an option's theoretical value to a change in the price of the underlying asset. | ||
//<br>It indicates the expected change in the option price for a one-point change in the underlying asset. | ||
//<br>For example, if an option has a delta of 0.7, it suggests that the option's price will increase by $0.70 for every $1 increase in the underlying asset. | ||
double delta = 11; | ||
|
||
// Measeure sthe rate of change in the delta for each one-point increase in the underlying asset. | ||
//<br>It measures how much the delta of an option will change as the price of the underlying asset changes. | ||
//<br>Gamma is particularly important for assessing how delta might change as the underlying asset's price fluctuates. | ||
double gamma = 12; | ||
|
||
// A measure of the time decay on an option, the amount that an option willl lose each day due to the passage of time. | ||
//<br>It represents the change in the option price for a one-day decrease in the time to expiration. | ||
//<br>Theta is often referred to as time decay. As the expiration date approaches, the time value of an option tends to decrease, and theta quantifies that decay. | ||
double theta = 13; | ||
|
||
// Measures the sensitivity of the price of an option to changes in implied volatility. | ||
//<br>Implied volatility reflects the market's expectations for future price fluctuations. | ||
//<br>Vega indicates how much the option price is expected to change for a one-percentage-point change in implied volatility. | ||
double vega = 14; | ||
|
||
// The rate at which the price of a derivative changes relative to a change in the risk-free rate of interest. | ||
//<br>It represents the change in the option price for a one-percentage-point change in interest rates. | ||
//<br>Rho is more relevant for options with longer time to expiration. | ||
double rho = 15; | ||
|
||
// ImpliedVolatility value of the sampling period | ||
double implied_volatility = 16; | ||
|
||
// OpenInterest value of the sampling period | ||
double open_interest = 17; | ||
|
||
// Underlying value of the sampling period | ||
double underlying = 18; | ||
|
||
// The data quality scoring : from 0 (bad) to 100 (good) | ||
double score = 19; | ||
} | ||
|
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
92 changes: 92 additions & 0 deletions
92
src/systemathics/apis/services/intraday/v1/intraday_best_limit.proto
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,92 @@ | ||
// Copyright (c) 2021 Systemathics | ||
// | ||
// Permission is hereby granted, free of charge, to any person obtaining a copy | ||
// of this software and associated documentation files (the "Software"), to deal | ||
// in the Software without restriction, including without limitation the rights | ||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
// copies of the Software, and to permit persons to whom the Software is | ||
// furnished to do so, subject to the following conditions: | ||
// | ||
// The above copyright notice and this permission notice shall be included in all | ||
// copies or substantial portions of the Software. | ||
// | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
// SOFTWARE. | ||
|
||
// Best limit data represent the highest bid and lowest ask prices in the market at any given time, providing valuable insights into the current state of supply and demand. | ||
syntax = "proto3"; | ||
|
||
|
||
import "google/api/annotations.proto"; | ||
import "google/protobuf/timestamp.proto"; | ||
|
||
import "systemathics/apis/type/shared/v1/identifier.proto"; | ||
import "systemathics/apis/type/shared/v1/date_interval.proto"; | ||
import "systemathics/apis/type/shared/v1/sampling.proto"; | ||
|
||
package systemathics.apis.services.intraday.v1; | ||
|
||
// This service serves as a gateway to an intraday Best Limit market data service, allowing users to access historical data on the best limit order levels for various financial instruments. | ||
service IntradayBestLimitsService | ||
{ | ||
// Gets intraday historical data: date, bid and ask | ||
rpc IntradayBestLimits(IntradayBestLimitsRequest) returns (IntradayBestLimitsResponse) | ||
{ | ||
option (google.api.http) = { | ||
get: "/v1/intraday/bestlimits" | ||
}; | ||
} | ||
} | ||
|
||
// The required input to request the IntradayBestLimitsService. | ||
message IntradayBestLimitsRequest | ||
{ | ||
// [Mandatory] The instrument identifier: a ticker and exchange | ||
systemathics.apis.type.shared.v1.Identifier identifier = 1; | ||
|
||
// [Mandatory] The sampling interval | ||
systemathics.apis.type.shared.v1.Sampling sampling = 2; | ||
|
||
// [Optional] The time constraints used to define the look-back period. | ||
// If empty, then all the available data is retrieved. | ||
systemathics.apis.type.shared.v1.DateInterval date_interval = 3; | ||
|
||
// [Optional] The corporate action adjustment (dividends and splits). | ||
// By default the value is set to false | ||
bool adjustment = 4; | ||
} | ||
|
||
// The intraday bestlimits response contains an array of intraday bestlimits. | ||
message IntradayBestLimitsResponse | ||
{ | ||
// The intraday bestlimits: an array of IntradayBestLimit objects | ||
repeated IntradayBestLimit data = 1; | ||
} | ||
|
||
// Contains the intraday bar's data: date, bid, ask and score. | ||
message IntradayBestLimit | ||
{ | ||
// Time stamp of the intraday bar : open time of the sampling interval | ||
google.protobuf.Timestamp time_stamp = 1; | ||
|
||
// The best bid price of the sampling period | ||
double BidPrice = 2; | ||
|
||
// The best bid size of the sampling period | ||
double BidSize = 3; | ||
|
||
// The best ask price of the sampling period | ||
double AskPrice = 4; | ||
|
||
// The best ask size of the sampling period | ||
double AskSize = 5; | ||
|
||
// The data quality scoring : from 0 (bad) to 100 (good) | ||
double score = 6; | ||
} | ||
|
102 changes: 102 additions & 0 deletions
102
src/systemathics/apis/services/intraday/v1/intraday_greeks.proto
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,102 @@ | ||
// Copyright (c) 2021 Systemathics | ||
// | ||
// Permission is hereby granted, free of charge, to any person obtaining a copy | ||
// of this software and associated documentation files (the "Software"), to deal | ||
// in the Software without restriction, including without limitation the rights | ||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
// copies of the Software, and to permit persons to whom the Software is | ||
// furnished to do so, subject to the following conditions: | ||
// | ||
// The above copyright notice and this permission notice shall be included in all | ||
// copies or substantial portions of the Software. | ||
// | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
// SOFTWARE. | ||
|
||
// The <i>Greeks</i> are a set of risk measures or sensitivities used in options trading to assess the various factors that can influence the price of an option. | ||
|
||
syntax = "proto3"; | ||
|
||
|
||
import "google/api/annotations.proto"; | ||
import "google/protobuf/timestamp.proto"; | ||
|
||
import "systemathics/apis/type/shared/v1/identifier.proto"; | ||
import "systemathics/apis/type/shared/v1/date_interval.proto"; | ||
import "systemathics/apis/type/shared/v1/sampling.proto"; | ||
|
||
package systemathics.apis.services.intraday.v1; | ||
|
||
// Called to request intraday greeks data. | ||
service IntradayGreeksService | ||
{ | ||
// Gets intraday historical greeks data. | ||
rpc IntradayGreeks(IntradayGreeksRequest) returns (IntradayGreeksResponse) | ||
{ | ||
option (google.api.http) = { | ||
get: "/v1/intraday/greeks" | ||
}; | ||
} | ||
} | ||
|
||
// The required input to request the IntradayGreeksService. | ||
message IntradayGreeksRequest | ||
{ | ||
// [Mandatory] The instrument identifier: a ticker and exchange | ||
systemathics.apis.type.shared.v1.Identifier identifier = 1; | ||
|
||
// [Mandatory] The sampling interval | ||
systemathics.apis.type.shared.v1.Sampling sampling = 2; | ||
|
||
// [Optional] The time constraints used to define the look-back period. | ||
// If empty, then all the available data is retrieved. | ||
systemathics.apis.type.shared.v1.DateInterval date_interval = 3; | ||
} | ||
|
||
// The intraday greeks response contains an array of intraday greeks. | ||
message IntradayGreeksResponse | ||
{ | ||
// The intraday greeks: an array of IntradayGreeks objects | ||
repeated IntradayGreeks data = 1; | ||
} | ||
|
||
// Contains the intraday greeks data. | ||
message IntradayGreeks | ||
{ | ||
// Time stamp of the intraday greeks | ||
google.protobuf.Timestamp time_stamp = 1; | ||
|
||
// Measures the sensitivity of an option's theoretical value to a change in the price of the underlying asset. | ||
//<br>It indicates the expected change in the option price for a one-point change in the underlying asset. | ||
//<br>For example, if an option has a delta of 0.7, it suggests that the option's price will increase by $0.70 for every $1 increase in the underlying asset. | ||
double delta = 2; | ||
|
||
// Measeure sthe rate of change in the delta for each one-point increase in the underlying asset. | ||
//<br>It measures how much the delta of an option will change as the price of the underlying asset changes. | ||
//<br>Gamma is particularly important for assessing how delta might change as the underlying asset's price fluctuates. | ||
double gamma = 3; | ||
|
||
// A measure of the time decay on an option, the amount that an option willl lose each day due to the passage of time. | ||
//<br>It represents the change in the option price for a one-day decrease in the time to expiration. | ||
//<br>Theta is often referred to as time decay. As the expiration date approaches, the time value of an option tends to decrease, and theta quantifies that decay. | ||
double theta = 4; | ||
|
||
// Measures the sensitivity of the price of an option to changes in implied volatility. | ||
//<br>Implied volatility reflects the market's expectations for future price fluctuations. | ||
//<br>Vega indicates how much the option price is expected to change for a one-percentage-point change in implied volatility. | ||
double vega = 5; | ||
|
||
// The rate at which the price of a derivative changes relative to a change in the risk-free rate of interest. | ||
//<br>It represents the change in the option price for a one-percentage-point change in interest rates. | ||
//<br>Rho is more relevant for options with longer time to expiration. | ||
double rho = 6; | ||
|
||
// The data quality scoring : from 0 (bad) to 100 (good) | ||
double score = 7; | ||
} | ||
|
Oops, something went wrong.