👋Getting Started
Learn how to get an API Key and make your first request with the expand.network API.
🗒️ Follow these steps to start your journey today:
Step 1: 🔑Create an API key (For further details, Click here)
Step 2: 🎉 Make Your First Request
Performing READ operations
To perform read queries, directly target our domain https://api.expand.network/ to hit our API environment. Following are the examples to make read queries:
Example 1: via Postman


Example 2: via cURL from a command line
curl -H "x-api-key: YOUR_API_KEY" https://api.expand.network/chain/getbalance?address=0xe688b84b23f322a994A53dbF8E15FA82CDB71127Performing WRITE operations
To perform a write transaction, you would require the followings:-
- expand.network SDK which can be cloned from GitHub. 
- API key 
- Example code: Send one Wei from an address ending in - 2c7to address ending in- 86F. You need to use your private key to sign the transaction. The return value is the transaction hash (- res).
const rawTransaction = await signTransaction({
    from: '0x1BdC0A29f667E2cc74e55531431986838023E2c7',
    to: '0x94a5E554DC172A472421291Ae6e6c0e3C150286F',
    value: '1',
    gas: 50000,
},{
    privateKey: YOUR_PRIVATE_KEY',
    xApiKey : 'YOUR_API_KEY'
}).then(rawTransaction => sendTransaction({
    rawTransaction: rawTransaction.rawTransaction,
    xApiKey : 'YOUR_API_KEY'
})).then(res => console.log(res));Last updated

