Multi Collateral Dai Vault Tracker API Documentation
Multi Collateral Dai Vault Tracker API documentation.

INTRODUCTION

Access to this version of the Multi Collateral Dai Vault Tracker is provided under a Beta Program which is described in the Welcome section of the documentation. Access to the Beta Program is under the Terms of Service described in the Legal section of the documentation.
Please read through all sections of the documentation before using the API. In particular we draw your attention to the following:
  • The Beta Program is of limited duration - it may be suspended or ended at any time, but we will endeavour to give registered participants of the Beta Program as much notice as is reasonably possible before the Beta Program is wound down;
  • As with all Betas, the API and underlying dataset and technology are still in development, therefore you can expect to experience bugs, errors, and partial or complete loss of service at any time during the Beta Program. As such you should treat the API and data as being in development and should not use them for any purpose other than testing and providing feedback during the Beta Program;
  • As described in the API documentation below, the data is not live to the latest block. Since the data is processed before it is made available via the API, the data is typically multiple blocks behind the actual latest block on the public Ethereum blockchain. Users of the API can identify the latest block in the dataset using /last_block and should verify this against the current latest block via their preferred means (block explorer, node etc.) to understand how far behind the tip of the chain the data via API is;
  • The dataset includes only information that has been drawn from the public Ethereum blockchain - no additional data is added - it is just processed for easier access. This means that data particularly in relation to recent blocks may be subject to change e.g. due to chain reorganizations.

API ENDPOINTS

API endpoints accept GET requests only. In the next sections of this documentation you will find all the details concerning pulling data from every available endpoint. Some endpoints may take Query String parameters or Path Parameters (or both).
API endpoints base: https://beta.mcdstate.info/api/​
All endpoints return JSON responses. Some endpoints may return response in CSV format. This feature is available for all endpoints that accept 'format' Query String parameter

AUTHORIZATION

Every request should be authorized with an access token. To get an access token, please complete the registration form here:
As explained in the Welcome section of this GitBook, in order to register for the Beta Program users must read and accept the Terms of Service and Privacy Policy and must enter their email address to receive their access token and also to receive technical updates and notice of the Beta Program’s wind-down.
There are two ways of authorizing requests.
The first method is to use bearer authentication. To authorize the request, pass the access token as 'Authorization' header value with 'Bearer' prefix.
1
curl -X GET https://beta.mcdstate.info/api/last_block -H 'Authorization: Bearer <access_token>'
Copied!
The second way is to simply pass the authorization token as a value of 'access_token' query string parameter.
1
curl -X GET https://beta.mcdstate.info/api/last_block?access_token=<access_token>
Copied!

RESPONSES

Properly sent GET request to any available endpoint will result in an HTTP 200 response containing 'message' and 'status' fields.
'Message' contains a key - value pair, which hopefully embodies a set of data that matches your request.
'Status' possible values are: 'success' and 'failure'. If 'success', then the data in 'message' is correct. Otherwise, there was a problem related to the database connection or the request was improperly configured. In the 'message' value you will find more details about the cause of the failure.

ENDPOINTS

get
https://beta.mcdstate.info/api
/last_block
/last_block
get
https://beta.mcdstate.info/api
/last_time
/last_time
get
https://beta.mcdstate.info/api
/vault_history/:id
/vault_history/:id
get
https://beta.mcdstate.info/api
/vaults_list
/vaults_list

DIMENSIONS

Dimension
Type
Definition
vault
string
Vault id
urn
string
Vault urn handler
ilk
string
Collateral name
collateral
numeric
Collateral amount locked in contract
art
numeric
Total art value
debt
numeric
Total DAI debt
principal
numeric
Principal DAI debt (debt without fees)
accured_fees
numeric
Accrued DAI fees
paid_fees
numeric
Already paid fees (not included in debt)
collateralization
numeric
Current collateralization ratio
osm_price
numeric
Oracle Security Module collateral price (USD)
mkt_price
numeric
Collateral market price (USD)
ratio
numeric
Minimal collateralization ratio
liquidation_price
numeric
Collateral liquidation price
available_collateral
numeric
Collateral available to withdraw
available_debt
numeric
Debt available to generate (DAI)
owner
string
Owner's address
block_created
number
Vault's creation block

OPERATORS

Operator
Definition
Usage
gte
greater than or equal
collateral[gte]=5000
gt
greater than
debt[gt]=10000
eq
equal
ilk[eq]=ETH-A
neq
not equal
ilk[neq]=ETH-A
lt
lower than
collateralization[lt]=150
lte
lower than or equal
collateralization[lte]=150
in
in
ilk[in]=ETH-A,COMP-A
get
https://beta.mcdstate.info/api
/vault_state/:id
/vault_state/:id
get
https://beta.mcdstate.info/api
/collaterals
/collaterals

PROVIDING FEEDBACK

We welcome feedback from users on this Beta product. We will occasionally request feedback from all registered participants of the Beta Program, and you can contact us directly at [email protected].
​
Last modified 9mo ago