Networks and environments
Mainnet-only endpoints
Prices, NFTs, DeFi, and swap require mainnet chain ids.
Overview
Prices, NFTs, DeFi, and swaps rely on market data that exists only on mainnets. Calling them with a testnet chainId returns unsupported_capability.
Mainnet-only
| Route | Notes |
|---|---|
| GET /v1/prices · POST /v1/prices/multi | USD price quotes |
| GET /v1/nfts | Unsupported on testnets |
| GET /v1/defi/positions* · POST …/prepare | DeFi positions and action preparation |
| POST /v1/swap/quote · GET /v1/routes/status | Swap and bridge quotes and route status |
| GET /v1/activity/multi · /nfts/multi | Not implemented on any network (not_implemented, HTTP 501) |
bash
# Fails on testnet
curl -sS "https://blockchain.gray3.io/v1/prices?chainId=ethereum-sepolia" \
-H "X-Gray-Project-Id: $GRAY_PROJECT_ID" \
-H "Authorization: Bearer $GRAY_SECRET_KEY"json
{
"error": {
"code": "unsupported_capability",
"message": "Prices are not available on testnets.",
"retryable": false
}
}USD on portfolio
Portfolio responses on many mainnets include priceUsd and balanceUsd. On other chains, including UTXO chains and many layer-1 networks, portfolio returns balances only. Call the prices endpoints when you need USD quotes, and check capabilities.prices on the chain first.
Capability discovery: Capability and plan errors.