curl --request POST \
--url https://api.fairground.fi/position_service.v1.PositionService/GetOpenPositionsStreaming \
--header 'Authorization: Bearer <token>' \
--header 'Connect-Protocol-Version: <connect-protocol-version>' \
--header 'Content-Type: application/json' \
--data '
{
"address": "<string>",
"updateIntervalMs": 123
}
'import requests
url = "https://api.fairground.fi/position_service.v1.PositionService/GetOpenPositionsStreaming"
payload = {
"address": "<string>",
"updateIntervalMs": 123
}
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({address: '<string>', updateIntervalMs: 123})
};
fetch('https://api.fairground.fi/position_service.v1.PositionService/GetOpenPositionsStreaming', 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/position_service.v1.PositionService/GetOpenPositionsStreaming",
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([
'address' => '<string>',
'updateIntervalMs' => 123
]),
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/position_service.v1.PositionService/GetOpenPositionsStreaming"
payload := strings.NewReader("{\n \"address\": \"<string>\",\n \"updateIntervalMs\": 123\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/position_service.v1.PositionService/GetOpenPositionsStreaming")
.header("Connect-Protocol-Version", "<connect-protocol-version>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"address\": \"<string>\",\n \"updateIntervalMs\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fairground.fi/position_service.v1.PositionService/GetOpenPositionsStreaming")
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 \"address\": \"<string>\",\n \"updateIntervalMs\": 123\n}"
response = http.request(request)
puts response.read_body{
"positions": [
{
"owner": "0x71c7656ec7ab88b098defb751b7401b5f6d8976",
"positionId": "48213",
"marketId": "1",
"timestamp": "2026-07-11T14:32:07Z",
"market": "BTC-PERP",
"side": "SIDE_LONG",
"marginType": "MARGIN_TYPE_ISOLATED",
"nominalSize": 0.1538,
"entryPrice": 65000.5,
"markPrice": 65420,
"liquidationPrice": 54200,
"allocatedMargin": 2000,
"leverage": 5,
"unrealizedPnl": 64.6,
"reduceOnly": false,
"associatedOrders": [],
"associatedOrderIds": [
{
"orderId": "50501",
"marketId": "1",
"reduceOnly": true
}
],
"tickDecimals": 1,
"revenueSpent": 12.5,
"effectiveSize": 0.1538,
"estimatedRebate": 3.2,
"stopLossPrice": 60000,
"takeProfitPrice": 72000
}
]
}GetOpenPositionsStreaming
Server-streaming endpoint. Opens a long-lived Connect/gRPC-Web stream
and sends a GetOpenPositionsStreamingResponse message immediately,
then again on a fixed interval, until the client disconnects. Each
message is a full snapshot of the wallet’s currently open positions,
not a diff.
update_interval_ms defaults to 250ms when omitted, and is clamped
to the 100–60000ms range rather than rejected.
NOTE: Mintlify’s request-based API explorer cannot exercise a real streaming response.
curl --request POST \
--url https://api.fairground.fi/position_service.v1.PositionService/GetOpenPositionsStreaming \
--header 'Authorization: Bearer <token>' \
--header 'Connect-Protocol-Version: <connect-protocol-version>' \
--header 'Content-Type: application/json' \
--data '
{
"address": "<string>",
"updateIntervalMs": 123
}
'import requests
url = "https://api.fairground.fi/position_service.v1.PositionService/GetOpenPositionsStreaming"
payload = {
"address": "<string>",
"updateIntervalMs": 123
}
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({address: '<string>', updateIntervalMs: 123})
};
fetch('https://api.fairground.fi/position_service.v1.PositionService/GetOpenPositionsStreaming', 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/position_service.v1.PositionService/GetOpenPositionsStreaming",
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([
'address' => '<string>',
'updateIntervalMs' => 123
]),
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/position_service.v1.PositionService/GetOpenPositionsStreaming"
payload := strings.NewReader("{\n \"address\": \"<string>\",\n \"updateIntervalMs\": 123\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/position_service.v1.PositionService/GetOpenPositionsStreaming")
.header("Connect-Protocol-Version", "<connect-protocol-version>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"address\": \"<string>\",\n \"updateIntervalMs\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fairground.fi/position_service.v1.PositionService/GetOpenPositionsStreaming")
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 \"address\": \"<string>\",\n \"updateIntervalMs\": 123\n}"
response = http.request(request)
puts response.read_body{
"positions": [
{
"owner": "0x71c7656ec7ab88b098defb751b7401b5f6d8976",
"positionId": "48213",
"marketId": "1",
"timestamp": "2026-07-11T14:32:07Z",
"market": "BTC-PERP",
"side": "SIDE_LONG",
"marginType": "MARGIN_TYPE_ISOLATED",
"nominalSize": 0.1538,
"entryPrice": 65000.5,
"markPrice": 65420,
"liquidationPrice": 54200,
"allocatedMargin": 2000,
"leverage": 5,
"unrealizedPnl": 64.6,
"reduceOnly": false,
"associatedOrders": [],
"associatedOrderIds": [
{
"orderId": "50501",
"marketId": "1",
"reduceOnly": true
}
],
"tickDecimals": 1,
"revenueSpent": 12.5,
"effectiveSize": 0.1538,
"estimatedRebate": 3.2,
"stopLossPrice": 60000,
"takeProfitPrice": 72000
}
]
}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.
1 Define the timeout, in ms
Body
Response
One streamed message (the server sends a sequence of these, not a single response).
Full snapshot of address's open positions as of this message.
Not a diff against the previous message.
Show child attributes
Show child attributes