For AI agents: an LLM-friendly Markdown version of every page is available by appending .md to its URL or by sending an Accept: text/markdown request header. The full documentation index is at https://www.ankr.com/docs/llms.txt
Skip to main content

Somnia joins the Advanced API

Docs Team

Somnia mainnet is now a blockchain value on the Advanced API. Pass somnia_mainnet to the Token, NFT and Query methods, or omit blockchain and Somnia joins the multichain fan-out with every other supported network. We also corrected two testnet names in the supported-chain lists.

Advanced API

somnia_mainnet answers on the Token, NFT and Query methods, including ankr_getAccountBalance, ankr_getCurrencies, ankr_getTokenPrice, ankr_getTokenHolders, ankr_getTokenTransfers, ankr_getNFTsByOwner, ankr_getNFTMetadata, ankr_getLogs, ankr_getBlocks and ankr_getTransactionsByAddress.

curl -X POST https://rpc.ankr.com/multichain/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"ankr_getCurrencies","params":{"blockchain":"somnia_mainnet"}}'

Somnia JSON-RPC keeps its own endpoint at https://rpc.ankr.com/somnia_mainnet/YOUR_ANKR_API_KEY and is unchanged.

Corrected chain names

Two testnet names in our supported-chain lists did not match what the gateway answers, and we fixed the lists rather than the gateway:

Was listedWhat the gateway answers
eth_holeskynot served on the Advanced API, -32602 eth_holesky is not allowed
optimism_testnetserved as optimism_sepolia

The OpenAPI spec, the Advanced API pages and the API reference now carry the same list.

Worth checking on your side

  • If you call the Advanced API with eth_holesky, that call has been failing. It answers -32602, and a client that only checks the HTTP status code reads the response as a success.
  • optimism_testnet behaves the same way. Switch it to optimism_sepolia.
  • Nothing else changed. No method limits, error codes or rate limits moved on any network.