Is it possible to create an offer that would only be valid for a day through Stellar DEX? If not filled until expiry time, such offer would be automatically cancelled.

Centralized exchanges often allow specifying the order lifetime. For example in Kraken: https://support.kraken.com/hc/en-us/articles/203053246-Other-Order-Options

Specifying the expiration time does not seem to be possible through the Create Offer API.

Stellar Smart Contracts provide a capability to create a time lock: https://www.stellar.org/developers/guides/walkthroughs/stellar-smart-contracts.html#2-party-multisignature-escrow-account-with-time-lock-recovery

Could the expiration time for an offer be enforced with a smart contract?
I understand that the workaround solution is to send a cancel offer request after the expiration time, but that does not seem to be the optimal (or 100% reliable) way of doing things.

1 Answer 1


Stellar does not support expiring offers. Time locks only specify the time window when a Stellar transaction is eligible to be submitted to the network but not it's validity.

Therefore, sending a cancel offer operation after the expiration time is currently the only way of achieving what you want.

  • Please expand on your answer
    – manjuu5
    May 31, 2018 at 23:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.