dYdX transparency API endpoint docs
  • 📚Endpoint specifications
  • 🔬Formulas
  • ❓Sample requests
Powered by GitBook
On this page
  • Overview
  • API Endpoint URL
  • Dashboard URL
  • Request Headers
  • Formulas
  • Response Format
  • Rate Limiting

Endpoint specifications

Overview

The Lacerta Labs API allows users to query data on various blockchain metrics such as circulating supply, trading fee collection, gas fee collection, staking APR, and trading rewards distribution. This document provides a detailed guide on how to use the API, including endpoints, request formats, and examples.

API Endpoint URL

The base URL for the API is:

https://api.lacertalabs.xyz/

Different variables can be queried using:

https://api.lacertalabs.xyz/data/[variable]

where [variable] is replaced with the specific variable you want to query. For example, to query the gas fee collection:

https://api.lacertalabs.xyz/data/gasfeecollection

Dashboard URL

You can view daily averages or sums and the last 10 entries for each variable on the dashboard at:

https://dydxdashboard.lacertalabs.xyz/

Request Headers

To query a specific block height, add the block height to the request header. For example:

curl --header "height: 12261374" https://api.lacertalabs.xyz/data/gasfeecollection

Formulas

More information of how different variables can be found from

Response Format

The responses from the API are in JSON format. Here's an example response:

{
  "0": {
    "day": "2023-10-26T00:00:00.000Z",
    "average": "501377204.81145328"
  },
  "latestTen": {
    "info": [
      {"circulationsupply": "501378716.82265", "height": 12261375},
      {"circulationsupply": "501378716.82265", "height": 12261374},
      {"circulationsupply": "501378716.82265", "height": 12261373},
      {"circulationsupply": "501378716.22173315", "height": 12261372},
      {"circulationsupply": "501378714.44391423", "height": 12261371},
      {"circulationsupply": "501378714.44391423", "height": 12261370},
      {"circulationsupply": "501378714.44391423", "height": 12261369},
      {"circulationsupply": "501378713.83916193", "height": 12261368},
      {"circulationsupply": "501378711.8043553", "height": 12261367},
      {"circulationsupply": "501378711.8043553", "height": 12261366}
    ]
  }
}

Daily Averages or Sums

  • Keys: Daily averages or sums are indexed by keys starting from 0.

  • Genesis Date: The date of the genesis block is represented by the key 0, which corresponds to October 26th, 2023.

  • Subsequent Days: Keys 1, 2, 3, etc., represent the daily averages or sums for each subsequent day since the genesis block.

Latest 10 Values

  • Key: The latest 10 values for a variable can be found under the key latestTen.

  • Format: Each entry includes the value of the variable and its associated block height, formatted as shown above.

Rate Limiting

The API allows up to 40 requests per minute.

NextFormulas

Last updated 1 year ago

📚
🔬Formulas