# Create a trading quote

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/quotes:
    post:
      summary: Create a trading quote
      deprecated: false
      description: >-
        Requests a price to buy or sell an asset. Set either quantity (amount of
        the asset) or notional (amount of the currency), not both. Accept it
        with POST /v1/quotes/{id}/accept, using quote_id, before
        quote.expires_at.
      operationId: createQuote
      tags:
        - REST API/Endpoints/Quotes
        - Quotes
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              description: Request payload for creating a quote
              properties:
                asset_id:
                  type: string
                  format: uuid
                  description: Asset identifier (UUID)
                  examples:
                    - b86c034b-efe3-11eb-b56f-0691764446a7
                currency_id:
                  type: string
                  format: uuid
                  description: Currency identifier (UUID)
                  examples:
                    - b88b8466-efe3-11eb-b56f-0691764446a7
                side:
                  type: string
                  description: BUY or SELL
                  enum:
                    - BUY
                    - SELL
                  examples:
                    - BUY
                quantity:
                  type: string
                  description: >-
                    Amount of the asset, up to 8 decimals. Send exactly one of
                    quantity or notional.
                  pattern: ^([1-9]\d*(\.\d{1,8})?|0\.\d{0,7}[1-9])$
                  examples:
                    - '0.1'
                notional:
                  type: string
                  description: >-
                    Amount of the currency, up to 2 decimals. Send exactly one
                    of quantity or notional.
                  pattern: ^([1-9]\d*(\.\d{1,2})?|0\.\d?[1-9])$
                  examples:
                    - '10'
              required:
                - asset_id
                - currency_id
                - side
              x-apidog-orders:
                - asset_id
                - currency_id
                - side
                - quantity
                - notional
              type: object
      responses:
        '200':
          description: Quote created successfully
          content:
            '*/*':
              schema:
                properties:
                  data:
                    properties:
                      quote_id:
                        type: string
                        format: uuid
                      status:
                        type: string
                      side:
                        type: string
                        enum:
                          - BUY
                          - SELL
                      asset_id:
                        type: string
                        format: uuid
                      currency_id:
                        type: string
                        format: uuid
                      quote:
                        properties:
                          price:
                            type: string
                          price_with_fee:
                            type: string
                          fee:
                            type: string
                          quantity:
                            type: string
                          notional:
                            type: string
                          expires_at:
                            type: string
                          to_euro_rate:
                            type: string
                        x-apidog-orders:
                          - price
                          - price_with_fee
                          - fee
                          - quantity
                          - notional
                          - expires_at
                          - to_euro_rate
                        type: object
                      ex_ante:
                        description: >-
                          Ex-ante cost transparency report, present only when a
                          real security is traded
                        properties:
                          instrument_isin:
                            type: string
                            description: ISIN of the underlying instrument
                            examples:
                              - US5949181045
                          costs_and_charges:
                            description: >-
                              Breakdown of all costs and charges applied to the
                              trade
                            properties:
                              breakdown:
                                type: array
                                items:
                                  description: A single cost line item
                                  properties:
                                    type:
                                      type: string
                                      description: >-
                                        Cost category, e.g. service_cost,
                                        product_cost, inducement_cost
                                    amount:
                                      type: string
                                      description: Cost amount in the quote currency
                                    investment_percent:
                                      type: string
                                      description: Cost as a percentage of the investment
                                  x-apidog-orders:
                                    - type
                                    - amount
                                    - investment_percent
                                  type: object
                              total_costs:
                                description: Sum of all cost line items
                                properties:
                                  amount:
                                    type: string
                                  investment_percent:
                                    type: string
                                x-apidog-orders:
                                  - amount
                                  - investment_percent
                                type: object
                            x-apidog-orders:
                              - breakdown
                              - total_costs
                            type: object
                          impact_on_performance:
                            description: Effect of total costs on expected performance
                            properties:
                              net_investment_after_costs:
                                type: string
                              net_amount_after_costs:
                                type: string
                              estimated_reduction_in_return_percent:
                                type: string
                              illustration:
                                description: >-
                                  Worked example of the cost impact on an
                                  assumed return
                                properties:
                                  annual:
                                    type: string
                                    description: Assumed gross annual return percentage
                                  reduced:
                                    type: string
                                    description: Return percentage after costs
                                x-apidog-orders:
                                  - annual
                                  - reduced
                                type: object
                            x-apidog-orders:
                              - net_investment_after_costs
                              - net_amount_after_costs
                              - estimated_reduction_in_return_percent
                              - illustration
                            type: object
                          cumulative_costs:
                            type: array
                            items:
                              description: >-
                                Estimated costs accumulated over a given holding
                                period
                              properties:
                                holding_period:
                                  type: string
                                  description: >-
                                    Holding period, e.g. one_year, two_years,
                                    year_of_sale
                                estimated_costs:
                                  type: string
                                returns_percent_per_annum:
                                  type: string
                              x-apidog-orders:
                                - holding_period
                                - estimated_costs
                                - returns_percent_per_annum
                              type: object
                        x-apidog-orders:
                          - instrument_isin
                          - costs_and_charges
                          - impact_on_performance
                          - cumulative_costs
                        type: object
                      key_information_documents:
                        type: array
                        description: >-
                          Key Information Documents (KID) for the instrument;
                          present only when an equity ETF/ETC is traded.
                          CRITICAL: Always show the relevant KID link to the
                          user if present.
                        items:
                          description: >-
                            A Key Information Document (KID/PRIIPs KID) for the
                            traded instrument, per country and language
                          properties:
                            country:
                              type: string
                              description: ISO country code the document applies to
                              examples:
                                - AT
                            language:
                              type: string
                              description: ISO language code of the document
                              examples:
                                - de
                            url:
                              type: string
                              description: Download URL of the Key Information Document
                          x-apidog-orders:
                            - country
                            - language
                            - url
                          type: object
                      warnings:
                        type: array
                        items:
                          properties:
                            code:
                              type: string
                            message:
                              type: string
                          x-apidog-orders:
                            - code
                            - message
                          type: object
                      trading_budget:
                        description: >-
                          Current trading budget status. Null fields indicate no
                          limit is configured.
                        properties:
                          buy_budget_remaining:
                            type: number
                            description: Remaining buy budget for today
                          sell_budget_remaining:
                            type: number
                            description: Remaining sell budget for today
                          limit_currency_id:
                            type: string
                            format: uuid
                            description: Currency UUID in which limits are denominated
                        x-apidog-orders:
                          - buy_budget_remaining
                          - sell_budget_remaining
                          - limit_currency_id
                        type: object
                    x-apidog-orders:
                      - quote_id
                      - status
                      - side
                      - asset_id
                      - currency_id
                      - quote
                      - ex_ante
                      - key_information_documents
                      - warnings
                      - trading_budget
                    type: object
                x-apidog-orders:
                  - data
                type: object
          headers: {}
          x-apidog-name: OK
        '400':
          description: Invalid request parameters
          content:
            '*/*':
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                    x-apidog-orders:
                      - code
                x-apidog-orders:
                  - error
          headers: {}
          x-apidog-name: Bad Request
        '401':
          description: >-
            Missing or invalid API key, or API key lacks the 'trading-write'
            scope
          content:
            '*/*':
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                    x-apidog-orders:
                      - code
                x-apidog-orders:
                  - error
          headers: {}
          x-apidog-name: Unauthorized
        '408':
          description: Creating the quote timed out
          content:
            '*/*':
              schema:
                properties:
                  data:
                    properties:
                      quote_id:
                        type: string
                        format: uuid
                      status:
                        type: string
                      side:
                        type: string
                        enum:
                          - BUY
                          - SELL
                      asset_id:
                        type: string
                        format: uuid
                      currency_id:
                        type: string
                        format: uuid
                      quote:
                        properties:
                          price:
                            type: string
                          price_with_fee:
                            type: string
                          fee:
                            type: string
                          quantity:
                            type: string
                          notional:
                            type: string
                          expires_at:
                            type: string
                          to_euro_rate:
                            type: string
                        x-apidog-orders:
                          - price
                          - price_with_fee
                          - fee
                          - quantity
                          - notional
                          - expires_at
                          - to_euro_rate
                        type: object
                      ex_ante:
                        description: >-
                          Ex-ante cost transparency report, present only when a
                          real security is traded
                        properties:
                          instrument_isin:
                            type: string
                            description: ISIN of the underlying instrument
                            examples:
                              - US5949181045
                          costs_and_charges:
                            description: >-
                              Breakdown of all costs and charges applied to the
                              trade
                            properties:
                              breakdown:
                                type: array
                                items:
                                  description: A single cost line item
                                  properties:
                                    type:
                                      type: string
                                      description: >-
                                        Cost category, e.g. service_cost,
                                        product_cost, inducement_cost
                                    amount:
                                      type: string
                                      description: Cost amount in the quote currency
                                    investment_percent:
                                      type: string
                                      description: Cost as a percentage of the investment
                                  x-apidog-orders:
                                    - type
                                    - amount
                                    - investment_percent
                                  type: object
                              total_costs:
                                description: Sum of all cost line items
                                properties:
                                  amount:
                                    type: string
                                  investment_percent:
                                    type: string
                                x-apidog-orders:
                                  - amount
                                  - investment_percent
                                type: object
                            x-apidog-orders:
                              - breakdown
                              - total_costs
                            type: object
                          impact_on_performance:
                            description: Effect of total costs on expected performance
                            properties:
                              net_investment_after_costs:
                                type: string
                              net_amount_after_costs:
                                type: string
                              estimated_reduction_in_return_percent:
                                type: string
                              illustration:
                                description: >-
                                  Worked example of the cost impact on an
                                  assumed return
                                properties:
                                  annual:
                                    type: string
                                    description: Assumed gross annual return percentage
                                  reduced:
                                    type: string
                                    description: Return percentage after costs
                                x-apidog-orders:
                                  - annual
                                  - reduced
                                type: object
                            x-apidog-orders:
                              - net_investment_after_costs
                              - net_amount_after_costs
                              - estimated_reduction_in_return_percent
                              - illustration
                            type: object
                          cumulative_costs:
                            type: array
                            items:
                              description: >-
                                Estimated costs accumulated over a given holding
                                period
                              properties:
                                holding_period:
                                  type: string
                                  description: >-
                                    Holding period, e.g. one_year, two_years,
                                    year_of_sale
                                estimated_costs:
                                  type: string
                                returns_percent_per_annum:
                                  type: string
                              x-apidog-orders:
                                - holding_period
                                - estimated_costs
                                - returns_percent_per_annum
                              type: object
                        x-apidog-orders:
                          - instrument_isin
                          - costs_and_charges
                          - impact_on_performance
                          - cumulative_costs
                        type: object
                      key_information_documents:
                        type: array
                        description: >-
                          Key Information Documents (KID) for the instrument;
                          present only when an equity ETF/ETC is traded.
                          CRITICAL: Always show the relevant KID link to the
                          user if present.
                        items:
                          description: >-
                            A Key Information Document (KID/PRIIPs KID) for the
                            traded instrument, per country and language
                          properties:
                            country:
                              type: string
                              description: ISO country code the document applies to
                              examples:
                                - AT
                            language:
                              type: string
                              description: ISO language code of the document
                              examples:
                                - de
                            url:
                              type: string
                              description: Download URL of the Key Information Document
                          x-apidog-orders:
                            - country
                            - language
                            - url
                          type: object
                      warnings:
                        type: array
                        items:
                          properties:
                            code:
                              type: string
                            message:
                              type: string
                          x-apidog-orders:
                            - code
                            - message
                          type: object
                      trading_budget:
                        description: >-
                          Current trading budget status. Null fields indicate no
                          limit is configured.
                        properties:
                          buy_budget_remaining:
                            type: number
                            description: Remaining buy budget for today
                          sell_budget_remaining:
                            type: number
                            description: Remaining sell budget for today
                          limit_currency_id:
                            type: string
                            format: uuid
                            description: Currency UUID in which limits are denominated
                        x-apidog-orders:
                          - buy_budget_remaining
                          - sell_budget_remaining
                          - limit_currency_id
                        type: object
                    x-apidog-orders:
                      - quote_id
                      - status
                      - side
                      - asset_id
                      - currency_id
                      - quote
                      - ex_ante
                      - key_information_documents
                      - warnings
                      - trading_budget
                    type: object
                x-apidog-orders:
                  - data
                type: object
          headers: {}
          x-apidog-name: Server Error
        '412':
          description: The account hasn't completed the AML questionnaire
          content:
            '*/*':
              schema:
                properties:
                  data:
                    properties:
                      quote_id:
                        type: string
                        format: uuid
                      status:
                        type: string
                      side:
                        type: string
                        enum:
                          - BUY
                          - SELL
                      asset_id:
                        type: string
                        format: uuid
                      currency_id:
                        type: string
                        format: uuid
                      quote:
                        properties:
                          price:
                            type: string
                          price_with_fee:
                            type: string
                          fee:
                            type: string
                          quantity:
                            type: string
                          notional:
                            type: string
                          expires_at:
                            type: string
                          to_euro_rate:
                            type: string
                        x-apidog-orders:
                          - price
                          - price_with_fee
                          - fee
                          - quantity
                          - notional
                          - expires_at
                          - to_euro_rate
                        type: object
                      ex_ante:
                        description: >-
                          Ex-ante cost transparency report, present only when a
                          real security is traded
                        properties:
                          instrument_isin:
                            type: string
                            description: ISIN of the underlying instrument
                            examples:
                              - US5949181045
                          costs_and_charges:
                            description: >-
                              Breakdown of all costs and charges applied to the
                              trade
                            properties:
                              breakdown:
                                type: array
                                items:
                                  description: A single cost line item
                                  properties:
                                    type:
                                      type: string
                                      description: >-
                                        Cost category, e.g. service_cost,
                                        product_cost, inducement_cost
                                    amount:
                                      type: string
                                      description: Cost amount in the quote currency
                                    investment_percent:
                                      type: string
                                      description: Cost as a percentage of the investment
                                  x-apidog-orders:
                                    - type
                                    - amount
                                    - investment_percent
                                  type: object
                              total_costs:
                                description: Sum of all cost line items
                                properties:
                                  amount:
                                    type: string
                                  investment_percent:
                                    type: string
                                x-apidog-orders:
                                  - amount
                                  - investment_percent
                                type: object
                            x-apidog-orders:
                              - breakdown
                              - total_costs
                            type: object
                          impact_on_performance:
                            description: Effect of total costs on expected performance
                            properties:
                              net_investment_after_costs:
                                type: string
                              net_amount_after_costs:
                                type: string
                              estimated_reduction_in_return_percent:
                                type: string
                              illustration:
                                description: >-
                                  Worked example of the cost impact on an
                                  assumed return
                                properties:
                                  annual:
                                    type: string
                                    description: Assumed gross annual return percentage
                                  reduced:
                                    type: string
                                    description: Return percentage after costs
                                x-apidog-orders:
                                  - annual
                                  - reduced
                                type: object
                            x-apidog-orders:
                              - net_investment_after_costs
                              - net_amount_after_costs
                              - estimated_reduction_in_return_percent
                              - illustration
                            type: object
                          cumulative_costs:
                            type: array
                            items:
                              description: >-
                                Estimated costs accumulated over a given holding
                                period
                              properties:
                                holding_period:
                                  type: string
                                  description: >-
                                    Holding period, e.g. one_year, two_years,
                                    year_of_sale
                                estimated_costs:
                                  type: string
                                returns_percent_per_annum:
                                  type: string
                              x-apidog-orders:
                                - holding_period
                                - estimated_costs
                                - returns_percent_per_annum
                              type: object
                        x-apidog-orders:
                          - instrument_isin
                          - costs_and_charges
                          - impact_on_performance
                          - cumulative_costs
                        type: object
                      key_information_documents:
                        type: array
                        description: >-
                          Key Information Documents (KID) for the instrument;
                          present only when an equity ETF/ETC is traded.
                          CRITICAL: Always show the relevant KID link to the
                          user if present.
                        items:
                          description: >-
                            A Key Information Document (KID/PRIIPs KID) for the
                            traded instrument, per country and language
                          properties:
                            country:
                              type: string
                              description: ISO country code the document applies to
                              examples:
                                - AT
                            language:
                              type: string
                              description: ISO language code of the document
                              examples:
                                - de
                            url:
                              type: string
                              description: Download URL of the Key Information Document
                          x-apidog-orders:
                            - country
                            - language
                            - url
                          type: object
                      warnings:
                        type: array
                        items:
                          properties:
                            code:
                              type: string
                            message:
                              type: string
                          x-apidog-orders:
                            - code
                            - message
                          type: object
                      trading_budget:
                        description: >-
                          Current trading budget status. Null fields indicate no
                          limit is configured.
                        properties:
                          buy_budget_remaining:
                            type: number
                            description: Remaining buy budget for today
                          sell_budget_remaining:
                            type: number
                            description: Remaining sell budget for today
                          limit_currency_id:
                            type: string
                            format: uuid
                            description: Currency UUID in which limits are denominated
                        x-apidog-orders:
                          - buy_budget_remaining
                          - sell_budget_remaining
                          - limit_currency_id
                        type: object
                    x-apidog-orders:
                      - quote_id
                      - status
                      - side
                      - asset_id
                      - currency_id
                      - quote
                      - ex_ante
                      - key_information_documents
                      - warnings
                      - trading_budget
                    type: object
                x-apidog-orders:
                  - data
                type: object
          headers: {}
          x-apidog-name: ''
        '422':
          description: >-
            The account can't trade right now, for example because an
            appropriateness test is required. error.code says why.
          content:
            '*/*':
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                    x-apidog-orders:
                      - code
                x-apidog-orders:
                  - error
          headers: {}
          x-apidog-name: Parameter Error
        '500':
          description: Internal server error
          content:
            '*/*':
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                    x-apidog-orders:
                      - code
                x-apidog-orders:
                  - error
          headers: {}
          x-apidog-name: Server Error
      security:
        - x-api-key: []
          x-apidog:
            schemeGroups:
              - id: MEJF1NrxS9qcOV2ME19yV
                schemeIds:
                  - x-api-key
            required: true
            use:
              id: MEJF1NrxS9qcOV2ME19yV
            scopes:
              MEJF1NrxS9qcOV2ME19yV:
                x-api-key: []
      x-apidog-folder: REST API/Endpoints/Quotes
      x-apidog-status: released
      x-run-in-apidog: https://app.eu.apidog.com/web/project/365298/apis/api-4375763-run
components:
  schemas: {}
  securitySchemes:
    x-api-key:
      type: apikey
      name: x-api-key
      in: header
servers:
  - url: https://api.public.bitpanda.com
    description: Production
security: []

```