Position events
curl --request GET \
--url https://api.polynode.dev/v3/perps/events \
--header 'x-api-key: <api-key>'import requests
url = "https://api.polynode.dev/v3/perps/events"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.polynode.dev/v3/perps/events', 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.polynode.dev/v3/perps/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.polynode.dev/v3/perps/events"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.polynode.dev/v3/perps/events")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.polynode.dev/v3/perps/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"address": "0x1198f33d4f889cafaf4a07a7dea55d615bf44ebc",
"event": "increased",
"instrument_id": 6,
"liquidation": false,
"mark_price": "64128",
"new_size": "-1.04134",
"notional": "66779.051520",
"prev_size": "-0.99553",
"symbol": "BTC-USD",
"timestamp": 1783739413988,
"unrealized_pnl": "-14.3833150202127"
},
{
"address": "0x1198f33d4f889cafaf4a07a7dea55d615bf44ebc",
"event": "flipped",
"instrument_id": 8,
"liquidation": false,
"mark_price": "77.724",
"new_size": "569.68",
"notional": "44277.808320",
"prev_size": "-588.63",
"symbol": "SOL-USD",
"timestamp": 1783739413988,
"unrealized_pnl": "-143.05582313907624"
}
],
"has_more": false,
"next_cursor": null
}{
"error": "invalid cursor"
}Perps Analytics
Position Events
Position activity feed: opened / closed / increased / reduced / flipped. Filter by type, instrument, min_notional, address, liquidation, and after. Continue newest first through a fixed traversal with next_cursor.
GET
/
v3
/
perps
/
events
Position events
curl --request GET \
--url https://api.polynode.dev/v3/perps/events \
--header 'x-api-key: <api-key>'import requests
url = "https://api.polynode.dev/v3/perps/events"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.polynode.dev/v3/perps/events', 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.polynode.dev/v3/perps/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.polynode.dev/v3/perps/events"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.polynode.dev/v3/perps/events")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.polynode.dev/v3/perps/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"address": "0x1198f33d4f889cafaf4a07a7dea55d615bf44ebc",
"event": "increased",
"instrument_id": 6,
"liquidation": false,
"mark_price": "64128",
"new_size": "-1.04134",
"notional": "66779.051520",
"prev_size": "-0.99553",
"symbol": "BTC-USD",
"timestamp": 1783739413988,
"unrealized_pnl": "-14.3833150202127"
},
{
"address": "0x1198f33d4f889cafaf4a07a7dea55d615bf44ebc",
"event": "flipped",
"instrument_id": 8,
"liquidation": false,
"mark_price": "77.724",
"new_size": "569.68",
"notional": "44277.808320",
"prev_size": "-588.63",
"symbol": "SOL-USD",
"timestamp": 1783739413988,
"unrealized_pnl": "-143.05582313907624"
}
],
"has_more": false,
"next_cursor": null
}{
"error": "invalid cursor"
}A position-activity feed of opened, closed, increased, reduced,
and flipped events. Filter by
Cursors expire after 24 hours and cannot be reused on the liquidations route.
A malformed cursor returns HTTP
type, instrument, min_notional,
address, liquidation, and after.
Responses are newest first and include has_more plus an opaque
next_cursor. Send that value as cursor with the same filters to continue
through the fixed traversal:
GET /v3/perps/events?address=0xabc&limit=100
GET /v3/perps/events?address=0xabc&limit=100&cursor=<next_cursor>
400 with {"error":"invalid cursor"}. An
expired cursor returns {"error":"cursor has expired"}. Changing a filter
returns HTTP 400 with a clean cursor-mismatch message. Start again without
the cursor in each case.Authorizations
Query Parameters
opened | closed | increased | reduced | flipped
Instrument id/symbol/asset.
Only events >= this USD size.
One account.
true | false
Only rows after this time (Unix s or ms).
Max rows.
Opaque next_cursor from the preceding page. Reuse the same route and filters within 24 hours.
Response
Success

