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

MinNotional and MinAmount are not been set correctly when the futures mode is enabled #1610

Open
981746 opened this issue Mar 29, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@981746
Copy link

981746 commented Mar 29, 2024

When the futures mode is enabled and with bbgo run command, MinNotionalFilter() of go-binance returns a nil value, but other filter functions like LotSizeFilter() and PriceFilter() work fine.

I disabled markets cache in .env.local using DISABLE_MARKETS_CACHE=true.

Then run the "bbgo run" command
in the toGlobalFuturesMarket() function of pkg/exchange/binance/convert.go, the following code snippet's f shows nil:

if f := symbol.MinNotionalFilter(); f != nil {
	market.MinNotional = fixedpoint.MustNewFromString(f.Notional)
	market.MinAmount = fixedpoint.MustNewFromString(f.Notional)
}

I think market.MinNotional and market.MinAmount are not being set correctly, causing me to always get 0 from s.Market.MinNotional and s.Market.MinAmount in my strategy.

@c9s
Copy link
Owner

c9s commented Mar 31, 2024

which version do you use? because I thought this was fixed few weeks ago?

@c9s
Copy link
Owner

c9s commented Mar 31, 2024

image

@c9s
Copy link
Owner

c9s commented Mar 31, 2024

@981746 I just upgraded the adshao/go-binance package in revision d55d1e9, please give it a try

@c9s c9s added the bug Something isn't working label Mar 31, 2024
@981746
Copy link
Author

981746 commented Mar 31, 2024

@981746 I just upgraded the adshao/go-binance package in revision d55d1e9, please give it a try

It works now, thank you very much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants