Skip to content

Which API to use ​

The platform exposes five HTTP APIs. Picking the right one is mostly a question of who holds the keys and what you are reading.

APIBase URLPurposeAuth
Chain datahttps://api.testnet.kriptonyx.com/api/v2Blocks, transactions, addresses, tokens, logsNone
Platform RESThttps://endpoint.testnet.kriptonyx.comManaged wallets, tokens, pools, swapsPassword
Bridgehttps://bridge.testnet.kriptonyx.com/apiCross-chain swaps, webhooksNone / bearer
ICOhttps://ico.testnet.kriptonyx.com/apiLaunchpadWallet signature → JWT
Explorer serviceshttps://explorer.testnet.kriptonyx.com/apiAccounts, watchlists, DeFi dataBearer JWT

Every endpoint, live

The API reference below lists every endpoint of the chain data API, with a Try it out button that calls the testnet from this page.

Choosing ​

Reading chain state. Use the chain data API for anything historical — it is indexed, so a query that would take thousands of JSON-RPC calls takes one. Use JSON-RPC directly for current state and for eth_call.

Signing your own transactions. Use JSON-RPC with ethers.js or viem. Your users keep their keys. This is the right default for anything user-facing.

Letting the platform hold keys. Use the Platform REST API. It stores an encrypted key per wallet and signs for you, authenticated by a password. Convenient for server-side integrations where there is no user wallet to prompt.

Moving assets across chains. Use the bridge API.

Reacting to events. Use WebSocket in a browser and webhooks on a server.

Common conventions ​

All five APIs speak JSON over HTTPS. Response shapes differ — the chain data API returns resources directly, the Platform REST API wraps everything in a { success, data } envelope — so see Errors and conventions.

Rate limits ​

The chain data API and the bridge API are not rate limited for normal use. The explorer services API limits authentication and public forms; see Explorer services API.

Be reasonable regardless: paginate rather than requesting everything, and cache what does not change.

API reference ​

The chain data API is a Blockscout instance, and it answers in four styles. This is the reference Blockscout publishes at api.testnet.kriptonyx.com/api-docs, cut down to what works on this network: every endpoint below was called against the testnet, and the ones that did not answer were left out.

StyleEndpointUse it for
REST APIhttps://api.testnet.kriptonyx.com/api/v2New integrations: resources, pagination, full JSON
Stats APIhttps://api.testnet.kriptonyx.com/api/v1Network counters and time-series charts
ETH RPC APIhttps://api.testnet.kriptonyx.com/api/eth-rpcStandard eth_* JSON-RPC calls
RPC API endpointshttps://api.testnet.kriptonyx.com/apiEtherscan-style ?module=&action= calls

All four are public: no key, and cross-origin requests are allowed, so a browser app can call them directly.

REST API ​

The main API, with 52 endpoints in 12 groups. Open a group, pick an endpoint and choose Try it out. The fields are pre-filled with a real KUSD transfer, its block, the address that sent it, the KUSD token and a verified contract, so Execute returns live data straight away.

Loading the reference…

Endpoints in Blockscout's spec that are not listed here
EndpointWhy
GET /transactions/{hash}/summaryThe transaction interpretation service is not enabled on this network; the call returns 403.
GET /api/v1/celestia/blobFor chains that post data to Celestia. KriptoNyx does not.
GET /api/v1/celestia/l2BatchMetadataSame.
GET /healthThe Celestia service's health check; not routed here.

Stats API ​

Counters and daily charts computed by Blockscout's stats service: the numbers behind the explorer's charts. GET /api/v1/lines lists every chart, and its IDs go into GET /api/v1/lines/{name}.

Loading the reference…

Endpoints in the stats service's spec that are not listed here
EndpointWhy
POST /api/v1/charts/batch-updateOperator only: it needs the service's API key.
GET /api/v1/update-statusNot routed to the stats service on this network.
GET /api/v1/pages/interchain/mainFor interchain indexers; every value is null here.
GET /api/v1/pages/multichain/mainFor multichain indexers; every value is null here.
GET /healthNot routed to the stats service on this network.

ETH RPC API ​

