Ask it, or call it.
Every answer works two ways: in plain words through your AI agent, or as a REST call. Same data, same key, four blockchains.
Your agentSet up your agent
What’s the balance of
bc1qxhmdufsvnuaaaer4ynz88fspdsxq2h9e9cetdj right now?
sochain · get_balance · BTC
It holds 0.12771200 BTC, all confirmed. Nothing is waiting in the mempool.
Actual AI responses may differ
curl https://sochain.com/ api/ v3/ balance/ BTC/ bc1qxhmdufsvnuaaaer4ynz88fspdsxq2h9e9cetdj \ -H "API-KEY: $SOCHAIN_API_KEY"
const res = await fetch("https://sochain.com/api/v3/balance/BTC/bc1qxhmdufsvnuaaaer4ynz88fspdsxq2h9e9cetdj", {
headers: { "API-KEY": process.env.SOCHAIN_API_KEY }
});
const { data } = await res.json();
import os, requests
r = requests.get("https://sochain.com/api/v3/balance/BTC/bc1qxhmdufsvnuaaaer4ynz88fspdsxq2h9e9cetdj",
headers={"API-KEY": os.environ["SOCHAIN_API_KEY"]})
data = r.json()["data"]
{
"status": "success",
"data": {
"confirmed": "0.12771200",
"unconfirmed": "0.00000000"
}
}
200 OK · 17 ms · no key needed
Your agentSet up your agent
Has
597bafa25fcbb081467bdeb030a42bf441dbfcc054bdcfad31a829d7db5d931f confirmed? What was the fee?
sochain · get_transaction · BTC
It has 202,245 confirmations, in block 769,781; the fee was 0.00090000 BTC.
Actual AI responses may differ
curl https://sochain.com/ api/ v3/ transaction/ BTC/ 597bafa25fcbb081467bdeb030a42bf441dbfcc054bdcfad31a829d7db5d931f \ -H "API-KEY: $SOCHAIN_API_KEY"
const res = await fetch("https://sochain.com/api/v3/transaction/BTC/597bafa25fcbb081467bdeb030a42bf441dbfcc054bdcfad31a829d7db5d931f", {
headers: { "API-KEY": process.env.SOCHAIN_API_KEY }
});
const { data } = await res.json();
import os, requests
r = requests.get("https://sochain.com/api/v3/transaction/BTC/597bafa25fcbb081467bdeb030a42bf441dbfcc054bdcfad31a829d7db5d931f",
headers={"API-KEY": os.environ["SOCHAIN_API_KEY"]})
data = r.json()["data"]
{
"status": "success",
"data": {
"hash": "597bafa25fcbb081467bdeb030a42bf441dbfcc054bdcfad31a829d7db5d931f",
"confirmations": 202245,
"size": 380,
"vsize": 190,
"weight": 758,
"version": 1,
"locktime": 0,
"block_hash": "0000000000000000000717afe429887e2967094d6e17c2b22b54cf0e33debb69",
"block_height": 769781,
"time": 1672525387,
"inputs_n": 1,
"outputs_n": 2,
"inputs_value": "0.66579765",
"outputs_value": "0.66489765",
"fee": "0.00090000",
"price": {
"value": "16540.41000000",
"currency": "USD"
},
"inputs": [
{
"index": 0,
"value": "0.66579765",
"address": "bc1qwqdg6squsna38e46795at95yu9atm8azzmyvckulcc7kytlcckxswvvzej",
"scriptSig": {
"hex": "",
"asm": ""
},
"witness": [
"",
"30440220018433af266f34446613cf4f476c9721…2d5438cb4ed9d201",
"30440220084e1f306aecec3c797b1097908b74e0…671610a860c70701",
"52210375e00eb72e29da82b89367947f29ef34af…11a32cf9f88053ae"
],
"previous_output": {
"hash": "eb4fdf3627d92379557cfbc296c520271378978d4a9204a5ce13b51a6bb40b81",
"index": 1
},
"sequence": 4294967295
}
],
"outputs": [
{
"index": 0,
"value": "0.15526090",
"address": "39KPyDkWXeEE9UXkSNPXkv5tbgqZfxHhqv",
"type": "scripthash",
"script": {
"hex": "a91453aa4220caf513cc2850ed4deb2662a729350a5987",
"asm": "OP_HASH160 53aa4220caf513cc2850ed4deb2662a729350a59 OP_EQUAL"
},
"spent": {
"hash": "2fbe643e9bf9370d08786f9146b9032f355558f5d50e6f367e76bfdc65b44bf6",
"index": 3
},
"is_change": null
},
{
"index": 1,
"value": "0.50963675",
"address": "bc1qwqdg6squsna38e46795at95yu9atm8azzmyvckulcc7kytlcckxswvvzej",
"type": "witness_v0_scripthash",
"script": {
"hex": "0020701a8d401c84fb13e6baf169d59684e17abd9fa216c8cc5b9fc63d622ff8c58d",
"asm": "0 701a8d401c84fb13e6baf169d59684e17abd9fa216c8cc5b9fc63d622ff8c58d"
},
"spent": {
"hash": "01344f7472a5ebb31c3b76e1eabbd2e827a5c1ee45017287dcc743d769939e88",
"index": 0
},
"is_change": true
}
],
"kind": "payment",
"heuristic": false
}
}
200 OK · 17 ms · no key needed
Your agentSet up your agent
How busy is Bitcoin, and what fee should I pay?
sochain · get_network_info · BTC
Block 972,025 is the newest; 38,659 transactions are waiting, and the next block’s median fee rate is 1 sat/vB.
Actual AI responses may differ
curl https://sochain.com/ api/ v3/ network_info/ BTC \ -H "API-KEY: $SOCHAIN_API_KEY"
const res = await fetch("https://sochain.com/api/v3/network_info/BTC", {
headers: { "API-KEY": process.env.SOCHAIN_API_KEY }
});
const { data } = await res.json();
import os, requests
r = requests.get("https://sochain.com/api/v3/network_info/BTC",
headers={"API-KEY": os.environ["SOCHAIN_API_KEY"]})
data = r.json()["data"]
{
"status": "success",
"data": {
"block_count": 972025,
"best_block_hash": "00000000000000000001f7291ef851b3affc653595c2672a9f4dff65c20563fe",
"hashrate": "1005653117675905000000",
"mempool": {
"mempool_txs": 38659,
"mempool_size": 30450728,
"updated_at": 1792341919,
"blocks": [
{
"block_num": 1,
"min_fee_rate": 1,
"max_fee_rate": 60,
"median_fee_rate": 1,
"min_fee_rate_possible": 1,
"weight": 3995755,
"size": 1728982,
"num_txs": 3020,
"min_fee_rate_precise": "0.14",
"max_fee_rate_precise": "59.51",
"median_fee_rate_precise": "0.24",
"min_fee_rate_possible_precise": "0.17"
},
// … 5 more projected blocks
],
"quote_targets": null,
"loading": false
}
}
}
200 OK · 18 ms · no key needed
Your agentSet up your agent
What’s Bitcoin worth right now?
sochain · get_price · BTC
81073.20434861 USD per bitcoin.
Actual AI responses may differ
curl https://sochain.com/ api/ v3/ price/ BTC \ -H "API-KEY: $SOCHAIN_API_KEY"
const res = await fetch("https://sochain.com/api/v3/price/BTC", {
headers: { "API-KEY": process.env.SOCHAIN_API_KEY }
});
const { data } = await res.json();
import os, requests
r = requests.get("https://sochain.com/api/v3/price/BTC",
headers={"API-KEY": os.environ["SOCHAIN_API_KEY"]})
data = r.json()["data"]
{
"status": "success",
"data": {
"value": "81073.20434861",
"currency": "USD",
"as_of": 1792341919
}
}
200 OK · 19 ms · no key needed
Already integrated? It keeps working. Same base URL, paths, fields and API key. Limits are now monthly, and
broadcast_transaction is no longer offered.
Quickstart
1
Get your key
Sign in with your email and an 8-digit sign-in code. Your key is shown once on the dashboard: copy it then.
Sign in →
2
Send it as a header
API-KEY: YOUR_API_KEY
Keep it on your server — never ship it in client-side code.
3
Call any endpoint
https://sochain.com/api/v3/…
From a terminal, no key needed: npx sochain-cli balance BTC bc1qxhmdufsvnuaaaer4ynz88fspdsxq2h9e9cetdj · the SoChain CLI
Networks
Every endpoint takes a network code. Same paths, same fields, on all of them.
Endpoints
Responses & errors
JSON: success wraps the result in data; failures explain themselves in data.error_message.
200"success"Here’s your data.
401"fail"Invalid key (or none where one is needed), a locked account, or the month’s requests and the free rate both used up.
404"fail"Not found — check the network code, address, hash or height.
Plans & limits
Free
$0
Hobby
$35 / mo
Starter
$149 / mo
Professional
$499 / mo
Behemoth
$1,999 / mo