Connect via our RPC
API KEY
Access to the RPC data requires authentication. Head to the Developer Portal to get your API Key.
With access to the RPC, you can interact with Shibarium and Puppynet networks and fetch relevant data to your needs, such as the latest block, gas price and other standard Ethereum JSON-RPC API functions.
You can use all the standard Ethereum JSON-RPC API methods, such as eth_blockNumber
to retrieve the network's latest block.
info
Find a list of all possible functions on Ethereum's documentation.
Base URL
- Shibarium
- Puppynet
https://api.shibrpc.com/shibarium/
https://api.shibrpc.com/puppynet/
Request example
POST /{api_key}
- cURL
- Typescript
- Go
curl -s "https://api.shibrpc.com/puppynet/{api_key}" \
-H "Content-Type: application/json" \
-X POST --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":67}' \
fetch('https://api.shibrpc.com/puppynet/2i7ARsIeJzAB9fzSnj5oa7SJ9NdwDnT7UVrsahod', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
jsonrpc: '2.0',
method: 'eth_blockNumber',
params: [],
id: 67
})
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
package main
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
)
func main() {
url := "https://api.shibrpc.com/puppynet/2i7ARsIeJzAB9fzSnj5oa7SJ9NdwDnT7UVrsahod"
jsonStr := []byte(`{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":67}`)
resp, err := http.Post(url, "application/json", bytes.NewBuffer(jsonStr))
if err != nil {
fmt.Println("Error:", err)
return
}
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(body))
}
Body
{
"jsonrpc":"2.0",
"method":"eth_blockNumber",
"params":[],
"id":67
}
Key | Value |
---|---|
jsonrpc | JSON-RPC specification version. |
method | Function to retrieve data from the network. Find more on Ethereum's documentation. |
params | Extra parameters. |
id | ID for the RPC call. |
Header Parameters
No header parameters needed.
Query Parameters
No query parameters needed.
Response
{
"jsonrpc": "2.0",
"id": 67,
"result": "0x484419"
}
Key | Value |
---|---|
jsonrpc | JSON-RPC specification version. |
id | |
result | For the the eth_blockNumber , the latest block on the network. |
web3.js
If you are building a frontend or backend project, you can call the functions above with the web3.js library format.