Prepare token approval
Prepare token approval.
Credential: Customer session
Before you call
- A customer session for the same partner, integration, customer, wallet and chain.
- Use the original
preparationIdand the customer’s registered wallet. - Keep the signed bytes and any known hashes if you need to recover an uncertain submission.
- Set an Idempotency-Key and reuse it for an identical retry.
Prepares the token approval transactions that a SELL needs before escrow creation. Use the owning customer session. Sinbad may reuse an allowance snapshot for up to 30 seconds and invalidates it after a confirmed approval or reset. A snapshot is advisory, because Sinbad always simulates the current chain state before it broadcasts.
The response holds no transactions when the customer needs no approval: on a BUY, or when the allowance is already enough. On a SELL, it returns the exact approval, preceded by an allowance reset when a non-zero allowance is too small.
Run the transactions in order and wait for each to be CONFIRMED before the next. You can execute them with the wallet, submit the signed bytes of an ordinary wallet transaction to POST /v1/transactions, or broadcast externally and report the hash there. An approval does not create a trade and does not extend the breakdown’s deadline.
Confirm with Sinbad that this endpoint is enabled in your environment.
Errors
Authentication
Bearer authentication of the form Bearer <token>, where token is your auth token.