> For the complete documentation index, see [llms.txt](https://predictbase.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://predictbase.gitbook.io/docs/developer/endpoints/claim-winnings.md).

# Claim Winnings

Once a market is **resolved**, each winning share can be claimed for $1. If a market is **canceled**, all options are resolved evenly. For example, in a market with **2 options**, each share can be claimed for **$0.50**.\
All winnings are automatically credited to your PredictBase account balance.

***

#### **Endpoint**

```http
POST /claim-winnings-for-user
```

**Full URL**

```
https://api.predictbase.app/claim-winnings-for-user
```

***

#### Authentication

This endpoint requires **authentication**. You must include your **API key** in the request headers:

```
x-api-key: YOUR_API_KEY
```

***

#### Request Body

```json
{
  "marketId": 12001,
  "user" : "0xd...",
  "option" : 0  
}
```

***

#### Field Notes

* **`marketId`**\
  The ID of the market you want to mint shares for.
* **`user`**\
  The user’s wallet address.
* **`option`**\
  The option index. You can retrieve the option index from our [**Read Markets**](/docs/developer/endpoints/read-markets.md) API&#x73;**.**

***

#### Response (Success)

```json
{
  "success": true,
  "txHash": "0x...",
  "receipt": {
    "...": "EVM transaction receipt fields"
  }
}
```

***

#### ⚠️ Failure Cases

* Missing or invalid `x-api-key`
* API key not authorized for the `user`
* On-chain transaction failure
