Get portfolio
curl --request GET \
--url https://relay.bayse.markets/v1/pm/portfolioimport requests
url = "https://relay.bayse.markets/v1/pm/portfolio"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://relay.bayse.markets/v1/pm/portfolio', 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/portfolio",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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/portfolio"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://relay.bayse.markets/v1/pm/portfolio")
.asString();require 'uri'
require 'net/http'
url = URI("https://relay.bayse.markets/v1/pm/portfolio")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"outcomeBalances": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"outcome": "YES",
"outcomeId": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"balance": 138.21,
"availableBalance": 138.21,
"averagePrice": 0.7235,
"cost": 100,
"currentValue": 107.60,
"sellPrice": 0.7786,
"payoutIfOutcomeWins": 138.21,
"percentageChange": 7.60,
"currency": "USD",
"market": {
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"title": "Will Super Eagles qualify?",
"event": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"title": "Will Super Eagles qualify for AFCON 2026?",
"type": "single",
"engine": "AMM"
}
},
"createdAt": "2026-02-17T12:00:00Z",
"updatedAt": "2026-02-17T12:05:00Z"
}
],
"portfolioCost": 100,
"portfolioCurrentValue": 107.60,
"portfolioPercentageChange": 7.60,
"pagination": {
"page": 1,
"size": 20,
"lastPage": 1,
"totalCount": 1
}
}
Trading
Get portfolio
Get your current positions across all markets
GET
/
v1
/
pm
/
portfolio
Get portfolio
curl --request GET \
--url https://relay.bayse.markets/v1/pm/portfolioimport requests
url = "https://relay.bayse.markets/v1/pm/portfolio"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://relay.bayse.markets/v1/pm/portfolio', 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/portfolio",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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/portfolio"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://relay.bayse.markets/v1/pm/portfolio")
.asString();require 'uri'
require 'net/http'
url = URI("https://relay.bayse.markets/v1/pm/portfolio")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"outcomeBalances": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"outcome": "YES",
"outcomeId": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"balance": 138.21,
"availableBalance": 138.21,
"averagePrice": 0.7235,
"cost": 100,
"currentValue": 107.60,
"sellPrice": 0.7786,
"payoutIfOutcomeWins": 138.21,
"percentageChange": 7.60,
"currency": "USD",
"market": {
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"title": "Will Super Eagles qualify?",
"event": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"title": "Will Super Eagles qualify for AFCON 2026?",
"type": "single",
"engine": "AMM"
}
},
"createdAt": "2026-02-17T12:00:00Z",
"updatedAt": "2026-02-17T12:05:00Z"
}
],
"portfolioCost": 100,
"portfolioCurrentValue": 107.60,
"portfolioPercentageChange": 7.60,
"pagination": {
"page": 1,
"size": 20,
"lastPage": 1,
"totalCount": 1
}
}
Authentication
Read authentication required —X-Public-Key header. See the Authentication guide.
Example request
curl "https://relay.bayse.markets/v1/pm/portfolio" \
-H "X-Public-Key: pk_live_abcdef123456"
const response = await fetch('https://relay.bayse.markets/v1/pm/portfolio', {
headers: {
'X-Public-Key': 'pk_live_abcdef123456',
},
});
const portfolio = await response.json();
import requests
resp = requests.get(
'https://relay.bayse.markets/v1/pm/portfolio',
headers={'X-Public-Key': 'pk_live_abcdef123456'},
)
portfolio = resp.json()
req, _ := http.NewRequest("GET", "https://relay.bayse.markets/v1/pm/portfolio", nil)
req.Header.Set("X-Public-Key", "pk_live_abcdef123456")
resp, _ := http.DefaultClient.Do(req)
Response
array
Your positions across all markets.
Show position fields
Show position fields
string
Position UUID.
string
YES or NO.string
UUID of the outcome.
string
Asset identifier.
number
Total shares held.
number
Shares available to sell.
number
Average price paid per share.
number
Total amount invested.
number
Current market value of position.
number
Current price per share if sold now.
number
Payout if this outcome resolves as the winner.
number
Percentage gain or loss from average price.
string
Currency this position is denominated in.
string
Your user UUID.
object
string
ISO 8601 timestamp.
string
ISO 8601 timestamp.
number
Total amount invested across all positions.
number
Total current value of all positions.
number
Overall portfolio gain or loss percentage.
object
Pagination information.
{
"outcomeBalances": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"outcome": "YES",
"outcomeId": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"balance": 138.21,
"availableBalance": 138.21,
"averagePrice": 0.7235,
"cost": 100,
"currentValue": 107.60,
"sellPrice": 0.7786,
"payoutIfOutcomeWins": 138.21,
"percentageChange": 7.60,
"currency": "USD",
"market": {
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"title": "Will Super Eagles qualify?",
"event": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"title": "Will Super Eagles qualify for AFCON 2026?",
"type": "single",
"engine": "AMM"
}
},
"createdAt": "2026-02-17T12:00:00Z",
"updatedAt": "2026-02-17T12:05:00Z"
}
],
"portfolioCost": 100,
"portfolioCurrentValue": 107.60,
"portfolioPercentageChange": 7.60,
"pagination": {
"page": 1,
"size": 20,
"lastPage": 1,
"totalCount": 1
}
}
⌘I