Skip to content

Commit

Permalink
doc: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
keivanipchihagh committed Mar 20, 2024
1 parent 478c88e commit 767e40b
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 20 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
build:
bash scripts/clean.sh
bash scripts/build.sh

clean:
bash scripts/clean.sh
8 changes: 4 additions & 4 deletions protos/athena/athena.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ package athena.v1;
import "athena/athena_struct.proto";
import "candlestick_struct.proto";

// [Request] GetBacktestRequest
// config: Broker configurations.
// candlesticks: Candlesticks data.
// GetBacktestRequest
message GetBacktestRequest {
// Broker configurations.
Config config = 1;
// Candlesticks data.
Candlestick candlesticks = 2;
}

// [Response] GetBacktestResponse
// GetBacktestResponse
message GetBacktestResponse {
Statistics statistics = 1;
}
Expand Down
19 changes: 13 additions & 6 deletions protos/athena/athena_struct.proto
Original file line number Diff line number Diff line change
@@ -1,22 +1,29 @@
syntax = "proto3";

import "google/protobuf/timestamp.proto";

package athena.v1;

// Config
// commission: Commission rate charged by the broker for each trade.
// cache: Initial balance for trading.
// capital_risk: Capital risk limit imposed by the broker.
// trade_on_close: Indicates whether to trade on open or close.
// exclusive_orders: Indicates whether the broker accepts exclusive orders.
message Config {
// Commission rate charged by the broker for each trade.
float commission = 1;
// Initial balance for trading.
float cache = 2;
// Capital risk limit imposed by the broker.
float capital_risk = 3;
// Indicates whether to trade on open or close.
bool trade_on_close = 4;
// Indicates whether the broker accepts exclusive orders.
bool exclusive_orders = 5;
}

// Statistics
message Statistics {
int64 id = 1;
// The timestamp for when the backstart is started
google.protobuf.Timestamp start = 1;
// The timestamp for when the backstart is ended
google.protobuf.Timestamp end = 2;
// Number of trades
int64 n_trades = 3;
}
22 changes: 12 additions & 10 deletions protos/candlestick_struct.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,26 @@ syntax = "proto3";

import "google/protobuf/timestamp.proto";

// Open, high, Low, Close, and Volume data for a single candlestick.
// open: Candlestick's opening price.
// high: Candlestick's high price.
// low: Candlestick's low price.
// close: Candlestick's closing price.
// volume: Traded volume.
// Ohlcv
// Represents open, high, low, close, and volume.
message Ohlcv {
// Candlestick's opening price.
float open = 1;
// Candlestick's high price.
float high = 2;
// Candlestick's low price.
float low = 3;
// Candlestick's closing price.
float close = 4;
// Traded volume.
float volume = 5;
}

// A candlestick containing OHLCV data for a financial instrument at a specific timestamp.
// timestamp: Candlestick's Timestamp.
// ohlcv: Candlestick's open, high, low, close and volume data.
message Candlestick {
// Candlestick
// Represents a single candlestick bar with timestamp and other properties
message Candlestick {
// Candlestick's Timestamp.
google.protobuf.Timestamp timestamp = 1;
// Candlestick's open, high, low, close and volume data.
repeated Ohlcv ohlcv = 2;
}

0 comments on commit 767e40b

Please sign in to comment.