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

# List share merges

> Retrieve your share merges with optional state and market filters.

## Query Parameters

<ParamField query="market_condition_id" type="string">
  Filter share merges by market condition id.
</ParamField>

<ParamField query="state" type="string">
  State filter (lowercase, case-sensitive): `waiting_to_sign`, `in_process`, `done`, `failed`, `expired`.
</ParamField>

<ParamField query="limit" type="integer" default="50">
  Number of records to return. Range: 1-100.
</ParamField>

<ParamField query="cursor" type="string">
  Cursor from `meta.next_cursor` (`before_id` keyset pagination).
</ParamField>

## Response

<ResponseField name="data" type="array">
  Share merge rows, newest first.
</ResponseField>

<Expandable title="Data fields">
  <ResponseField name="pubkey" type="string">
    Share merge public key.
  </ResponseField>

  <ResponseField name="message" type="string | null">
    Program message from the draft. Sign it while the merge is `waiting_to_sign`. The value is kept after signing. `null` only when the draft could not be created (state `failed`).
  </ResponseField>

  <ResponseField name="market_condition_id" type="string">
    Market condition id.
  </ResponseField>

  <ResponseField name="state" type="string">
    Lifecycle state: (`waiting_to_sign`, `in_process`, `done`, `failed`, `expired`).
  </ResponseField>

  <ResponseField name="amount" type="string">
    Requested amount.
  </ResponseField>

  <ResponseField name="onchain_amount" type="string | null">
    Amount settled on chain. `null` unless `state` is `done`.
  </ResponseField>

  <ResponseField name="created" type="integer">
    Created timestamp (Unix seconds).
  </ResponseField>
</Expandable>

<ResponseField name="meta" type="object | null">
  Pagination for this list: `limit` and `next_cursor`. See [Pagination](/api-reference/pagination). On error responses, `meta` is `null`.
</ResponseField>

<ResponseField name="error" type="object | null">
  `null` on success. Error object on failed requests.
</ResponseField>

<ResponseExample>
  ```json 200 theme={null}
  {
    "data": [
      {
        "pubkey": "HwqEtgeDoWHLqyMQgjwj7BGWmCrZ46m6y5bALMfYcGYY",
        "message": "Program call payload to merge shares.",
        "market_condition_id": "7n9G9WfQ2V7d6hM3XK8pQ4LwR2eY6aT1uJ5cB8mN3qPz",
        "state": "done",
        "amount": "10.000000",
        "onchain_amount": "10.000000",
        "created": 1714303300
      }
    ],
    "meta": {
      "limit": 50,
      "next_cursor": "eyJiZWZvcmVfaWQiOjEyMzQ1fQ"
    },
    "error": null
  }
  ```

  ```json 400 theme={null}
  {
    "data": null,
    "meta": null,
    "error": {
      "code": -11,
      "slug": "invalid_request_params",
      "message": "Validation Error",
      "details": []
    }
  }
  ```

  ```json 401 theme={null}
  {
    "data": null,
    "meta": null,
    "error": {
      "code": -12,
      "slug": "authentication_failed",
      "message": "Invalid signature",
      "details": []
    }
  }
  ```

  ```json 403 theme={null}
  {
    "data": null,
    "meta": null,
    "error": {
      "code": -14,
      "slug": "permission_denied",
      "message": "You do not have permission to perform this action.",
      "details": []
    }
  }
  ```

  ```json 429 theme={null}
  {
    "data": null,
    "meta": null,
    "error": {
      "code": -17,
      "slug": "throttled",
      "message": "Request was throttled.",
      "details": []
    }
  }
  ```

  ```json 500 theme={null}
  {
    "data": null,
    "meta": null,
    "error": {
      "code": -3,
      "slug": "internal_error",
      "message": "An internal error occurred.",
      "details": []
    }
  }
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.