GET
All GET endpoints are documented here. Base URLs should be changed in relation to the environment that is used: Testnet or Mainnet.
Last updated
All GET endpoints are documented here. Base URLs should be changed in relation to the environment that is used: Testnet or Mainnet.
Last updated
GET
https://api.swivel.exchange/v2/markets?status=s&depth=d
This endpoint allows you to request a list of markets.
Name | Type | Description |
---|---|---|
GET
https://api.swivel.exchange/v2/orderbook?underlying=u&maturity=m
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.
GET
https://api.swivel.exchange/v2/orders/key
This endpoint allows you to request the detailed state and parameters for a given order.
Returns the orders parameters as well as order price, volume available and initial timestamp.
GET
https://api.swivel.exchange/v2/fillpreview?underlying=u&maturity=m&volume=v&vault=w&exit=e
This endpoint allows you to request a limit order payload that matches a given market order. Returns the effective price as well as orders for consumption.
GET
https://api.swivel.exchange/v2/users/:address/orders?underlying=u&maturity=m&status=s
This endpoint allows you to request the order history for a given address, and allows filtering by active, cancelled, full and expired statuses. Returns chronologically sorted orders for a given address.
GET
https://api.swivel.exchange/v2/fills?underlying=u&maturity=m&depth=d
This endpoint allows you to request the agreement most recently initiated in a given market. (The trade last made in a given market) Returns the parameters of the most recent agreement for the specified market.
GET
https://api.swivel.exchange/v2/samples?underlying=x&maturity=y&start=z&end=e&interval=f&type=g
This endpoint allows you to request OHLCV points for the given period. Returns OHLCV points with each containing its OHLCV data at the given timestamp.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
status
string
active or matured
depth
integer
The number of markets to return.
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.
key*
String
Order key
underlying*
string
The underlying token being transacted. E.g. USDC, DAI, etc.,
maturity*
string
The duration of the rolling-maturity market in seconds. E.g. 31536000 (12 months)
volume*
string
The amount of currency to use.
vault*
boolean
Indicates if an order is in relation to a initiating/exiting a vault or zcToken
exit*
boolean
Indicated if an order is an exit or an initiate
address*
string
Public key of an order's creator
underlying*
string
The underlying token being transacted. E.g. USDC, DAI, etc.,
maturity*
string
The maturity of market in unix seconds.
status
list(string)
List of statuses expired, cancelled, full or insolvent.
underlying*
string
The underlying token being transacted. E.g. USDC, DAI, etc.,
maturity*
string
The maturity of market in unix seconds.
depth*
string
Should always be 1 to return one last trade. If more specified, the result will be a sorted list of last trades.
interval*
string
The time between datapoints in minutes dividable by 5. E.g. 5, 15, 30, 60, ...
maturity*
string
The maturity of market in unix seconds.
underlying*
string
The underlying token contract being transacted. E.g. USDC, DAI, etc.,
start*
number
Start of of the period in seconds
end*
number
End of the period in seconds
type*
string
Sampling type e.g. OHLCV