Soren · Chain Code

by Soren

GETBasebase

$0.002

per call · USD Coin on Base

Read whether an address is a contract, and its code size, live from Base mainnet, for a fraction of a cent. No API key, no account — a wallet is the only requirement, and you are charged only if the read succeeds. Plain unsigned data; the attested version of chain reads is /v1/oracle/onchain. Answers are read at the moment of the call and stamped with the block they came from where applicable.

Endpoint

GET https://soren.com/v1/chain/code

2

Calls / 30d

1

Unique payers / 30d

Sep 7

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("https://soren.com/v1/chain/code", {
  method: "GET",
});
const data = await res.json();
cURL
curl -X GET \
  "https://soren.com/v1/chain/code?address=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "address": "<0x…>",
  "code_bytes": "<int>",
  "is_contract": true
}

Payment details

Pay to0xadc3a47efbd82ed724a0e9a3d08d5a1a8e6586fd
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase, base
Schemesexact

Is this your API?

Pin it to the top of Onchain Data and the homepage with a featured placement.

Get featured →

More from Soren & similar services