These are the v1 (pre-BLS) docs, kept for reference — this page
describes the retired flow. The current design is under v2 in the
version picker.
OrderPortal contract, and the Maker locks tokens on the ad chain via the AdManager contract. Settlement is coordinated by zero-knowledge proofs that unlock funds for both parties simultaneously.
Several trade endpoints return signed contract call data that your application must submit on-chain. After each on-chain transaction is confirmed, call the corresponding /confirm endpoint to advance the trade state in the relayer.
All amounts are decimal strings representing values in the smallest token unit (e.g.,
"1000000" for 1 USDC with 6 decimals).GET /v1/trades/all
List trades with optional filters. Returns a paginated list.Query parameters
Response fields
Array of trade objects. See the Trade object fields section.
GET /v1/trades/:id
Retrieve a single trade by its UUID.Path parameters
Returns a single Trade object.POST /v1/trades/create
Create a new trade as a Bridger against an existing ad. The response contains signed transaction data that you must submit to theOrderPortal contract on the order chain to make the deposit. After the deposit is confirmed, call POST /v1/trades/:id/confirm.
Requires authentication.
Request body
Amount of tokens to deposit, in the smallest token unit. Must fall within the ad’s
minAmount and maxAmount constraints.The Bridger’s destination address on the ad chain, where the Maker’s tokens will be released.
Response fields
GET /v1/trades/:id/params
Retrieve the order parameters for a trade. Use this to reconstruct the exact parameters needed to call theOrderPortal or AdManager contract independently.
Requires authentication.
Path parameters
Response fields
POST /v1/trades/:id/lock
Lock funds on the ad chain in response to a Bridger’s deposit. This is a Maker action — only the Maker whose ad is associated with this trade can call this endpoint. Returns signed transaction data to submit to theAdManager contract.
Requires authentication.
Path parameters
Response fields
POST /v1/trades/:id/unlock
Request unlock data to claim your locked funds after the trade is settled. Both the Bridger and the Maker call this endpoint on their respective chains. The response contains a zero-knowledge proof (proof), a nullifier hash, and signed contract data for either the OrderPortal (Bridger) or AdManager (Maker).
Requires authentication.
Path parameters
Request body
Your wallet signature authorizing the unlock request. This prevents unauthorized parties from requesting unlock data on your behalf.
Response fields
Serialized zero-knowledge proof attesting that the deposit is included in the on-chain Merkle tree.
POST /v1/trades/:id/unlock/confirm
Confirm that an unlock transaction has been submitted on-chain. Call this after successfully submitting the transaction data returned by/unlock.
Requires authentication.