-
Notifications
You must be signed in to change notification settings - Fork 157
Allow user to decide the timeout for quote requests #3401
Description
Problem
Some integrators think the 5s we currently allocate for quoting is too long. They would like to be able to control themselves how long they need to wait at most before getting a response from the API.
Suggested solution
Add an optional field to the /quote request (e.g. timeout) which the backend reads and respects.
If no timeout was provided we should use our current default value to keep things backwards compatible.
Also the user provided timeout should be capped at the timeout defined in the backend to prevent the creation of tasks that potentially stick around forever.
Alternatives considered
We could also expose a websocket based endpoint where we stream quotes as they become available. The caller could close the stream whenever they want. This would be a very useful new feature but is a lot more complex and we need the user provided timeout soonish.