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

# Get History

> Paginated history including AMM, CLOB trades, splits/merges, NegRisk conversions. Partner API tokens with `delegated_signing` scope may read a sub-account by sending the `x-on-behalf-of: <profileId>` header.



## OpenAPI

````yaml GET /portfolio/history
openapi: 3.0.0
info:
  title: Limitless Exchange API
  description: >-
    Production-ready REST API for prediction market trading, portfolio
    management, and market data on Limitless Exchange (Base L2).
  version: '1.0'
  contact:
    name: API Support
    url: https://limitless.exchange
    email: help@limitless.network
servers:
  - url: https://api.limitless.exchange
    description: Production API
security: []
tags:
  - name: Authentication
    description: User authentication and session management
  - name: Markets
    description: Browse, search, and analyze prediction markets
  - name: Market Navigation
    description: Navigation tree, market pages, and property filters
  - name: Trading
    description: Create, manage, and cancel orders
  - name: Portfolio
    description: Position tracking, trade history, and performance
  - name: API Tokens
    description: Scoped API token management for partner integrations
  - name: Partner Accounts
    description: Sub-account creation and allowance recovery for partner integrations
  - name: System
    description: Public API state and availability information
paths:
  /portfolio/history:
    get:
      tags:
        - Portfolio
      summary: Get History
      description: >-
        Paginated history including AMM, CLOB trades, splits/merges, NegRisk
        conversions. Partner API tokens with `delegated_signing` scope may read
        a sub-account by sending the `x-on-behalf-of: <profileId>` header.
      operationId: PortfolioController_getHistory
      parameters:
        - name: cursor
          required: false
          in: query
          description: >-
            Opaque cursor for cursor-based pagination. Omit for first page. For
            subsequent pages, pass the `nextCursor` value from the previous
            response.
          schema:
            type: string
        - name: limit
          required: false
          in: query
          description: Number of items per page (1-100).
          schema:
            example: 20
            default: 20
            minimum: 1
            maximum: 100
            type: number
      responses:
        '200':
          description: Paginated history of all user actions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HistoryResponseDto'
        '400':
          description: Invalid pagination parameters
        '401':
          description: Unauthorized
      security:
        - HmacAuth: []
