Skip to main content
POST
/
v1
/
quotes
curl --request POST \
  --url 'https://mach-prod-536329393577.asia-northeast1.run.app/v1/quotes' \
  --header 'Content-Type: application/json' \
  --data '{
    "wallet_address": "0xb20094DFede30AbEe3a8d549BbA828b6fd771106",
    "src_chain": "avalanche",
    "dst_chain": "arbitrum",
    "src_asset_address": "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
    "dst_asset_address": "0x498Bf2B1e120FeD3ad3D42EA2165E9b73f99C1e5",
    "src_amount": 1000000
  }'
{
  "wallet_address": "0xb20094DFede30AbEe3a8d549BbA828b6fd771106",
  "src_chain": "avalanche",
  "dst_chain": "arbitrum",
  "src_amount": "1000000",
  "dst_amount": "997000",
  "bond_amount": "1500000",
  "bond_fee": 3000,
  "src_asset_address": "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
  "dst_asset_address": "0x498Bf2B1e120FeD3ad3D42EA2165E9b73f99C1e5",
  "bond_asset_address": "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
  "challenge_offset": 900,
  "challenge_window": 300,
  "invalid_amount": false,
  "liquidity_source": "market_maker",
  "created_at": "2023-05-01T12:34:56Z",
  "expires_at": "2023-05-01T12:39:56Z",
  "order_data": {
    "contract_address": "0x123...",
    "order_direction": {
      "src_token_address": "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
      "dst_token_address": "0x498Bf2B1e120FeD3ad3D42EA2165E9b73f99C1e5",
      "src_lzc": 30106,
      "dst_lzc": 30110
    },
    "order_funding": {
      "src_amount_in": "1000000",
      "dst_amount_out": "997000",
      "bond_token_address": "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
      "bond_amount": "1500000",
      "bond_fee": "3000"
    },
    "order_expiration": {
      "timestamp": 1682944796,
      "challenge_offset": 900,
      "challenge_window": 300
    },
    "target_address": "0xb20094DFede30AbEe3a8d549BbA828b6fd771106",
    "filler_address": "0x456..."
  },
  "destination_transaction_fee": 500000,
  "destination_transaction_fee_usd": 0.50,
  "destination_transaction_fee_after_subsidy": 100000,
  "destination_transaction_fee_after_subsidy_usd": 0.10,
  "destination_transaction_fee_subsidy_usd": 0.40,
  "reject_order": false
}
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

wallet_address
string
User’s wallet address (optional, defaults to zero address)
target_address
string
Optional recipient address if different from wallet
src_chain
string
required
Source chain identifier (e.g., “avalanche”, “arbitrum”)
dst_chain
string
required
Destination chain identifier
src_asset_address
string
required
Source token contract address
dst_asset_address
string
required
Destination token contract address
src_amount
integer
required
Amount to swap in the smallest unit of the source token

Response

wallet_address
string
User’s wallet address
src_chain
string
Source chain identifier
dst_chain
string
Destination chain identifier
src_amount
string
Amount being swapped in the smallest unit
dst_amount
string
Amount to be received in the smallest unit
bond_amount
string
Bond amount required for the swap
bond_fee
integer
Fee for the bond
src_asset_address
string
Source token contract address
dst_asset_address
string
Destination token contract address
bond_asset_address
string
Token address used for bonding
challenge_offset
integer
Challenge offset time in seconds
challenge_window
integer
Challenge window time in seconds
invalid_amount
boolean
Whether the provided amount is invalid
liquidity_source
string
Source of liquidity (e.g., “market_maker”, “cctp_direct”)
created_at
string
Timestamp when the quote was created
expires_at
string
Timestamp when the quote expires
order_data
object
destination_transaction_fee
integer
Fee for the destination transaction
destination_transaction_fee_usd
number
USD value of the destination transaction fee
destination_transaction_fee_after_subsidy
integer
Destination transaction fee after subsidy
destination_transaction_fee_after_subsidy_usd
number
USD value of the destination transaction fee after subsidy
destination_transaction_fee_subsidy_usd
number
USD value of the subsidy
reject_order
boolean
Whether the order should be rejected
curl --request POST \
  --url 'https://mach-prod-536329393577.asia-northeast1.run.app/v1/quotes' \
  --header 'Content-Type: application/json' \
  --data '{
    "wallet_address": "0xb20094DFede30AbEe3a8d549BbA828b6fd771106",
    "src_chain": "avalanche",
    "dst_chain": "arbitrum",
    "src_asset_address": "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
    "dst_asset_address": "0x498Bf2B1e120FeD3ad3D42EA2165E9b73f99C1e5",
    "src_amount": 1000000
  }'
{
  "wallet_address": "0xb20094DFede30AbEe3a8d549BbA828b6fd771106",
  "src_chain": "avalanche",
  "dst_chain": "arbitrum",
  "src_amount": "1000000",
  "dst_amount": "997000",
  "bond_amount": "1500000",
  "bond_fee": 3000,
  "src_asset_address": "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
  "dst_asset_address": "0x498Bf2B1e120FeD3ad3D42EA2165E9b73f99C1e5",
  "bond_asset_address": "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
  "challenge_offset": 900,
  "challenge_window": 300,
  "invalid_amount": false,
  "liquidity_source": "market_maker",
  "created_at": "2023-05-01T12:34:56Z",
  "expires_at": "2023-05-01T12:39:56Z",
  "order_data": {
    "contract_address": "0x123...",
    "order_direction": {
      "src_token_address": "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
      "dst_token_address": "0x498Bf2B1e120FeD3ad3D42EA2165E9b73f99C1e5",
      "src_lzc": 30106,
      "dst_lzc": 30110
    },
    "order_funding": {
      "src_amount_in": "1000000",
      "dst_amount_out": "997000",
      "bond_token_address": "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
      "bond_amount": "1500000",
      "bond_fee": "3000"
    },
    "order_expiration": {
      "timestamp": 1682944796,
      "challenge_offset": 900,
      "challenge_window": 300
    },
    "target_address": "0xb20094DFede30AbEe3a8d549BbA828b6fd771106",
    "filler_address": "0x456..."
  },
  "destination_transaction_fee": 500000,
  "destination_transaction_fee_usd": 0.50,
  "destination_transaction_fee_after_subsidy": 100000,
  "destination_transaction_fee_after_subsidy_usd": 0.10,
  "destination_transaction_fee_subsidy_usd": 0.40,
  "reject_order": false
}

Status Codes

Status CodeDescription
200Success - Quote returned successfully
422Validation Error - Invalid parameters
500Internal Server Error - Something went wrong on the server