> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rhino.fi/llms.txt
> Use this file to discover all available pages before exploring further.

# Calldata to execute a single swap

> Get the calldata needed to execute a single swap.



## OpenAPI

````yaml https://api.rhino.fi/bridge/swagger.json get /swap/calldata/{commitmentId}
openapi: 3.1.0
info:
  title: Bridge API
  version: 0.0.1
  description: Functionality for interacting with Rhino bridge service
servers:
  - url: https://api.rhino.fi/bridge
security: []
tags:
  - name: quote
  - name: configs
  - name: history
  - name: swap
  - name: depositAddresses
paths:
  /swap/calldata/{commitmentId}:
    get:
      tags:
        - swap
      summary: Calldata to execute a single swap
      description: Get the calldata needed to execute a single swap.
      operationId: swap.calldata
      parameters:
        - name: commitmentId
          in: path
          schema:
            type: string
            description: Unique identifier of the swap commitment.
          required: true
          description: Unique identifier of the swap commitment.
      responses:
        '200':
          description: SwapCalldataResponse
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SwapCalldataResponse'
        '400':
          description: The request did not match the expected schema
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpApiDecodeError'
        '404':
          description: CommitmentNotFoundError
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/CommitmentNotFoundError'
                  - $ref: '#/components/schemas/TokenNotFoundError'
        '422':
          description: InvalidCommitmentTypeError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidCommitmentTypeError'
      security: []
components:
  schemas:
    SwapCalldataResponse:
      type: object
      required:
        - calldata
      properties:
        calldata:
          type: string
          description: Hex-encoded calldata for executing the swap transaction.
      additionalProperties: false
    HttpApiDecodeError:
      type: object
      required:
        - issues
        - message
        - _tag
      properties:
        issues:
          type: array
          items:
            $ref: '#/components/schemas/Issue'
        message:
          type: string
        _tag:
          type: string
          enum:
            - HttpApiDecodeError
      additionalProperties: false
      description: The request did not match the expected schema
    CommitmentNotFoundError:
      type: object
      required:
        - _id
        - _tag
      properties:
        _id:
          type: string
        _tag:
          type: string
          enum:
            - CommitmentNotFoundError
      additionalProperties: false
    TokenNotFoundError:
      type: object
      required:
        - chain
        - symbol
        - _tag
      properties:
        chain:
          type: string
        symbol:
          type: string
        _tag:
          type: string
          enum:
            - TokenNotFoundError
      additionalProperties: false
    InvalidCommitmentTypeError:
      type: object
      required:
        - message
        - _tag
      properties:
        message:
          type: string
        _tag:
          type: string
          enum:
            - InvalidCommitmentTypeError
      additionalProperties: false
    Issue:
      type: object
      required:
        - _tag
        - path
        - message
      properties:
        _tag:
          type: string
          enum:
            - Pointer
            - Unexpected
            - Missing
            - Composite
            - Refinement
            - Transformation
            - Type
            - Forbidden
          description: The tag identifying the type of parse issue
        path:
          type: array
          items:
            $ref: '#/components/schemas/PropertyKey'
          description: The path to the property where the issue occurred
        message:
          type: string
          description: A descriptive message explaining the issue
      additionalProperties: false
      description: >-
        Represents an error encountered while parsing a value to match the
        schema
    PropertyKey:
      anyOf:
        - type: string
        - type: number
        - type: object
          required:
            - _tag
            - key
          properties:
            _tag:
              type: string
              enum:
                - symbol
            key:
              type: string
          additionalProperties: false
          description: an object to be decoded into a globally shared symbol

````