JSON-RPC 2.0 over POST, in exactly the format an Ethereum node uses, so ethers.js, viem and web3.js work against it unchanged.

bash
curl -s https://api.testnet.kriptonyx.com/api/eth-rpc \
  -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}'
json
{ "jsonrpc": "2.0", "result": "0x5ee57e", "id": 1 }
MethodReturns
eth_blockNumberThe latest block number
eth_chainId0xbc1 (3009)
eth_gasPriceThe current gas price
eth_maxPriorityFeePerGasThe suggested priority fee
eth_getBalanceAn address's KNYX balance
eth_getTransactionCountAn address's nonce
eth_getCodeA contract's bytecode
eth_getStorageAtOne storage slot of a contract
eth_getBlockByNumberA block, by number or tag
eth_getBlockByHashA block, by hash
eth_getTransactionByHashA transaction
eth_getTransactionReceiptA transaction's receipt
eth_getLogsEvent logs. Needs an address or topics filter.
eth_callThe result of a read-only contract call
eth_estimateGasThe gas a transaction would use
eth_sendRawTransactionSubmits a signed transaction

Any other method returns "Action not found.". For the node's full JSON-RPC interface, use https://rpc.testnet.kriptonyx.com, as in Connect to the network.

RPC API endpoints ​

An Etherscan-compatible API, for tools and scripts written against Etherscan. Every call is a GET (POST also works) with the module and action in the query string:

bash
curl -s "https://api.testnet.kriptonyx.com/api?module=account&action=balance&address=0x0Ff60aa4c32c76f44a82d7B7B80cDbAEC558D629"
json
{ "message": "OK", "result": "0", "status": "1" }

status is "1" when there is a result and "0" when there is not. An empty list comes back as "0" with a message such as "No transactions found", not as an error, so check message before treating "0" as a failure.

account ​

ActionParametersReturns
balanceaddressKNYX balance, in wei
balancemultiaddress (comma-separated)Balances of several addresses
txlistaddress, optional startblock endblock page offset sortTransactions
txlistinternaladdress or txhashInternal transactions
tokentxaddress, optional contractaddressERC-20 transfers
tokennfttxaddressERC-721 transfers
token1155txaddressERC-1155 transfers
tokenbalancecontractaddress, addressOne token balance
tokenlistaddressEvery token the address holds
getminedblocksaddressBlocks the address produced
pendingtxlistaddressPending transactions
listaccountsoptional page offsetAddresses with their balances
eth_get_balanceaddress, optional blockBalance, in JSON-RPC form

block ​

ActionParametersReturns
getblockrewardblocknoBlock producer and reward
getblocknobytimetimestamp, closest (before or after)The block nearest a time
getblockcountdownblocknoBlocks and estimated seconds until a future block
eth_block_numbernoneThe latest block number, in JSON-RPC form

contract ​

ActionParametersReturns
listcontractsoptional filter page offsetContracts, with verified source where there is one
getabiaddressA verified contract's ABI
getsourcecodeaddressA verified contract's source and compiler settings
getcontractcreationcontractaddressesCreator and creation transaction

logs ​

ActionParametersReturns
getLogsfromBlock, toBlock, and address and/or topic0…topic3Event logs

stats ​

ActionParametersReturns
tokensupplycontractaddressA token's total supply
totalfeesdate (YYYY-MM-DD)Fees paid that day, in wei
coinprice / ethpricenoneKNYX price. null: the testnet coin has no market.
ethsupply / ethsupplyexchange / coinsupplynoneKNYX supply. 0 on the testnet, which does not track it.

token ​

ActionParametersReturns
getTokencontractaddressName, symbol, decimals, supply and type
getTokenHolderscontractaddress, optional page offsetHolders and their balances

transaction ​

ActionParametersReturns
gettxinfotxhashTransaction details and logs
gettxreceiptstatustxhash1 success, 0 failure
getstatustxhashWhether the transaction reverted, and why

token / bridgedTokenList, which Blockscout lists for bridged chains, returns "Unknown action" here.

KriptoNyx testnet — chain ID 3009 (kriptonyx_3009-1)