Quote stream/only emit better results#4648
Conversation
|
Claude finished @fleupold's task in 4m 17s —— View job PR Review: Quote stream / only emit better results
The refactor is clean and the tests are well-written and readable. The consolidation of I left 2 inline comments. The main one is worth an explicit decision:
Nothing else stood out — timeout handling (full timeout per estimator vs. divided in the sequential one-shot) and ignoring Note: I could not run |
|
Reminder: Please consider backward compatibility when modifying the API specification.
Caused by: |
jmg-duarte
left a comment
There was a problem hiding this comment.
LGTM, just suggestions
MartinquaXD
left a comment
There was a problem hiding this comment.
Change makes sense to me but runs into the inherent awkwardness of unverified vs verified quotes in the streaming context.
|
@claude can you re-review please? |
|
Claude finished @fleupold's task in 3m 28s —— View job Re-review: Quote stream / only emit better resultsRe-reviewed after the latest changes. The concerns from the previous round have been addressed well. Resolved since last review
Correctness checks I ran through
Remaining (non-blocking)
Nice refactor overall — sharing Note: |
59a421e to
4d1d121
Compare
Description
Currently we emit every quote as part of the streaming quote api. This has been flagged as unergonomic from partners that want to integrate. They are not interested in receiving errors and potentially lower quality quote updates, they only want to see an increasingly better quotes.
This PR implements this by deferring errors to the end and only emitting new results if they are better as the best one so far
Important
Inline with the non streamed endpoint, verified quotes are considered "better" than an unverified one regardless of out amount. This is because unverified quotes often suffer from overquoting (and promising a price that is "too good to be true).
Changes
How to test
Added unit tests