DaVinciGraph Default User Avatar

DaVinciGraph Locker API

The DaVinciGraph Locker API offers comprehensive information regarding locked tokens, including the specific quantities of tokens/LP tokens, as well as the duration for which they are locked. Additionally, the API provides access to historical contracts logs, ensuring transparency and traceability for all transactions. As a public API, it is accessible to everyone interested in gaining insights into token locking activities.

Contract/API Sync

It's important to note that the API offered is designed to provide a comprehensive representation of all the activities associated with the DaVinciGraph locker contracts. The beauty of this system lies in the absence of any intermediary force that creates a disconnect between the API and the contracts. In fact, the API seamlessly synchronizes with the contracts by actively reading and extracting relevant data from their event logs. This ensures that the information provided by the API is up-to-date, accurate, and aligned with the contracts' actual operations. By leveraging the power of event logs, the API ensures a reliable and transparent source of data, facilitating smooth and efficient access to the contracts' lock-related information. at any time you can investigate the contracts logs here .

The delay

Since API data is read from the contracts logs, when an event emits by each contract there is 1 to at most 30 seconds delay for API to reads it.

The API is only available on MAINNET.

Base URLhttps://davincigraph.network

API V1 Deprecation Note:

This documentation belongs to locker API V1 which is now considered deprecated, it will be supported until the end of March 2024. The Locker API V2 documentation will be added soon.

Resources

There are only four resources in the api, Locks, Logs, Tokens and contracts. you can see the endpoints below:

Locks

After the introduction of DaVinciGraph Black Hole, the lock entity got a property of type. since from a conceptual and architectural point of view a burn of tokens is still a lock but without expiration, instead of creating another entity for burns we integrated it with lock entity. so whenever you got a lock or list of them you must consider what type is it, LOCK or BURN.
GET
/api/v1/locks/contracts/{contractId}/tokens/{tokenId}/lockers/{lockerId}
Get A specific lock by contractId, tokenId and lockerId
GET
/api/v1/locks/tokens/{tokenId}/lockers/{lockerId}
Get locks of a specific token which is locked by a certain locker among all the contracts
GET
/api/v1/locks/tokens/{tokenId}
Get a Token's Locks
GET
/api/v1/locks/lockers/{lockerId}
Get a Locker's Locks
GET
/api/v1/locks
Get All Locks

Logs

GET
/api/v1/logs/contracts/{contractId}/timestamp/{timestamp}/index/{index}
Get a specific log
GET
/api/v1/logs/contracts/{contractId}/tokens/{tokenId}/lockers/{lockerId}
Get logs of a specific lock
GET
/api/v1/logs/tokens/{tokenId}
Get logs of a locked token
GET
/api/v1/logs/lockers/{lockerId}
Get logs of a locker
GET
/api/v1/logs/contracts/{contractId}
Get a contract's logs
GET
/api/v1/logs
Get Entire logs

Tokens

GET
/api/v1/tokens/{tokenId}
Get a specific token with token ID
GET
/api/v1/tokens
Get All Tokens

Contracts

GET
/api/v1/contracts/{contractId}
Get a specific contract with contract ID
GET
/api/v1/contracts
Get All contracts

Rate Limit

Each user can send 100 request per minute. Dexes and DeFis which needs to send more than that, can request an API key.