Docs API reference
Markdown Get an API key

API referenceMedia and accounts

On-chain Wallet

Public reads of on-chain balances, RPC endpoints, and token contract addresses for any EVM wallet address. These show on-chain holdings, not generation-account credit. For spendable balances, Premium Spark, usage, and worker earnings, use the authenticated account reference.

#Read on-chain balances

GET /v2/wallet/balance Public

Returns SOGNI, Spark, and native (ether) balances for a wallet on the chosen provider, as decimal strings in whole-token units. An RPC failure returns 500; retry with backoff.

#Query parameters

NameTypeInDescription
walletAddressrequiredstringqueryEVM address, all-lowercase or with a valid EIP-55 checksum. Other values return 400.
providerstringqueryNetwork provider. Lowercase base (default) or etherlink; any other value is treated as base.

#Response

{
  "status": "success",
  "data": {
    "sogni": "1234.56",
    "spark": "78.90",
    "ether": "0.0123"
  }
}

#List RPC endpoints

GET /v1/wallet/rpc-endpoints Public

Returns the canonical RPC endpoint list for a network provider. Useful for adding Sogni's network to an EVM wallet.

#Query parameters

NameTypeInDescription
providerstringqueryLowercase base (default) or etherlink; any other value is treated as base.

#Response

{
  "status": "success",
  "data": {
    "RPCEndpoints": {
      "endpoint1": "https://mainnet.base.org",
      "endpoint2": "https://base-rpc.publicnode.com"
    }
  }
}

#List token contract addresses

GET /v1/contract/addresses Public

Returns data.addresses for the chosen network. Use SogniToken and SparkToken to add SOGNI and Spark to a wallet or read balances directly. Other entries are Sogni platform contracts and can change.

#Query parameters

NameTypeInDescription
providerstringqueryetherlink for Etherlink; any other value, or none, returns Base.