Rebalance Events API
Stream and query vault rebalances (when exposure is adjusted to hit target ratio). Use this feed for analytics or keeper bots.
Endpoints
GET /rebalances/events?symbol=SOL5X&limit=50GET /rebalances/summary/{symbol}WS:
wss://stream.plx.fi/rebalance?symbols=SOL5X,PUMP2X
curl
curl -s "https://api.plx.fi/v1/rebalances/events?symbol=SOL5X&limit=3"[
{
"event":"rebalance",
"symbol":"SOL5X",
"old_ratio":4.89,
"new_ratio":5.02,
"px":"187.92",
"slippage_bps":3,
"oracle_variance":0.0021,
"ts":1735698290,
"tx":"4zA...cMh"
}
]curl -s https://api.plx.fi/v1/rebalances/summary/SOL5X{
"symbol":"SOL5X",
"rebalances_24h":12,
"avg_drift":0.018,
"avg_slippage_bps":2.7,
"efficiency_index":0.944,
"last_ts":1735698290
}WebSocket (Node)
import WebSocket from "ws";
const ws = new WebSocket("wss://stream.plx.fi/rebalance?symbols=SOL2X,SOL5X,PUMP5X");
ws.on("message", (buf) => {
const evt = JSON.parse(buf.toString());
// {event, symbol, old_ratio, new_ratio, ts, tx, slippage_bps}
console.log(`[${evt.symbol}] ${evt.old_ratio} -> ${evt.new_ratio} @ ${evt.ts}`);
});Last updated
