Get quote
curl --request POST \
--url https://relay.bayse.markets/v1/pm/events/{eventId}/markets/{marketId}/quote \
--header 'Content-Type: application/json' \
--data '
{
"side": "<string>",
"outcomeId": "<string>",
"amount": 123,
"currency": "<string>"
}
'import requests
url = "https://relay.bayse.markets/v1/pm/events/{eventId}/markets/{marketId}/quote"
payload = {
"side": "<string>",
"outcomeId": "<string>",
"amount": 123,
"currency": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({side: '<string>', outcomeId: '<string>', amount: 123, currency: '<string>'})
};
fetch('https://relay.bayse.markets/v1/pm/events/{eventId}/markets/{marketId}/quote', 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/events/{eventId}/markets/{marketId}/quote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'side' => '<string>',
'outcomeId' => '<string>',
'amount' => 123,
'currency' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://relay.bayse.markets/v1/pm/events/{eventId}/markets/{marketId}/quote"
payload := strings.NewReader("{\n \"side\": \"<string>\",\n \"outcomeId\": \"<string>\",\n \"amount\": 123,\n \"currency\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
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/events/{eventId}/markets/{marketId}/quote")
.header("Content-Type", "application/json")
.body("{\n \"side\": \"<string>\",\n \"outcomeId\": \"<string>\",\n \"amount\": 123,\n \"currency\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://relay.bayse.markets/v1/pm/events/{eventId}/markets/{marketId}/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"side\": \"<string>\",\n \"outcomeId\": \"<string>\",\n \"amount\": 123,\n \"currency\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"price": 0.7235,
"currentMarketPrice": 0.72,
"quantity": 138.21,
"amount": 100,
"costOfShares": 98.04,
"fee": 1.96,
"priceImpactAbsolute": 0.0035,
"profitPercentage": 38.21,
"currencyBaseMultiplier": 1,
"completeFill": true,
"tradeGoesOverMaxLiability": false
}
Trading
Get quote
Get a price quote before placing an order
POST
/
v1
/
pm
/
events
/
{eventId}
/
markets
/
{marketId}
/
quote
Get quote
curl --request POST \
--url https://relay.bayse.markets/v1/pm/events/{eventId}/markets/{marketId}/quote \
--header 'Content-Type: application/json' \
--data '
{
"side": "<string>",
"outcomeId": "<string>",
"amount": 123,
"currency": "<string>"
}
'import requests
url = "https://relay.bayse.markets/v1/pm/events/{eventId}/markets/{marketId}/quote"
payload = {
"side": "<string>",
"outcomeId": "<string>",
"amount": 123,
"currency": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({side: '<string>', outcomeId: '<string>', amount: 123, currency: '<string>'})
};
fetch('https://relay.bayse.markets/v1/pm/events/{eventId}/markets/{marketId}/quote', 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/events/{eventId}/markets/{marketId}/quote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'side' => '<string>',
'outcomeId' => '<string>',
'amount' => 123,
'currency' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://relay.bayse.markets/v1/pm/events/{eventId}/markets/{marketId}/quote"
payload := strings.NewReader("{\n \"side\": \"<string>\",\n \"outcomeId\": \"<string>\",\n \"amount\": 123,\n \"currency\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
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/events/{eventId}/markets/{marketId}/quote")
.header("Content-Type", "application/json")
.body("{\n \"side\": \"<string>\",\n \"outcomeId\": \"<string>\",\n \"amount\": 123,\n \"currency\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://relay.bayse.markets/v1/pm/events/{eventId}/markets/{marketId}/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"side\": \"<string>\",\n \"outcomeId\": \"<string>\",\n \"amount\": 123,\n \"currency\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"price": 0.7235,
"currentMarketPrice": 0.72,
"quantity": 138.21,
"amount": 100,
"costOfShares": 98.04,
"fee": 1.96,
"priceImpactAbsolute": 0.0035,
"profitPercentage": 38.21,
"currencyBaseMultiplier": 1,
"completeFill": true,
"tradeGoesOverMaxLiability": false
}
Get the expected cost, shares, and fees for a potential trade without committing to it. Provide
X-Public-Key to include profit estimates based on your existing position.
Authentication
Public — no authentication required. ProvideX-Public-Key for personalized profit estimates.
Path parameters
string
required
UUID of the event.
string
required
UUID of the market.
Request body
string
required
BUY or SELL.number
required
Amount to spend (buy) or receive (sell), in the specified currency.
string
USD (default) or NGN.Example request
curl -X POST \
"https://relay.bayse.markets/v1/pm/events/a1b2c3d4-e5f6-7890-abcd-ef1234567890/markets/b2c3d4e5-f6a7-8901-bcde-f12345678901/quote" \
-H "Content-Type: application/json" \
-d '{"side":"BUY","outcomeId":"c3d4e5f6-a7b8-9012-cdef-345678901234","amount":100,"currency":"USD"}'
const response = await fetch(
'https://relay.bayse.markets/v1/pm/events/a1b2c3d4-e5f6-7890-abcd-ef1234567890/markets/b2c3d4e5-f6a7-8901-bcde-f12345678901/quote',
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
side: 'BUY',
outcomeId: 'c3d4e5f6-a7b8-9012-cdef-345678901234',
amount: 100,
currency: 'USD',
}),
}
);
const quote = await response.json();
import requests
resp = requests.post(
'https://relay.bayse.markets/v1/pm/events/a1b2c3d4-e5f6-7890-abcd-ef1234567890/markets/b2c3d4e5-f6a7-8901-bcde-f12345678901/quote',
json={
'side': 'BUY',
'outcomeId': 'c3d4e5f6-a7b8-9012-cdef-345678901234',
'amount': 100,
'currency': 'USD',
},
)
quote = resp.json()
body := strings.NewReader(`{"side":"BUY","outcomeId":"c3d4e5f6-a7b8-9012-cdef-345678901234","amount":100,"currency":"USD"}`)
req, _ := http.NewRequest(
"POST",
"https://relay.bayse.markets/v1/pm/events/a1b2c3d4-e5f6-7890-abcd-ef1234567890/markets/b2c3d4e5-f6a7-8901-bcde-f12345678901/quote",
body,
)
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
Response
number
Average price per share for this trade (0.00–1.00).
number
Current market price before this trade executes.
number
Number of shares you will receive.
number
Total amount spent (including fee).
number
Cost of shares before fee.
number
Trading fee charged.
number
How much this trade moves the market price.
number
Estimated profit percentage if the outcome wins.
number
Multiplier applied to convert prices to the requested currency (1 for USD, 100 for NGN).
boolean
Whether the full amount can be filled at the quoted price (relevant for CLOB markets).
boolean
Whether this trade exceeds maximum liability limits.
{
"price": 0.7235,
"currentMarketPrice": 0.72,
"quantity": 138.21,
"amount": 100,
"costOfShares": 98.04,
"fee": 1.96,
"priceImpactAbsolute": 0.0035,
"profitPercentage": 38.21,
"currencyBaseMultiplier": 1,
"completeFill": true,
"tradeGoesOverMaxLiability": false
}
Always get a quote before placing an order to confirm the expected cost and shares. The quoted price is indicative — the actual fill price may differ slightly in fast-moving markets.
⌘I