Skip to content
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

fix: rebalance: fix positions and profit stats map #1109

Merged
merged 1 commit into from
Mar 15, 2023

Conversation

narumiruna
Copy link
Collaborator

No description provided.

@narumiruna narumiruna requested a review from c9s March 14, 2023 10:18
@bbgokarma-bot
Copy link

Welcome back! @narumiruna, This pull request may get 235 BBG.

@codecov
Copy link

codecov bot commented Mar 14, 2023

Codecov Report

Merging #1109 (0458858) into main (ee43884) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1109   +/-   ##
=======================================
  Coverage   19.87%   19.87%           
=======================================
  Files         434      434           
  Lines       33883    33883           
=======================================
  Hits         6734     6734           
  Misses      26604    26604           
  Partials      545      545           

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 ee43884...0458858. Read the comment docs.

@narumiruna narumiruna force-pushed the narumi/rebalance/fix-order-executor-not-found branch from 0196787 to 0458858 Compare March 14, 2023 11:28
@bbgokarma-bot
Copy link

Re-estimated karma: this pull request may get 245 BBG

func NewPositionMap(markets []types.Market) PositionMap {
m := make(PositionMap)

func (m PositionMap) createPositions(markets []types.Market) PositionMap {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not NewPositionMap ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we change the config from

quoteCurrency: USDT
targetWeights:
        BTC: 50%
        USDT: 50%

to

quoteCurrency: USDT
targetWeights:
        BTC: 50%
        ETH: 25%
        USDT: 25%

, then the previous PositionMap (loaded from Redis) doesn't contain ETHUSDT.

@narumiruna narumiruna merged commit 7d91fd0 into main Mar 15, 2023
@narumiruna narumiruna deleted the narumi/rebalance/fix-order-executor-not-found branch March 15, 2023 04:25
@bbgokarma-bot
Copy link

Hi @narumiruna,

Well done! 270 BBG has been sent to your polygon wallet. Please check the following tx:

https://polygonscan.com/tx/0x2e63d173cd809dd76e14fe60430ceabf7afa9b13e30ccb71a617cb7134b7ee75

Thank you for your contribution!

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.

3 participants