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

[Ticker] properly handle exchanges with MARK_PRICE_IN_TICKER #821

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

techfreaque
Copy link
Contributor

Binance usdm uses MARK_PRICE_IN_TICKER which is getting treated as a secondary source and mark price will get overwritten by mark price from recent trades.

With this change mark price from ticker will work properly

This was not used before by, so thats why nobody noticed

Copy link
Member

@GuillaumeDSM GuillaumeDSM left a comment

Choose a reason for hiding this comment

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

👍

@GuillaumeDSM
Copy link
Member

@Herklos I let you merge it when you approve it !

@Herklos
Copy link
Member

Herklos commented Feb 11, 2023

We should still handle TICKER_CLOSE_PRICE somewhere. I don't think that just because Binance provides it in the ticker, it should be generalized for all exchanges.

@techfreaque
Copy link
Contributor Author

We should still handle TICKER_CLOSE_PRICE somewhere. I don't think that just because Binance provides it in the ticker, it should be generalized for all exchanges.

This code is/was never used by any other exchange. As you must set MARK_PRICE_IN_TICKER to use it. This is only relevant to futures and doesnt have anything to do with TICKER_CLOSE_PRICE.
TICKER_CLOSE_PRICE was wrongly used here, it should be EXCHANGE_MARK_PRICE as its for cases where the actual real mark price (not the close) is in the ticker

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