Arbitrum API Quickstart
How to get started building on Arbitrum and use the JSON-RPC API
Don’t have an API key?
Sign up to start building on Arbitrum. Get started for free
Getting Started Instructions
1. Choose a package manager (npm or yarn)
For this guide, we will be using npm or yarn as our package manager to install Viem or Ethers.js.
npm
To get started with npm
, follow the documentation to install Node.js and npm
for your operating system: https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
yarn
To get started with yarn
, follow these steps: https://classic.yarnpkg.com/lang/en/docs/install
2. Set up your project (npm or yarn)
3. Install Web3 Library
Run the following command to install Viem or Ethers.js with npm or yarn.
4. Make your first request
You are all set now to use Arbitrum API and make your first request. For instance, lets make a request to get latest block
. Create an index.js
file and paste one of the following code snippets into the file.
5. Run script
To run the above node script, use cmd node index.js
, and you should see the output.
Arbitrum Tutorials
You must not stop here! Want to build your first Dapp on Arbitrum and use Arbitrum APIs?
Check out the following tutorials to learn how to build on Arbitrum:
- Arbitrum NFTs: Creating and Deploying ERC-721
- Arbitrum SDK Examples
- Arbitrum API FAQ
- How to Add Arbitrum to Metamask
For full documentation on Web3 libraries, check out the official documentation:
- Viem Documentation - Modern TypeScript interface for Ethereum
- Ethers.js Documentation - Complete Ethereum wallet implementation