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

# Create quote

> Create a quote for a transaction.

export const RestEndpointSubjects = ({subjects = []}) => {
  const subjectToIconMap = {
    'client': 'browser',
    'user:individual': 'user',
    'user:business': 'briefcase'
  };
  if (subjects.length === 0) {
    return null;
  }
  return <>
      {subjects.map(subject => <a key={subject} href="/rest-apis/authentication#subjects" className="border-0 opacity-85 hover:opacity-100 transition-opacity">
          <Badge stroke size="lg" icon={subjectToIconMap[subject]} color="gray" className="mr-1">
            {subject}
          </Badge>
        </a>)}
    </>;
};

<RestEndpointSubjects subjects={["user:individual", "user:business"]} />

## Origin and destination

The `origin` and `destination` objects identify the source and destination of funds respectively for the transaction.

Read more about the [Anatomy of a quote request](/rest-apis/core-api/transactions/introduction) to understand the different types of nodes you can use as origin and destination. Refer to the API spec below to see how each node type is expressed in the request.

## Denomination

The `denomination` object defines what is being moved, how much, and which side of the trade the amount applies to precisely.

* `asset`: The currency or asset in which `amount` is expressed — for example, `GBP`, `USD`, or `BTC`. Does not need to match the asset of either account; Uphold will convert as needed.
* `amount`: The amount to transfer, expressed as a decimal string (e.g. `"100.00"`).
* `target`: Controls which side of the trade receives the exact `amount`:
  * `origin` — Debits exactly `amount` from the origin. Fees are deducted before the destination receives funds.
  * `destination` — Credits exactly `amount` to the destination. Fees are added on top of what is debited from the origin.

#### Example: How target affects fee handling

Consider a trade of 500 GBP to BTC with a 2% fee:

| Target        | Debited from origin        | Credited to destination                      |
| ------------- | -------------------------- | -------------------------------------------- |
| `origin`      | Exactly 500 GBP            | BTC equivalent of 490 GBP (after 10 GBP fee) |
| `destination` | 510 GBP (500 + 10 GBP fee) | BTC equivalent of exactly 500 GBP            |

Use `origin` when you want to control exactly how much leaves the sender. Use `destination` when you want to control exactly how much arrives for the recipient.

