Vault
The pool's state, its history, and one depositor's share of it.
Six GET routes cover the pool: its state right now, one depositor's share of it, two series over a window chosen by bucket width and count, realised performance over a number of days, and the queue of deposit and withdrawal requests still waiting on the keeper.
| Method | Path | Answers |
|---|---|---|
GET | /vault | The pool right now: assets, shares, reserved and free capital, risk units. |
GET | /vault/position/:address | One depositor's result. Public, like everything else here: the deposits are on chain and this only sums them. |
GET | /vault/history | The pool's series over a window. |
GET | /vault/market-activity | What the house was exposed to over the same window. |
GET | /vault/profitability | Realised performance over days, 1 to 365, default 30. |
GET | /lp-requests | Queued deposit and withdrawal requests, optionally for one owner. |
Windows and buckets
The two series take a bucket of 5min, hour or day (the default), and a buckets count. The ceiling differs per width: 288 five-minute bars is a day, 168 hourly ones a week, 365 daily ones a year. Past that you are asking for more marks than a chart can draw.
GET https://win-trader.com/api/vault/history?bucket=hour&buckets=168