-
-
Notifications
You must be signed in to change notification settings - Fork 302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
strategy: add neutral maker #1130
base: main
Are you sure you want to change the base?
Conversation
Welcome back! @austin362667, This pull request may get 621 BBG. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1130 +/- ##
=======================================
Coverage 19.94% 19.94%
=======================================
Files 436 436
Lines 34072 34072
=======================================
Hits 6794 6794
Misses 26734 26734
Partials 544 544 Continue to review full report in Codecov by Sentry.
|
s.futureStreamBook.BindStream(s.FutureSession.MarketDataStream) | ||
s.spotStreamBook = types.NewStreamBook(s.SpotMarket.Symbol) | ||
s.spotStreamBook.BindStream(s.SpotSession.MarketDataStream) | ||
s.spot2StreamBook = types.NewStreamBook("BTCBUSD") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we pull out this to a config? thanks
s2ask, s2aok := s.spot2StreamBook.OrderBook.BestAsk() | ||
fbid, fbok := s.futureStreamBook.BestBid() | ||
fask, faok := s.futureStreamBook.BestAsk() | ||
log.Infof("Futures Bid Price: %f, Future Ask Price: %f\n Spot Bid Price: %f, Spot Ask Price: %f", fbid.Price.Float64(), fask.Price.Float64(), sbid.Price.Float64(), sask.Price.Float64()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log message starts with lower case letters
FutureMarket types.Market | ||
|
||
BestBidPrice fixedpoint.Value | ||
BestAskPrice fixedpoint.Value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused variables?
return | ||
case <-posTicker.C: | ||
s.cancelOrders(ctx) | ||
sbid, sbok := s.spotStreamBook.OrderBook.BestBid() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sbid, sask, ok := s.spotStreamBook.OrderBook.BestBidAndAsk()
if !ok {
return
}
|
||
// SourceExchange session name | ||
SpotExchange string `json:"spotExchange"` | ||
// MakerExchange session name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these comments are out of date?
SpotPosition *types.Position `json:"position,omitempty" persistence:"position"` | ||
SpotProfitStats *types.ProfitStats `json:"profitStats,omitempty" persistence:"profit_stats"` | ||
FuturePosition *types.Position `json:"position,omitempty" persistence:"future_position"` | ||
FutureProfitStats *types.ProfitStats `json:"profitStats,omitempty" persistence:"future_profit_stats"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're using the same json keys in the fields
|
No description provided.