Markets and prices
The instruments, the oracle marks, the candles and the protocol config.
Five GET routes cover the instruments and their prices: every listed market with its margins, fees, caps and funding state, one market by symbol, the current oracle mark for all of them, OHLC candles built from the oracle, and the protocol-wide config.
| Method | Path | Answers |
|---|---|---|
GET | /markets | Every listed market, with its margins, fees, caps, open interest and funding state. |
GET | /markets/:symbol | One of them. 404 if the symbol is not listed. |
GET | /prices | The current oracle mark for every market. The settlement price, not the chart's. |
GET | /prices/:symbol/candles | OHLC bars built from the oracle. See the parameters below. |
GET | /config | Protocol-wide settings: borrow curve, funding half-life, risk capacity, withdrawal limits, request delay. |
Candles
- interval
- Seconds per bar, and one of
60, 300, 900, 3600, 14400, 86400. Anything else is a 400 rather than a silent rounding. Default 60. - limit
- Bars to return, 1 to 1000, default 500.
GET https://win-trader.com/api/prices/BTCUSD/candles?interval=3600&limit=168
What a market carries
- initial_margin_bps
- Sets the leverage cap:
10000 / initial_margin_bps. - maintenance_margin_bps
- The floor health may not fall through. See Liquidation.
- close_fee_low_bps / close_fee_high_bps
- The two closing fee tiers. Low when the close improves the market's skew, high when it worsens it. Only ever charged out of profit.
- long_open_interest / short_open_interest
- Notional open on each side.
- long_base_exposure / short_base_exposure
- The same exposure in units of the underlying, which is what skew and funding are judged on.
- max_long_size_open_interest / max_short_size_open_interest
- The side's notional cap. The ticket's max size is the tightest of this, the base exposure cap and the pool's risk headroom.
- market_risk_factor_bps
- How much of the pool's risk budget a unit of size in this market consumes, and what borrow is charged on.
- current_payer_side / current_payer_rate
- Which side pays funding right now and at what rate per day. Read from chain state; see Profit, loss and fees.
- borrow_index, receiver_index_*, lp_backed_index_*
- The accrual indices a position's fees are measured against.