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

# Retrieve prices

> Retrieve the price for the requested symbols as-of the given datetime, which defaults to now.



## OpenAPI

````yaml https://api.engine.usesophic.com/openapi.json get /prices
openapi: 3.1.0
info:
  title: Sophic Engine API
  version: 0.1.0
servers:
  - url: https://api.engine.usesophic.com/
security: []
paths:
  /prices:
    get:
      summary: Retrieve prices
      description: >-
        Retrieve the price for the requested symbols as-of the given datetime,
        which defaults to now.
      operationId: list_prices_prices_get
      parameters:
        - name: symbol
          in: query
          required: true
          schema:
            type: array
            items:
              type: string
            description: Return prices for the given symbols.
            title: Symbol
          description: Return prices for the given symbols.
        - name: asof
          in: query
          required: false
          schema:
            description: Return prices as-of the given datetime. Defaults to now.
            x-remove-null-from-type-union: true
            title: Asof
            type: string
            format: date-time
          description: Return prices as-of the given datetime. Defaults to now.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Price'
                title: Response List Prices Prices Get
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - HTTPBearer: []
components:
  schemas:
    Price:
      properties:
        symbol:
          type: string
          title: Symbol
          description: The instrument symbol i.e ISIN or ticker.
        price_type:
          allOf:
            - $ref: '#/components/schemas/PriceType'
          description: >-
            The type of price (e.g. percentage or monetary). Percentage prices
            are expressed as a percentage of par (and apply to fixed-income
            instruments), while monetary prices are expressed as a monetary
            value.
        quality:
          allOf:
            - $ref: '#/components/schemas/PriceQuality'
          description: The quality of the price (e.g. closing, delayed, realtime).
        currency:
          allOf:
            - $ref: '#/components/schemas/Currency'
          description: >-
            The currency of the price. This is specified for percentage prices
            as well, and reflects the trading currency of the instrument. For
            currency pairs, this is the base currency.
        bid:
          type: string
          title: Bid
          description: The bid (buy) price at the specific point in time.
        ask:
          type: string
          title: Ask
          description: The ask (sell) price at the specific point in time.
        mid:
          anyOf:
            - type: string
            - type: 'null'
          title: Mid
          description: The mid-price (bid + ask / 2).
        dirty_bid:
          anyOf:
            - type: string
            - type: 'null'
          title: Dirty Bid
          description: >-
            Gross (dirty) bid for fixed-income instruments: full settlement cash
            price including accrued interest, in the same units as bid
            (typically % of par). Set when the vendor publishes dirty quotes
            alongside clean bid/ask/mid; otherwise null.
        dirty_ask:
          anyOf:
            - type: string
            - type: 'null'
          title: Dirty Ask
          description: >-
            Gross (dirty) ask for fixed-income instruments: full settlement cash
            price including accrued interest, in the same units as ask. Set when
            the vendor publishes dirty quotes alongside clean bid/ask/mid;
            otherwise null.
        dirty_mid:
          anyOf:
            - type: string
            - type: 'null'
          title: Dirty Mid
          description: >-
            Gross (dirty) mid derived from dirty bid and ask (or supplied by the
            vendor), in the same units as mid. Null when dirty sides are not
            available.
        ytm_bid:
          anyOf:
            - type: string
            - type: 'null'
          title: Ytm Bid
          description: >-
            The bid yield-to-maturity at the specific point in time. Only
            applicable for fixed-income instrument types like bonds and bills.
        ytm_ask:
          anyOf:
            - type: string
            - type: 'null'
          title: Ytm Ask
          description: >-
            The ask yield-to-maturity at the specific point in time. Only
            applicable for fixed-income instrument types like bonds and bills.
        ytm_mid:
          anyOf:
            - type: string
            - type: 'null'
          title: Ytm Mid
          description: >-
            The mid yield-to-maturity (bid + ask / 2) at the specific point in
            time. Only applicable for fixed-income instrument types like bonds
            and bills.
        accrued_interest:
          anyOf:
            - type: string
            - type: 'null'
          title: Accrued Interest
          description: >-
            Accrued interest at standard settlement, in the same units as
            bid/ask (% of par). Populated only for fixed-coupon bonds.
        timestamp:
          type: string
          format: date-time
          title: Timestamp
          description: >-
            [ISO-8601](https://www.iso.org/iso-8601-date-and-time-format.html)
            datetime of when the price was in effect.
      type: object
      required:
        - symbol
        - price_type
        - quality
        - currency
        - bid
        - ask
        - mid
        - ytm_bid
        - ytm_ask
        - ytm_mid
        - accrued_interest
        - timestamp
      title: Price
    Error:
      properties:
        detail:
          type: string
          title: Detail
          description: A human-readable description of the error.
        code:
          type: string
          title: Code
          description: A machine-readable error code.
        docs:
          title: Docs
          description: A URL to documentation about this error code.
          x-remove-null-from-type-union: true
          type: string
        context:
          title: Context
          description: An optional object for adding extra context to the error.
          x-remove-null-from-type-union: true
          additionalProperties:
            anyOf:
              - type: string
              - type: integer
          type: object
        params:
          title: Params
          description: An optional list of params that failed validation.
          x-remove-null-from-type-union: true
          items:
            $ref: '#/components/schemas/InvalidParam'
          type: array
      type: object
      required:
        - detail
        - code
      title: Error
    PriceType:
      type: string
      enum:
        - percent
        - money
      title: PriceType
      properties: {}
    PriceQuality:
      type: string
      enum:
        - closing
        - intraday
        - realtime
        - delayed
      title: PriceQuality
      properties: {}
    Currency:
      type: string
      enum:
        - EUR
        - USD
        - GBP
      title: Currency
      properties: {}
    InvalidParam:
      properties:
        path:
          items:
            anyOf:
              - type: integer
              - type: string
          type: array
          title: Path
          description: Path to the field name (or index if a list) that errored.
        detail:
          type: string
          title: Detail
          description: Human-readable detail for error.
        code:
          type: string
          title: Code
          description: A machine-readable error code.
      type: object
      required:
        - path
        - detail
        - code
      title: InvalidParam
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````