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

# Recent Trades

> Retrieve recent trade executions for a trading symbol.

## Notes

* side: buy / sell
* timestamp in milliseconds (UTC)

## Supported Markets

**US Stocks**, **HK Stocks**, **A-Shares**, **China Futures**, **Crypto**

Examples:

* US Stocks: AAPL.US, TSLA.US, MSFT.US
* HK Stocks: 700.HK, 9988.HK, 3690.HK
* A-Shares: 600519.SH, 000001.SZ, 920186.BJ
* China Futures: BU2609, IC2606, AP8888
* Crypto: BTCUSDT, ETHUSDT, ADAUSDT

## Request Parameters

| Parameter | Required | Description                                                                                                                                                                                               |
| --------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| symbol    | Yes      | Trading symbol code                                                                                                                                                                                       |
| limit     | No       | Number of trades, default 100, max 1000                                                                                                                                                                   |
| type      | No       | Symbol type, optional. Not required when the symbol is unambiguous; if the API returns an `AMBIGUOUS_SYMBOL` error, pass the value as indicated. Values: `stock`, `indices`, `crypto`, `forex`, `futures` |

## Response Fields

| Field                     | Description                                     |
| ------------------------- | ----------------------------------------------- |
| symbol                    | Trading symbol                                  |
| type                      | Product type                                    |
| trades                    | Trade record array                              |
| └─ id                     | Trade ID                                        |
| └─ price                  | Trade execution price                           |
| └─ quantity               | Trade volume                                    |
| └─ side                   | Trade direction (`buy`, `sell`, or `neutral`)   |
| └─ timestamp              | Trade execution time (milliseconds, UTC)        |
| └─ open\_interest\_change | Change in open interest; futures only           |
| └─ position\_effect       | Position effect; futures only; see values below |

### `position_effect` Values

| Category | Values                                            |
| -------- | ------------------------------------------------- |
| Open     | `long_open`<br />`short_open`<br />`both_open`    |
| Close    | `long_close`<br />`short_close`<br />`both_close` |
| Transfer | `long_transfer`<br />`short_transfer`             |


## OpenAPI

````yaml GET /v1/market/trades
openapi: 3.0.0
info:
  title: TickDB API
  description: >-
    Unified real-time market data API — one connection for Forex, indices, US
    stocks, HK stocks, A-shares, China futures, and Crypto via REST and
    WebSocket.
  version: 1.0.2
  contact:
    email: support@tickdb.ai
servers:
  - url: https://api.tickdb.ai
    description: Production server
security:
  - ApiKeyAuth: []
paths:
  /v1/market/trades:
    get:
      summary: Recent Trades
      description: >-
        Get latest trade prints for a symbol, including A-shares and China
        futures.
      parameters:
        - name: symbol
          in: query
          required: true
          description: Trading symbol
          schema:
            type: string
            default: 700.HK
            example: 700.HK
        - name: limit
          in: query
          required: false
          description: Number of trades (default 100, max 1000)
          schema:
            type: integer
            minimum: 1
            maximum: 1000
            example: 100
        - name: type
          in: query
          required: false
          description: >-
            Symbol type, optional. Not required when the symbol is unambiguous;
            if the API returns an AMBIGUOUS_SYMBOL error, pass the value as
            indicated
          schema:
            type: string
            enum:
              - stock
              - indices
              - crypto
              - forex
              - futures
            example: stock
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 0
                  message:
                    type: string
                    example: success
                  data:
                    type: object
                    properties:
                      symbol:
                        type: string
                        example: BU2609
                      type:
                        type: string
                        enum:
                          - stock
                          - indices
                          - crypto
                          - forex
                          - futures
                        example: futures
                      trades:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              example: '1703123456789_0'
                            price:
                              type: string
                              example: '4315.00'
                            quantity:
                              type: string
                              example: '2'
                            side:
                              type: string
                              enum:
                                - buy
                                - sell
                                - neutral
                              example: sell
                            timestamp:
                              type: integer
                              example: 1703123456789
                            open_interest_change:
                              type: integer
                              nullable: true
                              description: >-
                                Change in open interest caused by this trade;
                                futures only
                              example: 0
                            position_effect:
                              type: string
                              description: Effect of the trade on positions; futures only
                              enum:
                                - long_open
                                - short_open
                                - both_open
                                - long_close
                                - short_close
                                - both_close
                                - long_transfer
                                - short_transfer
                              example: short_transfer
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````