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

# Get a CEX market quote

> Requires `marketdata:read`. Returns one raw normalized ticker from a CEX credential already connected by this user. It never reads a balance or position, uses the internal valuation price or cache, persists the quote, or falls back to another venue. An omitted `venue` selects one healthy connected CEX and returns its actual `source_venue`; a supplied `venue` is a strict constraint.



## OpenAPI

````yaml /openapi/portfobit-openapi.yaml get /market-data/quote
openapi: 3.1.0
info:
  title: Portfobit Open API
  version: 0.1.0
  description: >
    Public REST API for direct API clients, CI, scripts, service accounts,
    third-party agents, and developer integrations.

    Public REST requests use scoped Portfobit Open API keys. OAuth access tokens
    issued for the Portfobit MCP resource are not accepted by `/api/v1/*`
    endpoints.

    Portfobit is crypto-CEX-only. Financial values are decimal strings and
    timestamps are RFC 3339 UTC strings.

    The API never supports withdrawals, external-address transfers,
    cross-exchange transfers, or P2P transfers.
servers:
  - url: https://api.portfobit.com/api/v1
security:
  - bearerAuth: []
tags:
  - name: Context
  - name: Accounts
  - name: Portfolios
  - name: Valuation
  - name: Activity
  - name: Trading
  - name: Market data
  - name: Support
paths:
  /market-data/quote:
    get:
      tags:
        - Market data
      summary: Get a CEX market quote
      description: >-
        Requires `marketdata:read`. Returns one raw normalized ticker from a CEX
        credential already connected by this user. It never reads a balance or
        position, uses the internal valuation price or cache, persists the
        quote, or falls back to another venue. An omitted `venue` selects one
        healthy connected CEX and returns its actual `source_venue`; a supplied
        `venue` is a strict constraint.
      operationId: getMarketQuote
      parameters:
        - $ref: '#/components/parameters/MarketSymbol'
        - $ref: '#/components/parameters/MarketVenue'
      responses:
        '200':
          $ref: '#/components/responses/MarketQuoteResponse'
        '400':
          $ref: '#/components/responses/InvalidMarketDataQueryResponse'
        '404':
          $ref: '#/components/responses/MarketVenueUnavailableResponse'
        '412':
          $ref: '#/components/responses/MarketQuoteUnavailableResponse'
        '429':
          $ref: '#/components/responses/MarketRateLimitedResponse'
        '503':
          $ref: '#/components/responses/MarketDataUnavailableResponse'
