Orderbook
Last updated
Last updated
GET
https://api.swivel.exchange/v2/orderbook?underlying=x&maturity=y&protocol=p&depth=z
This endpoint allows you to request an orderbook of a given depth for a specified market. Returns receiving premium and paying premium orders in descending/ascending order including availableVolume translated into both premiumAvailable and principalAvailable.
Name | Type | Description |
---|---|---|
underlying*
string
The underlying token being transacted. E.g. USDC, DAI, etc.,
maturity*
string
The maturity of market in unix seconds.
depth*
integer
The number of orders on each side of the orderbook to return.
protocol*
integer
A pointer that refers to a given yield bearing market like Lido or Compound.
The protocol enum values:
enum Protocols {
Erc4626 = 0,
Compound = 1,
Rari = 2,
Yearn = 3,
Aave = 4,
Euler = 5,
Lido = 6
}