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

# Trades

> Lists the trades history based on the filtering criteria.

---

**Authorization**

- Requires a valid API key.
- Required API-key permission(s):
  - General Data (Read)



## OpenAPI

````yaml get /trade/trades
openapi: 3.0.0
info:
  title: Ripio Gateway
  description: Ripio API - Services documentation.
  version: 0.1.0
  x-logo:
    url: https://cwstatic.nyc3.digitaloceanspaces.com/1996/bitcointrade.png
servers:
  - url: https://api.ripio.com
    description: Production environment
security: []
paths:
  /trade/trades:
    get:
      tags:
        - Ripio Trade
      summary: Orders - Trades
      description: |-
        Lists the trades history based on the filtering criteria.

        ---

        **Authorization**

        - Requires a valid API key.
        - Required API-key permission(s):
          - General Data (Read)
      parameters:
        - in: query
          name: pair
          required: true
          description: Currency pair code
          schema:
            example: BTC_BRL
            type: string
        - in: query
          name: start_time
          required: false
          description: Initial datetime filter in ISO-8601 format
          schema:
            example: '2020-01-01T03:00:00.000Z'
            type: string
        - in: query
          name: end_time
          required: false
          description: Final datetime filter in ISO-8601 format
          schema:
            example: '2020-01-03T02:59:59.000Z'
            type: string
        - in: query
          name: page_size
          required: false
          description: Number of records per page
          schema:
            example: 100
            type: number
        - in: query
          name: c
          required: false
          description: >-
            The `c` parameter is the cursor you should use to fetch the next
            page of results
          schema:
            type: string
        - in: header
          name: authorization
          required: true
          description: The API key as a string.
          schema:
            type: string
        - in: header
          name: signature
          required: true
          description: >-
            See the [Generating
            Signature](/static/api/authentication#generating-signature) section
            for more details.
          schema:
            type: string
        - in: header
          name: timestamp
          required: true
          description: >-
            A timestamp in milliseconds. See the [Timestamp
            Security](/static/api/authentication#timestamp-security) section for
            more details.
          schema:
            type: number
        - in: header
          name: timstamp-tolerance
          required: false
          description: >-
            An additional, non-required parameter, that you can send to specify
            the number of milliseconds after the timestamp for the request to be
            valid. See the [Timestamp
            Security](/static/api/authentication#timestamp-security) section for
            more details.
          schema:
            type: number
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                description: Ok
                properties:
                  data:
                    properties:
                      trades:
                        items:
                          properties:
                            amount:
                              description: Amount
                              type: number
                            date:
                              description: Trade date (UTC format)
                              type: string
                            id:
                              description: Trade id
                              type: string
                            maker_order_id:
                              description: Maker order id
                              type: string
                            maker_side:
                              description: Maker order side (sell / buy)
                              type: string
                            maker_type:
                              description: Maker order type (market / limit)
                              type: string
                            price:
                              description: Price
                              type: number
                            pair:
                              description: Currency pair code
                              type: string
                              example: BTC_BRL
                            taker_order_id:
                              description: Taker order id
                              type: string
                            taker_side:
                              description: Taker order side (sell / buy)
                              type: string
                            taker_type:
                              description: Taker order type (market / limit)
                              type: string
                            timestamp:
                              description: Current timestamp
                              type: number
                              example: 1675708481219
                            total_value:
                              description: Total value
                              type: number
                          required:
                            - amount
                            - date
                            - id
                            - maker_order_id
                            - maker_side
                            - maker_type
                            - price
                            - pair
                            - taker_order_id
                            - taker_side
                            - taker_type
                            - timestamp
                            - total_value
                          type: object
                        type: array
                        example:
                          - amount: 0.2404764
                            date: '2019-01-03T02:27:33.947Z'
                            id: 2B222F22-5235-45FA-97FC-E9DBFA2575EE
                            maker_order_id: F49F5BD8-3F5B-4364-BCEE-F36F62DB966A
                            maker_side: buy
                            maker_type: limit
                            pair: BTC_BRL
                            price: 15160
                            taker_order_id: FEAB5CEC-7F9E-4F95-B67D-9E8D5C739BE3
                            taker_side: sell
                            taker_type: market
                            timestamp: 1675708481219
                            total_value: 3638.4
                          - amount: 0.00563617
                            date: '2019-01-03T02:27:33.943Z'
                            id: CDC492A5-B1BF-4353-BE7A-43F51C371388
                            maker_order_id: 53BF30D2-901C-43D5-B0D1-62CD05DFD02A
                            maker_side: buy
                            maker_type: limit
                            pair: BTC_BRL
                            price: 15163
                            taker_order_id: E4B1B38D-C871-4476-9314-3DC23292F45E
                            taker_side: sell
                            taker_type: limit
                            timestamp: 1675708481220
                            total_value: 84.91
                          - amount: 0.00680154
                            date: '2019-01-03T02:27:33.940Z'
                            id: 910AA20F-211F-4755-90A7-94227DB407D8
                            maker_order_id: 1FD30735-E055-4200-AD3D-007B02A5BA92
                            maker_side: buy
                            maker_type: limit
                            pair: BTC_BRL
                            price: 15163.03
                            taker_order_id: DBC6D4AF-D454-46DF-80EC-E19528A0FB25
                            taker_side: sell
                            taker_type: limit
                            timestamp: 1675708481221
                            total_value: 104.1
                      nc:
                        description: >-
                          This is the next cursor, use its value with the `c`
                          parameter to retrieve the next page
                        type: string
                      pc:
                        description: >-
                          This is the previous cursor, use its value with the
                          `c` parameter to retrieve the previous page
                        type: string
                    required:
                      - trades
                    type: object
                  error_code:
                    type: number
                    example: null
                  message:
                    type: string
                    example: null
                required:
                  - data
                  - error_code
                  - message
                type: object

````