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

# Get Activities

> Get activities for a user including trades, position resolutions, and account balance changes



## OpenAPI

````yaml /api-reference/oapi-schemas/portfolio-schema.json get /v1/portfolio/activities
openapi: 3.0.1
info:
  title: Portfolio API
  description: >-
    Portfolio and activity endpoints for tracking positions and trading history.
    All endpoints require Ed25519 signature authentication.
  version: v1.0.0
servers:
  - url: https://api.polymarket.us
security:
  - X-PM-Access-Key: []
    X-PM-Timestamp: []
    X-PM-Signature: []
tags:
  - name: Portfolio
  - name: Account
paths:
  /v1/portfolio/activities:
    get:
      tags:
        - Portfolio
      summary: Get Activities
      description: >-
        Get activities for a user including trades, position resolutions, and
        account balance changes
      operationId: PortfolioService_GetActivities
      parameters:
        - name: limit
          in: query
          description: >-
            Maximum number of activities to return per page. Use with `cursor`
            for pagination. Default: `100`. Example: `50`
          required: false
          schema:
            type: integer
            format: int32
        - name: cursor
          in: query
          description: >-
            Pagination cursor from a previous response's `nextCursor` field. Use
            to fetch the next page of results. Omit for the first request
          required: false
          schema:
            type: string
        - name: marketSlug
          in: query
          description: >-
            Filter activities by a specific market slug. Returns only activities
            (trades, resolutions) related to that market. Example:
            `will-team-a-win`
          required: false
          schema:
            type: string
        - name: types
          in: query
          description: >-
            Filter by activity types. When specified, only returns activities of
            the selected types. TRADE (order executions), POSITION_RESOLUTION
            (market settlements), ACCOUNT_DEPOSIT/WITHDRAWAL (fund transfers)
          required: false
          schema:
            type: array
            items:
              type: string
              enum:
                - ACTIVITY_TYPE_TRADE
                - ACTIVITY_TYPE_POSITION_RESOLUTION
                - ACTIVITY_TYPE_ACCOUNT_DEPOSIT
                - ACTIVITY_TYPE_ACCOUNT_ADVANCED_DEPOSIT
                - ACTIVITY_TYPE_ACCOUNT_WITHDRAWAL
                - ACTIVITY_TYPE_REFERRAL_BONUS
                - ACTIVITY_TYPE_TRANSFER
                - ACTIVITY_TYPE_TAKER_FEE_REBATE
                - ACTIVITY_TYPE_LIQUIDITY_PROGRAM
        - name: sortOrder
          in: query
          description: >-
            Sort order for activities by timestamp. DESCENDING returns newest
            first (default), ASCENDING returns oldest first
          required: false
          schema:
            type: string
            enum:
              - SORT_ORDER_DESCENDING
              - SORT_ORDER_ASCENDING
      responses:
        '200':
          description: List of activities
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetActivitiesResponse'
        '401':
          description: Unauthorized - invalid or missing API key
        '500':
          description: Internal server error
