GetPrice
curl --request POST \
--url https://api.fairground.fi/price_service.v1.PriceService/GetPrice \
--header 'Authorization: Bearer <token>' \
--header 'Connect-Protocol-Version: <connect-protocol-version>' \
--header 'Content-Type: application/json' \
--data '
{
"market": {
"marketId": "<string>"
}
}
'import requests
url = "https://api.fairground.fi/price_service.v1.PriceService/GetPrice"
payload = { "market": { "marketId": "<string>" } }
headers = {
"Connect-Protocol-Version": "<connect-protocol-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Connect-Protocol-Version': '<connect-protocol-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({market: {marketId: '<string>'}})
};
fetch('https://api.fairground.fi/price_service.v1.PriceService/GetPrice', 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://api.fairground.fi/price_service.v1.PriceService/GetPrice",
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([
'market' => [
'marketId' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Connect-Protocol-Version: <connect-protocol-version>",
"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://api.fairground.fi/price_service.v1.PriceService/GetPrice"
payload := strings.NewReader("{\n \"market\": {\n \"marketId\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Connect-Protocol-Version", "<connect-protocol-version>")
req.Header.Add("Authorization", "Bearer <token>")
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://api.fairground.fi/price_service.v1.PriceService/GetPrice")
.header("Connect-Protocol-Version", "<connect-protocol-version>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"market\": {\n \"marketId\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fairground.fi/price_service.v1.PriceService/GetPrice")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Connect-Protocol-Version"] = '<connect-protocol-version>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"market\": {\n \"marketId\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"price": {
"marketId": "1",
"marketName": "BTC-PERP",
"symbol": "BTC-PERP",
"price": 65420,
"volume24h": 0,
"priceChange24h": 0,
"timestamp": "2026-07-11T14:32:07Z",
"source": ""
},
"signedPricePayload": "0x1a2b3c4d..."
}Prices
GetPrice
Returns the current oracle price for one market, along with a signed price payload suitable for on-chain submission.
POST
/
price_service.v1.PriceService
/
GetPrice
GetPrice
curl --request POST \
--url https://api.fairground.fi/price_service.v1.PriceService/GetPrice \
--header 'Authorization: Bearer <token>' \
--header 'Connect-Protocol-Version: <connect-protocol-version>' \
--header 'Content-Type: application/json' \
--data '
{
"market": {
"marketId": "<string>"
}
}
'import requests
url = "https://api.fairground.fi/price_service.v1.PriceService/GetPrice"
payload = { "market": { "marketId": "<string>" } }
headers = {
"Connect-Protocol-Version": "<connect-protocol-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Connect-Protocol-Version': '<connect-protocol-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({market: {marketId: '<string>'}})
};
fetch('https://api.fairground.fi/price_service.v1.PriceService/GetPrice', 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://api.fairground.fi/price_service.v1.PriceService/GetPrice",
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([
'market' => [
'marketId' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Connect-Protocol-Version: <connect-protocol-version>",
"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://api.fairground.fi/price_service.v1.PriceService/GetPrice"
payload := strings.NewReader("{\n \"market\": {\n \"marketId\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Connect-Protocol-Version", "<connect-protocol-version>")
req.Header.Add("Authorization", "Bearer <token>")
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://api.fairground.fi/price_service.v1.PriceService/GetPrice")
.header("Connect-Protocol-Version", "<connect-protocol-version>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"market\": {\n \"marketId\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fairground.fi/price_service.v1.PriceService/GetPrice")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Connect-Protocol-Version"] = '<connect-protocol-version>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"market\": {\n \"marketId\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"price": {
"marketId": "1",
"marketName": "BTC-PERP",
"symbol": "BTC-PERP",
"price": 65420,
"volume24h": 0,
"priceChange24h": 0,
"timestamp": "2026-07-11T14:32:07Z",
"source": ""
},
"signedPricePayload": "0x1a2b3c4d..."
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Define the version of the Connect protocol. If omitted, use 1.
Available options:
1 Define the timeout, in ms
Body
application/json
Market to fetch a price for, by market_id or market_symbol.
- market_id
- market_symbol
Show child attributes
Show child attributes
Response
200 - application/json
Success
Current price data for the requested market.
Show child attributes
Show child attributes
Signed price attestation from the upstream pricing oracle, suitable for on-chain submission (e.g. to settle trades or trigger liquidations). Opaque/encoded; format is defined by the pricing oracle, not by this API.
⌘I