# Competition Ended

**Webhook:** `CompetitionEnded`

Triggered when a competition reaches a its scheduled end. This webhook is typically used to finalize participant data, trigger winner evaluations, and distribute prizes.

```json
{
  "webhookType"          : "CompetitionEnded",
  "testMode"             : false,
  "competitionId"        : "<competition_id>",
  "competitionName"      : "<competition_name>",
  "startDateTime"        : "<start_date>",
  "endDateTime"          : "<end_date>",
  "prizePool"            : "<prize_pool>",
  "prizeCurrency"        : "<prize_currency>",
  "maxContestant"        : "<max_contestant>",
  "checkoutUrl"          : "<checkout_url>",
  "isPrivate"            : "<is_private>"
}
```

## Payload Structure

| Field             | Type    | Description                                                                                                                  |
| ----------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------- |
| `webhookType`     | String  | Type of webhook event. Always `CompetitionEnded` for this webhook.                                                           |
| `testMode`        | Boolean | Flag to indicate whether this payload is a test `true` or live `false`. Currently, only `false` is supported.                |
| `competitionId`   | String  | Unique identifier of the competition that has started.                                                                       |
| `competitionName` | String  | Display name of the competition.                                                                                             |
| `startDateTime`   | String  | ISO 8601. Exact date and time when the competition began (e.g., `2025-05-01T00:00:00Z`).                                     |
| `endDateTime`     | String  | ISO 8601. Timestamp indicating when the competition ended (e.g., `2025-05-01T00:00:00Z`).                                    |
| `prizePool`       | String  | Total prize amount allocated for this competition.                                                                           |
| `prizeCurrency`   | String  | Currency in which the prize is awarded. (e.g., `USD`).                                                                       |
| `maxContestant`   | Number  | Maximum number of participants allowed in the competition.                                                                   |
| `checkoutUrl`     | String  | URL to the public-facing competition page or registration portal.                                                            |
| `isPrivate`       | Boolean | Indicates whether the competition is only showing 5 recent trades for each account (`true`) or showing all trades (`false`). |