components:
  schemas:
    HistoryResponseDto:
      type: object
      properties:
        data:
          description: List of history entries
          type: array
          items:
            $ref: '#/components/schemas/HistoryEntryDto'
        nextCursor:
          type: string
          description: >-
            Opaque cursor for the next page. `null` when there are no more
            pages. Pass this value back as the `cursor` query parameter to fetch
            the next page.
          nullable: true
          example: eyJ0Ijoi...
        totalCount:
          type: number
          description: Total count of entries (`null` in cursor mode)
          example: 8
          nullable: true
      required:
        - data
        - totalCount
    HistoryEntryDto:
      type: object
      properties:
        blockTimestamp:
          type: number
          description: Block timestamp of the operation (unix seconds)
          example: 1744115608
        collateralAmount:
          type: string
          description: >-
            Collateral amount involved (human-readable, after dividing by token
            decimals)
          example: '25.5'
        market:
          description: Market information
          allOf:
            - $ref: '#/components/schemas/HistoryMarketDto'
        outcomeTokenAmount:
          type: string
          description: Amount of outcome tokens involved (human-readable)
          example: '50'
        outcomeTokenAmounts:
          description: Amounts of outcome tokens for each outcome [YES, NO]
          example:
            - '50'
            - '0'
          type: array
          items:
            type: string
        outcomeIndex:
          type: number
          description: Index of the outcome (0 = YES, 1 = NO)
          example: 0
        outcomeTokenPrice:
          type: number
          description: Effective price per outcome token for this fill
          example: 0.51
        strategy:
          type: string
          description: >-
            Type of operation. `Buy`/`Sell` = AMM trades, `Limit Buy`/`Limit
            Sell` = CLOB maker fills, `Market Buy`/`Market Sell` = CLOB taker
            fills, `Split`/`Merge` = position split/merge, `Convert` = NegRisk
            conversion, `Claim` = winnings redemption.
          example: Limit Buy
          enum:
            - Buy
            - Sell
            - Limit Buy
            - Limit Sell
            - Market Buy
            - Market Sell
            - Split
            - Merge
            - Convert
            - Claim
        transactionHash:
          type: string
          description: >-
            On-chain transaction hash (present for settled trades, splits,
            merges, conversions, and claims)
          example: '0x992f36465f938b21a6a5fe3c417c98c3268a616a05479d2dc53870c6cd1a0761'
      required:
        - blockTimestamp
        - collateralAmount
        - market
        - outcomeTokenAmount
        - outcomeTokenAmounts
        - outcomeIndex
        - outcomeTokenPrice
        - strategy
    HistoryMarketDto:
      type: object
      properties:
        closed:
          type: boolean
          description: Whether the market is closed
          example: false
        collateral:
          type: object
          description: Collateral token information
          example:
            symbol: USDC
            id: 7
            decimals: 6
        group:
          description: Market group information
          allOf:
            - $ref: '#/components/schemas/HistoryMarketGroupDto'
        condition_id:
          type: string
          description: Condition ID of the market
          example: '0x08518bc4bb8a3dbb89aac4425ace0876b94a5dfa77dee47a20737a19cf67e325'
        funding:
          type: number
          description: Market funding amount
          example: 0
        id:
          type: number
          description: Market ID
          example: 980
        slug:
          type: string
          description: Market slug
          example: btc-above-100k-jul-4
        title:
          type: string
          description: Market title
          example: $BTC above $100k on Jul 4?
        deadline:
          type: string
          description: Market deadline
          example: '2025-07-04T23:59:59.000Z'
      required:
        - closed
        - collateral
        - group
        - condition_id
        - funding
        - id
        - slug
        - title
        - deadline
    HistoryMarketGroupDto:
      type: object
      properties:
        id:
          type: number
          description: Unique identifier of the group
          example: 10000037
        slug:
          type: string
          description: Slug identifier of the group
          example: positionconverted-test-1744046422596
        title:
          type: string
          description: Title of the group
          example: PositionConverted test
        status:
          type: string
          description: Status of the group
          example: FUNDED
        deadline:
          type: string
          description: Deadline for the group
          example: '2025-04-11T22:34:56.000Z'
        hidden:
          type: boolean
          description: Whether the group is hidden
          example: false
        txHash:
          type: string
          description: Transaction hash for the group
          example: null
        resolutionTxHash:
          type: string
          description: Resolution transaction hash
          example: null
        priorityIndex:
          type: number
          description: Priority index of the group
          example: 0
        metadata:
          type: object
          description: Group metadata
          example:
            isBannered: false
        negRiskMarketId:
          type: string
          description: >-
            Onchain NegRisk market ID as identified by the NegriskAdapter
            smart-contract
          example: '0xe103633b40e9b664f8acc89e8cf7b7916475961ae1708a249fa5d6c933168c00'
        createdAt:
          type: string
          description: Creation timestamp
          example: '2025-04-07T17:20:22.135Z'
        updatedAt:
          type: string
          description: Last update timestamp
          example: '2025-04-07T17:22:08.464Z'
      required:
        - id
        - slug
        - title
        - status
        - deadline
        - hidden
        - priorityIndex
        - metadata
        - negRiskMarketId
        - createdAt
        - updatedAt
  securitySchemes:
    HmacAuth:
      type: apiKey
      in: header
      name: lmts-api-key
      description: >-
        Scoped API token with HMAC-SHA256 signing. Requires three headers:
        lmts-api-key (token ID), lmts-timestamp (ISO-8601), lmts-signature
        (Base64-encoded HMAC). See Authentication docs for details.

````