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

# Get Orders

## Overview

<Info>
  To avoid ambiguity, we denote the smallest possible multiple of USDC (0.000001 USDC) as one `uusdc`,
  which stands for µUSDC (micro-USDC), and denote the smallest possible multiple of a contract (0.01 contract)
  as one `ccontract` (centicontract).

  User-facing USDC balances are specified as fixed-point strings (e.g. `"1.2625"` for USDC). Contract quantities
  in the API and SDK are specified as integer `ccontracts` strings (e.g. `"1050"` for 10.50 contracts at precision 2).
</Info>

Retrieve orders for a user with flexible filtering and cursor-based pagination. This endpoint supports filtering by status, market, action, side, and date range, with server-side sorting and efficient pagination for large order histories.

## Filtering by Status

The `status` parameter accepts:

* `pending` - Orders waiting to be filled
* `filled` - Fully executed orders
* `cancelled` - Cancelled orders
* `closed` - Convenience filter for both `filled` and `cancelled` orders (useful for order history)

## Pagination

This endpoint uses cursor-based pagination for efficient traversal of large datasets:

1. Make an initial request with your desired `limit` (default: 50, max: 200)
2. Check `pagination.hasMore` to see if more results exist
3. Use `pagination.nextCursor` in subsequent requests to fetch the next page

<Warning>
  Cursors are opaque strings and should not be modified. They encode the position in the result set and are only valid for the same query parameters.
</Warning>

## Example: Fetching Order History

```bash theme={null}
# First page of closed orders, sorted by most recent
curl "https://api.bison.markets/kalshi/orders?userId=0x...&status=closed&sortBy=updatedAt&sortOrder=desc&limit=10"

# Response includes pagination info
# {
#   "orders": [...],
#   "pagination": {
#     "total": 47,
#     "hasMore": true,
#     "nextCursor": "eyJ0IjoxNzAyMzQ1Njc4OTAwLCJpZCI6ImFiYzEyMyJ9"
#   }
# }

# Fetch next page using cursor
curl "https://api.bison.markets/kalshi/orders?userId=0x...&status=closed&sortBy=updatedAt&sortOrder=desc&limit=10&cursor=eyJ0IjoxNzAyMzQ1Njc4OTAwLCJpZCI6ImFiYzEyMyJ9"
```

## Example: Pending Orders

```bash theme={null}
# Get all pending orders (typically a small set, no pagination needed)
curl "https://api.bison.markets/kalshi/orders?userId=0x...&status=pending"
```


## OpenAPI

````yaml GET /kalshi/orders
openapi: 3.0.0
info:
  version: 1.0.0
  title: Bison API
servers: []
security: []
paths:
  /kalshi/orders:
    get:
      parameters:
        - schema:
            type: string
            pattern: ^0x[a-fA-F0-9]{40}$
            description: Ethereum address of the user
            example: '0x1234567890123456789012345678901234567890'
          required: true
          description: Ethereum address of the user
          name: userId
          in: query
        - schema:
            type: string
            enum:
              - pending
              - filled
              - cancelled
              - closed
            description: Filter by status. "closed" matches filled OR cancelled.
          required: false
          description: Filter by status. "closed" matches filled OR cancelled.
          name: status
          in: query
        - schema:
            type: string
            description: Filter by market ticker
          required: false
          description: Filter by market ticker
          name: marketId
          in: query
        - schema:
            type: string
            enum:
              - buy
              - sell
            description: Filter by order action
          required: false
          description: Filter by order action
          name: action
          in: query
        - schema:
            type: string
            enum:
              - 'yes'
              - 'no'
            description: Filter by contract side
          required: false
          description: Filter by contract side
          name: side
          in: query
        - schema:
            type: number
            nullable: true
            description: Orders created after this timestamp (ms)
          required: false
          description: Orders created after this timestamp (ms)
          name: createdAfter
          in: query
        - schema:
            type: number
            nullable: true
            description: Orders created before this timestamp (ms)
          required: false
          description: Orders created before this timestamp (ms)
          name: createdBefore
          in: query
        - schema:
            type: string
            enum:
              - createdAt
              - updatedAt
            description: 'Field to sort by (default: createdAt)'
          required: false
          description: 'Field to sort by (default: createdAt)'
          name: sortBy
          in: query
        - schema:
            type: string
            enum:
              - asc
              - desc
            description: 'Sort direction (default: desc)'
          required: false
          description: 'Sort direction (default: desc)'
          name: sortOrder
          in: query
        - schema:
            type: number
            minimum: 1
            maximum: 200
            description: 'Max orders per page (default: 50, max: 200)'
          required: false
          description: 'Max orders per page (default: 50, max: 200)'
          name: limit
          in: query
        - schema:
            type: string
            description: Pagination cursor from previous response
          required: false
          description: Pagination cursor from previous response
          name: cursor
          in: query
      responses:
        '200':
          description: Successfully retrieved orders
          content:
            application/json:
              schema:
                type: object
                properties:
                  orders:
                    type: array
                    items:
                      type: object
                      properties:
                        kalshiOrderId:
                          type: string
                        userId:
                          type: string
                        marketId:
                          type: string
                        side:
                          type: string
                          enum:
                            - 'yes'
                            - 'no'
                        action:
                          type: string
                          enum:
                            - buy
                            - sell
                        requestedCcontracts:
                          type: string
                        filledCcontracts:
                          type: string
                        filledUusdc:
                          type: string
                        priceUusdc:
                          type: string
                        chain:
                          type: string
                        status:
                          type: string
                          enum:
                            - pending
                            - filled
                            - cancelled
                        createdAt:
                          type: number
                        updatedAt:
                          type: number
                      required:
                        - kalshiOrderId
                        - userId
                        - marketId
                        - side
                        - action
                        - requestedCcontracts
                        - filledCcontracts
                        - filledUusdc
                        - priceUusdc
                        - chain
                        - status
                        - createdAt
                        - updatedAt
                  pagination:
                    type: object
                    properties:
                      total:
                        type: number
                      hasMore:
                        type: boolean
                      nextCursor:
                        type: string
                    required:
                      - total
                      - hasMore
                required:
                  - orders
                  - pagination
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error

````