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

telegram order price wrong truncation #1624

Closed
EliasM108 opened this issue Apr 25, 2024 · 2 comments · Fixed by #1636
Closed

telegram order price wrong truncation #1624

EliasM108 opened this issue Apr 25, 2024 · 2 comments · Fixed by #1636

Comments

@EliasM108
Copy link

I got my bbgo bot connected to telegram to receive order changes, but the buy and the sell price gets truncated to the second decimal.

Example of current notification
Order binance AEURUSDT LIMIT SELL @ 1.07 0.00/20.000 -> NEW

How it should look like
Order binance AEURUSDT LIMIT SELL @ 1.0705 0.00/20.000 -> NEW

@zenixls2
Copy link
Collaborator

Right now this is formatted using the following source code:

func (o Order) PlainText() string {
    return fmt.Sprintf("Order %s %s %s %s @ %s %s/%s -> %s",
        o.Exchange.String(),
        o.Symbol,
        o.Type,
        o.Side,
        o.Price.FormatString(2),
        o.ExecutedQuantity.FormatString(2),
        o.Quantity.FormatString(4),
        o.Status)
}

so it will definitely be truncated to two decimals.
@c9s do we have any specific reason that should present the number in this format?

@zenixls2
Copy link
Collaborator

Seems like originated from f4ef19e
and slack msg already gets fixed.
I think this part needs to be updated as well.

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 a pull request may close this issue.

2 participants