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

# Get active user orders by market

> Returns active orders for a user on a specific market.

Note:
- response field names follow the API payload exactly (lowercase keys)
- `baseAsset` and `quoteAsset` fields from upstream are intentionally omitted




## OpenAPI

````yaml /kuru-exchange/openapi.yaml get /api/v2/{userAddress}/user/orders/active/{marketAddress}
openapi: 3.0.3
info:
  title: Kuru Exchange WebSocket Server API
  description: >
    # Introduction


    The Kuru Exchange WebSocket Server provides REST and WebSocket APIs for
    streaming Kuru Exchange's orderbook data.


    ## Key Features


    - **Four-State Orderbook Model**: Reflects Monad's BFT consensus pipeline
    (Proposed, Voted, Finalized, Committed)

    - **High Performance**: Low latency orderbook updates directly consuming
    from Monad's event ring.

    - **Real-Time Streaming**: WebSocket subscriptions with efficient broadcast


    ## Monad Consensus States


    | State | Description | Use Case |

    |-------|-------------|----------|

    | **Proposed** | Block execution started, speculative | Lowest latency,
    highest risk |

    | **Voted** | Block received quorum certificate | Early confirmation |

    | **Finalized** | Block finalized (reorg-proof) | Safe for most applications
    |

    | **Committed** | State root verified | Maximum safety |


    ## Base URLs


    - **REST API**: `https://exchange.kuru.io`

    - **WebSocket**: `wss://exchange.kuru.io/ws`


    ## WebSocket Streams


    Connect to `wss://exchange.kuru.io` and send JSON messages to
    subscribe/unsubscribe.


    ### Subscription Format


    ```json

    {
      "method": "SUBSCRIBE",
      "params": ["mon_usdc@depth", "ethusdc@trade"],
      "id": 1
    }

    ```


    ### Available Stream Types


    | Stream | Description | Example |

    |--------|-------------|---------|

    | `<symbol>@depth` | Full orderbook updates (committed state) |
    `mon_usdc@depth` |

    | `<symbol>@depth5` | Top 5 levels | `mon_usdc@depth5` |

    | `<symbol>@depth10` | Top 10 levels | `mon_usdc@depth10` |

    | `<symbol>@depth20` | Top 20 levels | `mon_usdc@depth20` |

    | `<symbol>@depth@<state>` | Specific state orderbook |
    `mon_usdc@depth@proposed` |

    | `<symbol>@monadDepth` | All states in one message | `mon_usdc@monadDepth`
    |

    | `<symbol>@trade` | Trade stream | `mon_usdc@trade` |


    ### State Values


    - `proposed` - Block execution started

    - `voted` - Block received QC

    - `finalized` - Block finalized (reorg-proof)

    - `committed` - State root verified


    ## Rate Limits


    ### REST API


    The REST API uses a **token bucket** algorithm per IP address.


    | Parameter | Value | Description |

    |-----------|-------|-------------|

    | Refill rate | 1200 req/min (20 req/sec) | Tokens added continuously |

    | Burst capacity | 100 tokens | Max tokens in the bucket — allows short
    bursts |

    | Tracking | Per IP address | Each IP has its own independent bucket |


    Each request consumes a **weight** from the bucket. Heavier endpoints
    consume more tokens:


    | Endpoint | Weight |

    |----------|--------|

    | `GET /health` | 1 |

    | `GET /api/v3/trades` | 1 |

    | `GET /api/v3/ticker/24hr` | 1 |

    | `GET /api/v3/exchangeInfo` | 10 |

    | `GET /api/v3/klines` (limit ≤ 100) | 1 |

    | `GET /api/v3/klines` (limit 101–500) | 2 |

    | `GET /api/v3/klines` (limit > 500) | 5 |

    | `GET /api/v3/depth` (limit ≤ 100) | 1 |

    | `GET /api/v3/depth` (limit 101–500) | 5 |

    | `GET /api/v3/depth` (limit 501–1000) | 10 |

    | `GET /api/v3/depth` (limit > 1000) | 20 |


    When the bucket is empty the server returns **HTTP 429**. The response
    includes a `Retry-After` header indicating how many seconds until the next
    token is available.


    ### WebSocket


    | Limit | Value | Description |

    |-------|-------|-------------|

    | Connections per IP | 5 | Max concurrent WebSocket connections from a
    single IP |

    | Subscriptions per connection | 1024 | Max active stream subscriptions on
    one connection |

    | Broadcast buffer | 32,768 messages | Per-channel internal queue before
    backpressure |


    Connections that exceed the per-IP limit are rejected at the TCP accept
    stage. Subscription requests that exceed the per-connection limit are
    silently ignored — subscribe to fewer streams or open a new connection.
  version: 1.0.0
  contact:
    name: Kuru Exchange
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://exchange.kuru.io
    description: Exchange server
