The Web3 RPC API provides you with an easy way to maintain a constant, secure connection to the blockchain. These nodes provide reliable, real-time data access and interaction capabilities for executing transactions, monitoring block events, and querying network data efficiently.
| Supported Chains | Chain ID | JSON-RPC | Websockets/Subscriptions | gRPC | full-node | archive-node |
|---|---|---|---|---|---|---|
| Ethereum | 1 | ✅ | ✅ | ❌ | ✅ | ✅ |
| Solana | 501 | ✅ | ✅ | ✅ | ✅ | ✅ |
| Base | 8453 | ✅ | ✅ | ❌ | ✅ | ✅ |
| Binance | 56 | ✅ | ✅ | ❌ | ✅ | ✅ |
| Monad | 143 | ✅ | ✅ | ❌ | ✅ | ✅ |
| zkSync | 324 | ✅ | ✅ | ❌ | ✅ | ✅ |
| Gnosis | 100 | ✅ | ✅ | ❌ | ✅ | ✅ |
| Optimism | 10 | ✅ | ✅ | ❌ | ✅ | ✅ |
| Polygon | 137 | ✅ | ✅ | ❌ | ✅ | ✅ |
| Linea | 59144 | ✅ | ✅ | ❌ | ✅ | ✅ |
| Sonic | 146 | ✅ | ✅ | ❌ | ✅ | ✅ |
| Unichain | 130 | ✅ | ✅ | ❌ | ✅ | ✅ |
| Arbitrum | 42161 | ✅ | ✅ | ❌ | ✅ | ✅ |
| Avalanche | 43114 | ✅ | ✅ | ❌ | ✅ | ✅ |
| Cronos | 25 | ✅ | ✅ | ❌ | ✅ | ✅ |
Solana gRPC Support
For real-time Solana blockchain data streaming, check out our Solana gRPC documentation using the Yellowstone protocol.
Select a chain from the navigation to view available JSON-RPC methods for that network. Each chain has its own set of methods that can be called using JSON-RPC requests.
For authentication details, see the Authentication documentation.
The base URL for all Web3 RPC requests is:https://api.1inch.com/web3/{chainId}
Where {chainId} is the chain ID of the network you want to interact with.
Enhanced API services are available as part of our paid plans. They are designed for enterprises with high-demand blockchain interactions or substantial operational scale, ensuring superior performance in terms of connectivity, throughput, and response times.
Here's a simple example using viem to make a JSON-RPC call:
TypeScript
1234567891011121314151617
import { createPublicClient, http } from "viem";
import { mainnet } from "viem/chains";
const client = createPublicClient({
chain: mainnet,
transport: http("https://api.1inch.com/web3/1", {
fetchOptions: {
headers: {
Authorization: `Bearer ${process.env.API_KEY}`
}
}
})
});
// Get the current block number
const blockNumber = await client.getBlockNumber();
console.log("Current block number:", blockNumber);
For detailed information about each endpoint, refer to the Web3 RPC API section.