List open positions
curl --request GET \
--url https://api.reperp.xyz/api/v1/positions/open/{owner} \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.reperp.xyz/api/v1/positions/open/{owner}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.reperp.xyz/api/v1/positions/open/{owner}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"status": "success",
"data": [
{
"id": "<string>",
"owner": "<string>",
"market": {
"symbol": "<string>",
"address": "<string>",
"protocol": "<string>",
"logo": "<string>",
"price": 123,
"market_id": 123
},
"side": "<string>",
"size": 123,
"sizeUsd": 123,
"collateralUsd": 123,
"leverage": 123,
"price": 123,
"liquidationPrice": 123,
"unrealisedPnl": 123,
"realisedPnl": 123,
"fundingUsd": 123,
"fee": 123,
"marginType": "CROSSED",
"status": "open"
}
]
}{
"status": "error",
"message": "<string>",
"errors": [
{}
]
}{
"error": "Unauthorized"
}{
"error": "Too many requests. Please wait for a moment."
}Positions and trades
List open positions
What one wallet holds right now, read live from the venue. On Phoenix a wallet can return several rows for one market, one per subaccount.
GET
/
positions
/
open
/
{owner}
List open positions
curl --request GET \
--url https://api.reperp.xyz/api/v1/positions/open/{owner} \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.reperp.xyz/api/v1/positions/open/{owner}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.reperp.xyz/api/v1/positions/open/{owner}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"status": "success",
"data": [
{
"id": "<string>",
"owner": "<string>",
"market": {
"symbol": "<string>",
"address": "<string>",
"protocol": "<string>",
"logo": "<string>",
"price": 123,
"market_id": 123
},
"side": "<string>",
"size": 123,
"sizeUsd": 123,
"collateralUsd": 123,
"leverage": 123,
"price": 123,
"liquidationPrice": 123,
"unrealisedPnl": 123,
"realisedPnl": 123,
"fundingUsd": 123,
"fee": 123,
"marginType": "CROSSED",
"status": "open"
}
]
}{
"status": "error",
"message": "<string>",
"errors": [
{}
]
}{
"error": "Unauthorized"
}{
"error": "Too many requests. Please wait for a moment."
}Authorizations
Your API key. Keys are issued on request: message @perp_ag on X.
Path Parameters
The wallet: an account index on Lighter and RH Lighter, a Solana address on Jupiter, Phoenix and Bullet, an account object id (0x + 64 hex) on Aftermath.
Query Parameters
Venue. See Venues and identifiers.
Available options:
LIGHTER, RHLT, JUPITER, PHOENIX, BULLET, AFTERMATH ⌘I