---
title: "getQuote"
method: GET
path: "/gasless/quote"
tags: ["Gasless"]
---

# getQuote

`GET /gasless/quote`

Get the firm quote for a gasless swap

## Query parameters

- `chainId` integer, required
- `buyToken` string, required
- `sellToken` string, required
- `sellAmount` string, required
- `taker` string, required
- `recipient` string
- `swapFeeRecipient` string
- `swapFeeBps` string
- `swapFeeToken` string
- `tradeSurplusRecipient` string
- `tradeSurplusMaxBps` integer
- `slippageBps` integer
- `slippagePpm` integer
- `excludedSources` string

## Headers

- `0x-api-key` string, required
- `0x-version` string, required

## Response `200`

Successful response

- union
  - object
    - `allowanceTarget` string, nullable, required — The target contract address for which the `taker` needs to have an allowance in order to be able to complete the swap. For swaps with the native asset (ie "ETH" or "BNB") as the `sellToken`, wrapping the native asset (i.e. "ETH" to "WETH") or unwrapping, no allowance is needed
    - `approval` object, nullable, required — This is the “approval” object which contains the necessary information to process a gasless approval
      - `type` 'executeMetaTransaction::approve' | 'permit' | 'erc7597Permit' | 'daiPermit', required
      - `hash` string, required — The hash for the approval according to [EIP-712](https://eips.ethereum.org/EIPS/eip-712). If you compute the hash from eip712 field, it should match the value of this field
      - `eip712` object, required — The necessary data for [EIP-712](https://eips.ethereum.org/EIPS/eip-712). Please don't assume static shapes for `approval.eip712.types`, `approval.eip712.domain`, `approval.eip712.primaryType` and `approval.eip712.message` as they will change depending on the `type`
        - `types` object, required
        - `domain` object, required
          - `name` string
          - `version` string
          - `chainId` number
          - `verifyingContract` string
          - `salt` string
        - `message` object, required
        - `primaryType` string, required
    - `blockNumber` string, required — The block number at which the liquidity sources were sampled to generate the quote. This indicates the freshness of the quote.
    - `buyAmount` string, required — The exact amount of `buyToken` (in `buyToken` units) that will be bought in the swap
    - `buyToken` string, required — The contract address of the token to buy in the swap
    - `fees` object, required
      - `integratorFee` object, nullable, required — The specified fee to charge and deliver to the `swapFeeRecipient`.
        - `amount` string, required — The amount of token charged as the integrator fee
        - `token` string, required — The address of the token charged as the integrator fee
        - `type` 'volume', required
      - `integratorFees` object[], nullable, required — The specified fees to charge and deliver to the `swapFeesRecipient`.
        - `amount` string, required — The amount of token charged as the integrator fee
        - `token` string, required — The address of the token charged as the integrator fee
        - `type` 'volume', required
      - `zeroExFee` object, nullable, required — The fee charged by 0x for the trade.
        - `amount` string, required — The amount of token charged as the 0x fee
        - `token` string, required — The address of the token charged as the 0x fee
        - `type` 'volume', required
      - `gasFee` object, nullable, required — The gas fee to be used in submitting the transaction.
        - `amount` string, required — The amount of token charged as the gas fee
        - `token` string, required — The address of the token charged as the gas fee
        - `type` 'gas', required
    - `issues` object, required — An object containing potential issues discovered during 0x validation that can prevent the swap from being executed successfully by the `taker`
      - `allowance` object, nullable, required — Details of allowances that the `taker` must set for in order to execute the swap successfully. Null if no allowance is required
        - `actual` string, required — The `taker`'s current allowance of the `spender`
        - `spender` string, required — The address to set the allowance on
      - `balance` object, nullable, required — Details of balance of the `sellToken` that the `taker` must hold. Null if the `taker` has sufficient balance
        - `token` string, required — The contract address of the `sellToken`
        - `actual` string, required — The current balance of the `sellToken` in the `taker` address
        - `expected` string, required — The balance of the `sellToken` required for the swap to execute successfully
      - `simulationIncomplete` boolean, required — This is set to `true` when 0x cannot validate the transaction. This happens when the `taker` has an insufficient balance of the `sellToken` and 0x is unable to peform ehanced quote validation with the low balance. Note that this does not necessarily mean that the trade will revert
      - `invalidSourcesPassed` string[], required — A list of invalid sources present in `excludedSources` request. See `https://api.0x.org/sources?chainId=` with the desired chain's ID for the list of valid sources
    - `liquidityAvailable` true, required — This validates the availability of liquidity for the quote requested. The rest of the fields will only be returned if `true`
    - `minBuyAmount` string, required — The price which must be met or else the transaction will revert. This price is influenced by the `slippageBps` parameter. On-chain sources may encounter price movements from quote to settlement
    - `route` object, required — The path of liquidity sources to be used in executing this swap
      - `fills` object[], required — Details of each segment that 0x routes the swap through
        - `from` string, required — The contract address of the input token
        - `to` string, required — The contract address of the output token
        - `source` string, required — The liquidity source used in the route
        - `proportionBps` string, required — The proportion of the trade to be filled by the `source`
      - `tokens` object[], required — Properties of the tokens involved in the swap
        - `address` string, required — The token address. This is the unique identifier of the token
        - `symbol` string, required — The token symbol. This is not guaranteed to be unique, as multiple tokens can have the same symbol
    - `sellAmount` string, required — The amount of `sellToken` (in `sellToken` units) that will be sold in this swap
    - `sellToken` string, required — The contract address of the token to sell in the swap
    - `target` string, required — The address of the target contract that the transaction will be submitted to
    - `tokenMetadata` object, required — Swap-related metadata for the buy and sell token in the swap
      - `buyToken` object, required — Swap-related metadata for the buy token
        - `buyTaxBps` string, nullable, required — The buy tax in bps of the token. Since each token could have arbitrary implementation, this field is best effort, meaning it would be set to `null` if the system is not able to determine the tax
        - `sellTaxBps` string, nullable, required — The sell tax in bps of the token. Since each token could have arbitrary implementation, this field is best effort, meaning it would be set to `null` if the system is not able to determine the tax
        - `transferTaxBps` string, nullable, required — The transfer tax in bps of the token. Since each token could have arbitrary implementation, this field is best effort, meaning it would be set to `null` if the system is not able to determine the tax
      - `sellToken` object, required — Swap-related metadata for the sell token
        - `buyTaxBps` string, nullable, required — The buy tax in bps of the token. Since each token could have arbitrary implementation, this field is best effort, meaning it would be set to `null` if the system is not able to determine the tax
        - `sellTaxBps` string, nullable, required — The sell tax in bps of the token. Since each token could have arbitrary implementation, this field is best effort, meaning it would be set to `null` if the system is not able to determine the tax
        - `transferTaxBps` string, nullable, required — The transfer tax in bps of the token. Since each token could have arbitrary implementation, this field is best effort, meaning it would be set to `null` if the system is not able to determine the tax
    - `trade` object, required — This is the “trade” object which contains the necessary information to process a gasless trade
      - `type` 'settler_metatransaction', required — The transaction type for a Gasless trade
      - `hash` string, required — The hash for the trade according to [EIP-712](https://eips.ethereum.org/EIPS/eip-712). If you compute the hash from eip712 field, it should match the value of this field
      - `eip712` object, required — This is the necessary data for [EIP-712](https://eips.ethereum.org/EIPS/eip-712). Please don't assume static shapes for `trade.eip712.types`, `trade.eip712.domain`, `trade.eip712.primaryType` and `trade.eip712.message` as they will change depending on the `type`
        - `types` object, required
        - `domain` object, required
          - `name` string
          - `version` string
          - `chainId` number
          - `verifyingContract` string
          - `salt` string
        - `message` object, required
        - `primaryType` string, required
    - `zid` string, required — The unique ZeroEx identifier of the request
  - object
    - `liquidityAvailable` false, required — This validates the availability of liquidity for the quote requested. No other fields will be returned if it is `false`
    - `zid` string, required — The unique ZeroEx identifier of the request

## Other responses

- `400` — 400 error response
- `403` — 403 error response
- `422` — 422 error response
- `500` — 500 error response

---

[API](https://skmtc.net/0xproject/apis/0x-api.md) · [All operations](https://skmtc.net/0xproject/apis/0x-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/0xproject/0x-api/versions/27a84feeb09b/schema)
