Quick Start (Algod)
Algorand Mainnet & Testnet RPC quick start - Algod API
API/RPC access does not require any tokens. You should leave this field empty unless you subscribe to a paid tier.
import {Algodv2} from 'algosdk';
const token = '' // no token needed!;
// const testnet ="https://testnet-api.algonode.cloud";
const mainnet = 'https://mainnet-api.algonode.cloud';
const client = new Algodv2(token, mainnet , 443);
//Query archival node status
(async () => {
console.log(await client.status().do());
})().catch((e) => {
console.log(e);
});
As a general rule please make sure you pause for a bit before repeating the same query after ANY error. Failing to do that might get your IP address banned for a period of time.
The free tier will return HTTP 429 error if you attempt to do more than 50 requests (500+ for paid tiers) per second from your machine. Advanced examples show how to use rate limiters to solve this issue.
Last updated