Skip to main content

Get Chart Raw JSON

Retrieve raw chart data in JSON format. Uses the same input and output types as getChartJson.

Query Structure​

query GetChartRawJson($input: GetChartJsonInput!) {
getChartRawJson(input: $input) {
term_id
curve_id
graph_type
interval
count
data {
timestamp
value
}
}
}

Variables​

Same as getChartJson -- takes GetChartJsonInput:

FieldTypeRequiredDescription
term_idStringYesTerm ID to query
curve_idStringYesCurve ID (bonding curve)
intervalStringYesTime interval (e.g. "1h", "1d")
start_timeStringYesStart of time range (ISO 8601)
end_timeStringYesEnd of time range (ISO 8601)
graph_typeStringNoType of graph data
{
"input": {
"term_id": "0x57d94c116a33bb460428eced262b7ae2ec6f865e7aceef6357cec3d034e8ea21",
"curve_id": "1",
"interval": "1d",
"start_time": "2024-01-01T00:00:00Z",
"end_time": "2024-01-31T23:59:59Z"
}
}

Response Fields (ChartDataOutput)​

FieldTypeDescription
term_idString!Term ID for this chart
curve_idStringCurve ID used
graph_typeString!Type of graph
intervalString!Interval used
countInt!Number of data points
data[ChartDataPoint!]!Array of data points (timestamp: String!, value: String!)