-
Notifications
You must be signed in to change notification settings - Fork 137
Description
Hi guyz,
I’m using @polymarket/clob-client in a latency-sensitive trading setup and had a question about request control for postOrders.
In some cases, an order batch POST can take significantly longer than usual (e.g. >500–700ms). When this happens, the orders may reach the book after the market state has already changed, increasing the risk of one-sided fills.
I’m trying to understand what level of control the client provides (or could provide) around this. Specifically:
Does ClobClient.postOrders() support passing an AbortSignal, request timeout, or custom axios instance so the request can be aborted client-side if it exceeds a latency threshold?
If not, is there a recommended pattern for handling this (e.g. IOC/FOK equivalents, short TTLs, or immediate cancel-after-ack strategies)?
Is there any server-side support for rejecting or auto-cancelling orders that arrive “too late” relative to signing time?
I understand that once an HTTP request is sent it may still be processed by the server, but I’m trying to minimize exposure during transient latency spikes.
Any guidance on best practices here would be greatly appreciated. Thanks!