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