components:
  parameters:
    MarketSymbol:
      name: symbol
      in: query
      required: true
      schema:
        type: string
      description: CCXT unified symbol, for example `BTC/USDT` or `ETH/USDT:USDT`.
    MarketVenue:
      name: venue
      in: query
      schema:
        type: string
      description: >-
        Optional connected CEX venue. When supplied, it is a strict source
        constraint; when omitted, one healthy connected venue is selected.
  responses:
    MarketQuoteResponse:
      description: CEX market-quote response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MarketQuoteResponseSchema'
    InvalidMarketDataQueryResponse:
      description: >-
        The market-data query is invalid. This includes an invalid CCXT unified
        symbol or candle interval, a non-integer or out-of-range candle limit,
        an invalid/future time range, and a requested range that exceeds its
        interval-specific maximum.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            error:
              code: invalid_candle_interval
              message: interval must be a supported CCXT timeframe
              details: {}
            meta:
              request_id: req_01J2K8B7QW
              generated_at: '2026-08-14T08:00:00Z'
    MarketVenueUnavailableResponse:
      description: >-
        The requested CEX venue is unavailable for this user's connected
        accounts.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MarketVenueUnavailableResponseSchema'
    MarketQuoteUnavailableResponse:
      description: >-
        The selected CEX did not return a usable `last` price. The API does not
        derive it from bid/ask or substitute another venue or Portfobit
        valuation price.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            error:
              code: market_quote_unavailable
              message: market quote has no last price
              details: {}
            meta:
              request_id: req_01J2K8B7QW
              generated_at: '2026-08-14T08:00:00Z'
    MarketRateLimitedResponse:
      description: The selected CEX rate-limited the market-data request.
      headers:
        Retry-After:
          schema:
            type: integer
          description: Seconds until another request may be attempted.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MarketRateLimitedResponseSchema'
    MarketDataUnavailableResponse:
      description: >-
        The selected CEX or its dependency is temporarily unavailable. The API
        does not retry against another venue or return a stale cached result.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            error:
              code: unavailable
              message: market data is unavailable
              details: {}
            meta:
              request_id: req_01J2K8B7QW
              generated_at: '2026-08-14T08:00:00Z'
  schemas:
    MarketQuoteResponseSchema:
      type: object
      required:
        - data
        - meta
      properties:
        data:
          type: object
          required:
            - symbol
            - instrument_type
            - source
            - source_venue
            - last
            - bid
            - ask
            - open_24h
            - high_24h
            - low_24h
            - base_volume_24h
            - quote_volume_24h
            - change_24h
            - change_percent_24h
            - price_as_of
            - fetched_at
          properties:
            symbol:
              type: string
            instrument_type:
              type: string
            source:
              type: string
            source_venue:
              type: string
            last:
              type: string
            bid:
              type:
                - string
                - 'null'
            ask:
              type:
                - string
                - 'null'
            open_24h:
              type:
                - string
                - 'null'
            high_24h:
              type:
                - string
                - 'null'
            low_24h:
              type:
                - string
                - 'null'
            base_volume_24h:
              type:
                - string
                - 'null'
            quote_volume_24h:
              type:
                - string
                - 'null'
            change_24h:
              type:
                - string
                - 'null'
            change_percent_24h:
              type:
                - string
                - 'null'
            price_as_of:
              type: string
              format: date-time
            fetched_at:
              type: string
              format: date-time
        meta:
          type: object
          required:
            - request_id
            - generated_at
          properties:
            request_id:
              type: string
            generated_at:
              type: string
              format: date-time
      example:
        data:
          symbol: BTC/USDT
          instrument_type: spot
          source: ccxt
          source_venue: binance
          last: '60000.00'
          bid: '59999.90'
          ask: '60000.10'
          open_24h: '59000.00'
          high_24h: '61000.00'
          low_24h: '58500.00'
          base_volume_24h: '1234.56'
          quote_volume_24h: '74000000.00'
          change_24h: '1000.00'
          change_percent_24h: '1.694915254237288136'
          price_as_of: '2026-08-07T08:00:00Z'
          fetched_at: '2026-08-07T08:00:01Z'
        meta:
          request_id: req_01J2K8B7QW
          generated_at: '2026-08-07T08:00:01Z'
    ErrorEnvelope:
      type: object
      required:
        - error
        - meta
      properties:
        error:
          $ref: '#/components/schemas/Error'
        meta:
          $ref: '#/components/schemas/Meta'
    MarketVenueUnavailableResponseSchema:
      type: object
      required:
        - error
        - meta
      properties:
        error:
          type: object
          required:
            - code
            - message
            - details
          properties:
            code:
              type: string
            message:
              type: string
            details:
              type: object
              required:
                - venue
              properties:
                venue:
                  type: string
        meta:
          type: object
          required:
            - request_id
            - generated_at
          properties:
            request_id:
              type: string
            generated_at:
              type: string
              format: date-time
      example:
        error:
          code: market_venue_not_available
          message: The requested market venue is not available.
          details:
            venue: binance
        meta:
          request_id: req_01J2K8B7QW
          generated_at: '2026-08-08T08:00:00Z'
    MarketRateLimitedResponseSchema:
      type: object
      required:
        - error
        - meta
      properties:
        error:
          type: object
          required:
            - code
            - message
            - details
          properties:
            code:
              type: string
            message:
              type: string
            details:
              type: object
              required: []
              properties: {}
        meta:
          type: object
          required:
            - request_id
            - generated_at
          properties:
            request_id:
              type: string
            generated_at:
              type: string
              format: date-time
      example:
        error:
          code: market_upstream_rate_limited
          message: The market-data provider is rate limited.
          details: {}
        meta:
          request_id: req_01J2K8B7QW
          generated_at: '2026-08-08T08:00:00Z'
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
        message:
          type: string
        details:
          type: object
          additionalProperties: true
    Meta:
      type: object
      required:
        - request_id
        - generated_at
      properties:
        request_id:
          type: string
        generated_at:
          type: string
          format: date-time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Portfobit Open API key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.