Skip to content

Conversation

@austin362667
Copy link
Collaborator

No description provided.

c9s and others added 30 commits March 1, 2023 21:09
strategy: rebalance: add order type parameter
FEATURE: add persistence service to environment
@bbgokarma-bot
Copy link

Welcome back! @austin362667, This pull request may get 621 BBG.

@codecov
Copy link

codecov bot commented Mar 24, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (cc74156) 19.94% compared to head (545f138) 19.94%.
Report is 1507 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cc74156...545f138. Read the comment docs.

s.futureStreamBook.BindStream(s.FutureSession.MarketDataStream)
s.spotStreamBook = types.NewStreamBook(s.SpotMarket.Symbol)
s.spotStreamBook.BindStream(s.SpotSession.MarketDataStream)
s.spot2StreamBook = types.NewStreamBook("BTCBUSD")
Copy link
Owner

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())
Copy link
Owner

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
Copy link
Contributor

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()
Copy link
Contributor

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
Copy link
Owner

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"`
Copy link
Owner

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

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants