Signal21 API

Download OpenAPI specification:Download

E-mail: hello@signal21.io License: Apache 2.0

Signal21 provides various information about Stacks blockchain through REST API. The data is as real-time as it appears on Stacks node. Finalized blocks, transactions and corresponding events are visible once the consensus is reached. This document describes what information is available and how to query it to produce various reports and dashboards.

Stacks

General Stacks blockchain analytics API

block

Returns the latest block number.

Responses

Response samples

Content type
application/json
{
  • "maxBlockHeight": 0
}

deserialize

Deserialize serialized Clarity values

path Parameters
value
required
string

Responses

price

Fetched latest prices for corresponding symbol.

query Parameters
symbol
string

Can be STX-USD or BTC-USD

from
string
to
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

run

Runs a predefined report, the report might use provided block. If block is not specified the latest one is assumed.

Request Body schema: application/json

reportName must be one of active_contracts, active_recent_contracts, smart_contracts, smart_contracts_total, pools, wallets, wallets_dist, whales, nft_contracts.

reportName
string
blockHeight
integer <int64>

Responses

Request samples

Content type
application/json
{
  • "reportName": "string",
  • "blockHeight": 0
}

Response samples

Content type
application/json
{
  • "columns": {
    },
  • "order": [
    ],
  • "types": [
    ],
  • "time": 0,
  • "cached": true,
  • "plan": { }
}

ts

Runs a predefined time-series report (e.g. price feed).

Request Body schema: application/json
reportName
string
blockHeight
integer <int64>

Responses

Request samples

Content type
application/json
{
  • "reportName": "string",
  • "blockHeight": 0
}

Response samples

Content type
application/json
{
  • "columns": {
    },
  • "order": [
    ],
  • "types": [
    ],
  • "time": 0,
  • "cached": true,
  • "plan": { }
}

SQL

SQL interface to Stacks blockchain analytics API

runSql

Executes a provided SQL. See SQL API guide for details. https://app.signal21.io/docs/api.html.html

Request Body schema: */*

SQL query

string

Responses

Response samples

Content type
application/json
{
  • "columns": {
    },
  • "order": [
    ],
  • "types": [
    ],
  • "time": 0,
  • "cached": true,
  • "plan": { }
}

runSqlV2

Executes a provided SQL. See SQL API guide for details https://app.signal21.io/docs/api.html.

Request Body schema: application/json
query
string
offset
integer <int64>
next
string

Responses

Request samples

Content type
application/json
{
  • "query": "string",
  • "offset": 0,
  • "next": "string"
}

Response samples

Content type
application/json
{
  • "columns": {
    },
  • "order": [
    ],
  • "types": [
    ],
  • "time": 0,
  • "cached": true,
  • "plan": { }
}

runTxHistory

Transaction history for owner

path Parameters
address
required
string
query Parameters
next
string
limit
integer <int32>

Responses

Response samples

Content type
application/json
{
  • "pagination": {
    },
  • "records": { }
}

NFTs

NFT specific reporting API

addressHistory

NFT events history for a specific address

Authorizations:
bearerAuth
path Parameters
address
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

assets

NFT assets with corresponding transactions by recipient.

Authorizations:
bearerAuth
path Parameters
recipient
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

owners

Returns a list of all owner of given NFT contract.

Authorizations:
bearerAuth
path Parameters
contract
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

tokens

Returns a list of all tokens of given NFT contract.

Authorizations:
bearerAuth
path Parameters
contract
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

transactions

Returns number of transactions per day for given NFT contract.

Authorizations:
bearerAuth
path Parameters
contract
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

volumes

Returns volumes per day for given NFT contract.

Authorizations:
bearerAuth
path Parameters
contract
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

User Reports

Users and Users Reports management API

listDatasets

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

createDataset

Authorizations:
bearerAuth
Request Body schema: application/json
name
string
Array of objects (Column)

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "schema": [
    ]
}

Response samples

Content type
application/json
{
  • "name": "string",
  • "table": "string",
  • "spec": {
    }
}

listUserReports

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

createUserReport

Authorizations:
bearerAuth
Request Body schema: application/json
name
string
query
string
indices
Array of strings

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "query": "string",
  • "indices": [
    ]
}

Response samples

Content type
application/json
{
  • "name": "string",
  • "query": "string",
  • "table": "string",
  • "spec": {
    },
  • "state": 0,
  • "ts": "2019-08-24T14:15:22Z"
}

deleteUserReport

Authorizations:
bearerAuth
path Parameters
name
required
string

Responses

runUserReport

Authorizations:
bearerAuth
path Parameters
name
required
string

Responses

Response samples

Content type
application/json
{
  • "status": "string",
  • "value": {
    }
}

upload

Authorizations:
bearerAuth
path Parameters
name
required
string
Request Body schema: text/csv
object

Responses

Response samples

Content type
application/json
0
0