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

# Get Trade History

> Fetch paginated trade history for your account, ordered by most recent first.



## OpenAPI

````yaml GET /v1/history
openapi: 3.1.0
info:
  title: LaserSell API
  version: 1.0.0
  description: >
    The LaserSell API builds unsigned Solana transactions for buying and selling
    tokens across supported DEXs.

    All transactions are non-custodial: the API returns unsigned
    `VersionedTransaction` payloads that you sign locally with your own keypair.


    Supported markets: Pump.fun, PumpSwap, Raydium (CPMM, Launchpad), Meteora
    (DBC, DAMM v2).
servers:
  - url: https://api.lasersell.io
    description: Production
security:
  - apiKey: []
tags:
  - name: Trading
    description: Build unsigned buy and sell transactions.
  - name: Account
    description: Account details and trade history.
  - name: Wallets
    description: Wallet registration for the Exit Intelligence Stream.
paths:
  /v1/history:
    get:
      tags:
        - Account
      summary: Get Trade History
      description: >-
        Fetch paginated trade history for your account, ordered by most recent
        first.
      operationId: getTradeHistory
      parameters:
        - name: limit
          in: query
          required: false
          description: Maximum number of trades to return (capped at 200).
          schema:
            type: integer
            default: 50
            maximum: 200
            example: 20
        - name: offset
          in: query
          required: false
          description: Number of trades to skip for pagination.
          schema:
            type: integer
            default: 0
            example: 0
        - name: mint
          in: query
          required: false
          description: Filter results to a specific token mint address (base58).
          schema:
            type: string
            example: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
        - name: wallet
          in: query
          required: false
          description: Filter results to a specific wallet public key (base58).
          schema:
            type: string
            example: 9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM
      responses:
        '200':
          description: Trade history page.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TradeHistoryResponse'
        '401':
          description: Unauthorized. Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    TradeHistoryResponse:
      type: object
      required:
        - trades
      properties:
        trades:
          type: array
          description: Array of trade records, ordered by most recent first.
          items:
            $ref: '#/components/schemas/TradeHistoryItem'
        total:
          type:
            - integer
            - 'null'
          description: Estimated total number of matching trades for pagination.
          example: 42
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable error message.
          example: invalid mint address
    TradeHistoryItem:
      type: object
      required:
        - id
        - session_id
        - position_id
        - wallet_pubkey
        - mint
        - entry_quote_units
        - tokens
        - opened_at
      properties:
        id:
          type: integer
          description: Unique trade record identifier.
          example: 42
        session_id:
          type: integer
          description: Stream session that produced this trade.
          example: 1001
        position_id:
          type: integer
          description: Position identifier within the session.
          example: 3
        wallet_pubkey:
          type: string
          description: Wallet public key that held the position (base58).
          example: 9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM
        mint:
          type: string
          description: Token mint address (base58).
          example: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
        entry_quote_units:
          type: integer
          description: Amount spent to open the position in quote asset atomic units.
          example: 500000000
        exit_quote_units:
          type:
            - integer
            - 'null'
          description: Proceeds received on close in quote asset atomic units.
          example: 650000000
        profit_quote_units:
          type:
            - integer
            - 'null'
          description: Net profit or loss in quote asset atomic units.
          example: 150000000
        tokens:
          type: integer
          description: Number of tokens acquired at entry in atomic units.
          example: 1000000
        exit_reason:
          type:
            - string
            - 'null'
          enum:
            - target_profit
            - stop_loss
            - trailing_stop
            - manual
            - null
          description: Why the position was closed.
          example: target_profit
        market_kind:
          type:
            - string
            - 'null'
          description: DEX or launchpad the token was traded on.
          example: PumpFun
        strategy_target_profit_pct:
          type:
            - number
            - 'null'
          description: Target profit percentage configured when the position opened.
          example: 30
        strategy_stop_loss_pct:
          type:
            - number
            - 'null'
          description: Stop loss percentage configured when the position opened.
          example: 50
        strategy_trailing_stop_pct:
          type:
            - number
            - 'null'
          description: Trailing stop percentage configured when the position opened.
          example: 20
        opened_at:
          type: string
          format: date-time
          description: ISO 8601 timestamp when the position was opened.
          example: '2026-03-07T12:00:00Z'
        closed_at:
          type:
            - string
            - 'null'
          format: date-time
          description: ISO 8601 timestamp when the position was closed.
          example: '2026-03-07T12:30:00Z'
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Your LaserSell API key. Obtain one from the [LaserSell
        dashboard](https://www.lasersell.io).

````