0x · Capability

0x API — Gasless

0x API — Gasless. 6 operations. Lead operation: Get Gasless Price. Self-contained Naftiko capability covering one 0x business surface.

Run with Naftiko 0x0X ApiGasless

What You Can Do

GET
Gasless getprice — Get Gasless Price
/gasless/price
GET
Gasless getquote — Get Gasless Quote
/gasless/quote
POST
Gasless submit — Submit Gasless Trade
/gasless/submit
GET
Gasless getstatus — Get Gasless Trade Status
/gasless/status/{tradehash}
GET
Gasless getgaslessapprovaltokens — Get Gasless Approval Tokens
/gasless/gasless-approval-tokens
GET
Gasless chains — Get Supported Chains
/gasless/chains

MCP Tools

0x-gasless-getprice

Get Gasless Price

read-only idempotent
0x-gasless-getquote

Get Gasless Quote

read-only idempotent
0x-gasless-submit

Submit Gasless Trade

0x-gasless-getstatus

Get Gasless Trade Status

read-only idempotent
0x-gasless-getgaslessapprovaltokens

Get Gasless Approval Tokens

read-only idempotent
0x-gasless-chains

Get Supported Chains

read-only idempotent

Capability Spec

0x-api-gasless.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: 0x API — Gasless
  description: '0x API — Gasless. 6 operations. Lead operation: Get Gasless Price. Self-contained Naftiko capability covering
    one 0x business surface.'
  tags:
  - 0x
  - 0X Api
  - Gasless
  created: '2026-05-28'
  modified: '2026-05-28'
binds:
- namespace: env
  keys:
    0X_API_KEY: 0X_API_KEY
