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

Fix persisting Kraken trades in QuestDB #1039

Merged
merged 2 commits into from
May 29, 2024
Merged

Fix persisting Kraken trades in QuestDB #1039

merged 2 commits into from
May 29, 2024

Conversation

carloe
Copy link
Contributor

@carloe carloe commented May 29, 2024

This PR fixes an issue (#1038) where inserting Kraken trades into QuestDB would always fail silently.

When TradeQuest persists a Trade it tried to use Trade.id for for the db id field. But the old Kraken websocket does not return trade id's, which means TradeQuest attempts to insert every record with id None. But the QuestDB server will silently ignore any record that have that has it's id set to None.

Since in quest id is not a required field in qdb (actually not sure if this is specific to qdb, or more generally true for the InfluxDB line protocol), this pr only adds the id peoperty to the request if it's not None.

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

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

The Kraken ws API does not return a `trade_id`. When the Quest backend tries to insert a record with a `None` id it will just ignore that insert.
@bmoscon bmoscon merged commit 556f31b into bmoscon:master May 29, 2024
1 of 4 checks passed
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