GetOpenPositions
curl --request POST \
--url https://api.fairground.fi/position_service.v1.PositionService/GetOpenPositions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"address": "<string>",
"chainId": "<string>"
}
'import requests
url = "https://api.fairground.fi/position_service.v1.PositionService/GetOpenPositions"
payload = {
"address": "<string>",
"chainId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({address: '<string>', chainId: '<string>'})
};
fetch('https://api.fairground.fi/position_service.v1.PositionService/GetOpenPositions', 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/GetOpenPositions",
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>',
'chainId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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/GetOpenPositions"
payload := strings.NewReader("{\n \"address\": \"<string>\",\n \"chainId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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/GetOpenPositions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"address\": \"<string>\",\n \"chainId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fairground.fi/position_service.v1.PositionService/GetOpenPositions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"address\": \"<string>\",\n \"chainId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"positions": [
{
"owner": "0x71c7656ec7ab88b098defb751b7401b5f6d8976",
"positionId": "48213",
"marketId": "12942289985198375563",
"timestamp": "2026-07-11T14:32:07Z",
"market": "BTC-USD",
"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": "12942289985198375563",
"reduceOnly": true
}
],
"tickDecimals": 1,
"revenueSpent": 12.5,
"effectiveSize": 0.1538,
"estimatedRebate": 3.2,
"stopLossPrice": 60000,
"takeProfitPrice": 72000
}
]
}{
"code": "not_found",
"message": "<string>",
"details": [
{
"type": "<string>",
"value": "aSDinaTvuI8gbWludGxpZnk=",
"debug": {}
}
]
}Positions
GetOpenPositions
Returns all currently open positions for one wallet, across all
markets. address is required (matched trimmed and
case-insensitively). Results are ordered by timestamp descending,
most recent first.
Unlike the portfolio path, associated orders are loaded as
lightweight references only — see associatedOrderIds on the
Position schema, not associatedOrders.
POST
/
position_service.v1.PositionService
/
GetOpenPositions
GetOpenPositions
curl --request POST \
--url https://api.fairground.fi/position_service.v1.PositionService/GetOpenPositions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"address": "<string>",
"chainId": "<string>"
}
'import requests
url = "https://api.fairground.fi/position_service.v1.PositionService/GetOpenPositions"
payload = {
"address": "<string>",
"chainId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({address: '<string>', chainId: '<string>'})
};
fetch('https://api.fairground.fi/position_service.v1.PositionService/GetOpenPositions', 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/GetOpenPositions",
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>',
'chainId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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/GetOpenPositions"
payload := strings.NewReader("{\n \"address\": \"<string>\",\n \"chainId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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/GetOpenPositions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"address\": \"<string>\",\n \"chainId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fairground.fi/position_service.v1.PositionService/GetOpenPositions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"address\": \"<string>\",\n \"chainId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"positions": [
{
"owner": "0x71c7656ec7ab88b098defb751b7401b5f6d8976",
"positionId": "48213",
"marketId": "12942289985198375563",
"timestamp": "2026-07-11T14:32:07Z",
"market": "BTC-USD",
"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": "12942289985198375563",
"reduceOnly": true
}
],
"tickDecimals": 1,
"revenueSpent": 12.5,
"effectiveSize": 0.1538,
"estimatedRebate": 3.2,
"stopLossPrice": 60000,
"takeProfitPrice": 72000
}
]
}{
"code": "not_found",
"message": "<string>",
"details": [
{
"type": "<string>",
"value": "aSDinaTvuI8gbWludGxpZnk=",
"debug": {}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Define the version of the Connect protocol Define the version of the Connect protocol. If omitted, use 1.
Available options:
1 Define the timeout, in ms
Example:
1000
Body
application/json
Response
Success
Show child attributes
Show child attributes