security: []
tags:
  - name: Market Data
    description: Market data endpoints (orderbook, trades, tickers)
  - name: User Data
    description: User-specific order and trade event endpoints
  - name: Exchange Info
    description: Exchange metadata and market information
  - name: Health
    description: Health and status endpoints
paths:
  /api/v2/{userAddress}/user/orders/active/{marketAddress}:
    get:
      tags:
        - User Data
      summary: Get active user orders by market
      description: >
        Returns active orders for a user on a specific market.


        Note:

        - response field names follow the API payload exactly (lowercase keys)

        - `baseAsset` and `quoteAsset` fields from upstream are intentionally
        omitted
      operationId: getActiveUserOrdersV2
      parameters:
        - name: userAddress
          in: path
          required: true
          description: Ethereum address of the user (case-insensitive)
          schema:
            type: string
            example: '0x4869a4c7657cef5e5496c9ce56dde4cd593e4923'
        - name: marketAddress
          in: path
          required: true
          description: Market contract address
          schema:
            type: string
            example: '0x131a2e70a5b31a517a74b8c567149bc294470da9'
        - name: limit
          in: query
          required: false
          description: Number of active orders to return
          schema:
            type: integer
            minimum: 1
            example: 1
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActiveUserOrdersV2Response'
              example:
                success: true
                code: 200
                timestamp: 1773755594562
                data:
                  data:
                    - orderid: 11560335
                      marketaddress: '0x131a2e70a5b31a517a74b8c567149bc294470da9'
                      owner: '0x4869a4c7657cef5e5496c9ce56dde4cd593e4923'
                      size: '810856890131771'
                      price: '2389000'
                      isbuy: true
                      remainingsize: '810856890131771'
                      iscanceled: false
                      blocknumber: '62028413'
                      txindex: '7'
                      logindex: '57'
                      transactionhash: >-
                        0xb9c3b4077193010527f3570490edb25fc9ac441f786ab8c731c1cdf5b6bb2019
                      triggertime: '2026-03-17T13:53:08.000Z'
                      fliporderid: 0
                      flipprice: 0
                      lpid: ''
                      sizeprecision: '10000000000'
                      priceprecision: '100000000'
                  pagination:
                    total: 1
                    page: 1
                    pageSize: 1
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserOrderEventsError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserOrderEventsError'
      servers:
        - url: https://api.kuru.io
          description: Dedicated user API server
components:
  schemas:
    ActiveUserOrdersV2Response:
      type: object
      required:
        - success
        - code
        - timestamp
        - data
      properties:
        success:
          type: boolean
          example: true
        code:
          type: integer
          example: 200
        timestamp:
          type: integer
          format: int64
          example: 1773755594562
        data:
          $ref: '#/components/schemas/ActiveUserOrdersV2Data'
    UserOrderEventsError:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          example: >-
            Invalid eventType: "swap". Must be one of: order-created,
            order-canceled, trade
    ActiveUserOrdersV2Data:
      type: object
      required:
        - data
        - pagination
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ActiveOrderV2'
        pagination:
          $ref: '#/components/schemas/UserOrderEventsPagination'
    ActiveOrderV2:
      type: object
      description: Active user order payload with original lowercase keys
      required:
        - orderid
        - marketaddress
        - owner
        - size
        - price
        - isbuy
        - remainingsize
        - iscanceled
        - blocknumber
        - txindex
        - logindex
        - transactionhash
        - triggertime
        - fliporderid
        - flipprice
        - lpid
        - sizeprecision
        - priceprecision
      properties:
        orderid:
          type: integer
          format: int64
          example: 11560335
        marketaddress:
          type: string
          example: '0x131a2e70a5b31a517a74b8c567149bc294470da9'
        owner:
          type: string
          example: '0x4869a4c7657cef5e5496c9ce56dde4cd593e4923'
        size:
          type: string
          example: '810856890131771'
        price:
          type: string
          example: '2389000'
        isbuy:
          type: boolean
          example: true
        remainingsize:
          type: string
          example: '810856890131771'
        iscanceled:
          type: boolean
          example: false
        blocknumber:
          type: string
          example: '62028413'
        txindex:
          type: string
          example: '7'
        logindex:
          type: string
          example: '57'
        transactionhash:
          type: string
          example: '0xb9c3b4077193010527f3570490edb25fc9ac441f786ab8c731c1cdf5b6bb2019'
        triggertime:
          type: string
          format: date-time
          example: '2026-03-17T13:53:08.000Z'
        fliporderid:
          type: integer
          format: int64
          example: 0
        flipprice:
          type: integer
          format: int64
          example: 0
        lpid:
          type: string
          example: ''
        sizeprecision:
          type: string
          example: '10000000000'
        priceprecision:
          type: string
          example: '100000000'
    UserOrderEventsPagination:
      type: object
      required:
        - total
        - page
        - pageSize
      properties:
        total:
          type: integer
          description: Number of events returned in this page
          example: 12
        page:
          type: integer
          example: 1
        pageSize:
          type: integer
          example: 100

````