fix: accept GTD expiration boundary#46
Conversation
|
Approach is exactly right (Option 1 from the issue), and good catch on aligning with the CLOB server-side rule rather than just patching the message. The deterministic One minor consideration: a client that builds the order at |
|
The docstring addition is the right call — keeps the boundary aligned with the server while making the buffer expectation explicit at the public API surface. "Use extra buffer for immediate submissions to account for latency and clock skew" is exactly the framing users need. LGTM, thanks for the quick turnaround on both PRs. |
Summary
Verification
Linear: DEV-136
Closes #44
Note
Low Risk
Small validation boundary fix for limit-order expiration with tests; no auth or payment paths touched.
Overview
GTD limit orders can use an
expirationexactly 60 seconds ahead of “now.” Validation invalidate_limit_order_paramsno longer rejects that timestamp: the check changes fromexpiration <= minimumtoexpiration < minimum, matching the CLOB’s inclusive minimum.Docs on sync/async
create_limit_orderandplace_limit_ordernow state the 60-second rule and suggest extra buffer for immediate posts (latency/clock skew).Tests add frozen-clock cases for
now + 59(reject) andnow + 60(accept).Reviewed by Cursor Bugbot for commit 20c9600. Bugbot is set up for automated code reviews on this repo. Configure here.