capability:
  consumes:
  - type: http
    namespace: 0x-api-gasless
    baseUri: https://api.0x.org
    description: 0x API — Gasless business capability. Self-contained, no shared references.
    authentication:
      type: apiKey
      in: header
      name: 0x-api-key
      value: '{{env.0X_API_KEY}}'
    defaultHeaders:
      0x-version: v2
    resources:
    - name: gasless-price
      path: /gasless/price
      operations:
      - name: gasless-getprice
        method: GET
        path: /gasless/price
        description: Get Gasless Price
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: 0x-api-key
          in: header
          type: string
          required: true
          description: Visit dashboard.0x.org to get your API Key
        - name: 0x-version
          in: header
          type: string
          required: true
          description: API version
        - name: chainId
          in: query
          type: integer
          required: true
          description: Chain ID. See [here](https://docs.0x.org/docs/introduction/supported-chains) for the list of supported
            chains
        - name: buyToken
          in: query
          type: string
          required: true
          description: The contract address of the token to buy
        - name: sellToken
          in: query
          type: string
          required: true
          description: The contract address of the token to sell. Native token is not supported
        - name: sellAmount
          in: query
          type: string
          required: true
          description: The amount of `sellToken` in `sellToken` base units to sell
        - name: taker
          in: query
          type: string
          required: false
          description: The address which holds the `sellToken` balance and has the allowance set for the swap
        - name: recipient
          in: query
          type: string
          required: false
          description: The address to receive the `buyToken`. If not provided, defaults to the taker address. Not supported
            for wrap/unwrap operations.
        - name: swapFeeRecipient
          in: query
          type: string
          required: false
          description: The wallet address to receive the specified trading fees (supports single or multiple comma-separated
            values). You must also specify the `swapFeeBps` in the request to use this feature. When multiple values are provided,
            must match length of `swapFeeBps`.
        - name: swapFeeBps
          in: query
          type: string
          required: false
          description: The amount in Bps of the `swapFeeToken` to charge and deliver to the `swapFeeRecipient` (supports single
            or multiple comma-separated values). You must also specify the `swapFeeRecipient` in the request to use this feature.
            For security, this field has a default limit of 1000 Bps. If your application requires a higher value, please
            reach out to us.
        - name: swapFeeToken
          in: query
          type: string
          required: false
          description: The contract address of the token to receive trading fees in (supports single or multiple comma-separated
            values). Each token must be set to the value of either the `buyToken` or the `sellToken`. If omitted, the fee
            token will be determined by 0x with preference to stablecoins and highly liquid assets. You must also specify
            the `swapFeeRecipient` and `swapFeeBps` to charge integrator fees. When multiple values are provided, must match
            length of `swapFeeBps`.
        - name: tradeSurplusRecipient
          in: query
          type: string
          required: false
          description: The address to receive any trade surplus. If specified, this address will receive trade surplus when
            applicable. Otherwise, the taker will receive the surplus. This feature is only available to selected integrators
            on a custom pricing plan. In other cases, the surplus will be collected by 0x. For assistance with a custom plan,
            please contact support.
        - name: tradeSurplusMaxBps
          in: query
          type: integer
          required: false
          description: The maximum trade surplus (positive slippage) that can be collected in Bps of the buy amount. If not
            provided, defaults to 10000 (100%). Must be used together with `tradeSurplusRecipient`.
        - name: slippageBps
          in: query
          type: integer
          required: false
          description: The maximum acceptable slippage of the `buyToken` in Bps. 0x sets the optimal slippage tolerance per
            trade by default. To mitigate the risk of MEV attacks, we recommend adjusting this value only when trading low-liquidity
            tokens.
        - name: slippagePpm
          in: query
          type: integer
          required: false
          description: The maximum acceptable slippage of the `buyToken` in parts-per-million (PPM). Mutually exclusive with
            `slippageBps`. e.g. 3000 PPM = 30 BPS = 0.30%.
        - name: excludedSources
          in: query
          type: string
          required: false
          description: Liquidity sources e.g. Uniswap_V3, SushiSwap, 0x_RFQ to exclude from the provided quote. `See https://api.0x.org/sources?chainId=<chain_id>`
            with the desired chain's ID for a full list of sources. Separate multiple sources with a comma
    - name: gasless-quote
      path: /gasless/quote
      operations:
      - name: gasless-getquote
        method: GET
        path: /gasless/quote
        description: Get Gasless Quote
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: 0x-api-key
          in: header
          type: string
          required: true
          description: Visit dashboard.0x.org to get your API Key
        - name: 0x-version
          in: header
          type: string
          required: true
          description: API version
        - name: chainId
          in: query
          type: integer
          required: true
          description: Chain ID. See [here](https://docs.0x.org/docs/introduction/supported-chains) for the list of supported
            chains
        - name: buyToken
          in: query
          type: string
          required: true
          description: The contract address of the token to buy
        - name: sellToken
          in: query
          type: string
          required: true
          description: The contract address of the token to sell. Native token is not supported
        - name: sellAmount
          in: query
          type: string
          required: true
          description: The amount of `sellToken` in `sellToken` base units to sell
        - name: taker
          in: query
          type: string
          required: true
          description: The address which holds the `sellToken` balance and has the allowance set for the swap
        - name: recipient
          in: query
          type: string
          required: false
          description: The address to receive the `buyToken`. If not provided, defaults to the taker address. Not supported
            for wrap/unwrap operations.
        - name: swapFeeRecipient
          in: query
          type: string
          required: false
          description: The wallet address to receive the specified trading fees (supports single or multiple comma-separated
            values). You must also specify the `swapFeeBps` in the request to use this feature. When multiple values are provided,
            must match length of `swapFeeBps`.
        - name: swapFeeBps
          in: query
          type: string
          required: false
          description: The amount in Bps of the `swapFeeToken` to charge and deliver to the `swapFeeRecipient` (supports single
            or multiple comma-separated values). You must also specify the `swapFeeRecipient` in the request to use this feature.
            For security, this field has a default limit of 1000 Bps. If your application requires a higher value, please
            reach out to us.
        - name: swapFeeToken
          in: query
          type: string
          required: false
          description: The contract address of the token to receive trading fees in (supports single or multiple comma-separated
            values). Each token must be set to the value of either the `buyToken` or the `sellToken`. If omitted, the fee
            token will be determined by 0x with preference to stablecoins and highly liquid assets. You must also specify
            the `swapFeeRecipient` and `swapFeeBps` to charge integrator fees. When multiple values are provided, must match
            length of `swapFeeBps`.
        - name: tradeSurplusRecipient
          in: query
          type: string
          required: false
          description: The address to receive any trade surplus. If specified, this address will receive trade surplus when
            applicable. Otherwise, the taker will receive the surplus. This feature is only available to selected integrators
            on a custom pricing plan. In other cases, the surplus will be collected by 0x. For assistance with a custom plan,
            please contact support.
        - name: tradeSurplusMaxBps
          in: query
          type: integer
          required: false
          description: The maximum trade surplus (positive slippage) that can be collected in Bps of the buy amount. If not
            provided, defaults to 10000 (100%). Must be used together with `tradeSurplusRecipient`.
        - name: slippageBps
          in: query
          type: integer
          required: false
          description: The maximum acceptable slippage of the `buyToken` in Bps. 0x sets the optimal slippage tolerance per
            trade by default. To mitigate the risk of MEV attacks, we recommend adjusting this value only when trading low-liquidity
            tokens.
        - name: slippagePpm
          in: query
          type: integer
          required: false
          description: The maximum acceptable slippage of the `buyToken` in parts-per-million (PPM). Mutually exclusive with
            `slippageBps`. e.g. 3000 PPM = 30 BPS = 0.30%.
        - name: excludedSources
          in: query
          type: string
          required: false
          description: Liquidity sources e.g. Uniswap_V3, SushiSwap, 0x_RFQ to exclude from the provided quote. See `https://api.0x.org/sources?chainId=<chain_id>`
            with the desired chain's ID for a full list of sources. Separate multiple sources with a comma
    - name: gasless-submit
      path: /gasless/submit
      operations:
      - name: gasless-submit
        method: POST
        path: /gasless/submit
        description: Submit Gasless Trade
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: 0x-api-key
          in: header
          type: string
          required: true
          description: Visit dashboard.0x.org to get your API Key
        - name: 0x-version
          in: header
          type: string
          required: true
          description: API version
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: gasless-status-tradehash
      path: /gasless/status/{tradeHash}
      operations:
      - name: gasless-getstatus
        method: GET
        path: /gasless/status/{tradeHash}
        description: Get Gasless Trade Status
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: 0x-api-key
          in: header
          type: string
          required: true
          description: Visit dashboard.0x.org to get your API Key
        - name: 0x-version
          in: header
          type: string
          required: true
          description: API version
        - name: chainId
          in: query
          type: integer
          required: true
          description: ' [here](https://docs.0x.org/docs/introduction/supported-chains) for the list of supported chains'
        - name: tradeHash
          in: path
          type: string
          required: true
          description: The hash for the trade according to [EIP-712](https://eips.ethereum.org/EIPS/eip-712)
    - name: gasless-gasless-approval-tokens
      path: /gasless/gasless-approval-tokens
      operations:
      - name: gasless-getgaslessapprovaltokens
        method: GET
        path: /gasless/gasless-approval-tokens
        description: Get Gasless Approval Tokens
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: 0x-api-key
          in: header
          type: string
          required: true
          description: Visit dashboard.0x.org to get your API Key
        - name: 0x-version
          in: header
          type: string
          required: true
          description: API version
        - name: chainId
          in: query
          type: integer
          required: true
          description: Chain ID. See [here](https://docs.0x.org/docs/introduction/supported-chains) for the list of supported
            chains
    - name: gasless-chains
      path: /gasless/chains
      operations:
      - name: gasless-chains
        method: GET
        path: /gasless/chains
        description: Get Supported Chains
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: 0x-api-key
          in: header
          type: string
          required: true
          description: Visit dashboard.0x.org to get your API Key
        - name: 0x-version
          in: header
          type: string
          required: true
          description: API version
  exposes:
  - type: rest
    namespace: 0x-api-gasless-rest
    port: 8080
    description: REST adapter for 0x API — Gasless. One Spectral-compliant resource per consumed operation.
    resources:
    - path: /gasless/price
      name: gasless-price
      description: REST surface for gasless-price.
      operations:
      - method: GET
        name: gasless-getprice
        description: Get Gasless Price
        call: 0x-api-gasless.gasless-getprice
        with:
          0x-api-key: rest.0x-api-key
          0x-version: rest.0x-version
          chainId: rest.chainId
          buyToken: rest.buyToken
          sellToken: rest.sellToken
          sellAmount: rest.sellAmount
          taker: rest.taker
          recipient: rest.recipient
          swapFeeRecipient: rest.swapFeeRecipient
          swapFeeBps: rest.swapFeeBps
          swapFeeToken: rest.swapFeeToken
          tradeSurplusRecipient: rest.tradeSurplusRecipient
          tradeSurplusMaxBps: rest.tradeSurplusMaxBps
          slippageBps: rest.slippageBps
          slippagePpm: rest.slippagePpm
          excludedSources: rest.excludedSources
        outputParameters:
        - type: object
          mapping: $.
    - path: /gasless/quote
      name: gasless-quote
      description: REST surface for gasless-quote.
      operations:
      - method: GET
        name: gasless-getquote
        description: Get Gasless Quote
        call: 0x-api-gasless.gasless-getquote
        with:
          0x-api-key: rest.0x-api-key
          0x-version: rest.0x-version
          chainId: rest.chainId
          buyToken: rest.buyToken
          sellToken: rest.sellToken
          sellAmount: rest.sellAmount
          taker: rest.taker
          recipient: rest.recipient
          swapFeeRecipient: rest.swapFeeRecipient
          swapFeeBps: rest.swapFeeBps
          swapFeeToken: rest.swapFeeToken
          tradeSurplusRecipient: rest.tradeSurplusRecipient
          tradeSurplusMaxBps: rest.tradeSurplusMaxBps
          slippageBps: rest.slippageBps
          slippagePpm: rest.slippagePpm
          excludedSources: rest.excludedSources
        outputParameters:
        - type: object
          mapping: $.
    - path: /gasless/submit
      name: gasless-submit
      description: REST surface for gasless-submit.
      operations:
      - method: POST
        name: gasless-submit
        description: Submit Gasless Trade
        call: 0x-api-gasless.gasless-submit
        with:
          0x-api-key: rest.0x-api-key
          0x-version: rest.0x-version
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /gasless/status/{tradehash}
      name: gasless-status-tradehash
      description: REST surface for gasless-status-tradehash.
      operations:
      - method: GET
        name: gasless-getstatus
        description: Get Gasless Trade Status
        call: 0x-api-gasless.gasless-getstatus
        with:
          0x-api-key: rest.0x-api-key
          0x-version: rest.0x-version
          chainId: rest.chainId
          tradeHash: rest.tradeHash
        outputParameters:
        - type: object
          mapping: $.
    - path: /gasless/gasless-approval-tokens
      name: gasless-gasless-approval-tokens
      description: REST surface for gasless-gasless-approval-tokens.
      operations:
      - method: GET
        name: gasless-getgaslessapprovaltokens
        description: Get Gasless Approval Tokens
        call: 0x-api-gasless.gasless-getgaslessapprovaltokens
        with:
          0x-api-key: rest.0x-api-key
          0x-version: rest.0x-version
          chainId: rest.chainId
        outputParameters:
        - type: object
          mapping: $.
    - path: /gasless/chains
      name: gasless-chains
      description: REST surface for gasless-chains.
      operations:
      - method: GET
        name: gasless-chains
        description: Get Supported Chains
        call: 0x-api-gasless.gasless-chains
        with:
          0x-api-key: rest.0x-api-key
          0x-version: rest.0x-version
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: 0x-api-gasless-mcp
    port: 9090
    transport: http
    description: MCP adapter for 0x API — Gasless. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: 0x-gasless-getprice
      description: Get Gasless Price
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: 0x-api-gasless.gasless-getprice
      with:
        0x-api-key: tools.0x-api-key
        0x-version: tools.0x-version
        chainId: tools.chainId
        buyToken: tools.buyToken
        sellToken: tools.sellToken
        sellAmount: tools.sellAmount
        taker: tools.taker
        recipient: tools.recipient
        swapFeeRecipient: tools.swapFeeRecipient
        swapFeeBps: tools.swapFeeBps
        swapFeeToken: tools.swapFeeToken
        tradeSurplusRecipient: tools.tradeSurplusRecipient
        tradeSurplusMaxBps: tools.tradeSurplusMaxBps
        slippageBps: tools.slippageBps
        slippagePpm: tools.slippagePpm
        excludedSources: tools.excludedSources
      outputParameters:
      - type: object
        mapping: $.
    - name: 0x-gasless-getquote
      description: Get Gasless Quote
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: 0x-api-gasless.gasless-getquote
      with:
        0x-api-key: tools.0x-api-key
        0x-version: tools.0x-version
        chainId: tools.chainId
        buyToken: tools.buyToken
        sellToken: tools.sellToken
        sellAmount: tools.sellAmount
        taker: tools.taker
        recipient: tools.recipient
        swapFeeRecipient: tools.swapFeeRecipient
        swapFeeBps: tools.swapFeeBps
        swapFeeToken: tools.swapFeeToken
        tradeSurplusRecipient: tools.tradeSurplusRecipient
        tradeSurplusMaxBps: tools.tradeSurplusMaxBps
        slippageBps: tools.slippageBps
        slippagePpm: tools.slippagePpm
        excludedSources: tools.excludedSources
      outputParameters:
      - type: object
        mapping: $.
    - name: 0x-gasless-submit
      description: Submit Gasless Trade
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: 0x-api-gasless.gasless-submit
      with:
        0x-api-key: tools.0x-api-key
        0x-version: tools.0x-version
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: 0x-gasless-getstatus
      description: Get Gasless Trade Status
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: 0x-api-gasless.gasless-getstatus
      with:
        0x-api-key: tools.0x-api-key
        0x-version: tools.0x-version
        chainId: tools.chainId
        tradeHash: tools.tradeHash
      outputParameters:
      - type: object
        mapping: $.
    - name: 0x-gasless-getgaslessapprovaltokens
      description: Get Gasless Approval Tokens
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: 0x-api-gasless.gasless-getgaslessapprovaltokens
      with:
        0x-api-key: tools.0x-api-key
        0x-version: tools.0x-version
        chainId: tools.chainId
      outputParameters:
      - type: object
        mapping: $.
    - name: 0x-gasless-chains
      description: Get Supported Chains
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: 0x-api-gasless.gasless-chains
      with:
        0x-api-key: tools.0x-api-key
        0x-version: tools.0x-version
      outputParameters:
      - type: object
        mapping: $.