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

# Get Perp Unfilled Orders

> Retrieve all open (unfilled) limit or stop orders for a specific wallet.

### Query Parameters

<ParamField query="wallet" type="string" required>
  The wallet address to query orders for.
</ParamField>

<ParamField query="chainId" type="string">
  Filter orders by chain ID (e.g. `evm:42161`). If omitted, returns orders from all supported chains.
</ParamField>

<ParamField query="dex" type="string">
  Filter orders by DEX. Supported values: `gains`, `lighter`. If omitted, returns orders from all supported DEXes.
</ParamField>

### Response

<ResponseField name="data" type="array">
  Array of unfilled perpetual orders.

  <Expandable title="PerpsOrder Object">
    <ResponseField name="id" type="string">Unique order identifier</ResponseField>
    <ResponseField name="type" type="string">Order type: `STOP` or `LIMIT`</ResponseField>
    <ResponseField name="address" type="string">Contract address associated with the order</ResponseField>
    <ResponseField name="chainId" type="string">Blockchain ID</ResponseField>
    <ResponseField name="marketId" type="string">Market pair identifier</ResponseField>
    <ResponseField name="exchange" type="string">DEX name. Possible values: `gains`, `hyperliquid`, `gte`, `lighter`</ResponseField>
    <ResponseField name="side" type="string">Order side: `BUY` (Long) or `SELL` (Short)</ResponseField>
    <ResponseField name="amountUSD" type="number">Order size in USD</ResponseField>
    <ResponseField name="amountRaw" type="string">Order size in raw token units (bigint as string). Decimals are the token's on-chain decimals, except for Lighter which always uses 18 decimals.</ResponseField>
    <ResponseField name="collateral" type="number">Collateral amount</ResponseField>
    <ResponseField name="currentLeverage" type="number">Target leverage</ResponseField>
    <ResponseField name="entryPriceQuote" type="number">Target entry price</ResponseField>
    <ResponseField name="currentPriceQuote" type="number">Current market price</ResponseField>
    <ResponseField name="liquidationPriceQuote" type="number">Estimated liquidation price</ResponseField>
    <ResponseField name="unrealizedPnlUSD" type="number">Unrealized Profit/Loss in USD</ResponseField>
    <ResponseField name="realizedPnlUSD" type="number">Realized Profit/Loss in USD</ResponseField>
    <ResponseField name="realizedPnlPercent" type="number">Realized Profit/Loss as percentage</ResponseField>
    <ResponseField name="unrealizedPnlPercent" type="number">Unrealized Profit/Loss as percentage</ResponseField>
    <ResponseField name="feesOpeningUSD" type="number">Opening fees paid in USD</ResponseField>
    <ResponseField name="feesClosingUSD" type="number">Closing fees paid in USD</ResponseField>
    <ResponseField name="feesFundingUSD" type="number">Funding fees paid/received in USD</ResponseField>
    <ResponseField name="collateralAsset" type="string">Address of collateral token</ResponseField>
    <ResponseField name="tp" type="array">Array of take-profit orders. Each object contains: `size` (bigint), `price` (number), `id` (number)</ResponseField>
    <ResponseField name="sl" type="array">Array of stop-loss orders. Each object contains: `size` (bigint), `price` (number), `id` (number)</ResponseField>
    <ResponseField name="openDate" type="string">Date when the order was created (ISO 8601 format)</ResponseField>
    <ResponseField name="lastUpdate" type="string">Date of last order update (ISO 8601 format)</ResponseField>
  </Expandable>
</ResponseField>


## OpenAPI

````yaml GET /2/wallet/positions/perp/unfilled
openapi: 3.0.0
info:
  version: 1.0.0
  title: Mobula API
  description: >-
    Documentation of the Mobula API


    **Demo API**: The default server (demo-api.mobula.io) is a demo API with
    rate limits.

    For production use, please use api.mobula.io with an API key from
    https://admin.mobula.io
servers:
  - url: https://demo-api.mobula.io/api/
    description: Demo API (rate limited, for testing only)
  - url: https://api.mobula.io/api/
    description: Production API (requires API key)
security: []
tags:
  - name: V2 - Token
    description: Token details, price, security, ATH, and holder data
  - name: V2 - Market Data
    description: Market details, OHLCV history, and lighthouse metrics
  - name: V2 - Trades
    description: Token trades, enriched trades, and trade filters
  - name: V2 - Wallet
    description: Wallet positions, activity, trades, analysis, and labels
  - name: V2 - Assets
    description: Cross-chain asset details and price history
  - name: V2 - Swap
    description: Swap quoting and execution
  - name: V2 - Perps
    description: Perpetual futures quoting, execution, and positions
  - name: V2 - Bridge
    description: Cross-chain bridge quoting and intent status (Alpha Preview)
  - name: V2 - DeFi
    description: Bonding pools and pulse data
  - name: V2 - Search
    description: Universal fast search
  - name: V2 - Blockchains
    description: System metadata and chain listings
  - name: V1 - Market Data
    description: Market prices, history, sparklines, pairs, and multi-data
  - name: V1 - Wallet
    description: Wallet portfolio, transactions, history, and NFTs
  - name: V1 - Token
    description: First buyers
  - name: V1 - Trades
    description: Market trades by pair
  - name: V1 - Metadata
    description: Token metadata, categories, trendings, and news
  - name: V1 - Assets
    description: List all assets
  - name: V1 - Search
    description: Search for assets, tokens, and pairs
  - name: V1 - DeFi
    description: Bonding pool pulse data
  - name: V1 - Blockchains
    description: Blockchain listings, pairs, and stats
  - name: V1 - Webhooks
    description: Webhook management
  - name: V1 - Feed
    description: Custom feed creation
