In src/polymarket/_internal/actions/orders/limit.py:66-70, the GTD expiration check uses <= against now + 60:
minimum = int(time.time()) + _MIN_EXPIRATION_BUFFER_S # = now + 60
if expiration <= minimum:
raise UserInputError(
f"expiration must be at least {_MIN_EXPIRATION_BUFFER_S} seconds in the future."
)
The condition rejects expiration == now + 60, so the actual required value is expiration > now + 60 (strictly more than 60 seconds). The error message says "at least 60 seconds in the future", which suggests expiration >= now + 60 is acceptable.
A user passing expiration = int(time.time()) + 60 (literally matching the documented contract) hits a UserInputError.
Suggested fix
Either tighten the comparison to < (accept the boundary value):
or update the message to "more than 60 seconds in the future". Aligning the condition with the documented contract is probably preferable.
Happy to send a small PR.
In
src/polymarket/_internal/actions/orders/limit.py:66-70, the GTD expiration check uses<=againstnow + 60:The condition rejects
expiration == now + 60, so the actual required value isexpiration > now + 60(strictly more than 60 seconds). The error message says "at least 60 seconds in the future", which suggestsexpiration >= now + 60is acceptable.A user passing
expiration = int(time.time()) + 60(literally matching the documented contract) hits aUserInputError.Suggested fix
Either tighten the comparison to
<(accept the boundary value):or update the message to "more than 60 seconds in the future". Aligning the condition with the documented contract is probably preferable.
Happy to send a small PR.