-
-
Notifications
You must be signed in to change notification settings - Fork 7
Indexer Built‐in API
Peter edited this page Mar 20, 2024
·
1 revision
The indexer repository provides a built in API for querying the data that has been indexed.
Data retrieval consists of hitting API endpoints with an on-chain address and a tax software format. The two main endpoints provided by the API for data retrieval are:
-
/events.csv
: provides a CSV file for a given tax software format -
/events.json
: provides a JSON blob with rows for a given format
The API provides a built-in method for tracking usage of the API. This consists of:
- Pre-validation to determine which blockchain addresses should be added as a usage event
- The pre-validation ensures that only addresses that have been indexed from the blockchain will be tracked. This will filter out noise or improper usage of the API.
- Database models for CSV and JSON API address usage.
The models for each API endpoint type consist of:
AddressUsage {
Address
RowsRetrieved
Timestamp
}
This data can be used for determining:
- How often the API is called for an on-chain address
- How many rows are returned for a given address over time
- Overall usage of the API over a given time period