Skip to content

Fix Phemex 1M, 1Q and 1Y candles subscribing to the wrong interval - #1184

Open
wavebyrd wants to merge 1 commit into
bmoscon:masterfrom
wavebyrd:fix/phemex-weekly-candles
Open

wavebyrd wants to merge 1 commit into
bmoscon:masterfrom
wavebyrd:fix/phemex-weekly-candles

Conversation

@wavebyrd

Copy link
Copy Markdown
Contributor

Description of code - what bug does this fix / what feature does this add?

Phemex's candle_interval_map zips 10 intervals with 11 resolutions, and the interval list has no 1w. So 1M maps to 604800 (Phemex's weekly kline), 1Q to 2592000 (monthly) and 1Y to 7776000 (quarterly), and the candle stop times are off by the same amount. The resolutions are listed in Phemex's API docs (60 ... 86400, 604800, 2592000, 7776000, 31104000). Adding 1w lines them up again. Added a unit test that fails without the change.

  • - Tested
  • - Changelog updated
  • - Tests run and pass
  • - ruff run and all errors/warnings resolved
  • - Contributors file updated (optional)

This branch has not been deployed

No deployments
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.

1 participant