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

# Estimate on-demand conversion

> Returns the indicative amounts, rate, and fees for an on-demand conversion. An estimate does not lock a price, reserve funds, or create a conversion.

Supports conversions from an account balance to a crypto address or bank account, and from a bank account to a crypto address. For a bank source, provide `from.amount`; the destination amount is calculated for you. For a balance source, provide either `from.amount` or `to.amount`.

Specify bank rails and crypto networks without account link identifiers, bank routing details, or crypto addresses. To lock the price, call [Prepare on-demand conversion](./prepare-on-demand-conversion).



## OpenAPI

````yaml https://d2588n1sy4m36o.cloudfront.net/uat/merged/openapi.json post /v1/accounts/{account_id}/on-demand-conversions/estimate
openapi: 3.1.0
info:
  title: PWS Public API
  version: '1'
  description: >-
    Integrate with Payward Services to onboard users, manage accounts and funds,
    trade assets, and receive event notifications.
  contact:
    name: Payward Services
servers:
  - url: https://api.sandbox.services.payward.com
security: []
tags:
  - name: Assets
    description: List the assets PWS is willing to swap.
    x-displayName: Assets
  - name: Conversions
    description: >-
      Rule-driven and on-demand fiat ↔ crypto value movement, including
      conversion rules and deposits.
    x-displayName: Conversions
  - name: Auto Earn
    description: >-
      Manage Auto Earn preferences and retrieve allocation and reward
      information.
    x-displayName: Auto Earn
  - name: Bonded Earn
    description: >-
      Allocate funds to and deallocate funds from bonded earn strategies, review
      allocations, and track request status.
    x-displayName: Bonded Earn
  - name: Funding
    description: >-
      Discover deposit and withdrawal options, manage deposit addresses, and
      move funds between accounts.
    x-displayName: Funding
  - name: Derivative transfers
    description: >-
      Move funds between an account's spot balance and the same owner's futures
      balance.
    x-displayName: Derivative transfers
  - name: Portfolio
    description: 'Inspect a customer''s portfolio: balances, valuations, and transactions.'
    x-displayName: Portfolio
  - name: Ramp
    description: >-
      Support Ramp flows with discovery, quotes, limits, and hosted checkout
      experiences.
    x-displayName: Ramp
  - name: Reports
    description: Settlement and reconciliation reports for the partner.
    x-displayName: Reports
  - name: Swaps
    description: Account-funded quotes that lock a price until they expire or are executed.
    x-displayName: Swaps
  - name: Onchain quotes
    description: Wallet-funded quotes that return the data needed to settle onchain.
    x-displayName: Onchain quotes
  - name: Price trigger swaps
    description: Swaps that wait for a target price before submitting a trade.
    x-displayName: Price trigger swaps
  - name: Travel Rule verifications
    description: Travel Rule address ownership verification flows.
    x-displayName: Travel Rule verifications
  - name: Users
    description: >-
      User onboarding and status flows that the partner manages.


      - **Create User** provisions an account-owned user from an external
      reference and optional email.

      - **Get User** retrieves the user's profile, verification status, and
      required actions.


      Use the returned user `id` for calls that require the user's identifier.
    x-displayName: Users
  - name: Verifications
    description: Identity verification (KYC) submission and status for end users.
    x-displayName: Verifications
  - name: Webhooks
    description: >-
      Register HTTPS destinations to receive event deliveries, rotate signing
      secrets, and inspect, update, or delete existing subscriptions. Each
      subscription is owned by the authenticated partner; deliveries are signed
      with HMAC-SHA256 and retried on transient failures.
    x-displayName: Webhooks
