Documentation

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.

MethodPathAnswers
GET/vaultThe pool right now: assets, shares, reserved and free capital, risk units.
GET/vault/position/:addressOne depositor's result. Public, like everything else here: the deposits are on chain and this only sums them.
GET/vault/historyThe pool's series over a window.
GET/vault/market-activityWhat the house was exposed to over the same window.
GET/vault/profitabilityRealised performance over days, 1 to 365, default 30.
GET/lp-requestsQueued 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