curl --request GET \
--url https://api.reperp.xyz/api/v1/positions/trades/{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/trades/{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/trades/{owner}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"status": "success",
"data": [
{
"position_key": "<string>",
"owner": "<string>",
"action": "<string>",
"token": "<string>",
"position_side": "long",
"price": 123,
"size_usd_delta": 123,
"position_size_usd": 123,
"pnl_delta": 123,
"fee_usd": 123,
"liquidation_fee_usd": 123,
"has_profit": true,
"collateral_usd_delta": 123,
"transfer_amount_usd": 123,
"tx_id": "<string>",
"block_time": 123,
"time": "2023-11-07T05:31:56Z",
"chain": "<string>",
"protocol": "<string>"
}
],
"pagination": {
"limit": 123,
"offset": 123,
"total": 123,
"hasMore": true
}
}{
"status": "error",
"message": "<string>",
"errors": [
{}
]
}{
"error": "Unauthorized"
}{
"error": "Too many requests. Please wait for a moment."
}List trades
Every fill of one wallet (view=trades), or its positions from open to close (view=positions). Paged with offset and limit; keep going while hasMore is true.
curl --request GET \
--url https://api.reperp.xyz/api/v1/positions/trades/{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/trades/{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/trades/{owner}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"status": "success",
"data": [
{
"position_key": "<string>",
"owner": "<string>",
"action": "<string>",
"token": "<string>",
"position_side": "long",
"price": 123,
"size_usd_delta": 123,
"position_size_usd": 123,
"pnl_delta": 123,
"fee_usd": 123,
"liquidation_fee_usd": 123,
"has_profit": true,
"collateral_usd_delta": 123,
"transfer_amount_usd": 123,
"tx_id": "<string>",
"block_time": 123,
"time": "2023-11-07T05:31:56Z",
"chain": "<string>",
"protocol": "<string>"
}
],
"pagination": {
"limit": 123,
"offset": 123,
"total": 123,
"hasMore": true
}
}{
"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.
LIGHTER, RHLT, JUPITER, PHOENIX, BULLET, AFTERMATH Fills, or positions grouped from open to close.
trades, positions Only this market symbol.
Only this side.
long, short Only this fill type. buy and sell on order-book venues; increase, decrease and liquidation on Jupiter.
buy, sell, increase, decrease, liquidation From this time (ISO 8601).
Up to this time (ISO 8601).
Only fills on positions at least this large.
Only fills on positions at most this large.
Sort column.
block_time, position_size_usd, size_usd_delta Sort direction.
asc, desc Rows per page.
1 <= x <= 1000Rows to skip.
x >= 0