paths:
  /v1/accounts/{account_id}/on-demand-conversions/estimate:
    post:
      tags:
        - Conversions
      summary: Estimate on-demand conversion
      description: >-
        Returns the indicative amounts, rate, and fees for an on-demand
        conversion. An estimate does not lock a price, reserve funds, or create
        a conversion.


        Supports conversions from an account balance to a crypto address or bank
        account, and from a bank account to a crypto address. For a bank source,
        provide `from.amount`; the destination amount is calculated for you. For
        a balance source, provide either `from.amount` or `to.amount`.


        Specify bank rails and crypto networks without account link identifiers,
        bank routing details, or crypto addresses. To lock the price, call
        [Prepare on-demand conversion](./prepare-on-demand-conversion).
      operationId: estimateOnDemandConversion
      parameters:
        - $ref: '#/components/parameters/AccountId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              description: On-demand conversion to estimate.
              type: object
              additionalProperties: false
              required:
                - from
                - to
              properties:
                from:
                  $ref: >-
                    #/components/schemas/Conversions_EstimateOnDemandConversionSide
                  description: Source of the conversion.
                to:
                  $ref: >-
                    #/components/schemas/Conversions_EstimateOnDemandConversionSide
                  description: Destination of the conversion.
              if:
                properties:
                  from:
                    properties:
                      type:
                        enum:
                          - bank
              then:
                properties:
                  from:
                    required:
                      - amount
                  to:
                    properties:
                      type:
                        enum:
                          - wallet
              else:
                properties:
                  from:
                    properties:
                      type:
                        enum:
                          - balance
                  to:
                    properties:
                      type:
                        enum:
                          - bank
                          - wallet
              oneOf:
                - title: Source amount
                  description: >-
                    Provide `from.amount` to specify how much to debit. Omit
                    `to.amount`; the service calculates the amount delivered to
                    the destination.
                  type: object
                  required:
                    - from
                  properties:
                    from:
                      type: object
                      required:
                        - amount
                      properties:
                        amount:
                          type: string
                          minLength: 1
                          maxLength: 64
                    to:
                      type: object
                      not:
                        required:
                          - amount
                - title: Destination amount
                  description: >-
                    Provide `to.amount` to specify how much to deliver. Omit
                    `from.amount`; the service calculates the amount debited
                    from the source.
                  type: object
                  required:
                    - to
                  properties:
                    from:
                      type: object
                      not:
                        required:
                          - amount
                    to:
                      type: object
                      required:
                        - amount
                      properties:
                        amount:
                          type: string
                          minLength: 1
                          maxLength: 64
            examples:
              estimate-on-demand-conversion:
                summary: Estimate an RfP-funded conversion to a wallet
                value:
                  from:
                    symbol: USD
                    type: bank
                    bank_account:
                      via: rfp
                    amount: '1000.00'
                  to:
                    symbol: ETH
                    type: wallet
                    wallet:
                      via: ethereum
      responses:
        '200':
          description: On-demand conversion estimate returned.
          headers:
            X-Trace-Id:
              $ref: '#/components/headers/TraceId'
            Strict-Transport-Security:
              $ref: '#/components/headers/StrictTransportSecurity'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    $ref: >-
                      #/components/schemas/Conversions_OnDemandConversionEstimate
              examples:
                estimate-on-demand-conversion-ok:
                  summary: Estimate an RfP-funded conversion to a wallet
                  value:
                    data:
                      from:
                        symbol: USD
                        type: bank
                        amount: '1000.00'
                      to:
                        symbol: ETH
                        type: wallet
                        amount: '0.39770000'
                      rate:
                        base:
                          symbol: USD
                        quote:
                          symbol: ETH
                        price: '0.0004'
                      fees:
                        from:
                          symbol: USD
                          amount: '0.00'
                        trade:
                          symbol: USD
                          amount: '5.00'
                        to:
                          symbol: ETH
                          amount: '0.00030000'
        '400':
          $ref: '#/components/responses/ConversionsBadRequestResponse'
          description: >-
            The request contains an invalid amount, unsupported asset or
            destination, an amount below the applicable minimum, a target amount
            that cannot be fulfilled, an unsupported bank rail, or a rail and
            currency mismatch.
        '401':
          $ref: '#/components/responses/ConversionsUnauthenticatedResponse'
          description: Authentication required.
        '403':
          $ref: '#/components/responses/ConversionsForbiddenResponse'
          description: Forbidden.
        '429':
          $ref: '#/components/responses/ConversionsResourceExhaustedResponse'
          description: Rate limit exceeded.
        '500':
          $ref: '#/components/responses/ConversionsInternalResponse'
          description: Internal server error.
        '503':
          $ref: '#/components/responses/ConversionsUnavailableResponse'
          description: Service unavailable.
        '504':
          $ref: '#/components/responses/ConversionsDeadlineExceededResponse'
          description: Deadline exceeded.
      security:
        - ApiKey: []
          ApiSign: []
          ApiNonce: []