paths:
  /2/wallet/positions/perp/unfilled:
    get:
      tags:
        - V2 - Perps
      summary: Get unfilled perp orders
      description: Retrieve all open (unfilled) limit or stop orders for a specific wallet.
      parameters:
        - schema:
            type: string
            description: Wallet address
          required: true
          description: Wallet address
          name: wallet
          in: query
        - schema:
            type: string
            description: >-
              Comma-separated list of chain IDs (e.g.,
              "evm:1,evm:8453,solana:solana"). If omitted, all chains.
          required: false
          description: >-
            Comma-separated list of chain IDs (e.g.,
            "evm:1,evm:8453,solana:solana"). If omitted, all chains.
          name: chainIds
          in: query
        - schema:
            type: number
            minimum: 1
            maximum: 500
            description: 'Number of positions per page (1-500, default: 100)'
          required: false
          description: 'Number of positions per page (1-500, default: 100)'
          name: limit
          in: query
        - schema:
            type: number
            nullable: true
            minimum: 0
            description: 'Offset for pagination (default: 0)'
          required: false
          description: 'Offset for pagination (default: 0)'
          name: offset
          in: query
        - schema:
            type: string
            description: Cursor for cursor-based pagination (takes precedence over offset)
          required: false
          description: Cursor for cursor-based pagination (takes precedence over offset)
          name: cursor
          in: query
        - schema:
            type: string
            enum:
              - before
              - after
            description: 'Cursor direction (default: after)'
          required: false
          description: 'Cursor direction (default: after)'
          name: cursorDirection
          in: query
        - schema:
            type: string
            enum:
              - lastActivity
              - realizedPnl
            description: 'Sort field (default: lastActivity)'
          required: false
          description: 'Sort field (default: lastActivity)'
          name: sortBy
          in: query
        - schema:
            type: string
            enum:
              - asc
              - desc
            description: 'Sort order (default: desc)'
          required: false
          description: 'Sort order (default: desc)'
          name: order
          in: query
        - schema:
            anyOf:
              - type: boolean
              - type: string
            description: >-
              Include fees in PnL calculation (deduct total_fees_paid_usd from
              PnL)
          required: true
          description: >-
            Include fees in PnL calculation (deduct total_fees_paid_usd from
            PnL)
          name: includeFees
          in: query
        - schema:
            anyOf:
              - type: boolean
              - type: string
            description: >-
              Use swap recipient mode (query wallet_positions_recipients table
              instead of wallet_positions)
          required: true
          description: >-
            Use swap recipient mode (query wallet_positions_recipients table
            instead of wallet_positions)
          name: useSwapRecipient
          in: query
        - schema:
            anyOf:
              - type: boolean
              - type: string
            description: >-
              Include all tokens the wallet holds, not just tokens with trading
              history
          required: true
          description: >-
            Include all tokens the wallet holds, not just tokens with trading
            history
          name: includeAllBalances
          in: query
        - schema:
            anyOf:
              - type: boolean
              - type: string
            description: >-
              Return only positions still held on-chain (filters out fully
              closed positions)
          required: true
          description: >-
            Return only positions still held on-chain (filters out fully closed
            positions)
          name: onlyOpen
          in: query
        - schema:
            type: number
            nullable: true
            minimum: 0
            description: >-
              Drop positions worth less than this USD value (live RPC balance ×
              live pool price)
          required: false
          description: >-
            Drop positions worth less than this USD value (live RPC balance ×
            live pool price)
          name: minPositionValueUSD
          in: query
      responses:
        '200':
          description: Unfilled perp orders response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        entryPriceQuote:
                          type: number
                        currentLeverage:
                          type: number
                        amountUSD:
                          type: number
                        amountRaw:
                          type: number
                        side:
                          type: string
                          enum:
                            - BUY
                            - SELL
                        liquidationPriceQuote:
                          type: number
                        currentPriceQuote:
                          type: number
                        realizedPnlUSD:
                          type: number
                        unrealizedPnlUSD:
                          type: number
                        realizedPnlPercent:
                          type: number
                        unrealizedPnlPercent:
                          type: number
                        tp:
                          type: array
                          items:
                            type: object
                            properties:
                              size:
                                type: number
                              price:
                                type: number
                              id:
                                type: number
                            required:
                              - size
                              - price
                              - id
                        sl:
                          type: array
                          items:
                            type: object
                            properties:
                              size:
                                type: number
                              price:
                                type: number
                              id:
                                type: number
                            required:
                              - size
                              - price
                              - id
                        marketId:
                          type: string
                        exchange:
                          type: string
                          enum:
                            - gains
                            - hyperliquid
                            - gte
                            - lighter
                            - drift
                        feesOpeningUSD:
                          type: number
                        feesClosingUSD:
                          type: number
                        feesFundingUSD:
                          type: number
                        openDate:
                          type: string
                        lastUpdate:
                          type: string
                        address:
                          type: string
                        chainId:
                          type: string
                        collateralAsset:
                          type: string
                        type:
                          type: string
                          enum:
                            - STOP
                            - LIMIT
                      required:
                        - id
                        - entryPriceQuote
                        - currentLeverage
                        - amountUSD
                        - amountRaw
                        - side
                        - liquidationPriceQuote
                        - currentPriceQuote
                        - realizedPnlUSD
                        - unrealizedPnlUSD
                        - realizedPnlPercent
                        - unrealizedPnlPercent
                        - tp
                        - sl
                        - marketId
                        - exchange
                        - feesOpeningUSD
                        - feesClosingUSD
                        - feesFundingUSD
                        - openDate
                        - lastUpdate
                        - address
                        - chainId
                        - collateralAsset
                        - type
                required:
                  - data

````