Skip to content

Conversation

sunlei
Copy link
Collaborator

@sunlei sunlei commented May 26, 2025

Pull Request

Summary

Add support for Binance's Mark Price Stream across all markets.

# Subscribe to the mark price of a specific instrument_id
self.subscribe_data(
    data_type=DataType(
        BinanceFuturesMarkPriceUpdate,
        metadata={"instrument_id": self.instrument_id},
    ),
    client_id=ClientId("BINANCE"),
)

# Subscribe to the mark price of all market
self.subscribe_data(
    data_type=DataType(BinanceFuturesMarkPriceUpdate),
    client_id=ClientId("BINANCE"),
)

Type of change

  • Bug fix (non-breaking)
  • New feature (non-breaking)
  • Breaking change (impacts existing behavior)
  • Documentation update
  • Maintenance / chore

Testing

Tested in the live environment.

@sunlei sunlei changed the title Add support for Binance's Mark Price Stream across all markets Add support for Binance's mark price stream across all markets May 26, 2025
stream = f"{BinanceSymbol(symbol).lower()}@markPrice"

if speed:
stream += f"@{int(speed / 1000)}s"
Copy link
Member

@cjdsellers cjdsellers May 26, 2025

Choose a reason for hiding this comment

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

@cjdsellers cjdsellers merged commit 49e0da9 into develop May 26, 2025
17 checks passed
@cjdsellers cjdsellers deleted the sunlei/binance_mark_price branch May 26, 2025 22:29
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.

2 participants