Home

gRPC

Endpoint:

Endpoint:

Copied!
apt-grpc.nownodes.io

Authentication:

Copied!
api-key: YOUR_API_KEY

Official proto sources:

Copied!
https://github.com/aptos-labs/aptos-core
Copied!
https://github.com/aptos-labs/aptos-indexer-processors-v2

aptos.indexer.v1.RawData

GetTransactions

Description: Opens a server-side stream of Aptos transactions starting from the requested ledger version.

Copied!
aptos.indexer.v1.RawData/GetTransactions

Request:

Copied!
{
  "startingVersion": "0",
  "transactionsCount": "100",
  "batchSize": "100"
}
Copied!
grpcurl -insecure -H 'api-key: YOUR_API_KEY' -d '{"startingVersion":"0","transactionsCount":"100","batchSize":"100"}' 'apt-grpc.nownodes.io' aptos.indexer.v1.RawData/GetTransactions

Response example:

Copied!
{
  "transactions": [
    {
      "version": "1",
      "timestamp": {
        "seconds": "1710000000",
        "nanos": 0
      },
      "type": "TRANSACTION_TYPE_USER",
      "info": {
        "hash": "ASNFZ4mrze8="
      }
    }
  ],
  "chainId": "1",
  "processedRange": {
    "firstVersion": "1",
    "lastVersion": "1"
  }
}

The GetTransactions method is server-streaming and may return multiple response messages.

To open a continuous transaction stream, omit transactionsCount:

Copied!
{
  "startingVersion": "250000000",
  "batchSize": "100"
}
Copied!
grpcurl -insecure -H 'api-key: YOUR_API_KEY' -d '{"startingVersion":"250000000","batchSize":"100"}' 'apt-grpc.nownodes.io' aptos.indexer.v1.RawData/GetTransactions

The connection remains open until the client disconnects or the server terminates the stream.

aptos.indexer.v1.DataService

Ping

Description: Checks the availability of the Aptos transaction data service.

Copied!
aptos.indexer.v1.DataService/Ping

Request:

Copied!
{
  "knownLatestVersion": "0",
  "pingLiveDataService": true
}
Copied!
grpcurl -insecure -H 'api-key: YOUR_API_KEY' -d '{"knownLatestVersion":"0","pingLiveDataService":true}' 'apt-grpc.nownodes.io' aptos.indexer.v1.DataService/Ping

Live data service response example:

Copied!
{
  "liveDataServiceInfo": {
    "chainId": "1",
    "timestamp": {
      "seconds": "1710000000",
      "nanos": 0
    },
    "knownLatestVersion": "250000000",
    "minServableVersion": "249000000"
  }
}

Historical data service response example:

Copied!
{
  "historicalDataServiceInfo": {
    "chainId": "1",
    "timestamp": {
      "seconds": "1710000000",
      "nanos": 0
    },
    "knownLatestVersion": "250000000"
  }
}

The response contains either:

Copied!
liveDataServiceInfo

or:

Copied!
historicalDataServiceInfo

GetTransactions

Description: Opens a server-side stream of Aptos transactions starting from the requested ledger version.

Copied!
aptos.indexer.v1.DataService/GetTransactions

Request:

Copied!
{
  "startingVersion": "0",
  "transactionsCount": "100",
  "batchSize": "100"
}
Copied!
grpcurl -insecure -H 'api-key: YOUR_API_KEY' -d '{"startingVersion":"0","transactionsCount":"100","batchSize":"100"}' 'apt-grpc.nownodes.io' aptos.indexer.v1.DataService/GetTransactions

Response example:

Copied!
{
  "transactions": [
    {
      "version": "1",
      "timestamp": {
        "seconds": "1710000000",
        "nanos": 0
      },
      "type": "TRANSACTION_TYPE_USER",
      "info": {
        "hash": "ASNFZ4mrze8="
      }
    }
  ],
  "chainId": "1",
  "processedRange": {
    "firstVersion": "1",
    "lastVersion": "1"
  }
}

The GetTransactions method is server-streaming and may return multiple response messages.

To open a continuous transaction stream, omit transactionsCount:

Copied!
{
  "startingVersion": "250000000",
  "batchSize": "100"
}
Copied!
grpcurl -insecure -H 'api-key: YOUR_API_KEY' -d '{"startingVersion":"250000000","batchSize":"100"}' 'apt-grpc.nownodes.io' aptos.indexer.v1.DataService/GetTransactions

The connection remains open until the client disconnects or the server terminates the stream.