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?
This PR fixes an issue (#1038) where inserting Kraken trades into QuestDB would always fail silently.
When
TradeQuest
persists aTrade
it tried to useTrade.id
for for the dbid
field. But the old Kraken websocket does not return trade id's, which meansTradeQuest
attempts to insert every record with idNone
. But the QuestDB server will silently ignore any record that have that has it's id set toNone
.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 theid
peoperty to the request if it's notNone
.Description of code - what bug does this fix / what feature does this add?