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

# Cash out combo

> Exit an open combo at its current value

Cashes out an open combo at its current value and credits the proceeds to your wallet. The value is re-priced at execution, so it can differ from the last [cashout quote](https://docs.bayse.markets/api-reference/pm/get-combo-cashout-quote.md). On success the combo moves to `CASHED_OUT`.

Cashout is available only while the combo is `PENDING`, before any leg's game has started, while every leg's market is open, and while the value is positive. See [Cashout](https://docs.bayse.markets/concepts/combos.md#cashout).

## Authentication

Write authentication required — `X-Public-Key`, `X-Timestamp`, and `X-Signature` headers. See the [Authentication guide](https://docs.bayse.markets/authentication.md).

## Path parameters

**comboId** `string` *required*

UUID of the combo.

## Request body

No request body. Sign the request with an empty `bodyHash`.

## Example request

```bash cURL theme={null}
PUBLIC_KEY="pk_live_abcdef123456"
SECRET_KEY="sk_live_secret789xyz"
TIMESTAMP=$(date +%s)
METHOD="POST"
URL_PATH="/v1/pm/combos/3f8a2c61-9d4e-4b7a-8c15-6e2f0a9b4d73/cashout"

# No body — bodyHash is empty, payload ends with a trailing dot
PAYLOAD="${TIMESTAMP}.${METHOD}.${URL_PATH}."
SIGNATURE=$(printf '%s' "$PAYLOAD" | openssl dgst -sha256 -hmac "$SECRET_KEY" -binary | base64)

curl -X POST "https://relay.bayse.markets${URL_PATH}" \
  -H "X-Public-Key: ${PUBLIC_KEY}" \
  -H "X-Timestamp: ${TIMESTAMP}" \
  -H "X-Signature: ${SIGNATURE}"
```

```javascript Node.js theme={null}
import crypto from 'crypto';

const publicKey = 'pk_live_abcdef123456';
const secretKey = 'sk_live_secret789xyz';
const timestamp = Math.floor(Date.now() / 1000);
const method = 'POST';
const path = '/v1/pm/combos/3f8a2c61-9d4e-4b7a-8c15-6e2f0a9b4d73/cashout';

// No body — bodyHash is empty
const payload = `${timestamp}.${method}.${path}.`;
const signature = crypto
  .createHmac('sha256', secretKey)
  .update(payload)
  .digest('base64');

const response = await fetch(`https://relay.bayse.markets${path}`, {
  method,
  headers: {
    'X-Public-Key': publicKey,
    'X-Timestamp': timestamp.toString(),
    'X-Signature': signature,
  },
});
if (!response.ok) {
  const error = await response.json();
  throw new Error(`Cashout failed: ${error.message}`);
}
const combo = await response.json();
```

```python Python theme={null}
import hmac, hashlib, base64, time, requests

public_key = 'pk_live_abcdef123456'
secret_key = 'sk_live_secret789xyz'
timestamp = int(time.time())
method = 'POST'
path = '/v1/pm/combos/3f8a2c61-9d4e-4b7a-8c15-6e2f0a9b4d73/cashout'

# No body — bodyHash is empty
payload = f'{timestamp}.{method}.{path}.'
signature = base64.b64encode(
    hmac.new(secret_key.encode(), payload.encode(), hashlib.sha256).digest()
).decode()

resp = requests.post(
    f'https://relay.bayse.markets{path}',
    headers={
        'X-Public-Key': public_key,
        'X-Timestamp': str(timestamp),
        'X-Signature': signature,
    },
)
if not resp.ok:
    raise RuntimeError(f"Cashout failed: {resp.json()['message']}")
combo = resp.json()
```

```go Go theme={null}
import (
    "crypto/hmac"
    "crypto/sha256"
    "encoding/base64"
    "fmt"
    "net/http"
    "strconv"
    "time"
)

timestamp := time.Now().Unix()
method := "POST"
urlPath := "/v1/pm/combos/3f8a2c61-9d4e-4b7a-8c15-6e2f0a9b4d73/cashout"

// No body — bodyHash is empty
payload := fmt.Sprintf("%d.%s.%s.", timestamp, method, urlPath)
mac := hmac.New(sha256.New, []byte("sk_live_secret789xyz"))
mac.Write([]byte(payload))
signature := base64.StdEncoding.EncodeToString(mac.Sum(nil))

req, _ := http.NewRequest("POST", "https://relay.bayse.markets"+urlPath, nil)
req.Header.Set("X-Public-Key", "pk_live_abcdef123456")
req.Header.Set("X-Timestamp", strconv.FormatInt(timestamp, 10))
req.Header.Set("X-Signature", signature)
resp, _ := http.DefaultClient.Do(req)
```

## Response

Returns the combo with `status` set to `CASHED_OUT`. See [Place combo](https://docs.bayse.markets/api-reference/pm/place-combo.md) for the full field reference.

`cashoutPrice`, `cashoutAmount` and `cashoutMultiplier` give the exit the combo was cashed out at. `paidOut` is `true` and `amountPaidOut` equals `cashoutAmount` once the credit has landed in your wallet.

```json 200 OK theme={null}
{
  "id": "3f8a2c61-9d4e-4b7a-8c15-6e2f0a9b4d73",
  "code": "K7Q2M9XA",
  "status": "CASHED_OUT",
  "uiStatus": "COMPLETED",
  "amount": 10,
  "currency": "USD",
  "price": 0.18,
  "multiplier": 5.56,
  "potentialPayout": 55.56,
  "shares": 55.56,
  "amountPaidOut": 13.33,
  "cashoutPrice": 0.24,
  "cashoutAmount": 13.33,
  "cashoutMultiplier": 1.33,
  "cashedOutAt": "2026-10-28T09:41:12Z",
  "isOwner": true,
  "legCount": 2,
  "cashoutAvailable": false,
  "paidOut": true,
  "createdAt": "2026-10-27T10:15:00Z",
  "selections": [
    {
      "id": "a1c2e3f4-5b6d-4e7f-8a9b-0c1d2e3f4a5b",
      "eventId": "e5f6a7b8-c9d0-1234-efab-cd567890abcd",
      "marketId": "f6a7b8c9-d0e1-2345-fabc-678901234567",
      "outcomeId": "01234567-89ab-cdef-0123-456789abcdef",
      "eventTitle": "Manchester City vs Aston Villa",
      "marketTitle": "Manchester City to Win",
      "outcomeLabel": "YES",
      "outcomeIndex": 1,
      "quotedProbability": 0.62,
      "position": 1,
      "status": "PENDING",
      "displayStatus": "NOT_STARTED",
      "gameStartDate": "2026-10-31T15:00:00Z"
    },
    {
      "id": "b2d3f4a5-6c7e-4f8a-9b0c-1d2e3f4a5b6c",
      "eventId": "b9c0d1e2-f3a4-5678-9abc-def012345678",
      "marketId": "c9d0e1f2-a3b4-5678-cdef-901234567890",
      "outcomeId": "34567890-bcde-f012-3456-789abcdef012",
      "eventTitle": "Arsenal vs Chelsea",
      "marketTitle": "Over 2.5 total goals",
      "outcomeLabel": "YES",
      "outcomeIndex": 1,
      "quotedProbability": 0.29,
      "position": 2,
      "status": "PENDING",
      "displayStatus": "NOT_STARTED",
      "gameStartDate": "2026-10-31T17:30:00Z"
    }
  ]
}
```

```json 400 Unavailable theme={null}
{
  "error": "Bad Request",
  "message": "Cashout is not available once a game has started",
  "statusCode": 400
}
```

```json 409 Conflict theme={null}
{
  "error": "Conflict",
  "message": "This combo is no longer open",
  "statusCode": 409
}
```

## Errors

| Status | When |
| - | - |
| `400` | Cashout is unavailable. The `message` gives the reason — for example, a game has started or the combo is worth too little to cash out. |
| `401` | Missing or invalid HMAC signature. |
| `404` | The combo does not exist or is not yours. |
| `409` | The combo settled or was cashed out in the meantime. |


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