Skip to main content

Algorand Smart Contract Calls API

The Smart Contract Calls API returns parsed application call data on Algorand: transaction type, sender, smart contract address, block context, and call counts. Filter by txType to isolate payments (pay), asset configuration (acfg), or any other Algorand transaction type.

Endpoint

Algorand GraphQL queries are served at https://graphql.bitquery.io.

Count unique smart contract calls in the latest block

Returns the count of unique smart contract calls in the most recent block after a given date. Run query

{
algorand(network: algorand) {
smartContractCalls(
date: {after: "2023-08-05"}
options: {desc: "block.timestamp.iso8601", limit: 1}
) {
block {
timestamp {
iso8601
}
}
count(uniq: calls)
}
}
}

Track newly created assets (acfg transactions)

Returns the 10 most recent asset configuration transactions — acfg stands for asset config. Each result includes the smart contract address, transaction hash, sender, and block timestamp. Run query

{
algorand(network: algorand) {
smartContractCalls(
options: {desc: "block.timestamp.iso8601", limit: 10}
txType: {is: acfg}
) {
block {
timestamp {
iso8601
}
}
smartContract {
address {
address
}
}
transaction {
hash
}
txSender {
address
}
txType
}
}
}

Count smart contract calls by transaction type since genesis

Returns the total number of calls grouped by transaction type across Algorand mainnet history. Run query

query MyQuery {
algorand(network: algorand) {
smartContractCalls(options: {desc: "count"}) {
txType
count
}
}
}

Get latest smart contract calls filtered by type

Returns the 10 most recent pay (payment) transactions with smart contract address, hash, sender, and block timestamp. Swap pay for any other txType value.

{
algorand(network: algorand) {
smartContractCalls(
date: {after: "2023-08-05"}
options: {desc: "block.timestamp.iso8601", limit: 10}
txType: {is: pay}
) {
block {
timestamp {
iso8601
}
}
smartContract {
address {
address
}
}
transaction {
hash
}
txSender {
address
}
txType
}
}
}

Video: tracking newly created tokens on Algorand