POST
/
quote
Create quote.
curl --request POST \
  --url https://{environment}.garden.finance/v3/quote \
  --header 'Content-Type: application/json' \
  --header 'garden-app-id: <api-key>' \
  --data '
{
  "source": {
    "asset": "arbitrum_sepolia:wbtc",
    "owner": "<string>",
    "delegate": "<string>",
    "amount": "20000"
  },
  "destination": {
    "asset": "arbitrum_sepolia:wbtc",
    "owner": "<string>",
    "delegate": "<string>",
    "amount": "20000"
  },
  "slippage": 50,
  "affiliate_fees": [],
  "nonce": "<string>"
}
'
{
  "status": "Ok",
  "result": {
    "request_id": "<string>",
    "quotes": [
      {
        "id": "<string>",
        "solver_id": "<string>",
        "secret_hash": "<string>",
        "source_swap_id": "<string>",
        "destination_swap_id": "<string>",
        "source": {
          "asset": "solana_testnet:usdc",
          "amount": "15082000",
          "display": "15.08200000",
          "value": "15.0820"
        },
        "destination": {
          "asset": "solana_testnet:usdc",
          "amount": "15082000",
          "display": "15.08200000",
          "value": "15.0820"
        },
        "fee": 123,
        "fixed_fee": "<string>",
        "slippage": 123,
        "estimated_time": 123,
        "deadline": 123,
        "initiate": {
          "type": "evm",
          "chain_id": 421614,
          "initiate_transaction": {
            "to": "0xb5ae9785349186069c48794a763db39ec756b1cf",
            "value": "0x0",
            "data": "0x97ffc7ae0000000000000000000000001fd1f7b5c6e4e7b9f80a4db17903afd83d3fd31d",
            "gas_limit": "0x493e0",
            "chain_id": 421614
          },
          "approval_transaction": {
            "to": "0xb5ae9785349186069c48794a763db39ec756b1cf",
            "value": "0x0",
            "data": "0x97ffc7ae0000000000000000000000001fd1f7b5c6e4e7b9f80a4db17903afd83d3fd31d",
            "gas_limit": "0x493e0",
            "chain_id": 421614
          },
          "core_to_evm_transfer": {
            "to": "0xb5ae9785349186069c48794a763db39ec756b1cf",
            "value": "0x0",
            "data": "0x97ffc7ae0000000000000000000000001fd1f7b5c6e4e7b9f80a4db17903afd83d3fd31d",
            "gas_limit": "0x493e0",
            "chain_id": 421614
          }
        }
      }
    ]
  }
}
Price a swap and create the order in a single call. Returns the pre-built transaction to initiate the swap on-chain.

Authorizations

garden-app-id
string
header
required

If you do not yet have an app ID, please follow these steps.

Body

application/json
source
object
required

One side of the swap.

destination
object
required

One side of the swap.

slippage
integer
required

In BIPS (base index points), 100 bips = 1%.

Example:

50

affiliate_fees
object[]
nonce
string | null

Response

Quote information.

status
enum<string>
Available options:
Ok
result
object