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

# Get Wallet Trading History

> Returns paginated trading history for one wallet.

### Endpoint

`GET /api/personal-trading-history/{address}`

Returns paginated trading history for one wallet.

### Parameters

| Parameter   | Location | Required | Type    | Description                                                                 |
| ----------- | -------- | -------- | ------- | --------------------------------------------------------------------------- |
| `address`   | path     | Yes      | string  | Trader wallet address.                                                      |
| `chainId`   | query    | Yes      | integer | Blockchain chain ID. Common values: 42161 Arbitrum, 8453 Base, 137 Polygon. |
| `cursor`    | query    | No       | integer | Pagination cursor.                                                          |
| `limit`     | query    | No       | integer | Items to return.                                                            |
| `startDate` | query    | No       | string  | Optional ISO start date.                                                    |
| `endDate`   | query    | No       | string  | Optional ISO end date.                                                      |
| `pair`      | query    | No       | string  | Optional pair filter.                                                       |
| `action`    | query    | No       | string  | Optional action filter.                                                     |

### Usage Example

```bash theme={null}
curl -X GET "https://backend-global.gains.trade/api/personal-trading-history/0x0000000000000000000000000000000000000000?chainId=42161&limit=50"
```

### Response Structure

The generated API panel lists the response schema for status codes: 200, 400, 500. Error responses generally return an `error` or `message` field.


## OpenAPI

````yaml get /api/personal-trading-history/{address}
openapi: 3.0.3
info:
  title: Gains Network Backend API
  version: 1.0.0
  description: >-
    OpenAPI reference for Gains Network backend-global and public chain-specific
    trading backend endpoints.
servers:
  - url: https://backend-global.gains.trade
    description: Backend Global API
  - url: https://backend-arbitrum.gains.trade
    description: Arbitrum trading backend
  - url: https://backend-base.gains.trade
    description: Base trading backend
  - url: https://backend-polygon.gains.trade
    description: Polygon trading backend
  - url: https://backend-sepolia.gains.trade
    description: Arbitrum Sepolia trading backend
  - url: http://localhost:3002
    description: Local backend-global development server
security: []
tags:
  - name: Health
  - name: Stats
  - name: APR
  - name: Trading History
  - name: Personal Trading History
  - name: Leaderboard
  - name: Holding Rates
  - name: Contests
  - name: Dapp
  - name: Wallet
  - name: Circle
  - name: Solana
  - name: Transak
  - name: Bridge
  - name: Campaigns
  - name: VIP
  - name: Notifications
  - name: Referrals
  - name: Trading Backend
  - name: Legacy Contests
  - name: Rewards
paths:
  /api/personal-trading-history/{address}:
    get:
      tags:
        - Personal Trading History
      summary: Get Wallet Trading History
      description: Returns paginated trading history for one wallet.
      operationId: get_personal-trading-history
      parameters:
        - name: address
          in: path
          required: true
          schema:
            type: string
          description: Trader wallet address.
        - name: chainId
          in: query
          required: true
          schema:
            type: integer
            example: 42161
          description: >-
            Blockchain chain ID. Common values: 42161 Arbitrum, 8453 Base, 137
            Polygon.
        - name: cursor
          in: query
          required: false
          schema:
            type: integer
          description: Pagination cursor.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            example: 50
          description: Items to return.
        - name: startDate
          in: query
          required: false
          schema:
            type: string
          description: Optional ISO start date.
        - name: endDate
          in: query
          required: false
          schema:
            type: string
          description: Optional ISO end date.
        - name: pair
          in: query
          required: false
          schema:
            type: string
          description: Optional pair filter.
        - name: action
          in: query
          required: false
          schema:
            type: string
          description: Optional action filter.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedPersonalHistory'
        '400':
          description: Invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    PaginatedPersonalHistory:
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            additionalProperties: true
        pagination:
          type: object
          properties:
            hasMore:
              type: boolean
            nextCursor:
              type: integer
              nullable: true
            limit:
              type: integer
    Error:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
        success:
          type: boolean
      additionalProperties: true

````