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

# List events

> Get a paginated list of a wallet's lifecycle events — order fills, liquidations, and stop-loss / take-profit triggers — filterable by venue, market, event type and time window.

This is a proxy to the Yield.xyz Perps `GET /v1/events` endpoint. Portal validates the upstream response against the schema documented here before returning it under `data`. If Yield.xyz changes the response shape, Portal returns a 500 with `id: INTEGRATION_RESPONSE_SCHEMA_DRIFT` instead of a partial response. Upstream reference: [Yield.xyz Perps API](https://docs.yield.xyz).



## OpenAPI

````yaml /openapi/client-api.yaml get /clients/me/integrations/yield-xyz-perps/events
openapi: 3.1.0
info:
  title: Portal Client API
  version: '3.0'
  description: >
    The Portal Client API provides endpoints for managing wallets, building
    transactions,

    and interacting with blockchain networks. All endpoints require
    authentication via a

    Client API Key or Client Session Token (CST) passed as a Bearer token.


    ## Base URL

    `https://api.portalhq.io/api/v3`


    ## Authentication

    Include your Client API Key or Client Session Token as a Bearer token in the

    `Authorization` header of every request.


    ## Chain ID Format

    Chain parameters use either friendly names (e.g. `ethereum`, `solana`) or
    CAIP-2 format

    (e.g. `eip155:1`, `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp`). When using
    CAIP-2 format

    in URLs, ensure the colon is URI-encoded (`%3A`).
servers:
  - url: https://api.portalhq.io/api/v3
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Clients
    description: Core client management endpoints
  - name: Wallet
    description: >-
      Read wallet state — balances, NFTs, transaction history, capabilities, and
      transaction details
  - name: Transactions
    description: Build, broadcast, and evaluate blockchain transactions
  - name: Funding
    description: Fund wallets with testnet tokens
  - name: Wallet Shares
    description: Manage signing and backup share pairs
  - name: Delegations
    description: Manage token approvals, revocations, and delegated transfers
  - name: Session Keys
    description: Manage EIP-7702 session keys for smart accounts
  - name: 0x
    description: Token swap endpoints powered by the 0x protocol
  - name: Yield.xyz
    description: Yield opportunities and staking actions powered by Yield.xyz
  - name: Yield.xyz Borrow
    description: >-
      Supply collateral, borrow, repay and withdraw from lending markets (Aave
      V3, Morpho Blue, SparkLend, Lista) powered by Yield.xyz Borrow
  - name: Yield.xyz Perps
    description: >-
      Trade perpetual futures — open/close leveraged positions, manage
      stop-loss/take-profit, and fund/withdraw a trading account — powered by
      Yield.xyz Perps
  - name: Li.Fi
    description: Cross-chain swaps and bridging powered by Li.Fi
  - name: Blockaid
    description: Transaction and address security scanning powered by Blockaid
  - name: Hypernative
    description: >-
      Transaction, address, token, and NFT security scanning powered by
      Hypernative
  - name: Noah
    description: KYC onboarding, payins, and payouts powered by Noah
  - name: Meld
    description: Buy and sell crypto with fiat through aggregated providers powered by Meld
  - name: Due
    description: Payins, payouts, virtual accounts, and FX powered by Due
  - name: EIP-7702
    description: EIP-7702 account type detection and authorization management
  - name: Deprecated
    description: >-
      Legacy endpoints scheduled for removal. Use the newer equivalents listed
      in each endpoint's description.
paths:
  /clients/me/integrations/yield-xyz-perps/events:
    get:
      tags:
        - Yield.xyz Perps
      summary: List events
      description: >-
        Get a paginated list of a wallet's lifecycle events — order fills,
        liquidations, and stop-loss / take-profit triggers — filterable by
        venue, market, event type and time window.


        This is a proxy to the Yield.xyz Perps `GET /v1/events` endpoint. Portal
        validates the upstream response against the schema documented here
        before returning it under `data`. If Yield.xyz changes the response
        shape, Portal returns a 500 with `id: INTEGRATION_RESPONSE_SCHEMA_DRIFT`
        instead of a partial response. Upstream reference: [Yield.xyz Perps
        API](https://docs.yield.xyz).
      operationId: listYieldXyzPerpsEvents
      parameters:
        - name: offset
          in: query
          required: false
          schema:
            minimum: 0
            default: 0
            example: 0
            type: integer
          description: Offset for pagination
        - name: limit
          in: query
          required: false
          schema:
            minimum: 1
            maximum: 100
            default: 25
            example: 25
            type: integer
          description: Maximum number of items to return
        - name: address
          in: query
          required: true
          example: '0x1234567890abcdef1234567890abcdef12345678'
          schema:
            type: string
          description: Wallet address whose events to list.
        - name: providerId
          in: query
          required: false
          example: hyperliquid
          schema:
            type: string
          description: Filter by venue.
        - name: providerIds
          in: query
          required: false
          schema:
            type: string
          description: Filter by several venues (comma-separated, or repeat the parameter).
        - name: eventType
          in: query
          required: false
          schema:
            type: string
            enum:
              - order_filled
              - liquidation
              - stop_loss_triggered
              - take_profit_triggered
          description: Filter by event type.
        - name: eventTypes
          in: query
          required: false
          schema:
            type: string
          description: >-
            Filter by several event types (comma-separated, or repeat the
            parameter).
        - name: marketId
          in: query
          required: false
          schema:
            type: string
          description: Filter by market.
        - name: perpActionId
          in: query
          required: false
          schema:
            type: string
          description: Filter by the action that produced the event.
        - name: providerOrderId
          in: query
          required: false
          schema:
            type: string
          description: Filter by the venue order id.
        - name: fromDate
          in: query
          required: false
          schema:
            type: string
          description: Lower bound on `occurredAt` (ISO-8601).
        - name: toDate
          in: query
          required: false
          schema:
            type: string
          description: Upper bound on `occurredAt` (ISO-8601).
      responses:
        '200':
          description: Paginated list of events
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/YieldXyzPerpsEventsResponse'
        '400':
          description: >-
            Invalid request (a field failed validation). Also returned when
            Yield.xyz Perps rejects the request or the configured API key; a
            vendor `details.code` is surfaced when present.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Yield.xyz Perps rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: >-
            Yield.xyz Perps returned a response that does not match the schema
            Portal expects (`id: INTEGRATION_RESPONSE_SCHEMA_DRIFT`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IntegrationSchemaDriftErrorResponse'
        '503':
          description: Yield.xyz Perps is unreachable or returned an upstream error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    YieldXyzPerpsEventsResponse:
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/YieldXyzPerpsEventsPage'
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error message describing what went wrong
    IntegrationSchemaDriftErrorResponse:
      type: object
      description: >-
        Returned (HTTP 500) when a third-party response no longer matches the
        schema Portal proxies for it. The `id` is stable: SDKs should key off it
        and fail gracefully. Portal is alerted automatically and fixes the
        mapping server-side.
      required:
        - error
        - id
        - details
      properties:
        error:
          type: string
          example: >-
            yield-xyz-borrow returned a response for GET /v1/positions that does
            not match the expected schema
        id:
          type: string
          enum:
            - INTEGRATION_RESPONSE_SCHEMA_DRIFT
        details:
          type: object
          required:
            - integration
            - endpoint
            - issues
          properties:
            integration:
              type: string
              example: yield-xyz-borrow
            endpoint:
              type: string
              description: The upstream vendor endpoint whose response drifted.
              example: GET /v1/positions
            issues:
              type: array
              items:
                type: object
                required:
                  - path
                  - message
                  - code
                properties:
                  path:
                    type: string
                    description: Dotted path of the offending field in the vendor response.
                    example: supplyBalances.0.balanceUsd
                  message:
                    type: string
                    example: Expected string, received number
                  code:
                    type: string
                    example: invalid_type
    YieldXyzPerpsEventsPage:
      type: object
      required:
        - total
        - offset
        - limit
        - items
      properties:
        total:
          type: integer
          example: 150
        offset:
          type: integer
          example: 0
        limit:
          type: integer
          example: 100
        items:
          type: array
          items:
            $ref: '#/components/schemas/YieldXyzPerpsEvent'
    YieldXyzPerpsEvent:
      type: object
      description: >-
        A discrete lifecycle event (fill, liquidation, stop-loss/take-profit
        trigger).
      required:
        - id
        - eventType
        - providerId
        - occurredAt
        - order
      properties:
        id:
          type: string
          example: 550e8400-e29b-41d4-a716-446655440010
        eventType:
          type: string
          description: >-
            Known values: `order_filled`, `liquidation`, `stop_loss_triggered`,
            `take_profit_triggered`. Treat unknown values as opaque.
          example: order_filled
        providerId:
          type: string
          description: Venue slug (passed through unchanged).
          example: hyperliquid
        occurredAt:
          type: string
          format: date-time
          example: '2026-04-23T07:52:05.187Z'
        marketId:
          type: string
          nullable: true
          example: hyperliquid-eth-usdc
        perpActionId:
          type: string
          nullable: true
          description: Null for liquidations.
          example: 550e8400-e29b-41d4-a716-446655440001
        providerOrderId:
          type: string
          nullable: true
          example: '394438950581'
        explorerUrl:
          type: string
          nullable: true
        order:
          $ref: '#/components/schemas/YieldXyzPerpsEventOrder'
    YieldXyzPerpsEventOrder:
      type: object
      description: Order details carried on an event.
      required:
        - orderId
        - marketId
        - asset
        - side
        - type
        - originalSizeBase
        - remainingSizeBase
        - reduceOnly
        - isPositionLevel
        - clientOrderId
        - childOrderIds
        - createdAt
      properties:
        orderId:
          type: string
          example: '394438950581'
        marketId:
          type: string
          example: hyperliquid-eth-usdc
        asset:
          type: string
          example: ETH
        side:
          type: string
          description: 'Known values: `buy`, `sell`.'
          example: buy
        type:
          type: string
          description: 'Known values: `market`, `limit`, `stop_loss`, `take_profit`.'
          example: market
        originalSizeBase:
          type: string
          example: '0.0063'
        remainingSizeBase:
          type: string
          example: '0.0'
        limitPrice:
          type: number
          nullable: true
          example: 2395.2
        timeInForce:
          type: string
          nullable: true
          description: 'Known values: `ioc`, `gtc`, `alo`.'
          example: ioc
        triggerPrice:
          type: number
          nullable: true
        reduceOnly:
          type: boolean
          example: false
        isPositionLevel:
          type: boolean
          example: false
        clientOrderId:
          nullable: true
          description: Opaque client id (string or object), returned untouched.
          oneOf:
            - type: string
            - type: object
        childOrderIds:
          type: array
          items:
            type: string
        createdAt:
          type: string
          format: date-time
          example: '2026-04-23T07:52:05.187Z'
        closedPnl:
          type: string
          nullable: true
          example: '-12.45'
        fillPrice:
          type: number
          nullable: true
          example: 2500.5
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >
        Client API Key or Client Session Token (CST). Pass as a Bearer token in
        the

        Authorization header.

````