All Collections
Web3 API
Aptos - Quickstart with Node.js
Aptos - Quickstart with Node.js
Jonathan Blackburn avatar
Written by Jonathan Blackburn
Updated over a week ago

Quickstart with Node.js

Welcome to the Node.js Quickstart! Here we will walk through the process of getting your API keys, installing the SDK, and making your first API call with Node.js.


  1. Install and set up your editor of choice (we will use Visual Studio Code in this tutorial)

  2. Install the latest version of Node.js

Using the SDK​

Installing the SDK

Run the following command in your project directory to install the SDK via npm:

npm install moralis

Get Account Transactions

Now, we can get data by using the Moralis SDK. Let's use the getAccountTransactions function to get Account Transactions. Replace YOUR_API_KEY with your own API Key and run node index.js.


const Moralis = require("moralis").default;

const runApp = async () => {
await Moralis.start({
apiKey: "YOUR_API_KEY",

const address =

try {
const response = await Moralis.AptosApi.transactions.getAccountTransactions(
"network": "mainnet",
"address": address
} catch (e) {


Did this answer your question?