API
API Key
// Example
const headers = {
"x-api-key": "2Gljlz9zHf1hwOMrHDmmb4Tm1OKdVU4HbX03cXsb"
}Contract API
Metrics API
Chart Data API
Retrieves chart data for contracts and its metrics. Each metric is a line on the chart and bucket size, time range and breakdowns are applied to all lines if available.
Required scopes
This endpoint requires the following scopes:
- : modify contracts in your account
- : read your contracts and metrics
Authorizations
OAuth2implicitRequired
Authorization URL:
Body
bucket_sizestring ยท enumRequiredExample:
DAYPossible values: Responses
200
Successful operation
application/json
successbooleanOptional
400
Invalid parameters supplied
application/json
404
Contract not found
405
Validation exception
500
Try again or seek support
post
/chartCustom Contract Data API
Retrieves paginated data based on aggregations from a contract custom event.
Required scopes
This endpoint requires the following scopes:
- : modify contracts in your account
- : read your contracts and metrics
Authorizations
OAuth2implicitRequired
Authorization URL:
Body
pagenumberOptionalExample:
0bucket_sizestring ยท enumOptionalExample:
DAYPossible values: contract_idstringOptionalExample:
0xa86a_0xa695ea0c90d89a1463a53fa7a02168bc46fbbf7efromnumberOptionalExample:
1606184371264tonumberOptionalExample:
1798776371265event_topicstringOptionalExample:
0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62grouping_fieldsstring[]OptionalExample:
["operator","to","from"]Responses
200
Successful operation
application/json
successbooleanOptional
400
Invalid parameters supplied
application/json
404
Contract not found
405
Validation exception
500
Try again or seek support
post
/data/metricRetrieves paginated decoded custom events from a contract's custom event topic.
Required scopes
This endpoint requires the following scopes:
- : modify contracts in your account
- : read your contracts and metrics
Authorizations
OAuth2implicitRequired
Authorization URL:
Body
pagenumberOptionalExample:
0contract_idstringOptionalExample:
0xa86a_0xa695ea0c90d89a1463a53fa7a02168bc46fbbf7eevent_topicstringOptionalExample:
0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62fromnumberOptionalExample:
1606184371264tonumberOptionalExample:
1798776371265Responses
200
Successful operation
application/json
successbooleanOptional
400
Invalid parameters supplied
application/json
404
Contract not found
405
Validation exception
500
Try again or seek support
post
/data/eventsLast updated