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

# Get unmatched orders

> List your open orders resting on the exchange

Returns all of the caller's **open orders** that are currently resting on the exchange and available to be matched.

## Request

`GET /user/getUnmatched`

Takes no parameters.

<CodeGroup>
  ```bash curl theme={null}
  curl https://api.4casters.io/user/getUnmatched \
    -H "Authorization: Bearer YOUR_TOKEN"
  ```
</CodeGroup>

## Response

<ResponseField name="data.unmatched" type="array">
  Array of open orders, sorted ascending by game start time.

  <Expandable title="UnmatchedOrder">
    <ResponseField name="id" type="string">Order id.</ResponseField>
    <ResponseField name="txID" type="string">Transaction id of the order's creation.</ResponseField>
    <ResponseField name="type" type="string">`moneyline`, `spread`, `total`, or `moneyline1x2`.</ResponseField>
    <ResponseField name="bet" type="number">Original `bet` (risk).</ResponseField>
    <ResponseField name="odds" type="integer">American odds.</ResponseField>
    <ResponseField name="spread" type="number">Present for `spread`.</ResponseField>
    <ResponseField name="total" type="number">Present for `total`.</ResponseField>
    <ResponseField name="participantID" type="string">Present for `moneyline` and `spread` — the participant being backed.</ResponseField>
    <ResponseField name="otherParticipantID" type="string">The opposite participant id (whose side is being offered).</ResponseField>
    <ResponseField name="filled" type="number">Risk that has already been matched.</ResponseField>
    <ResponseField name="offered" type="number">Original offer amount (matched + remaining).</ResponseField>
    <ResponseField name="remaining" type="number">Win amount still available on this order (taker pays risk to claim it).</ResponseField>
    <ResponseField name="takenRatio" type="number">Fraction of the order that has been matched, between `0` and `1`.</ResponseField>
    <ResponseField name="expiry" type="string">Cancel-at timestamp (ISO 8601). `null` if no expiry was set.</ResponseField>
    <ResponseField name="createdAt" type="string">ISO 8601 timestamp.</ResponseField>
    <ResponseField name="origin" type="string">`offer` or `wager`.</ResponseField>
    <ResponseField name="userReference" type="string">Client-defined identifier preserved from place time.</ResponseField>
    <ResponseField name="wagerRequestID" type="string">Server-generated id grouping every fill / offer derived from the original place request.</ResponseField>
    <ResponseField name="graded" type="boolean">Always `false`.</ResponseField>

    <ResponseField name="closed" type="boolean" />

    <ResponseField name="adminRefund" type="boolean" />

    <Snippet file="types/game-summary.mdx" />
  </Expandable>
</ResponseField>

### Example

<CodeGroup>
  ```json JSON theme={null}
  {
    "data": {
      "unmatched": [
        {
          "id": "62851e3bd54b74e52c39953c",
          "txID": "62851e3bd54b74e52c39953b",
          "type": "moneyline",
          "bet": 100,
          "odds": 165,
          "spread": null,
          "total": null,
          "participantID": "6165e6e23c65e61a09bf1f73",
          "otherParticipantID": "626dca8a83899580a06ba87e",
          "filled": 0,
          "offered": 100,
          "remaining": 100,
          "takenRatio": 0,
          "expiry": "2022-05-18T23:08:00.000Z",
          "createdAt": "2022-05-18T16:26:35.601Z",
          "origin": "offer",
          "graded": false,
          "closed": false,
          "adminRefund": false,
          "game": {
            "id": "62823d9d75d894042dfee218",
            "league": "NHL",
            "sport": "hockey",
            "start": "2022-05-18T23:08:00.000Z",
            "ended": false,
            "eventName": "NEW YORK RANGERS VS CAROLINA HURRICANES",
            "isFutures": false,
            "participants": [/* ... */]
          }
        }
      ]
    }
  }
  ```
</CodeGroup>


## OpenAPI

````yaml GET /user/getUnmatched
openapi: 3.1.0
info:
  title: 4casters REST API
  version: 1.0.0
  description: >-
    Public REST API for the 4casters peer-to-peer betting exchange. Use this API
    to manage your account, query the orderbook and games, and place / edit /
    cancel orders.


    All responses (unless noted otherwise) are JSON envelopes of the form `{
    "data": ... }`.
  contact:
    name: 4casters
    url: https://4casters.io
servers:
  - url: https://api.4casters.io
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Authentication
    description: Login and account session management
  - name: User
    description: Read account info, bets, and orders
  - name: Orders
    description: Place, edit, look up, and cancel orders
  - name: Markets
    description: Browse leagues, games, participants, and orderbooks
  - name: Affiliate
    description: Affiliate / referral commission
paths:
  /user/getUnmatched:
    get:
      tags:
        - User
      summary: Get unmatched orders
      description: >-
        Return all of the caller's open (unmatched) orders that are currently
        resting on the exchange and available to be matched.
      responses:
        '200':
          description: Unmatched orders list
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      unmatched:
                        type: array
                        items:
                          $ref: '#/components/schemas/UnmatchedOrder'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    UnmatchedOrder:
      type: object
      description: An open order that is currently resting on the exchange.
      properties:
        id:
          type: string
        txID:
          type: string
        type:
          $ref: '#/components/schemas/MarketType'
        bet:
          type: number
        odds:
          type: integer
        spread:
          type: number
          nullable: true
        total:
          type: number
          nullable: true
        participantID:
          type: string
          description: Present for `moneyline` / `spread`.
        otherParticipantID:
          type: string
          description: The opposite participant id (the one whose side is being offered).
        expiry:
          type: string
          format: date-time
          nullable: true
        filled:
          type: number
        offered:
          type: number
        remaining:
          type: number
        takenRatio:
          type: number
        createdAt:
          type: string
          format: date-time
        origin:
          type: string
          description: '`offer` or `wager`.'
        graded:
          type: boolean
        closed:
          type: boolean
        adminRefund:
          type: boolean
        userReference:
          type: string
        wagerRequestID:
          type: string
        game:
          $ref: '#/components/schemas/GameSummary'
    MarketType:
      type: string
      enum:
        - moneyline
        - spread
        - total
        - moneyline1x2
      description: >-
        Market type. `moneyline1x2` is **soccer-only** (three-way money line:
        home / away / draw).
    GameSummary:
      type: object
      properties:
        id:
          type: string
        league:
          type: string
        sport:
          type: string
        start:
          type: string
          format: date-time
        ended:
          type: boolean
        eventName:
          type: string
          nullable: true
        isFutures:
          type: boolean
        participants:
          type: array
          items:
            $ref: '#/components/schemas/Participant'
    Participant:
      type: object
      properties:
        id:
          type: string
        longName:
          type: string
        shortName:
          type: string
        homeAway:
          type: string
          enum:
            - home
            - away
        mainPitcher:
          type: string
          nullable: true
        rotationNumber:
          type: string
          nullable: true
        futuresSide:
          type: string
          nullable: true
        score:
          type: number
          description: Final score; only present for ended games.
  responses:
    Unauthorized:
      description: Missing or invalid auth token
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Pass your auth token in the `Authorization` header. The `Bearer` prefix
        is optional; the server also accepts a signed `auth` cookie or a `token`
        field in the request body.

````