Fetch normalized open positions for a wallet across all connected derivatives venues (Lighter, Aster, Hyperliquid, Avantis)
GET/api/trading/positions/all/{walletAddress}| Name | Type | Required | Description |
|---|---|---|---|
walletAddress | string | ✅ | Wallet address to query across all venues |
positions array contains one entry per venue position. Zero-size positions are automatically filtered out.
GET/api/trading/{exchange}/positions/{walletAddress}| Name | Type | Required | Description |
|---|---|---|---|
exchange | string | ✅ | Venue to query (lighter, aster, hyperliquid, or avantis) |
walletAddress | string | ✅ | Wallet address to inspect on that venue |
GET /api/aster/perp/:walletId/positions
| Parameter | Type | Required | Description |
|---|---|---|---|
walletId | string | Yes | Wallet ID (UUID) |
| Parameter | Type | Required | Description |
|---|---|---|---|
symbol | string | No | Filter by trading pair (e.g., “BTCUSDT”) |
| Field | Type | Description |
|---|---|---|
symbol | string | Trading pair |
positionAmt | string | Position size (positive for LONG, negative for SHORT) |
entryPrice | string | Average entry price |
markPrice | string | Current mark price |
unRealizedProfit | string | Unrealized PnL |
liquidationPrice | string | Liquidation price |
leverage | string | Current leverage |
marginType | string | ”cross” or “isolated” |
positionSide | string | ”BOTH”, “LONG”, or “SHORT” |
notional | string | Position notional value |
updateTime | number | Last update timestamp (ms) |
GET /api/trading/positions/all/{walletAddress}
Avantis positions are returned within the aggregated positions response under data.positions.avantis.
| Field | Type | Description |
|---|---|---|
symbol | string | Asset symbol (e.g., “ETH”, “BTC”) |
exchange | string | Always "avantis" |
direction | string | "LONG" or "SHORT" |
size | string | Token amount (e.g., “0.032416”) |
entryPrice | string | Entry price in USD |
markPrice | string | Current mark price in USD |
liquidationPrice | string | Liquidation price in USD, or "-" |
unrealizedPnl | string | Unrealized PnL in USD (rollover fees only, no live PnL from backend) |
unrealizedPnlPercent | string | Unrealized PnL as percentage |
leverage | number | Position leverage |
collateral | string | Collateral in USDC |
margin | string | Margin in USDC |
timestamp | number | Position opened timestamp (ms) |
isZfp | boolean | Whether this is a zero-fee position |
walletAddress | string | Wallet address that owns the position |
markPrice returned from the backend matches entryPrice — live mark prices are not provided by the backend. For real-time mark prices, use the client-side Pyth oracle price feed.{ "success": false, "error": "Invalid wallet address format" }{ "success": false, "error": "Missing or invalid credentials for Aster" }{ "success": false, "error": "Failed to fetch open positions: timeout" }API key for authentication. Also requires X-API-SECRET, X-API-TIMESTAMP, and X-API-SIGNATURE headers for private endpoints.
Wallet address to query across all venues