Activities
curl --request GET \
--url https://relay.bayse.markets/v1/pm/activitiesimport requests
url = "https://relay.bayse.markets/v1/pm/activities"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://relay.bayse.markets/v1/pm/activities', 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/activities",
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/activities"
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/activities")
.asString();require 'uri'
require 'net/http'
url = URI("https://relay.bayse.markets/v1/pm/activities")
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{
"activities": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"type": "BUY_MARKET_ORDER_CREATED",
"eventId": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"marketId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"outcomeId": "d4e5f6a7-b8c9-0123-def1-234567890123",
"orderId": "e5f6a7b8-c9d0-1234-ef12-345678901234",
"eventType": "SINGLE",
"imageUrl": "https://example.com/image.png",
"eventTitle": "Will BTC reach $100k by March 2026?",
"marketTitle": "Bitcoin Price Prediction",
"outcome": "YES",
"currency": "USD",
"amount": "100",
"fee": "2",
"size": "138.21",
"price": "0.7235",
"totalCost": "102",
"currencyBaseMultiplier": "1",
"status": "FILLED",
"createdAt": "2026-02-17T12:00:00Z",
"updatedAt": "2026-02-17T12:00:00Z"
}
],
"pagination": {
"page": 1,
"size": 20,
"lastPage": 4,
"totalCount": 73
}
}
Trading
Activities
Get your trading activity history
GET
/
v1
/
pm
/
activities
Activities
curl --request GET \
--url https://relay.bayse.markets/v1/pm/activitiesimport requests
url = "https://relay.bayse.markets/v1/pm/activities"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://relay.bayse.markets/v1/pm/activities', 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/activities",
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/activities"
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/activities")
.asString();require 'uri'
require 'net/http'
url = URI("https://relay.bayse.markets/v1/pm/activities")
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{
"activities": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"type": "BUY_MARKET_ORDER_CREATED",
"eventId": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"marketId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"outcomeId": "d4e5f6a7-b8c9-0123-def1-234567890123",
"orderId": "e5f6a7b8-c9d0-1234-ef12-345678901234",
"eventType": "SINGLE",
"imageUrl": "https://example.com/image.png",
"eventTitle": "Will BTC reach $100k by March 2026?",
"marketTitle": "Bitcoin Price Prediction",
"outcome": "YES",
"currency": "USD",
"amount": "100",
"fee": "2",
"size": "138.21",
"price": "0.7235",
"totalCost": "102",
"currencyBaseMultiplier": "1",
"status": "FILLED",
"createdAt": "2026-02-17T12:00:00Z",
"updatedAt": "2026-02-17T12:00:00Z"
}
],
"pagination": {
"page": 1,
"size": 20,
"lastPage": 4,
"totalCount": 73
}
}
Authentication
Read authentication required —X-Public-Key header.
Query parameters
string
Filter activities by category. Accepted values:
When no filter is provided, all activity types are returned except
| Filter | Activity types included |
|---|---|
buys | BUY_MARKET_ORDER_CREATED, BUY_TRADE_FILL |
sells | SELL_MARKET_ORDER_CREATED, SELL_TRADE_FILL |
limits | BUY_LIMIT_ORDER_CREATED, SELL_LIMIT_ORDER_CREATED, BUY_LIMIT_ORDER_CANCELLED, SELL_LIMIT_ORDER_CANCELLED, BUY_LIMIT_ORDER_EXPIRED, SELL_LIMIT_ORDER_EXPIRED |
payout | PAYOUT_WIN, PAYOUT_LOSS |
BUY_TRADE_FILL and SELL_TRADE_FILL.integer
default:"1"
Page number.
integer
default:"20"
Results per page.
Activity types
Each activity in the response has atype field with one of the following values:
| Type | Description |
|---|---|
BUY_MARKET_ORDER_CREATED | A market buy order was placed |
SELL_MARKET_ORDER_CREATED | A market sell order was placed |
BUY_LIMIT_ORDER_CREATED | A limit buy order was placed |
SELL_LIMIT_ORDER_CREATED | A limit sell order was placed |
BUY_LIMIT_ORDER_CANCELLED | A limit buy order was cancelled |
SELL_LIMIT_ORDER_CANCELLED | A limit sell order was cancelled |
BUY_LIMIT_ORDER_EXPIRED | A limit buy order expired |
SELL_LIMIT_ORDER_EXPIRED | A limit sell order expired |
BUY_TRADE_FILL | A buy order was filled via trade match |
SELL_TRADE_FILL | A sell order was filled via trade match |
PAYOUT_WIN | Payout received for a winning position |
PAYOUT_LOSS | Market resolved against your position |
BUY_REFUND | Refund issued for a buy order |
Example request
curl "https://relay.bayse.markets/v1/pm/activities?type=buys&page=1&size=20" \
-H "X-Public-Key: pk_live_abcdef123456"
const response = await fetch(
'https://relay.bayse.markets/v1/pm/activities?type=buys&page=1&size=20',
{ headers: { 'X-Public-Key': 'pk_live_abcdef123456' } }
);
const activities = await response.json();
import requests
resp = requests.get(
'https://relay.bayse.markets/v1/pm/activities',
params={'type': 'buys', 'page': 1, 'size': 20},
headers={'X-Public-Key': 'pk_live_abcdef123456'},
)
activities = resp.json()
req, _ := http.NewRequest("GET", "https://relay.bayse.markets/v1/pm/activities", nil)
q := req.URL.Query()
q.Add("type", "buys")
q.Add("page", "1")
q.Add("size", "20")
req.URL.RawQuery = q.Encode()
req.Header.Set("X-Public-Key", "pk_live_abcdef123456")
resp, _ := http.DefaultClient.Do(req)
Response
Returns a paginated list of your trading activities across all markets.Response fields
array
Show Activity object
Show Activity object
string
Activity ID.
string
Activity type (see Activity types).
string
Event ID.
string
Market ID.
string
Outcome ID.
string
Order ID (if applicable).
string
Settlement ID (if applicable).
string
Transaction ID (if applicable).
string
Event type.
string
Event title.
string
Market title.
string
Outcome name (e.g.
"YES", "NO").string
Resolved outcome (for payout activities).
string
Currency code (e.g.
"USD", "NGN").string
Order amount.
string
Fee charged.
string
Number of shares.
string
Filled share quantity (limit orders).
string
Remaining share quantity (limit orders).
string
Order price.
string
Average fill price (limit orders).
string
Total cost of the order.
string
Currency base multiplier.
string
Order status.
string
Expiration timestamp (limit orders with GTD).
string
Payout amount (for
PAYOUT_WIN).string
Amount spent before cancellation/expiry (buy limit orders).
string
Amount refunded on cancellation/expiry (buy limit orders).
string
Amount earned before cancellation/expiry (sell limit orders).
string
Shares returned on cancellation/expiry (sell limit orders).
string
ISO 8601 timestamp.
string
ISO 8601 timestamp.
object
{
"activities": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"type": "BUY_MARKET_ORDER_CREATED",
"eventId": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"marketId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"outcomeId": "d4e5f6a7-b8c9-0123-def1-234567890123",
"orderId": "e5f6a7b8-c9d0-1234-ef12-345678901234",
"eventType": "SINGLE",
"imageUrl": "https://example.com/image.png",
"eventTitle": "Will BTC reach $100k by March 2026?",
"marketTitle": "Bitcoin Price Prediction",
"outcome": "YES",
"currency": "USD",
"amount": "100",
"fee": "2",
"size": "138.21",
"price": "0.7235",
"totalCost": "102",
"currencyBaseMultiplier": "1",
"status": "FILLED",
"createdAt": "2026-02-17T12:00:00Z",
"updatedAt": "2026-02-17T12:00:00Z"
}
],
"pagination": {
"page": 1,
"size": 20,
"lastPage": 4,
"totalCount": 73
}
}
⌘I