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
Filter by route UUID.
Filter by the advertisement UUID.
Filter by the Maker’s blockchain address.
Filter by the Bridger’s blockchain address.
Filter by the UUID of the source token.
Filter by the UUID of the destination token.
Return only trades with an amount greater than or equal to this value.
Return only trades with an amount less than or equal to this value.
Pagination cursor from a previous response’s
nextCursor field.Number of results per page. Between 1 and 100.
Response fields
Array of trade objects. See the Trade object fields section.
Cursor for the next page.
null on the last page.GET /v1/trades/:id
Retrieve a single trade by its UUID.Path parameters
UUID of the trade to retrieve.
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
UUID of the ad to trade against.
UUID of the route for this trade. Must match the route associated with the ad.
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
UUID of the newly created trade.
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
UUID of the trade.
Response fields
Token contract address on the order chain.
Token contract address on the ad chain.
Trade amount in the smallest token unit.
Bridger’s address.
Address that receives tokens on the order chain.
The associated ad identifier.
Maker’s address.
Address that receives tokens on the ad chain.
Cryptographic salt for this order, used to prevent replay attacks.
Chain ID of the order chain.
Address of the
OrderPortal contract on the order chain.Chain ID of the ad chain.
Address of the
AdManager contract on the ad chain.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
UUID of the trade to lock.
Response fields
Chain ID of the
AdManager contract.Address of the
AdManager contract.Relayer signature authorizing the lock.
Authorization token to pass to the contract.
Seconds until this signed request expires.
Full
AdManager order parameters for the lock transaction.Hash of the relayer-signed request.
Hash of the order parameters.
"EVM" or "STELLAR".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
UUID of the trade to unlock.
Request body
Your wallet signature authorizing the unlock request. This prevents unauthorized parties from requesting unlock data on your behalf.
Response fields
Chain ID of the contract to call.
Contract address to call for the unlock.
Relayer signature for the unlock transaction.
Authorization token to pass to the contract.
Seconds until this signed request expires.
Order parameters for the unlock call.
Cryptographic nullifier preventing double-spend of this settlement.
Merkle root used for deposit inclusion verification.
Serialized zero-knowledge proof attesting that the deposit is included in the on-chain Merkle tree.
Hash of the order parameters.
Hash of the relayer-signed request.
"EVM" or "STELLAR".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.
Path parameters
UUID of the trade.
Request body
Transaction hash of the on-chain unlock transaction.
Optional signature for the confirmation.
Response fields
UUID of the trade.
true when the relayer successfully recorded the confirmation.POST /v1/trades/:id/confirm
Confirm a general on-chain action for a trade (e.g., after the initial deposit transaction). Call this after any trade-related on-chain transaction that is not an unlock. Requires authentication.Path parameters
UUID of the trade.
Request body
Transaction hash of the confirmed on-chain transaction.
Optional signature for the confirmation.
Response fields
UUID of the trade.
true when the relayer successfully recorded the confirmation.Trade object fields
UUID of the trade.
UUID of the route this trade follows.
UUID of the ad this trade is placed against.
Blockchain address of the Maker.
Chain ID of the ad (source) chain.
Chain ID of the order (destination) chain.
Blockchain address of the Bridger.
Trade amount in the smallest token unit.
Current trade status (e.g.,
"PENDING", "LOCKED", "SETTLED").Whether the Maker has claimed their funds.
Whether the Bridger has claimed their funds.
ISO 8601 timestamp of trade creation.
ISO 8601 timestamp of the last status update.
Summary of the associated ad:
id, routeId, creatorAddress.Route details including
adToken and orderToken with their chain information.