For a more comprehensive explanation of the denomination concept, see the [Core Concepts](/rest-apis/core-api/concepts#denomination) page.

## TTL

There are cases in which the default TTL may not be sufficient, such as when you are performing deposits or withdrawals through your own rails (e.g.: your own card processor). In such cases, you want a quote to remain valid for long enough to allow the user to complete the transaction on your side before it expires on our side.

The `ttl` field allows you to extend the validity of the quote to accommodate those cases. When omitted, the platform applies a default TTL based on the transaction type.

<Note>
  This feature must be enabled for your organization. Contact your **Account Manager** to request access and agree on the maximum allowed TTL.
</Note>

The `expiresAt` field in the response indicates the exact time when the quote will expire, which takes into account the default TTL or the custom `ttl` provided in the request. Use this field to drive quote refresh logic in your UI — schedule the **next refresh slightly before this time** (e.g. a few seconds earlier) to account for network and infrastructure latency, ensuring the user always sees a valid quote.


## OpenAPI

````yaml _media/specs/core-openapi.mintlify.json post /core/transactions/quote
openapi: 3.1.0
info:
  version: 0.1.0
  title: Core API
  description: >-
    The Core API provides essential building blocks that empower businesses to
    embed financial services into their applications.
  contact:
    name: Uphold API Team
    email: developers@uphold.com
    url: https://developer.uphold.com
servers:
  - url: https://api.enterprise.sandbox.uphold.com
    description: Sandbox
  - url: https://api.enterprise.uphold.com
    description: Production
security:
  - OAuth2: []
tags:
  - name: Authentication
    description: Authentication.
  - name: Countries
    description: Countries.
  - name: Users
    description: Users.
  - name: KYC
    description: Individual User's KYC.
  - name: KYB
    description: Business User's KYB.
  - name: Capabilities
    description: User capabilities.
  - name: Terms of service
    description: User terms of service.
  - name: Files
    description: Files.
  - name: Assets
    description: Assets, networks and rails.
  - name: Accounts
    description: Accounts.
  - name: External accounts
    description: External accounts.
  - name: Transactions
    description: Transactions.
  - name: Portfolio
    description: Portfolio.
  - name: Statements
    description: Statements.
  - name: Metadata
    description: Metadata.
  - name: Webhooks
    description: Webhooks.
paths:
  /core/transactions/quote:
    post:
      tags:
        - Transactions
      summary: Create quote
      description: Create a quote for a transaction.
      operationId: core.create-quote
      requestBody:
        $ref: '#/components/requestBodies/create-quote-request-body'
      responses:
        '201':
          $ref: '#/components/responses/create-quote-response'
        '404':
          $ref: '#/components/responses/create-quote-not-found-response'
        '409':
          $ref: '#/components/responses/create-quote-conflict-response'
      security:
        - OAuth2:
            - core.transactions:create
components:
  requestBodies:
    create-quote-request-body:
      content:
        application/json:
          schema:
            type: object
            properties:
              origin:
                $ref: '#/components/schemas/create-quote-origin-node'
              destination:
                $ref: '#/components/schemas/create-quote-destination-node'
              denomination:
                type: object
                properties:
                  asset:
                    description: The asset in which the transaction is denominated.
                    type: string
                  amount:
                    description: The amount of the transaction.
                    type: string
                    pattern: ^\d+(\.\d+)?$
                  target:
                    description: >-
                      Whether this exact amount should be paid by the origin or
                      received by the destination.
                    type: string
                    enum:
                      - origin
                      - destination
                    default: origin
                required:
                  - asset
                  - amount
              ttl:
                description: The time-to-live for the quote in milliseconds.
                type: integer
                minimum: 1
            required:
              - origin
              - destination
              - denomination
          examples:
            Trade - Buy 100£ of BTC using GBP:
              value:
                origin:
                  type: account
                  id: b98e4f0d-a67d-4126-a99d-666f7e0315d9
                destination:
                  type: account
                  id: 555a99a1-620d-4431-a0ac-b43e1aad2bdc
                denomination:
                  asset: GBP
                  amount: '100.00'
                  target: origin
            Trade - Buy 100£ worth of ETH using BTC:
              value:
                origin:
                  type: account
                  id: 555a99a1-620d-4431-a0ac-b43e1aad2bdc
                destination:
                  type: account
                  id: 38778db4-7ad5-4353-88b8-07e93eb1e02e
                denomination:
                  asset: GBP
                  amount: '100.00'
                  target: origin
            Trade - Sell ETH to buy exactly 0.001 BTC:
              value:
                origin:
                  type: account
                  id: 38778db4-7ad5-4353-88b8-07e93eb1e02e
                destination:
                  type: account
                  id: 555a99a1-620d-4431-a0ac-b43e1aad2bdc
                denomination:
                  asset: BTC
                  amount: '0.001'
                  target: destination
            Deposit - 50£ from an external account:
              value:
                origin:
                  type: external-account
                  id: 555a99a1-620d-4431-a0ac-b43e1aad2bdc
                destination:
                  type: account
                  id: 38778db4-7ad5-4353-88b8-07e93eb1e02e
                denomination:
                  asset: GBP
                  amount: '50.00'
                  target: origin
            Withdraw - 50£ to an external account:
              value:
                origin:
                  type: account
                  id: 38778db4-7ad5-4353-88b8-07e93eb1e02e
                destination:
                  type: external-account
                  id: 555a99a1-620d-4431-a0ac-b43e1aad2bdc
                denomination:
                  asset: GBP
                  amount: '50.00'
                  target: origin
            Withdraw - 100£ to a crypto address:
              value:
                origin:
                  type: account
                  id: 555a99a1-620d-4431-a0ac-b43e1aad2bdc
                destination:
                  type: crypto-address
                  asset: BTC
                  network: bitcoin
                  address: 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
                denomination:
                  asset: GBP
                  amount: '100.00'
                  target: origin
  responses:
    create-quote-response:
      description: Quote created.
      content:
        application/json:
          schema:
            type: object
            properties:
              quote:
                $ref: '#/components/schemas/quote'
            required:
              - quote
          examples:
            Trade Quote Created:
              value:
                quote:
                  id: 623000c8-9bdf-4a2b-aa3d-6a6b44a7f6a0
                  origin:
                    amount: '100.00'
                    asset: GBP
                    rate: '47619.04761904762'
                    node:
                      type: account
                      id: b98e4f0d-a67d-4126-a99d-666f7e0315d9
                      ownerId: e4ce04dc-67b7-4e9f-af91-482cb6f9fc4a
                  destination:
                    amount: '0.0021'
                    asset: BTC
                    rate: '0.000021'
                    node:
                      type: account
                      id: 555a99a1-620d-4431-a0ac-b43e1aad2bdc
                      ownerId: e4ce04dc-67b7-4e9f-af91-482cb6f9fc4a
                  denomination:
                    amount: '100.00'
                    asset: GBP
                    target: origin
                    rate: '1'
                  fees: []
                  requirements: []
                  expiresAt: '2024-07-24T15:22:39.000Z'
            Deposit To External Account Quote Created:
              value:
                quote:
                  id: 623000c8-9bdf-4a2b-aa3d-6a6b44a7f6a0
                  origin:
                    amount: '100.00'
                    asset: GBP
                    rate: '47619.04761904762'
                    node:
                      type: external-account
                      id: b98e4f0d-a67d-4126-a99d-666f7e0315d9
                      ownerId: e4ce04dc-67b7-4e9f-af91-482cb6f9fc4a
                  destination:
                    amount: '0.0021'
                    asset: BTC
                    rate: '0.000021'
                    node:
                      type: account
                      id: 555a99a1-620d-4431-a0ac-b43e1aad2bdc
                      ownerId: e4ce04dc-67b7-4e9f-af91-482cb6f9fc4a
                  denomination:
                    amount: '100.00'
                    asset: GBP
                    target: origin
                    rate: '1'
                  fees: []
                  requirements: []
                  expiresAt: '2024-07-24T15:22:39.000Z'
            Withdrawal To External Account Quote Created:
              value:
                quote:
                  id: 623000c8-9bdf-4a2b-aa3d-6a6b44a7f6a0
                  origin:
                    amount: '100.00'
                    asset: GBP
                    rate: '47619.04761904762'
                    node:
                      type: account
                      id: b98e4f0d-a67d-4126-a99d-666f7e0315d9
                      ownerId: e4ce04dc-67b7-4e9f-af91-482cb6f9fc4a
                  destination:
                    amount: '0.0021'
                    asset: BTC
                    rate: '0.000021'
                    node:
                      type: external-account
                      id: 555a99a1-620d-4431-a0ac-b43e1aad2bdc
                      ownerId: e4ce04dc-67b7-4e9f-af91-482cb6f9fc4a
                  denomination:
                    amount: '100.00'
                    asset: GBP
                    target: origin
                    rate: '1'
                  fees: []
                  requirements: []
                  expiresAt: '2024-07-24T15:22:39.000Z'
            Withdrawal to Crypto Address Quote Created (On-chain):
              value:
                quote:
                  id: 623000c8-9bdf-4a2b-aa3d-6a6b44a7f6a0
                  origin:
                    amount: '0.00121023'
                    asset: BTC
                    rate: '0.00002629253259492961'
                    node:
                      type: account
                      id: b98e4f0d-a67d-4126-a99d-666f7e0315d9
                      ownerId: e4ce04dc-67b7-4e9f-af91-482cb6f9fc4a
                  destination:
                    amount: '0.00121023'
                    asset: BTC
                    rate: '1'
                    node:
                      type: crypto-address
                      address: 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
                      network: bitcoin
                      execution:
                        mode: onchain
                  denomination:
                    amount: '100.00'
                    asset: GBP
                    target: origin
                    rate: '0.00001210225938333485'
                  fees: []
                  requirements: []
                  expiresAt: '2024-07-24T15:22:39.000Z'
            Withdrawal to Crypto Address Quote Created (Off-chain):
              value:
                quote:
                  id: 623000c8-9bdf-4a2b-aa3d-6a6b44a7f6a0
                  origin:
                    amount: '0.00121023'
                    asset: BTC
                    rate: '0.00002629253259492961'
                    node:
                      type: account
                      id: b98e4f0d-a67d-4126-a99d-666f7e0315d9
                      ownerId: e4ce04dc-67b7-4e9f-af91-482cb6f9fc4a
                  destination:
                    amount: '0.00121023'
                    asset: BTC
                    rate: '1'
                    node:
                      type: crypto-address
                      address: 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
                      network: bitcoin
                      execution:
                        mode: offchain
                        accountId: d4c0dabb-79f1-4aec-9850-8bd6981275d5
                        accountOwnerId: 459762a5-fab0-43d1-9b55-1c92135779f9
                  denomination:
                    amount: '100.00'
                    asset: GBP
                    target: origin
                    rate: '0.00001210225938333485'
                  fees: []
                  requirements: []
                  expiresAt: '2024-07-24T15:22:39.000Z'
            Withdrawal to Crypto Address Quote Created (Simulated):
              value:
                quote:
                  id: 623000c8-9bdf-4a2b-aa3d-6a6b44a7f6a0
                  origin:
                    amount: '0.00121023'
                    asset: BTC
                    rate: '0.00002629253259492961'
                    node:
                      type: account
                      id: b98e4f0d-a67d-4126-a99d-666f7e0315d9
                      ownerId: e4ce04dc-67b7-4e9f-af91-482cb6f9fc4a
                  destination:
                    amount: '0.00121023'
                    asset: BTC
                    rate: '1'
                    node:
                      type: crypto-address
                      address: 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
                      network: bitcoin
                      execution:
                        mode: simulated
                  denomination:
                    amount: '100.00'
                    asset: GBP
                    target: origin
                    rate: '0.00001210225938333485'
                  fees: []
                  requirements: []
                  expiresAt: '2024-07-24T15:22:39.000Z'
            Withdrawal Quote with Travel Rule:
              value:
                quote:
                  id: 623000c8-9bdf-4a2b-aa3d-6a6b44a7f6a0
                  origin:
                    amount: '0.00121023'
                    asset: BTC
                    rate: '0.00002629253259492961'
                    node:
                      type: account
                      id: b98e4f0d-a67d-4126-a99d-666f7e0315d9
                      ownerId: e4ce04dc-67b7-4e9f-af91-482cb6f9fc4a
                  destination:
                    amount: '0.00121023'
                    asset: BTC
                    rate: '1'
                    node:
                      type: crypto-address
                      address: 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
                      network: bitcoin
                  denomination:
                    amount: '100.00'
                    asset: GBP
                    target: origin
                    rate: '0.00001210225938333485'
                  fees: []
                  requirements:
                    - travel-rule
                  expiresAt: '2024-07-24T15:22:39.000Z'
      headers:
        x-uphold-request-id:
          description: >-
            A unique identifier for the request that can be shared with Uphold
            for troubleshooting purposes.
          required: true
          schema:
            type: string
            format: uuid
          examples:
            Request ID:
              value: 9092ee4d-f0fb-42e9-8787-b668dbcec531
    create-quote-not-found-response:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          examples:
            Denomination Asset Not Found:
              value:
                code: entity_not_found
                message: The denomination asset cannot be found
                details:
                  entity: asset
                  context: body
                  property: denomination.asset
            Origin Not Found:
              value:
                code: entity_not_found
                message: The origin cannot be found
                details:
                  entity: account
                  context: body
                  property: origin
            Destination Not Found:
              value:
                code: entity_not_found
                message: The destination cannot be found
                details:
                  entity: account
                  context: body
                  property: destination
            Rail For Destination Asset And Network Not Found:
              value:
                code: entity_not_found
                message: >-
                  A rail for the specified destination asset and network cannot
                  be found
                details:
                  entity: rail
                  context: body
                  property: destination
      headers:
        x-uphold-request-id:
          description: >-
            A unique identifier for the request that can be shared with Uphold
            for troubleshooting purposes.
          required: true
          schema:
            type: string
            format: uuid
          examples:
            Request ID:
              value: 9092ee4d-f0fb-42e9-8787-b668dbcec531
    create-quote-conflict-response:
      description: Business logic error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          examples:
            Origin Asset Missing Sell Feature:
              value:
                code: asset_feature_not_available
                message: The 'sell' feature is not available for the origin asset
                details:
                  context: body
                  property: origin
                  feature: sell
            Destination Asset Missing Buy Feature:
              value:
                code: asset_feature_not_available
                message: The 'buy' feature is not available for the destination asset
                details:
                  context: body
                  property: destination
                  feature: buy
            Transaction Node Invalid:
              value:
                code: transaction_node_invalid
                message: The origin node is invalid
            Destination External Account Missing Withdraw Feature:
              value:
                code: transaction_node_invalid
                message: The destination external account lacks 'withdraw' feature
            Destination External Account Network Not Supported:
              value:
                code: transaction_node_invalid
                message: >-
                  The destination external account does not support the
                  specified network
            Crypto Address Invalid:
              value:
                code: crypto_address_invalid
                message: The crypto address is invalid
                details:
                  context: body
                  property: destination.address
            Crypto Address Reference Missing:
              value:
                code: crypto_address_invalid
                message: The crypto address reference is missing
                details:
                  context: body
                  property: destination.reference
            Crypto Address Reference Invalid:
              value:
                code: crypto_address_invalid
                message: The crypto address reference is invalid
                details:
                  context: body
                  property: destination.reference
            Amount Maximum Limit Exceeded:
              value:
                code: transaction_amount_invalid
                message: The amount maximum limit was exceeded
                details:
                  context: body
                  property: denomination
                  rule: maximum-limit-exceeded
                  limit:
                    maximumAmount: 150
            Amount Minimum Limit Not Met:
              value:
                code: transaction_amount_invalid
                message: The amount minimum limit was not met
                details:
                  context: body
                  property: denomination
                  rule: minimum-limit-not-met
                  limit:
                    minimumAmount: 0.85
            Amount Not Available Due To Unsettled Funds:
              value:
                code: transaction_amount_invalid
                message: The amount is invalid due to unsettled funds
                details:
                  context: body
                  property: denomination
                  rule: transacting-unsettled-funds
                  unsettledFunds:
                    settlementAt: '2024-07-26T13:00:00.000Z'
                    shortfallAmount: '0.95'
                    reasons:
                      - pending-ach-deposit-settlement
            User Capability Failure:
              value:
                code: user_capability_failure
                message: The user has capability constraints
                details:
                  capability:
                    code: trades
                    requirements:
                      - user-must-submit-identity
                    restrictions: []
            Node Type Not Configured For Organization:
              value:
                code: operation_not_allowed
                message: >-
                  Destination node type 'crypto-address' is not configured for
                  your organization
                details:
                  reasons:
                    - permission-denied
            Changing TTL Not Allowed For Organization:
              value:
                code: operation_not_allowed
                message: Changing the ttl is not allowed for your organization
                details:
                  reasons:
                    - permission-denied
            TTL Not Within Allowed Range:
              value:
                code: number_invalid
                message: The number must be greater than or equal to 18000
                details:
                  context: body
                  property: ttl
                  rule: greater-than-or-equal-to-threshold
                  threshold:
                    limit: 18000
            Amount Exceeds Periodic Limit:
              value:
                code: transaction_amount_invalid
                message: The amount exceeds the daily limit
                details:
                  context: body
                  property: denomination
                  rule: amount-exceeds-daily-limit
                  limit:
                    maximumAmount: '100.00'
                    remainingAmount: '80.00'
            Unspecified Error:
              value:
                code: operation_not_allowed
                message: Transaction not allowed due to an unspecified error
                details:
                  reasons:
                    - unspecified-error
      headers:
        x-uphold-request-id:
          description: >-
            A unique identifier for the request that can be shared with Uphold
            for troubleshooting purposes.
          required: true
          schema:
            type: string
            format: uuid
          examples:
            Request ID:
              value: 9092ee4d-f0fb-42e9-8787-b668dbcec531
  schemas:
    create-quote-origin-node:
      type: object
      discriminator:
        propertyName: type
        mapping:
          account:
            $ref: '#/components/schemas/create-quote-node-account'
          external-account:
            $ref: '#/components/schemas/create-quote-node-external-account'
      oneOf:
        - $ref: '#/components/schemas/create-quote-node-account'
          title: Account
        - $ref: '#/components/schemas/create-quote-node-external-account'
          title: External account
      required:
        - type
    create-quote-destination-node:
      type: object
      discriminator:
        propertyName: type
        mapping:
          account:
            $ref: '#/components/schemas/create-quote-node-account'
          external-account:
            $ref: '#/components/schemas/create-quote-node-external-account'
          crypto-address:
            $ref: '#/components/schemas/create-quote-node-crypto-address'
      oneOf:
        - $ref: '#/components/schemas/create-quote-node-account'
          title: Account
        - $ref: '#/components/schemas/create-quote-node-external-account'
          title: External account
        - $ref: '#/components/schemas/create-quote-node-crypto-address'
          title: Crypto address
      required:
        - type
    quote:
      type: object
      properties:
        id:
          description: The id of the quote.
          type: string
          format: uuid
        origin:
          $ref: '#/components/schemas/quote-origin-endpoint'
          description: The origin of the quote.
        destination:
          $ref: '#/components/schemas/quote-destination-endpoint'
          description: The destination of the quote.
        denomination:
          $ref: '#/components/schemas/transaction-denomination'
          description: The denomination of the quote.
        fees:
          $ref: '#/components/schemas/transaction-fees'
          description: The fees of the quote.
        requirements:
          $ref: '#/components/schemas/quote-requirements'
          description: >-
            The requirements the user must address when attempting to create the
            transaction with this quote.
        expiresAt:
          description: The time at which the quote expires.
          type: string
          format: date-time
      required:
        - id
        - origin
        - destination
        - denomination
        - fees
        - requirements
        - expiresAt
    error:
      description: The error information.
      type: object
      properties:
        code:
          description: >-
            A short string with a brief explanation about the error code
            reported.
          type: string
        message:
          description: A human-readable message providing more details about the error.
          type: string
        details:
          description: Additional information about the error reported.
          type: object
          additionalProperties: true
      required:
        - code
        - message
    create-quote-node-account:
      type: object
      properties:
        type:
          description: The type of the node.
          type: string
          enum:
            - account
        id:
          description: The account id.
          type: string
          format: uuid
      required:
        - type
        - id
    create-quote-node-external-account:
      type: object
      properties:
        type:
          description: The type of the node.
          type: string
          enum:
            - external-account
        id:
          description: The external account id.
          type: string
          format: uuid
        network:
          allOf:
            - $ref: '#/components/schemas/string-no-edge-spaces'
            - description: The network used for the transaction with the external account.
      required:
        - type
        - id
    create-quote-node-crypto-address:
      type: object
      properties:
        type:
          description: The type of the node.
          type: string
          enum:
            - crypto-address
        asset:
          allOf:
            - $ref: '#/components/schemas/string-no-edge-spaces'
            - description: The asset to be used in the operation.
        network:
          allOf:
            - $ref: '#/components/schemas/string-no-edge-spaces'
            - description: The network that the crypto address is on.
        address:
          allOf:
            - $ref: '#/components/schemas/string-no-edge-spaces'
            - description: The crypto address.
        reference:
          allOf:
            - $ref: '#/components/schemas/string-no-edge-spaces'
            - description: >-
                The additional identifier (e.g., destination tag, memo, or
                message) required for some networks such as XRP (Ripple), XLM
                (Stellar), EOS, and others. If the network does not require a
                tag, this field can be omitted.
      required:
        - type
        - asset
        - network
        - address
    quote-origin-endpoint:
      type: object
      properties:
        asset:
          description: The asset of the endpoint.
          type: string
        amount:
          description: The amount of the endpoint.
          type: string
        rate:
          description: >-
            The rate of the endpoint against its counter-part (origin to
            destination and vice-versa).
          type: string
        node:
          $ref: '#/components/schemas/quote-origin-node'
          description: The node of the endpoint.
      required:
        - asset
        - amount
        - rate
        - node
    quote-destination-endpoint:
      type: object
      properties:
        asset:
          description: The asset of the endpoint.
          type: string
        amount:
          description: The amount of the endpoint.
          type: string
        rate:
          description: >-
            The rate of the endpoint against its counter-part (origin to
            destination and vice-versa).
          type: string
        node:
          $ref: '#/components/schemas/quote-destination-node'
          description: The node of the endpoint.
      required:
        - asset
        - amount
        - rate
        - node
    transaction-denomination:
      type: object
      properties:
        asset:
          description: The asset in which the transaction is denominated.
          type: string
        amount:
          description: The amount of the transaction.
          type: string
        rate:
          description: The rate against the specified target (origin or destination).
          type: string
        target:
          description: >-
            Whether this exact amount should be paid by the origin or received
            by the destination.
          type: string
          enum:
            - origin
            - destination
      required:
        - asset
        - amount
        - rate
        - target
    transaction-fees:
      type: array
      items:
        type: object
        properties:
          type:
            description: The type of the fee.
            type: string
            enum:
              - deposit
              - exchange
              - network
              - withdrawal
          code:
            description: The code of the fee.
            type: string
          asset:
            description: The asset in which the fee is denominated.
            type: string
          amount:
            description: The amount of the fee.
            type: string
          percentage:
            description: >-
              The percentage of the fee, if the amount was calculated from a
              percentage.
            type: string
        required:
          - type
          - code
          - asset
          - amount
    quote-requirements:
      type: array
      items:
        type: string
        enum:
          - travel-rule
    string-no-edge-spaces:
      type: string
      pattern: ^\S.*\S$|^\S$
    quote-origin-node:
      type: object
      discriminator:
        propertyName: type
        mapping:
          account:
            $ref: '#/components/schemas/transaction-node-account'
          external-account:
            $ref: '#/components/schemas/transaction-node-external-account'
          bank-address:
            $ref: '#/components/schemas/transaction-node-bank-address'
          crypto-address:
            $ref: '#/components/schemas/transaction-node-crypto-address'
      oneOf:
        - $ref: '#/components/schemas/transaction-node-account'
          title: Account
        - $ref: '#/components/schemas/transaction-node-external-account'
          title: External account
    quote-destination-node:
      type: object
      discriminator:
        propertyName: type
        mapping:
          account:
            $ref: '#/components/schemas/transaction-node-account'
          external-account:
            $ref: '#/components/schemas/transaction-node-external-account'
          crypto-address:
            $ref: '#/components/schemas/transaction-node-crypto-address'
      oneOf:
        - $ref: '#/components/schemas/transaction-node-account'
          title: Account
        - $ref: '#/components/schemas/transaction-node-external-account'
          title: External account
        - $ref: '#/components/schemas/transaction-node-crypto-address'
          title: Crypto address
    transaction-node-account:
      type: object
      properties:
        type:
          description: The type of the node.
          type: string
          enum:
            - account
        id:
          description: The account id.
          type: string
          format: uuid
        ownerId:
          description: The id of the user that owns the account.
          type: string
          format: uuid
      required:
        - type
        - id
        - ownerId
    transaction-node-external-account:
      type: object
      properties:
        type:
          description: The type of the node.
          type: string
          enum:
            - external-account
        id:
          description: The external account id.
          type: string
          format: uuid
        confirmationUrl:
          description: >-
            The URL to confirm the authorization using the external account
            (e.g., 3DS).
          type: string
          format: uri
        ownerId:
          description: The id of the user that owns the external account.
          type: string
          format: uuid
        network:
          description: The network used for the transaction with the external account.
          type: string
      required:
        - type
        - id
        - ownerId
    transaction-node-bank-address:
      type: object
      properties:
        type:
          description: The type of the node.
          type: string
          enum:
            - bank-address
        network:
          description: The network of the bank transfer.
          type: string
      required:
        - type
        - network
    transaction-node-crypto-address:
      type: object
      properties:
        type:
          description: The type of the node.
          type: string
          enum:
            - crypto-address
        network:
          $ref: '#/components/schemas/string-no-edge-spaces'
          description: The network that the crypto address is on.
        address:
          $ref: '#/components/schemas/string-no-edge-spaces'
          description: The crypto address (may not be available for deposits).
        reference:
          description: >-
            The additional identifier (e.g., destination tag, memo, or message)
            for the crypto address.
          type: string
        execution:
          $ref: '#/components/schemas/transaction-node-crypto-address-execution'
          description: The execution details for the transaction.
      required:
        - type
        - network
    transaction-node-crypto-address-execution:
      type: object
      discriminator:
        propertyName: mode
        mapping:
          onchain:
            $ref: >-
              #/components/schemas/transaction-node-crypto-address-execution-onchain
          offchain:
            $ref: >-
              #/components/schemas/transaction-node-crypto-address-execution-offchain
          simulated:
            $ref: >-
              #/components/schemas/transaction-node-crypto-address-execution-simulated
      oneOf:
        - $ref: >-
            #/components/schemas/transaction-node-crypto-address-execution-onchain
          title: On-chain
        - $ref: >-
            #/components/schemas/transaction-node-crypto-address-execution-offchain
          title: Off-chain
        - $ref: >-
            #/components/schemas/transaction-node-crypto-address-execution-simulated
          title: Simulated
    transaction-node-crypto-address-execution-onchain:
      type: object
      properties:
        mode:
          description: The mode of execution.
          type: string
          enum:
            - onchain
        transactionHash:
          $ref: '#/components/schemas/string-no-edge-spaces'
          description: The hash of the transaction in the blockchain.
      required:
        - mode
    transaction-node-crypto-address-execution-offchain:
      type: object
      properties:
        mode:
          description: The mode of execution.
          type: string
          enum:
            - offchain
        accountId:
          description: The account id to which the off-chain transaction was made.
          type: string
          format: uuid
        accountOwnerId:
          description: >-
            The id of the user that owns the account to which the off-chain
            transaction was made.
          type: string
          format: uuid
      required:
        - mode
    transaction-node-crypto-address-execution-simulated:
      type: object
      properties:
        mode:
          description: The mode of execution.
          type: string
          enum:
            - simulated
        transactionHash:
          $ref: '#/components/schemas/string-no-edge-spaces'
          description: The simulated transaction hash.
      required:
        - mode
  securitySchemes:
    OAuth2:
      type: oauth2
      description: OAuth 2.0 authentication.
      flows:
        clientCredentials:
          tokenUrl: /core/oauth2/token
          scopes:
            core.users:act-on-behalf-of: Grants access to act on behalf of a user
            core.users:create: Grants access to create users
            core.users:read: Grants access to view users
            core.users:delete: Grants access to delete users
            core.users.metadata:read: Grants access to view user metadata
            core.users.metadata:write: Grants access to modify user metadata
            core.kyc:read: Grants access to view KYC processes
            core.kyc.profile:update: Grants access to update profile KYC process
            core.kyc.address:update: Grants access to update address KYC process
            core.kyc.email:update: Grants access to update email KYC process
            core.kyc.phone:update: Grants access to update phone KYC process
            core.kyc.identity:update: Grants access to update identity KYC process
            core.kyc.proof-of-address:update: Grants access to update proof-of-address KYC process
            core.kyc.customer-due-diligence:update: Grants access to update customer due diligence KYC process
            core.kyc.enhanced-due-diligence:update: Grants access to update enhanced due diligence KYC process
            core.kyc.crypto-risk-assessment:update: Grants access to update crypto risk assessment KYC process
            core.kyc.self-categorization-statement:update: Grants access to update self-categorization statement KYC process
            core.kyc.tax-details:update: Grants access to update tax details KYC process
            core.capabilities:read: Grants access to view user capabilities
            core.terms-of-service:read: Grants access to view terms of service
            core.terms-of-service:accept: Grants access to accept terms of service
            core.files:create: Grants access to create files
            core.files:read: Grants access to view files
            core.files.metadata:read: Grants access to view files metadata
            core.files.metadata:write: Grants access to modify files metadata
            core.accounts:create: Grants access to create accounts
            core.accounts:read: Grants access to view accounts
            core.accounts:update: Grants access to update accounts
            core.accounts:archive: Grants access to archive accounts
            core.accounts:deposit-method: >-
              Grants access to deposit method needed for depositing into
              accounts
            core.accounts:use-test-helpers: Grants access to test helpers of accounts
            core.accounts.metadata:read: Grants access to view accounts metadata
            core.accounts.metadata:write: Grants access to modify accounts metadata
            core.assets:use-test-helpers: Grants access to test helpers of assets
            core.external-accounts:create: Grants access to create external accounts
            core.external-accounts:read: Grants access to view external accounts
            core.external-accounts:update: Grants access to update external accounts
            core.external-accounts:delete: Grants access to delete external accounts
            core.external-accounts.metadata:read: Grants access to view external accounts metadata
            core.external-accounts.metadata:write: Grants access to modify external accounts metadata
            core.transactions:create: Grants access to commit quotes
            core.transactions:read: Grants access to view transactions
            core.transactions.metadata:read: Grants access to view transactions metadata
            core.transactions.metadata:write: Grants access to modify transactions metadata
            core.transactions.requests-for-information:read: Grants access to view transactions requests for information
            core.transactions.requests-for-information:update: Grants access to update transactions requests for information
            core.portfolio:read: >-
              Grants access to view portfolio overview, performance, and
              historical balance
            core.statements:read: Grants access to read statements
            core.webhooks:management-link: Grants access to create webhook management links

````