Mach API Endpoints
Request Quote
Returns a price quote for a cross-chain swap
POST
This endpoint provides a price quote for a cross-chain token swap based on the provided parameters. The quote includes the expected destination amount, fees, and other order details.
Request Body
User’s wallet address (optional, defaults to zero address)
Optional recipient address if different from wallet
Source chain identifier (e.g., “avalanche”, “arbitrum”)
Destination chain identifier
Source token contract address
Destination token contract address
Amount to swap in the smallest unit of the source token
Response
User’s wallet address
Source chain identifier
Destination chain identifier
Amount being swapped in the smallest unit
Amount to be received in the smallest unit
Bond amount required for the swap
Fee for the bond
Source token contract address
Destination token contract address
Token address used for bonding
Challenge offset time in seconds
Challenge window time in seconds
Whether the provided amount is invalid
Source of liquidity (e.g., “market_maker”, “cctp_direct”)
Timestamp when the quote was created
Timestamp when the quote expires
Fee for the destination transaction
USD value of the destination transaction fee
Destination transaction fee after subsidy
USD value of the destination transaction fee after subsidy
USD value of the subsidy
Whether the order should be rejected
Status Codes
| Status Code | Description |
|---|---|
| 200 | Success - Quote returned successfully |
| 422 | Validation Error - Invalid parameters |
| 500 | Internal Server Error - Something went wrong on the server |