Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Commit

Permalink
Revert "allow tick interval seconds to be specified in decimals, closes
Browse files Browse the repository at this point in the history
#608"

This reverts commit fc70a4f.
  • Loading branch information
nikhilsaraf committed Dec 6, 2020
1 parent fc70a4f commit ea03405
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cmd/trade.go
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ func makeBot(
botStart time.Time,
) *trader.Trader {
timeController := plugins.MakeIntervalTimeController(
time.Duration(botConfig.TickIntervalSeconds*1000000000)*time.Nanosecond,
time.Duration(botConfig.TickIntervalSeconds)*time.Second,
botConfig.MaxTickDelayMillis,
)
submitMode, e := api.ParseSubmitMode(botConfig.SubmitMode)
Expand Down
4 changes: 2 additions & 2 deletions plugins/metricsTracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ type commonProps struct {
GoVersion string `json:"go_version"`
GuiVersion string `json:"gui_version"`
Strategy string `json:"strategy"`
UpdateTimeIntervalSeconds float64 `json:"update_time_interval_seconds"`
UpdateTimeIntervalSeconds int32 `json:"update_time_interval_seconds"`
Exchange string `json:"exchange"`
TradingPair string `json:"trading_pair"`
SecondsSinceStart float64 `json:"seconds_since_start"`
Expand Down Expand Up @@ -155,7 +155,7 @@ func MakeMetricsTrackerCli(
goVersion string,
guiVersion string,
strategy string,
updateTimeIntervalSeconds float64,
updateTimeIntervalSeconds int32,
exchange string,
tradingPair string,
isDisabled bool,
Expand Down
4 changes: 2 additions & 2 deletions trader/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type BotConfig struct {
IssuerA string `valid:"-" toml:"ISSUER_A" json:"issuer_a"`
AssetCodeB string `valid:"-" toml:"ASSET_CODE_B" json:"asset_code_b"`
IssuerB string `valid:"-" toml:"ISSUER_B" json:"issuer_b"`
TickIntervalSeconds float64 `valid:"-" toml:"TICK_INTERVAL_SECONDS" json:"tick_interval_seconds"`
TickIntervalSeconds int32 `valid:"-" toml:"TICK_INTERVAL_SECONDS" json:"tick_interval_seconds"`
MaxTickDelayMillis int64 `valid:"-" toml:"MAX_TICK_DELAY_MILLIS" json:"max_tick_delay_millis"`
SleepMode string `valid:"-" toml:"SLEEP_MODE" json:"sleep_mode"`
DeleteCyclesThreshold int64 `valid:"-" toml:"DELETE_CYCLES_THRESHOLD" json:"delete_cycles_threshold"`
Expand Down Expand Up @@ -80,7 +80,7 @@ func MakeBotConfig(
issuerA string,
assetCodeB string,
issuerB string,
tickIntervalSeconds float64,
tickIntervalSeconds int32,
maxTickDelayMillis int64,
deleteCyclesThreshold int64,
submitMode string,
Expand Down

0 comments on commit ea03405

Please sign in to comment.