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

# Execute swap quote

> Spend the signature the account gave over the `executionContract` that submit returned — a signed order the backend relays, or a move that debits a provider-held fiat balance. A quote the client settles itself is refused here: it needs nothing beyond submit.



## OpenAPI

````yaml /openapi.json post /api/v1/balance/swap/quote/execute
openapi: 3.1.0
info:
  title: HEVN API
  description: Backend API for HEVN mobile neobank
  version: 0.1.2
servers: []
security: []
paths:
  /api/v1/balance/swap/quote/execute:
    post:
      tags:
        - Balance
      summary: Execute swap quote
      description: >-
        Spend the signature the account gave over the `executionContract` that
        submit returned — a signed order the backend relays, or a move that
        debits a provider-held fiat balance. A quote the client settles itself
        is refused here: it needs nothing beyond submit.
      operationId: execute_swap_quote_api_v1_balance_swap_quote_execute_post
      parameters:
        - name: x-api-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExecuteSwapQuoteRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitPayoutQuoteResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    ExecuteSwapQuoteRequest:
      properties:
        quoteId:
          type: string
          title: Quoteid
        signature:
          $ref: '#/components/schemas/ClientSignature'
      type: object
      required:
        - quoteId
        - signature
      title: ExecuteSwapQuoteRequest
      description: |-
        Execute a swap quote the account authorized with a signature.

        Sent when submit's `executionContract` says `requiresExecution`.
    SubmitPayoutQuoteResponse:
      properties:
        status:
          type: string
          title: Status
        executionContract:
          anyOf:
            - $ref: '#/components/schemas/ExecutionContract'
            - type: 'null'
      type: object
      required:
        - status
      title: SubmitPayoutQuoteResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ClientSignature:
      properties:
        signature:
          type: string
          title: Signature
        scheme:
          $ref: '#/components/schemas/SigningScheme'
          default: eip1271
        txHash:
          anyOf:
            - type: string
            - type: 'null'
          title: Txhash
      type: object
      required:
        - signature
      title: ClientSignature
      description: Client's answer to a signing request, sent with ``/quote/submit``.
    ExecutionContract:
      properties:
        mode:
          $ref: '#/components/schemas/SettlementMode'
        depositAddress:
          anyOf:
            - type: string
            - type: 'null'
          title: Depositaddress
        depositMemo:
          anyOf:
            - type: string
            - type: 'null'
          title: Depositmemo
        depositAmount:
          anyOf:
            - type: string
            - type: 'null'
          title: Depositamount
        depositToken:
          anyOf:
            - type: string
            - type: 'null'
          title: Deposittoken
        approval:
          anyOf:
            - $ref: '#/components/schemas/TokenApproval'
            - type: 'null'
        transaction:
          anyOf:
            - $ref: '#/components/schemas/EvmTransactionRequest'
            - type: 'null'
        typedData:
          anyOf:
            - $ref: '#/components/schemas/Eip712SigningRequest'
            - type: 'null'
        hashAlgorithm:
          anyOf:
            - type: string
              const: sha256
            - type: 'null'
          title: Hashalgorithm
        canonicalization:
          anyOf:
            - type: string
              const: sorted-json-v1
            - type: 'null'
          title: Canonicalization
        hashArguments:
          anyOf:
            - $ref: '#/components/schemas/PayoutQuoteHashArguments'
            - type: 'null'
        canonicalPayload:
          anyOf:
            - $ref: '#/components/schemas/AerodromeSettlementPayload'
            - $ref: '#/components/schemas/LifiSettlementPayload'
            - $ref: '#/components/schemas/CowSwapSettlementPayload'
            - $ref: '#/components/schemas/AlignSettlementPayload'
            - type: string
            - type: 'null'
          title: Canonicalpayload
        requiresExecution:
          type: boolean
          title: Requiresexecution
          readOnly: true
      type: object
      required:
        - mode
        - requiresExecution
      title: ExecutionContract
      description: >-
        Everything the client needs to execute one quote.


        One format for every channel: crypto routes carry deposit / transaction
        /

        order instructions, the banking provider fiat payouts carry the typed
        data to sign and the

        arguments that reproduce the quote hash. ``canonical_payload`` pins what
        was

        quoted — the provider payload persisted with a crypto route (``/submit``

        relays from it, never from client input), or the canonical JSON a the
        banking provider

        quote id is hashed from.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    SigningScheme:
      type: string
      enum:
        - eip712
        - eip1271
      title: SigningScheme
      description: How the client's signature over an order payload is produced.
    SettlementMode:
      type: string
      enum:
        - deposit_address
        - transaction
        - order_signature
        - message_signature
      title: SettlementMode
      description: How a quoted route gets executed by the client.
    TokenApproval:
      properties:
        token:
          type: string
          title: Token
        spender:
          type: string
          title: Spender
        amount:
          type: string
          title: Amount
        transaction:
          $ref: '#/components/schemas/EvmTransactionRequest'
      type: object
      required:
        - token
        - spender
        - amount
        - transaction
      title: TokenApproval
      description: |-
        ERC-20 allowance the route needs before it can be executed.

        Present only when the wallet's current allowance is short — the adapters
        read it on-chain, so a client that already approved gets ``None``.
    EvmTransactionRequest:
      properties:
        chainId:
          type: integer
          title: Chainid
        to:
          type: string
          title: To
        data:
          type: string
          title: Data
        value:
          type: string
          title: Value
          default: '0x0'
        gasLimit:
          anyOf:
            - type: string
            - type: 'null'
          title: Gaslimit
      type: object
      required:
        - chainId
        - to
        - data
      title: EvmTransactionRequest
      description: An EVM transaction the client signs and broadcasts from its wallet.
    Eip712SigningRequest:
      properties:
        domain:
          additionalProperties: true
          type: object
          title: Domain
        types:
          additionalProperties: true
          type: object
          title: Types
        primaryType:
          type: string
          title: Primarytype
        message:
          additionalProperties: true
          type: object
          title: Message
        digest:
          type: string
          title: Digest
        signingScheme:
          $ref: '#/components/schemas/SigningScheme'
          default: eip1271
      type: object
      required:
        - domain
        - types
        - primaryType
        - message
        - digest
      title: Eip712SigningRequest
      description: >-
        Typed data the client signs off-chain, plus its pre-computed digest.


        ``types`` deliberately omits ``EIP712Domain``: ethers v5 rejects it and
        viem

        does not need it. ``digest`` is the full EIP-712 hash — an EOA signs it

        directly, the Base smart wallet signs its replay-safe wrapping and
        returns

        the wrapped ERC-1271 bytes.
    PayoutQuoteHashArguments:
      properties:
        amount:
          type: string
          title: Amount
        recipient:
          $ref: '#/components/schemas/FiatPayoutRecipient'
        idempotencyKey:
          type: string
          title: Idempotencykey
        paymentReference:
          anyOf:
            - type: string
            - type: 'null'
          title: Paymentreference
        documentIds:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Documentids
      type: object
      required:
        - amount
        - recipient
        - idempotencyKey
      title: PayoutQuoteHashArguments
      description: Typed arguments used to derive a the banking provider payout quote ID.
    AerodromeSettlementPayload:
      properties:
        routes:
          items:
            $ref: '#/components/schemas/AerodromeRoutePayload'
          type: array
          title: Routes
        amount_in:
          type: string
          title: Amount In
        amount_out_min:
          type: string
          title: Amount Out Min
        recipient:
          type: string
          title: Recipient
        token:
          type: string
          title: Token
        chain_id:
          type: integer
          title: Chain Id
        tick_spacing:
          anyOf:
            - type: integer
            - type: 'null'
          title: Tick Spacing
      type: object
      required:
        - routes
        - amount_in
        - amount_out_min
        - recipient
        - token
        - chain_id
      title: AerodromeSettlementPayload
      description: Canonical Aerodrome path pinned when the pool is quoted.
    LifiSettlementPayload:
      properties:
        transaction:
          $ref: '#/components/schemas/EvmTransactionRequest'
        spender:
          type: string
          title: Spender
        token:
          type: string
          title: Token
        amount:
          type: string
          title: Amount
      type: object
      required:
        - transaction
        - spender
        - token
        - amount
      title: LifiSettlementPayload
      description: Canonical LiFi transaction and approval inputs.
    CowSwapSettlementPayload:
      properties:
        order:
          $ref: '#/components/schemas/CowOrder'
        chain_id:
          type: integer
          title: Chain Id
        owner:
          type: string
          title: Owner
        quote_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Quote Id
        sell_amount_total:
          type: string
          title: Sell Amount Total
      type: object
      required:
        - order
        - chain_id
        - owner
        - sell_amount_total
      title: CowSwapSettlementPayload
      description: Canonical CoW order and relay metadata.
    AlignSettlementPayload:
      properties:
        destination_address:
          type: string
          title: Destination Address
      type: object
      required:
        - destination_address
      title: AlignSettlementPayload
      description: Canonical Align destination selected at quote time.
    FiatPayoutRecipient:
      properties:
        rail:
          type: string
          enum:
            - us
            - swift
          title: Rail
        type:
          type: string
          enum:
            - individual
            - business
          title: Type
        bankAddress:
          $ref: '#/components/schemas/FiatPayoutAddress'
        postalAddress:
          $ref: '#/components/schemas/FiatPayoutAddress'
        accountNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Accountnumber
        routingNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Routingnumber
        accountType:
          anyOf:
            - type: string
              enum:
                - checking
                - savings
            - type: 'null'
          title: Accounttype
        iban:
          anyOf:
            - type: string
            - type: 'null'
          title: Iban
        bic:
          anyOf:
            - type: string
            - type: 'null'
          title: Bic
        bankName:
          anyOf:
            - type: string
            - type: 'null'
          title: Bankname
        firstName:
          anyOf:
            - type: string
            - type: 'null'
          title: Firstname
        lastName:
          anyOf:
            - type: string
            - type: 'null'
          title: Lastname
        legalName:
          anyOf:
            - type: string
            - type: 'null'
          title: Legalname
        phone:
          anyOf:
            - type: string
            - type: 'null'
          title: Phone
      type: object
      required:
        - rail
        - type
        - bankAddress
        - postalAddress
      title: FiatPayoutRecipient
    AerodromeRoutePayload:
      properties:
        from:
          type: string
          title: From
        to:
          type: string
          title: To
        stable:
          type: boolean
          title: Stable
        factory:
          type: string
          title: Factory
      type: object
      required:
        - from
        - to
        - stable
        - factory
      title: AerodromeRoutePayload
      description: Persisted form of one Aerodrome path hop.
    CowOrder:
      properties:
        sellToken:
          type: string
          title: Selltoken
        buyToken:
          type: string
          title: Buytoken
        receiver:
          type: string
          title: Receiver
        sellAmount:
          type: string
          title: Sellamount
        buyAmount:
          type: string
          title: Buyamount
        validTo:
          type: integer
          title: Validto
        appData:
          type: string
          title: Appdata
        feeAmount:
          type: string
          title: Feeamount
          default: '0'
        kind:
          $ref: '#/components/schemas/CowOrderKind'
          default: sell
        partiallyFillable:
          type: boolean
          title: Partiallyfillable
          default: false
        sellTokenBalance:
          $ref: '#/components/schemas/CowTokenBalance'
          default: erc20
        buyTokenBalance:
          $ref: '#/components/schemas/CowTokenBalance'
          default: erc20
      type: object
      required:
        - sellToken
        - buyToken
        - receiver
        - sellAmount
        - buyAmount
        - validTo
        - appData
      title: CowOrder
      description: >-
        The order the trader signs and the order book stores.


        Built verbatim from what ``POST /quote`` returned (plus the receiver) —
        the

        backend never recomputes CoW's fee or price math.
    FiatPayoutAddress:
      properties:
        addressLine1:
          type: string
          title: Addressline1
        city:
          type: string
          title: City
        country:
          type: string
          title: Country
        addressLine2:
          anyOf:
            - type: string
            - type: 'null'
          title: Addressline2
        state:
          anyOf:
            - type: string
            - type: 'null'
          title: State
        postalCode:
          anyOf:
            - type: string
            - type: 'null'
          title: Postalcode
      type: object
      required:
        - addressLine1
        - city
        - country
      title: FiatPayoutAddress
    CowOrderKind:
      type: string
      enum:
        - sell
        - buy
      title: CowOrderKind
      description: Which side of the order is fixed.
    CowTokenBalance:
      type: string
      enum:
        - erc20
        - external
        - internal
      title: CowTokenBalance
      description: Where the tokens are sourced from / delivered to.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````