components:
  schemas:
    GetActivitiesResponse:
      type: object
      properties:
        activities:
          type: array
          items:
            $ref: '#/components/schemas/Activity'
          description: List of activities
        nextCursor:
          type: string
          description: Pagination cursor for next page
        eof:
          type: boolean
          description: True if this is the last page
    Activity:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/ActivityType'
        trade:
          $ref: '#/components/schemas/Trade'
        positionResolution:
          $ref: '#/components/schemas/PositionResolution'
        accountBalanceChange:
          $ref: '#/components/schemas/AccountBalanceChange'
      description: Activity record
    ActivityType:
      type: string
      enum:
        - ACTIVITY_TYPE_TRADE
        - ACTIVITY_TYPE_POSITION_RESOLUTION
        - ACTIVITY_TYPE_ACCOUNT_DEPOSIT
        - ACTIVITY_TYPE_ACCOUNT_ADVANCED_DEPOSIT
        - ACTIVITY_TYPE_ACCOUNT_WITHDRAWAL
        - ACTIVITY_TYPE_REFERRAL_BONUS
        - ACTIVITY_TYPE_TRANSFER
        - ACTIVITY_TYPE_TAKER_FEE_REBATE
        - ACTIVITY_TYPE_LIQUIDITY_PROGRAM
      description: Type of activity
    Trade:
      type: object
      properties:
        id:
          type: string
          description: Exchange-assigned trade ID
        marketSlug:
          type: string
          description: Market slug
        state:
          type: string
          enum:
            - TRADE_STATE_NEW
            - TRADE_STATE_CLEARED
            - TRADE_STATE_BUSTED
            - TRADE_STATE_INFLIGHT
            - TRADE_STATE_PENDING_RISK
            - TRADE_STATE_PENDING_CLEARED
            - TRADE_STATE_REJECTED
          description: State of the trade
        createTime:
          type: string
          format: date-time
          description: Creation timestamp
        updateTime:
          type: string
          format: date-time
          description: Last update timestamp
        price:
          $ref: '#/components/schemas/Amount'
          description: Trade price
        qty:
          type: string
          description: >-
            Trade quantity rounded to a whole number - deprecated, use
            qtyDecimal
          deprecated: true
        isAggressor:
          type: boolean
          description: True if user's order was the taker
        costBasis:
          $ref: '#/components/schemas/Amount'
          nullable: true
          description: Cost basis for the trade
        realizedPnl:
          $ref: '#/components/schemas/Amount'
          nullable: true
          description: Realized profit and loss
        qtyDecimal:
          type: string
          format: decimal
          description: Trade quantity as a decimal string
    PositionResolution:
      type: object
      properties:
        marketSlug:
          type: string
          description: Market slug
        beforePosition:
          $ref: '#/components/schemas/UserPosition'
          description: Position before resolution
        afterPosition:
          $ref: '#/components/schemas/UserPosition'
          description: Position after resolution
        updateTime:
          type: string
          format: date-time
          description: Resolution timestamp
        tradeId:
          type: string
          description: Associated trade ID
        side:
          type: string
          enum:
            - POSITION_RESOLUTION_SIDE_LONG
            - POSITION_RESOLUTION_SIDE_SHORT
            - POSITION_RESOLUTION_SIDE_NEUTRAL
          description: Side of resolution
    AccountBalanceChange:
      type: object
      properties:
        transactionId:
          type: string
          description: Transaction ID
        status:
          type: string
          enum:
            - ACCOUNT_BALANCE_CHANGE_STATUS_PENDING
            - ACCOUNT_BALANCE_CHANGE_STATUS_COMPLETED
            - ACCOUNT_BALANCE_CHANGE_STATUS_PARTIALLY_REFUNDED
            - ACCOUNT_BALANCE_CHANGE_STATUS_REJECTED
          description: Status of the balance change
        amount:
          $ref: '#/components/schemas/Amount'
          description: Amount of the balance change
        updateTime:
          type: string
          format: date-time
          description: Last update time
        createTime:
          type: string
          format: date-time
          description: Creation time
    Amount:
      type: object
      required:
        - value
        - currency
      properties:
        value:
          type: string
          format: decimal
          example: '123.45'
          description: The amount as a decimal string
        currency:
          type: string
          description: The currency code
      description: Represents a monetary amount with its currency
    UserPosition:
      type: object
      properties:
        netPosition:
          type: string
          format: int64
          description: >-
            Net position quantity rounded to a whole number - deprecated, use
            netPositionDecimal
          deprecated: true
        qtyBought:
          type: string
          format: int64
          description: >-
            Total quantity bought rounded to a whole number - deprecated, use
            qtyBoughtDecimal
          deprecated: true
        qtySold:
          type: string
          format: int64
          description: >-
            Total quantity sold rounded to a whole number - deprecated, use
            qtySoldDecimal
          deprecated: true
        cost:
          $ref: '#/components/schemas/Amount'
          description: Total cost basis
        realized:
          $ref: '#/components/schemas/Amount'
          description: Realized profit/loss
        bodPosition:
          type: string
          format: int64
          description: >-
            Beginning of day position rounded to a whole number - deprecated,
            use bodPositionDecimal
          deprecated: true
        expired:
          type: boolean
          description: Whether the position has expired
        updateTime:
          type: string
          format: date-time
          description: Last update timestamp
        marketMetadata:
          $ref: '#/components/schemas/MarketMetadata'
        cashValue:
          $ref: '#/components/schemas/Amount'
          description: Unrealized PnL for the position
        qtyAvailable:
          type: string
          format: int64
          nullable: true
          description: >-
            Quantity available to trade rounded to a whole number - deprecated,
            use qtyAvailableDecimal
          deprecated: true
        netPositionDecimal:
          type: string
          format: decimal
          description: Net position quantity as a decimal string
        qtyBoughtDecimal:
          type: string
          format: decimal
          description: Total quantity bought as a decimal string
        qtySoldDecimal:
          type: string
          format: decimal
          description: Total quantity sold as a decimal string
        bodPositionDecimal:
          type: string
          format: decimal
          description: Beginning of day position as a decimal string
        qtyAvailableDecimal:
          type: string
          format: decimal
          nullable: true
          description: Quantity available to trade as a decimal string
      description: User's trading position information
    MarketMetadata:
      type: object
      properties:
        slug:
          type: string
          description: Market slug
        icon:
          type: string
          description: Market image URL
        title:
          type: string
          description: Market title
        outcome:
          type: string
          description: Market outcome
        eventSlug:
          type: string
          description: Event slug
  securitySchemes:
    X-PM-Access-Key:
      type: apiKey
      in: header
      name: X-PM-Access-Key
      description: >-
        Your API key ID (UUID). Generate at
        [polymarket.us/developer](https://polymarket.us/developer).
    X-PM-Timestamp:
      type: apiKey
      in: header
      name: X-PM-Timestamp
      description: >-
        Unix timestamp in milliseconds. Must be within 30 seconds of server
        time.
    X-PM-Signature:
      type: apiKey
      in: header
      name: X-PM-Signature
      description: >-
        Base64-encoded Ed25519 signature of `timestamp + method + path`. See
        [Authentication](/api/authentication) for details.

````