Skip to content

Fix Deribit options with fractional strikes collapsing onto one symbol - #1198

Open
takinanton wants to merge 1 commit into
bmoscon:masterfrom
takinanton:fix-deribit-fractional-strikes
Open

takinanton wants to merge 1 commit into
bmoscon:masterfrom
takinanton:fix-deribit-fractional-strikes

Conversation

@takinanton

Copy link
Copy Markdown

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

Deribit strikes go through int() when the symbols are built. The altcoin USDC options are struck in cents so XRP_USDC-30NOV26-0d85-C up to XRP_USDC-30NOV26-0d98-C all become XRP-USDC-0-26X30-call and only the last one stays in the mapping. With today's instrument lists for BTC ETH USDC and SOL that drops 642 of 4809 instruments and the ones that survive carry the wrong strike. Whole strikes print as before and a fractional one now keeps its value so that contract is XRP-USDC-0.98-26X30-call. After the change all 4809 map. The symbol snapshots in sample_data were recorded with the collapsed names so I regenerated them from the captures and added a unit test that fails without the fix.

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

🤖 Generated with Claude Code

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

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