components:
  parameters:
    AccountId:
      name: account_id
      in: path
      required: true
      example: WVSD33HRMGSZUBM7
      schema:
        $ref: '#/components/schemas/AccountId'
  schemas:
    Conversions_EstimateOnDemandConversionSide:
      description: >-
        One side of an on-demand conversion to estimate. It has the same fields
        as the matching side in Prepare on-demand conversion, without the
        address or account details. Send `bank_account` for a `bank` side and
        `wallet` for a `wallet` side.
      type: object
      additionalProperties: false
      required:
        - symbol
        - type
      properties:
        symbol:
          $ref: '#/components/schemas/AssetSymbol'
          description: Asset of this side.
        type:
          $ref: '#/components/schemas/Conversions_OnDemandConversionSideType'
        amount:
          description: Amount to debit from the source or to deliver to the destination.
          type: string
          minLength: 1
          maxLength: 64
        bank_account:
          $ref: '#/components/schemas/Conversions_EstimateOnDemandConversionVia'
          description: Bank rail of a `bank` side.
        wallet:
          $ref: '#/components/schemas/Conversions_EstimateOnDemandConversionVia'
          description: Network of a `wallet` side.
      allOf:
        - if:
            properties:
              type:
                enum:
                  - bank
          then:
            required:
              - bank_account
          else:
            not:
              required:
                - bank_account
        - if:
            properties:
              type:
                enum:
                  - wallet
          then:
            required:
              - wallet
          else:
            not:
              required:
                - wallet
    Conversions_OnDemandConversionEstimate:
      description: >-
        Indicative result of an on-demand conversion. The final amounts can
        differ.
      type: object
      additionalProperties: false
      required:
        - from
        - to
        - rate
        - fees
      properties:
        from:
          $ref: '#/components/schemas/Conversions_OnDemandConversionEstimateSide'
        to:
          $ref: '#/components/schemas/Conversions_OnDemandConversionEstimateSide'
        rate:
          $ref: '#/components/schemas/Conversions_OnDemandConversionRate'
          description: >-
            Indicative exchange rate. It is not locked and can change before a
            conversion.
        fees:
          $ref: '#/components/schemas/Conversions_OnDemandConversionFees'
          description: >-
            Indicative fees. They are not locked and can change before a
            conversion.
    AccountId:
      description: Globally unique public identifier for an account.
      type: string
      minLength: 14
      maxLength: 42
    AssetSymbol:
      description: Symbol identifying an asset within its asset category.
      type: string
      minLength: 1
      maxLength: 16
    Conversions_OnDemandConversionSideType:
      description: >-
        Where funds come from or go to. `balance` is the account balance, `bank`
        is a bank account, and `wallet` is a crypto address.
      type: string
      enum:
        - balance
        - bank
        - wallet
    Conversions_EstimateOnDemandConversionVia:
      description: Rail or network of an estimated side.
      type: object
      additionalProperties: false
      required:
        - via
      properties:
        via:
          description: >-
            Bank rail, such as `rfp` or `sepa`, or network from the List deposit
            methods `network` field. It has the same values as `via` in Prepare
            on-demand conversion.
          type: string
          minLength: 1
          maxLength: 32
    Conversions_OnDemandConversionEstimateSide:
      description: One side of an estimated on-demand conversion.
      type: object
      additionalProperties: false
      required:
        - symbol
        - type
        - amount
      properties:
        symbol:
          $ref: '#/components/schemas/AssetSymbol'
          description: Asset of this side.
        type:
          $ref: '#/components/schemas/Conversions_OnDemandConversionSideType'
        amount:
          description: Amount debited from the source or delivered to the destination.
          type: string
          minLength: 1
          maxLength: 64
    Conversions_OnDemandConversionRate:
      description: Exchange rate applied to an on-demand conversion.
      type: object
      required:
        - base
        - quote
        - price
      properties:
        base:
          $ref: '#/components/schemas/Conversions_OnDemandConversionRateAsset'
          description: Base asset of the rate pair.
        quote:
          $ref: '#/components/schemas/Conversions_OnDemandConversionRateAsset'
          description: Quote asset of the rate pair.
        price:
          $ref: '#/components/schemas/Price'
          description: Price of one unit of the base asset denominated in the quote asset.
    Conversions_OnDemandConversionFees:
      description: Breakdown of all fees charged for an on-demand conversion.
      type: object
      additionalProperties: false
      required:
        - from
        - trade
        - to
      properties:
        to:
          $ref: '#/components/schemas/Conversions_OnDemandConversionFee'
          description: >-
            Withdrawal or payout fee charged on the destination side of the
            conversion.
        from:
          $ref: '#/components/schemas/Conversions_OnDemandConversionFee'
          description: Funding or deposit fee charged on the source side of the conversion.
        trade:
          $ref: '#/components/schemas/Conversions_OnDemandConversionFee'
          description: Platform conversion fee charged by the trading leg.
    BadRequestError:
      title: Bad Request
      description: Request validation failed or the request could not be processed.
      oneOf:
        - title: Bad Request
          allOf:
            - $ref: '#/components/schemas/PwsValidationErrorEnvelope'
            - type: object
              required:
                - error
              properties:
                error:
                  allOf:
                    - $ref: '#/components/schemas/PwsValidationError'
                    - type: object
                      required:
                        - status
                        - code
                      properties:
                        status:
                          type: integer
                          format: int32
                          const: 400
                        code:
                          type: string
                          enum:
                            - bad_request
        - title: Gateway
          description: >-
            Gateway-level validation failure returned before the request reaches
            the service.
          allOf:
            - $ref: '#/components/schemas/PwsValidationErrorEnvelope'
            - type: object
              required:
                - error
              properties:
                error:
                  allOf:
                    - $ref: '#/components/schemas/PwsValidationError'
                    - type: object
                      required:
                        - status
                        - code
                      properties:
                        type:
                          type: string
                          const: service_error
                        status:
                          type: integer
                          format: int32
                          const: 400
                        code:
                          type: string
                          const: gateway
    UnauthenticatedError:
      title: Unauthenticated
      description: Authentication credentials are missing, invalid, or not accepted.
      oneOf:
        - title: Unauthenticated
          allOf:
            - $ref: '#/components/schemas/PwsGeneralErrorEnvelope'
            - type: object
              required:
                - error
              properties:
                error:
                  allOf:
                    - $ref: '#/components/schemas/PwsGeneralError'
                    - type: object
                      required:
                        - status
                        - code
                      properties:
                        status:
                          type: integer
                          format: int32
                          const: 401
                        code:
                          type: string
                          enum:
                            - unauthenticated
        - title: Gateway
          description: Authentication failure returned by the API gateway.
          allOf:
            - $ref: '#/components/schemas/PwsGeneralErrorEnvelope'
            - type: object
              required:
                - error
              properties:
                error:
                  allOf:
                    - $ref: '#/components/schemas/PwsGeneralError'
                    - type: object
                      required:
                        - status
                        - code
                      properties:
                        type:
                          type: string
                          const: service_error
                        status:
                          type: integer
                          format: int32
                          const: 401
                        code:
                          type: string
                          const: gateway
    ForbiddenError:
      title: Forbidden
      description: The caller is not allowed to perform this operation.
      oneOf:
        - title: Forbidden
          allOf:
            - $ref: '#/components/schemas/PwsGeneralErrorEnvelope'
            - type: object
              required:
                - error
              properties:
                error:
                  allOf:
                    - $ref: '#/components/schemas/PwsGeneralError'
                    - type: object
                      required:
                        - status
                        - code
                      properties:
                        status:
                          type: integer
                          format: int32
                          const: 403
                        code:
                          type: string
                          enum:
                            - forbidden
        - title: Gateway
          description: Authorization failure returned by the API gateway.
          allOf:
            - $ref: '#/components/schemas/PwsGeneralErrorEnvelope'
            - type: object
              required:
                - error
              properties:
                error:
                  allOf:
                    - $ref: '#/components/schemas/PwsGeneralError'
                    - type: object
                      required:
                        - status
                        - code
                      properties:
                        type:
                          type: string
                          const: service_error
                        status:
                          type: integer
                          format: int32
                          const: 403
                        code:
                          type: string
                          const: gateway
    ResourceExhaustedError:
      description: The request was rate limited or a resource quota was exhausted.
      allOf:
        - $ref: '#/components/schemas/PwsGeneralErrorEnvelope'
        - type: object
          required:
            - error
          properties:
            error:
              allOf:
                - $ref: '#/components/schemas/PwsGeneralError'
                - type: object
                  required:
                    - status
                    - code
                  properties:
                    status:
                      type: integer
                      format: int32
                      const: 429
                    code:
                      type: string
                      enum:
                        - resource_exhausted
    InternalError:
      description: An unexpected server-side error occurred.
      allOf:
        - $ref: '#/components/schemas/PwsGeneralErrorEnvelope'
        - type: object
          required:
            - error
          properties:
            error:
              allOf:
                - $ref: '#/components/schemas/PwsGeneralError'
                - type: object
                  required:
                    - status
                    - code
                  properties:
                    status:
                      type: integer
                      format: int32
                      const: 500
                    code:
                      type: string
                      enum:
                        - internal
    UnavailableError:
      description: The service is temporarily unavailable.
      allOf:
        - $ref: '#/components/schemas/PwsGeneralErrorEnvelope'
        - type: object
          required:
            - error
          properties:
            error:
              allOf:
                - $ref: '#/components/schemas/PwsGeneralError'
                - type: object
                  required:
                    - status
                    - code
                  properties:
                    status:
                      type: integer
                      format: int32
                      const: 503
                    code:
                      type: string
                      enum:
                        - unavailable
    DeadlineExceededError:
      description: The request deadline was exceeded before a response could be produced.
      allOf:
        - $ref: '#/components/schemas/PwsGeneralErrorEnvelope'
        - type: object
          required:
            - error
          properties:
            error:
              allOf:
                - $ref: '#/components/schemas/PwsGeneralError'
                - type: object
                  required:
                    - status
                    - code
                  properties:
                    status:
                      type: integer
                      format: int32
                      const: 504
                    code:
                      type: string
                      enum:
                        - deadline_exceeded
    Conversions_OnDemandConversionRateAsset:
      description: Asset in an on-demand conversion rate pair.
      type: object
      required:
        - symbol
      properties:
        symbol:
          description: Asset ticker symbol for the rate pair.
          type: string
    Price:
      description: >-
        Price of one unit of an asset or instrument in the applicable quote
        units.
      type: string
      minLength: 1
      maxLength: 64
      pattern: ^[0-9]+(\.[0-9]+)?$
    Conversions_OnDemandConversionFee:
      description: A single fee charged for an on-demand conversion.
      type: object
      additionalProperties: false
      required:
        - symbol
        - amount
      properties:
        symbol:
          $ref: '#/components/schemas/AssetSymbol'
          description: Asset ticker symbol the fee is denominated in.
        amount:
          description: Fee amount as a decimal string.
          type: string
          minLength: 1
          maxLength: 64
    PwsValidationErrorEnvelope:
      description: Error envelope for request validation failures.
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/PwsValidationError'
          description: Validation error details.
    PwsValidationError:
      description: Standard PWS API error object for request validation failures.
      type: object
      required:
        - type
        - status
        - instance
        - code
      properties:
        type:
          description: Machine-readable error class.
          type: string
        status:
          description: HTTP status code returned for this error.
          type: integer
          format: int32
        instance:
          description: Request identifier for this specific error occurrence.
          type: string
        code:
          description: Stable machine-readable error code.
          type: string
        doc_url:
          description: Optional link to documentation for this error.
          type: string
          format: uri
        causes:
          description: Validation failures that contributed to the error.
          type: array
          items:
            $ref: '#/components/schemas/PwsErrorCause'
    PwsGeneralErrorEnvelope:
      description: Error envelope for operational or domain failures.
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/PwsGeneralError'
          description: General error details.
    PwsGeneralError:
      description: Standard PWS API error object for non-validation failures.
      allOf:
        - $ref: '#/components/schemas/PwsErrorBase'
        - type: object
          properties:
            causes:
              description: Additional error details, when present.
              type: array
              items:
                type: object
                additionalProperties: true
    PwsErrorCause:
      description: A single request validation failure.
      type: object
      required:
        - field
        - message
      properties:
        field:
          description: Dot-notation path to the offending request field.
          type: string
        message:
          description: Human-readable explanation of the failed validation rule.
          type: string
    PwsErrorBase:
      description: Common fields present on every PWS API error object.
      type: object
      required:
        - type
        - status
        - instance
        - code
      properties:
        type:
          description: Machine-readable error class.
          type: string
        status:
          description: HTTP status code returned for this error.
          type: integer
          format: int32
        instance:
          description: Request identifier for this specific error occurrence.
          type: string
        code:
          description: Stable machine-readable error code.
          type: string
        doc_url:
          description: Optional link to documentation for this error.
          type: string
          format: uri
  headers:
    TraceId:
      description: Trace identifier for the request. Include it when contacting support.
      schema:
        type: string
        example: 4bf92f3577b34da6a3ce929d0e0e4736
    StrictTransportSecurity:
      description: Enforces HTTPS for the duration specified by `max-age`.
      schema:
        type: string
        example: max-age=31536000; includeSubDomains; preload
    CacheControl:
      description: Prevents caching of sensitive financial data. Always `no-store`.
      schema:
        type: string
        enum:
          - no-store
        example: no-store
  responses:
    ConversionsBadRequestResponse:
      description: Validation error.
      headers:
        X-Trace-Id:
          $ref: '#/components/headers/TraceId'
        Strict-Transport-Security:
          $ref: '#/components/headers/StrictTransportSecurity'
        Cache-Control:
          $ref: '#/components/headers/CacheControl'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BadRequestError'
          examples:
            invalid-request:
              $ref: '#/components/examples/conversions-bad-request'
    ConversionsUnauthenticatedResponse:
      description: Authentication required.
      headers:
        X-Trace-Id:
          $ref: '#/components/headers/TraceId'
        Strict-Transport-Security:
          $ref: '#/components/headers/StrictTransportSecurity'
        Cache-Control:
          $ref: '#/components/headers/CacheControl'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UnauthenticatedError'
          examples:
            authentication-failed:
              $ref: '#/components/examples/conversions-unauthenticated'
    ConversionsForbiddenResponse:
      description: Forbidden.
      headers:
        X-Trace-Id:
          $ref: '#/components/headers/TraceId'
        Strict-Transport-Security:
          $ref: '#/components/headers/StrictTransportSecurity'
        Cache-Control:
          $ref: '#/components/headers/CacheControl'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ForbiddenError'
          examples:
            caller-is-not-allowed:
              $ref: '#/components/examples/conversions-forbidden'
    ConversionsResourceExhaustedResponse:
      description: Rate limit exceeded.
      headers:
        X-Trace-Id:
          $ref: '#/components/headers/TraceId'
        Strict-Transport-Security:
          $ref: '#/components/headers/StrictTransportSecurity'
        Cache-Control:
          $ref: '#/components/headers/CacheControl'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResourceExhaustedError'
          examples:
            rate-limit-exceeded:
              $ref: '#/components/examples/conversions-resource-exhausted'
    ConversionsInternalResponse:
      description: Internal server error.
      headers:
        X-Trace-Id:
          $ref: '#/components/headers/TraceId'
        Strict-Transport-Security:
          $ref: '#/components/headers/StrictTransportSecurity'
        Cache-Control:
          $ref: '#/components/headers/CacheControl'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/InternalError'
          examples:
            internal-error:
              $ref: '#/components/examples/conversions-internal'
    ConversionsUnavailableResponse:
      description: Service unavailable.
      headers:
        X-Trace-Id:
          $ref: '#/components/headers/TraceId'
        Strict-Transport-Security:
          $ref: '#/components/headers/StrictTransportSecurity'
        Cache-Control:
          $ref: '#/components/headers/CacheControl'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UnavailableError'
          examples:
            service-unavailable:
              $ref: '#/components/examples/conversions-unavailable'
    ConversionsDeadlineExceededResponse:
      description: Request deadline exceeded.
      headers:
        X-Trace-Id:
          $ref: '#/components/headers/TraceId'
        Strict-Transport-Security:
          $ref: '#/components/headers/StrictTransportSecurity'
        Cache-Control:
          $ref: '#/components/headers/CacheControl'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DeadlineExceededError'
          examples:
            request-deadline-exceeded:
              $ref: '#/components/examples/conversions-deadline-exceeded'
  examples:
    conversions-bad-request:
      summary: Invalid request
      value:
        error:
          type: conversions_error
          instance: 5f4d2a8e-91a4-4d6c-8a17-9b1e2c3f4a5b
          status: 400
          code: bad_request
          causes:
            - field: account_id
              message: must be a valid account identifier
    conversions-unauthenticated:
      summary: Authentication failed
      value:
        error:
          type: conversions_error
          instance: 5f4d2a8e-91a4-4d6c-8a17-9b1e2c3f4a5b
          status: 401
          code: unauthenticated
    conversions-forbidden:
      summary: Caller is not allowed
      value:
        error:
          type: conversions_error
          instance: 5f4d2a8e-91a4-4d6c-8a17-9b1e2c3f4a5b
          status: 403
          code: forbidden
    conversions-resource-exhausted:
      summary: Rate limit exceeded
      value:
        error:
          type: conversions_error
          instance: 5f4d2a8e-91a4-4d6c-8a17-9b1e2c3f4a5b
          status: 429
          code: resource_exhausted
    conversions-internal:
      summary: Internal server error
      value:
        error:
          type: conversions_error
          instance: 5f4d2a8e-91a4-4d6c-8a17-9b1e2c3f4a5b
          status: 500
          code: internal
    conversions-unavailable:
      summary: Service unavailable
      value:
        error:
          type: conversions_error
          instance: 5f4d2a8e-91a4-4d6c-8a17-9b1e2c3f4a5b
          status: 503
          code: unavailable
    conversions-deadline-exceeded:
      summary: Request deadline exceeded
      value:
        error:
          type: conversions_error
          instance: 5f4d2a8e-91a4-4d6c-8a17-9b1e2c3f4a5b
          status: 504
          code: deadline_exceeded
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: API-Key
      description: Your public API key. Identifies the partner making the request.
    ApiSign:
      type: apiKey
      in: header
      name: API-Sign
      description: HMAC signature over the request, computed with your private key.
    ApiNonce:
      type: apiKey
      in: header
      name: API-Nonce
      description: Monotonically increasing nonce included in the request signature.

````