> ## 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.

# Get share merge by pubkey

> Retrieve a single share merge by its public key.

## Path Parameters

<ParamField path="pubkey" type="string" required>
  The public key of the share merge to retrieve.
</ParamField>

## Response

<ResponseField name="data" type="object">
  Single share merge row.
</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`). `done`, `failed` and `expired` are final. An `expired` draft was not signed in time; start a new one.
  </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">
  Empty object on success for this endpoint.
</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": {},
    "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 404 theme={null}
  {
    "data": null,
    "meta": null,
    "error": {
      "code": -15,
      "slug": "not_found",
      "message": "Not found.",
      "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.