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

# Get Public Market Trades

> Get snapshot information by product ID about the last trades (ticks) and best bid/ask.



## OpenAPI

````yaml GET /api/v3/brokerage/market/products/{product_id}/ticker
openapi: 3.1.0
info:
  title: Coinbase Advanced Trade API
  version: '0.1'
servers:
  - url: https://api.coinbase.com
security:
  - ApiKey: []
  - OAuth2: []
paths:
  /api/v3/brokerage/market/products/{product_id}/ticker:
    get:
      tags:
        - Public
      summary: Get Public Market Trades
      description: >-
        Get snapshot information by product ID about the last trades (ticks) and
        best bid/ask.
      operationId: RetailBrokerageApi_GetPublicMarketTrades
      parameters:
        - name: product_id
          description: The trading pair (e.g. 'BTC-USD').
          in: path
          required: true
          schema:
            type: string
        - name: limit
          description: 'The number of trades to be returned. '
          in: query
          required: true
          schema:
            type: integer
            format: int32
        - name: start
          description: The UNIX timestamp indicating the start of the time interval.
          in: query
          required: false
          schema:
            type: string
        - name: end
          description: The UNIX timestamp indicating the end of the time interval.
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.GetMarketTradesResponse
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.GetMarketTradesResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      security: []
components:
  schemas:
    coinbase.public_api.authed.retail_brokerage_api.GetMarketTradesResponse:
      type: object
      properties:
        trades:
          type: array
          items:
            $ref: >-
              #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.HistoricalMarketTrade
        best_bid:
          type: string
          example: '291.13'
          description: The best bid for the `product_id`, in quote currency.
        best_ask:
          type: string
          example: '292.40'
          description: The best ask for the `product_id`, in quote currency.
    grpc.gateway.runtime.Error:
      type: object
      properties:
        error:
          type: string
        code:
          type: integer
          format: int32
        message:
          type: string
        details:
          type: array
          items:
            type: object
            additionalProperties: true
    coinbase.public_api.authed.retail_brokerage_api.HistoricalMarketTrade:
      type: object
      properties:
        trade_id:
          type: string
          example: 34b080bf-fcfd-445a-832b-46b5ddc65601
          description: The ID of the trade that was placed.
        product_id:
          type: string
          example: BTC-USD
          description: The trading pair (e.g. 'BTC-USD').
        price:
          type: string
          example: '140.91'
          description: The price of the trade, in quote currency.
        size:
          type: string
          example: '4'
          description: The size of the trade, in base currency.
        time:
          type: string
          format: RFC3339 Timestamp
          example: '2021-05-31T09:59:59Z'
          description: The time of the trade.
        side:
          description: The maker side of the trade.
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.OrderSide
        exchange:
          type: string
          description: The exchange where the trade was placed.
    coinbase.public_api.authed.retail_brokerage_api.OrderSide:
      type: string
      enum:
        - BUY
        - SELL
      default: ''
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        A bearer token signed using your API Key Secret, see [Creating API
        Keys](/coinbase-app/authentication-authorization/api-key-authentication)
        section of our docs for more information. See [Scope &
        Permissions](/coinbase-app/advanced-trade-apis/rest-scopes) for the
        permission each endpoint requires.
    OAuth2:
      type: oauth2
      description: >-
        An OAuth 2.0 access token from the Coinbase App OAuth2 flow. See [Scope
        & Permissions](/coinbase-app/advanced-trade-apis/rest-scopes) for the
        scope each endpoint requires.
      flows:
        authorizationCode:
          authorizationUrl: https://login.coinbase.com/oauth2/auth
          tokenUrl: https://login.coinbase.com/oauth2/token
          scopes:
            wallet:user:read: View your account information.
            wallet:user:update: Update your account information.
            wallet:accounts:read: View your accounts.
            wallet:buys:create: Place, edit, and cancel orders.
            wallet:trades:read: View your cryptocurrency conversions.
            wallet:trades:create: Convert cryptocurrencies.
            wallet:transactions:read: View your transactions.
            wallet:transactions:transfer: Transfer funds between accounts.
            wallet:payment-methods:read: View your payment methods.

````