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

# Get trade history



## OpenAPI

````yaml https://vooi-api-app.fly.dev/swagger/json get /exchange/trades
openapi: 3.1.0
info:
  title: VOOI API
  description: Unified perps API
  version: '1.0'
  contact: {}
servers:
  - url: https://perps-api.vooi.io
security: []
tags: []
paths:
  /exchange/trades:
    get:
      tags:
        - Exchange
      summary: Get trade history
      operationId: ExchangeController_getTrades
      parameters:
        - name: exchanges
          required: false
          in: query
          schema:
            anyOf:
              - type: string
                enum:
                  - aster
                  - binance
                  - bybit
                  - extended
                  - gate
                  - hyperliquid
                  - lighter
                  - mexc
                  - ondo
                  - robinhood
                description: Supported perpetual exchange
              - type: array
                items:
                  type: string
                  enum:
                    - aster
                    - binance
                    - bybit
                    - extended
                    - gate
                    - hyperliquid
                    - lighter
                    - mexc
                    - ondo
                    - robinhood
                  description: Supported perpetual exchange
        - name: cursor
          required: false
          in: query
          schema:
            type: string
          description: Opaque pagination cursor returned as cursor from the previous page
        - name: limit
          required: false
          in: query
          schema:
            default: 20
            type: integer
            minimum: 1
            maximum: 100
          description: Number of trades to return per page (1–100)
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetTradesDto'
        '503':
          description: ExchangeApiError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDTO'
      security:
        - bearer: []
components:
  schemas:
    GetTradesDto:
      type: object
      properties:
        cursor:
          description: Pass as cursor to fetch the next page. Null when no more pages exist
          type:
            - string
            - 'null'
        items:
          type: array
          items:
            $ref: '#/components/schemas/TradeDto'
      required:
        - cursor
        - items
      title: Trades
    ErrorResponseDTO:
      type: object
      properties:
        message:
          type: string
          example: 'Invalid order id: 123'
        statusCode:
          example: 503
          type: number
      required:
        - message
      title: ErrorResponse
    TradeDto:
      type: object
      properties:
        baseSymbol:
          type: string
          example: ETH
        createdAt:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
        exchange:
          type: string
          enum:
            - aster
            - binance
            - bybit
            - extended
            - gate
            - hyperliquid
            - lighter
            - mexc
            - ondo
            - robinhood
          description: Perpetual exchange
        fee:
          description: Trading fee amount
          type:
            - string
            - 'null'
        feeToken:
          description: Fee token symbol
          type:
            - string
            - 'null'
        orderId:
          description: Exchange order ID associated with this trade
          type:
            - string
            - 'null'
        positionSide:
          type: string
          enum:
            - both
            - long
            - short
        price:
          type: string
          example: '1850.50'
        quoteSymbol:
          type: string
          example: USDC
        realizedPnl:
          example: '12.50'
          type:
            - string
            - 'null'
        role:
          anyOf:
            - type: string
              enum:
                - maker
                - taker
            - type: 'null'
          example: taker
          description: >-
            maker (the fill rested in the order book) or taker (the fill crossed
            the spread). Null for trades synced before the venue role was
            tracked, or when the venue did not report the role
        side:
          type: string
          enum:
            - buy
            - sell
        size:
          type: string
          example: '0.001'
        tradeId:
          type: string
        type:
          type: string
          enum:
            - trade
            - deleverage
            - liquidation
            - settlement
          example: trade
          description: >-
            trade (regular fill), liquidation (forced close), deleverage (ADL),
            settlement (market settlement)
      required:
        - baseSymbol
        - createdAt
        - exchange
        - fee
        - feeToken
        - orderId
        - positionSide
        - price
        - quoteSymbol
        - realizedPnl
        - role
        - side
        - size
        - tradeId
        - type
      title: Trade
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````

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