RPC
Send JSON-RPC requests over HTTPS. Bitcoin endpoints do not support WebSocket. Archive data is available: every block since genesis, through getblock.
- HTTPS
-
https://rpc.graphops.xyz/v1/bitcoin/signet
Call Bitcoin Core-compatible JSON-RPC methods on Bitcoin Signet through GraphOps RPC over HTTPS.
One API key from your organization can include every service you use, and all of them draw from the organization's credit balance.
Send JSON-RPC requests over HTTPS. Bitcoin endpoints do not support WebSocket. Archive data is available: every block since genesis, through getblock.
https://rpc.graphops.xyz/v1/bitcoin/signet Use these identifiers to name Bitcoin Signet in requests, manifests and package configuration.
signet bip122:00000008819873e925422c1ff0f99f7c This request reads Bitcoin Signet chain information with getblockchaininfo.
Create an API key that includes RPC in your organization and export it as GRAPHOPS_API_KEY.
The example sends it in the Authorization header.
RPC quickstart(opens in a new tab) Authentication(opens in a new tab)
Prerequisites
Set GRAPHOPS_API_KEY to your GraphOps API key.
Run the command in a terminal with curl installed.
CLI · curl
curl --fail-with-body --silent --show-error 'https://rpc.graphops.xyz/v1/bitcoin/signet' \
-H "Authorization: Bearer ${GRAPHOPS_API_KEY}" \
-H 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": 1,
"method": "getblockchaininfo",
"params": []
}'
export {};
const response = await fetch("https://rpc.graphops.xyz/v1/bitcoin/signet", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.GRAPHOPS_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
jsonrpc: "2.0",
id: 1,
method: "getblockchaininfo",
params: [],
}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
console.log(JSON.stringify(await response.json()));
import json
import os
import requests
response = requests.post(
"https://rpc.graphops.xyz/v1/bitcoin/signet",
headers={"Authorization": f"Bearer {os.environ['GRAPHOPS_API_KEY']}"},
json={
"jsonrpc": "2.0",
"id": 1,
"method": "getblockchaininfo",
"params": [],
},
timeout=30,
)
response.raise_for_status()
print(json.dumps(response.json()))
package main
import (
"bytes"
"fmt"
"io"
"log"
"net/http"
"os"
"time"
)
func main() {
body := bytes.NewBufferString(`{"jsonrpc":"2.0","id":1,"method":"getblockchaininfo","params":[]}`)
request, err := http.NewRequest(http.MethodPost, "https://rpc.graphops.xyz/v1/bitcoin/signet", body)
if err != nil {
log.Fatal(err)
}
for name, value := range map[string]string{
"Authorization": "Bearer " + os.Getenv("GRAPHOPS_API_KEY"),
"Content-Type": "application/json",
} {
request.Header.Set(name, value)
}
response, err := (&http.Client{Timeout: 30 * time.Second}).Do(request)
if err != nil {
log.Fatal(err)
}
defer response.Body.Close()
result, err := io.ReadAll(response.Body)
if err != nil {
log.Fatal(err)
}
if response.StatusCode != http.StatusOK {
log.Fatalf("HTTP %s: %s", response.Status, result)
}
fmt.Println(string(result))
}
use reqwest::header::{HeaderMap, HeaderName};
use serde_json::{json, Value};
use std::{env, error::Error, time::Duration};
#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
let mut headers = HeaderMap::new();
for (name, value) in vec![
("Authorization", format!("Bearer {}", env::var("GRAPHOPS_API_KEY")?)),
] {
headers.insert(name.parse::<HeaderName>()?, value.parse()?);
}
let response = reqwest::Client::new()
.post("https://rpc.graphops.xyz/v1/bitcoin/signet".to_string())
.headers(headers)
.timeout(Duration::from_secs(30))
.json(&json!({"jsonrpc":"2.0","id":1,"method":"getblockchaininfo","params":[]}))
.send()
.await?
.error_for_status()?;
let result: Value = response.json().await?;
println!("{result}");
Ok(())
}
Usage on Bitcoin Signet draws credits at the same rates as on every other network. Your monthly plan sets the price per credit.
bip122:00000008819873e925422c1ff0f99f7c, and RPC endpoints name it signet in their path.https://rpc.graphops.xyz/v1/bitcoin/signet. Authenticate with an API key from your organization that includes RPC, in the Authorization header or as a route token at the end of the path.getblock returns any block.Create an organization, choose your monthly credits, then create an API key that includes the services you need.