api-access
API access
Stacks on Chain expose the underlying blockchain data through the SQL interface over REST API. The endpoint for running queries is
https://api.stacksdata.info/v1/sql
It accepts POST HTTP call, for instance, returns 2 wallets balances:
> curl -X POST https://api.stacksdata.info/v1/sql \
-H "Content-Type: application/json" \
-d "select * from accounts limit 2" | jq
{
"columns": {
"total": [
83333.33333,
27777.777776
],
"account": [
"SM10018N5V6PQ3BPS9K49ZZXM94ZRCANSTH6H600B",
"SM103330DZKWNTJ992YEF4Y57QWP50P369DWX6WAM"
]
},
"order": [
"account",
"total"
]
}
2 wallets balances
API documentation
For more documentation please refer to API specification
Last updated