Cash out combo
curl --request POST \
--url https://relay.bayse.markets/v1/pm/combos/{comboId}/cashoutimport requests
url = "https://relay.bayse.markets/v1/pm/combos/{comboId}/cashout"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://relay.bayse.markets/v1/pm/combos/{comboId}/cashout', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://relay.bayse.markets/v1/pm/combos/{comboId}/cashout",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://relay.bayse.markets/v1/pm/combos/{comboId}/cashout"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://relay.bayse.markets/v1/pm/combos/{comboId}/cashout")
.asString();require 'uri'
require 'net/http'
url = URI("https://relay.bayse.markets/v1/pm/combos/{comboId}/cashout")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"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"
}
]
}
{
"error": "Bad Request",
"message": "Cashout is not available once a game has started",
"statusCode": 400
}
{
"error": "Conflict",
"message": "This combo is no longer open",
"statusCode": 409
}
Combos
Cash out combo
Exit an open combo at its current value
POST
/
v1
/
pm
/
combos
/
{comboId}
/
cashout
Cash out combo
curl --request POST \
--url https://relay.bayse.markets/v1/pm/combos/{comboId}/cashoutimport requests
url = "https://relay.bayse.markets/v1/pm/combos/{comboId}/cashout"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://relay.bayse.markets/v1/pm/combos/{comboId}/cashout', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://relay.bayse.markets/v1/pm/combos/{comboId}/cashout",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://relay.bayse.markets/v1/pm/combos/{comboId}/cashout"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://relay.bayse.markets/v1/pm/combos/{comboId}/cashout")
.asString();require 'uri'
require 'net/http'
url = URI("https://relay.bayse.markets/v1/pm/combos/{comboId}/cashout")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"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"
}
]
}
{
"error": "Bad Request",
"message": "Cashout is not available once a game has started",
"statusCode": 400
}
{
"error": "Conflict",
"message": "This combo is no longer open",
"statusCode": 409
}
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. 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.
Authentication
Write authentication required —X-Public-Key, X-Timestamp, and X-Signature headers. See the Authentication guide.
Path parameters
string
required
UUID of the combo.
Request body
No request body. Sign the request with an emptybodyHash.
Example request
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}"
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();
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()
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 withstatus set to CASHED_OUT. See Place combo 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.
{
"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"
}
]
}
{
"error": "Bad Request",
"message": "Cashout is not available once a game has started",
"statusCode": 400
}
{
"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. |