Kaspa REST-API server
v1.0.0https://kas.nownodes.ioThis server is to communicate with kaspa network via REST-API
Authentication
api-keyAuthapiKeyAPI Key: api-key in header
General
Addresses
Get Balance From Kaspa Address
Get balance for a given kaspa address
Parameters
kaspaAddressstringrequiredpathKaspa address as string e.g. kaspa:qqkqkzjvr7zwxxmjxjkmxxdwju9kjs6e9u82uh59z07vgaks6gg62v8707g73
Response
Successful Response
Validation Error
Authorization
api-keyAuthapiKey in headerGet Utxos For Address
Lists all open utxo for a given kaspa address
Parameters
kaspaAddressstringrequiredpathKaspa address as string e.g. kaspa:qqkqkzjvr7zwxxmjxjkmxxdwju9kjs6e9u82uh59z07vgaks6gg62v8707g73
Response
Successful Response
Validation Error
Authorization
api-keyAuthapiKey in headerGet Utxos For Addresses
Lists all open utxo for a given kaspa address
Body
addressesArray<string>kaspa:qqkqkzjvr7zwxxmjxjkmxxdwju9kjs6e9u82uh59z07vgaks6gg62v8707g73Response
Successful Response
Validation Error
Authorization
api-keyAuthapiKey in headerGet Full Transactions For Address
Get all transactions for a given address from database. And then get their related full transaction data
Parameters
kaspaAddressstringrequiredpathKaspa address as string e.g. kaspa:qqkqkzjvr7zwxxmjxjkmxxdwju9kjs6e9u82uh59z07vgaks6gg62v8707g73
limitinteger[1, 500]50queryThe number of records to get
offsetinteger>= 00queryThe offset from which to get records
fieldsstringqueryresolve_previous_outpointsPreviousOutpointLookupModenoqueryUse this parameter if you want to fetch the TransactionInput previous outpoint details. Light fetches only the adress and amount. Full fetches the whole TransactionOutput and adds it into each TxInput.
Response
Successful Response
Validation Error
Authorization
api-keyAuthapiKey in headerGet Addresses Active
This endpoint checks if addresses have had any transaction activity in the past. It is specifically designed for HD Wallets to verify historical address activity.
Body
addressesArray<string>kaspa:qqkqkzjvr7zwxxmjxjkmxxdwju9kjs6e9u82uh59z07vgaks6gg62v8707g73Response
Successful Response
Validation Error
Authorization
api-keyAuthapiKey in headerGet Full Transactions For Address Page
Get all transactions for a given address from database. And then get their related full transaction data
Parameters
kaspaAddressstringrequiredpathKaspa address as string e.g. kaspa:qqkqkzjvr7zwxxmjxjkmxxdwju9kjs6e9u82uh59z07vgaks6gg62v8707g73
limitinteger[1, 500]50queryThe max number of records to get. For paging combine with using 'before/after' from oldest previous result. Use value of X-Next-Page-Before/-After as long as header is present to continue paging. The actual number of transactions returned for each page can be > limit.
beforeinteger>= 00queryOnly include transactions with block time before this (epoch-millis)
afterinteger>= 00queryOnly include transactions with block time after this (epoch-millis)
fieldsstringqueryresolve_previous_outpointsPreviousOutpointLookupModenoqueryUse this parameter if you want to fetch the TransactionInput previous outpoint details. Light fetches only the adress and amount. Full fetches the whole TransactionOutput and adds it into each TxInput.
acceptanceAcceptanceModeacceptedrejectedqueryResponse
Successful Response
Validation Error
Authorization
api-keyAuthapiKey in headerGet Transaction Count For Address
Count the number of transactions associated with this address
Parameters
kaspaAddressstringrequiredpathKaspa address as string e.g. kaspa:qqkqkzjvr7zwxxmjxjkmxxdwju9kjs6e9u82uh59z07vgaks6gg62v8707g73
Response
Successful Response
Validation Error
Authorization
api-keyAuthapiKey in headerGet Addresses Names
Get the name for an address
Response
Successful Response
Authorization
api-keyAuthapiKey in headerGet Name For Address
Get the name for an address
Parameters
kaspaAddressstringrequiredpathKaspa address as string e.g. kaspa:qqkqkzjvr7zwxxmjxjkmxxdwju9kjs6e9u82uh59z07vgaks6gg62v8707g73
Response
Successful Response
Validation Error
Authorization
api-keyAuthapiKey in headerGet Balances From Addresses
Get balances for multiple Addresses
Body
addressesArray<string>kaspa:qqkqkzjvr7zwxxmjxjkmxxdwju9kjs6e9u82uh59z07vgaks6gg62v8707g73Response
Successful Response
Validation Error
Authorization
api-keyAuthapiKey in headerInfo
Get Virtual Selected Parent Blue Score
Returns the blue score of the sink
Response
Successful Response
Authorization
api-keyAuthapiKey in headerGet Network
Alias for /info/blockdag
Response
Successful Response
Authorization
api-keyAuthapiKey in headerGet Blockdag
Get Kaspa BlockDAG information
Response
Successful Response
Authorization
api-keyAuthapiKey in headerGet Coinsupply
Get $KAS coin supply information
Response
Successful Response
Authorization
api-keyAuthapiKey in headerGet Circulating Coins
Get circulating amount of $KAS token as numerical value
Parameters
in_billionbooleanfalsequeryResponse
Successful Response
Validation Error
Authorization
api-keyAuthapiKey in headerGet Total Coins
Get total amount of $KAS token as numerical value
Parameters
in_billionbooleanfalsequeryResponse
Successful Response
Validation Error
Authorization
api-keyAuthapiKey in headerGet Kaspad Info
Get some information for kaspad instance, which is currently connected.
Response
Successful Response
Authorization
api-keyAuthapiKey in headerGet Fee Estimate
Get fee estimate from Kaspad.
For all buckets, feerate values represent fee/mass of a transaction in sompi/gram units.
Given a feerate value recommendation, calculate the required fee by
taking the transaction mass and multiplying it by feerate: fee = feerate * mass(tx)
Response
Successful Response
Authorization
api-keyAuthapiKey in headerGet Price
Returns the current price for Kaspa in USD.
Parameters
stringOnlybooleanfalsequeryResponse
Successful Response
Validation Error
Authorization
api-keyAuthapiKey in headerGet Blockreward
Returns the current blockreward in KAS/block
Parameters
stringOnlybooleanfalsequeryResponse
Successful Response
Validation Error
Authorization
api-keyAuthapiKey in headerGet Halving
Returns information about chromatic halving
Parameters
fieldstringqueryResponse
Successful Response
Validation Error
Authorization
api-keyAuthapiKey in headerGet Hashrate
Returns the current hashrate for Kaspa network in TH/s.
Parameters
stringOnlybooleanfalsequeryResponse
Successful Response
Validation Error
Authorization
api-keyAuthapiKey in headerGet Max Hashrate
Returns the current hashrate for Kaspa network in TH/s.
Response
Successful Response
Authorization
api-keyAuthapiKey in headerGet Hashrate History
Get historical hashrate samples with optional resolution (default = 1h)
Parameters
resolutionstring1h3h1d7dqueryResponse
Successful Response
Validation Error
Authorization
api-keyAuthapiKey in headerHealth State
Checks node and database health by comparing blue score and sync status. Returns health details or 503 if the database lags by ~10min or no nodes are synced.
Response
Successful Response
Authorization
api-keyAuthapiKey in headerGet Marketcap
Get $KAS price and market cap. Price info is from coingecko.com
Parameters
stringOnlybooleanfalsequeryResponse
Successful Response
Validation Error
Authorization
api-keyAuthapiKey in headerBlocks
Get Block
Get block information for a given block id
Parameters
blockIdstringrequiredpathincludeTransactionsbooleantruequeryincludeColorbooleanfalsequeryResponse
Successful Response
Validation Error
Authorization
api-keyAuthapiKey in headerGet Blocks
Lists block beginning from a low hash (block id).
Parameters
lowHashstringrequiredqueryincludeBlocksbooleanfalsequeryincludeTransactionsbooleanfalsequeryResponse
Successful Response
Validation Error
Authorization
api-keyAuthapiKey in headerGet Blocks From Bluescore
Lists blocks of a given blueScore
Parameters
blueScoreinteger43679173queryincludeTransactionsbooleanfalsequeryResponse
Successful Response
Validation Error
Authorization
api-keyAuthapiKey in headerTransactions
Get Transaction
Get details for a given transaction id
Parameters
transactionIdstringrequiredpathblockHashstringquerySpecify a containing block (if known) for faster lookup
inputsbooleantruequeryoutputsbooleantruequeryresolve_previous_outpointsPreviousOutpointLookupModenoqueryUse this parameter if you want to fetch the TransactionInput previous outpoint details. Light fetches only the address and amount. Full fetches the whole TransactionOutput and adds it into each TxInput.
Response
Successful Response
Validation Error
Authorization
api-keyAuthapiKey in headerSearch For Transactions
Search for transactions by transaction_ids or blue_score
Body
transactionIdsArray<string>acceptingBlueScoresTxSearchAcceptingBlueScoresParameters
fieldsstringqueryresolve_previous_outpointsPreviousOutpointLookupModenoqueryUse this parameter if you want to fetch the TransactionInput previous outpoint details. Light fetches only the address and amount. Full fetches the whole TransactionOutput and adds it into each TxInput.
acceptanceAcceptanceModequeryOnly used when searching using transactionIds
Response
Successful Response
Validation Error
Authorization
api-keyAuthapiKey in headerGet Transaction Acceptance
Given a list of transaction_ids, return whether each one is accepted and the accepting blue score.
Body
transactionIdsArray<string>requiredResponse
Successful Response
Validation Error
Authorization
api-keyAuthapiKey in headerSubmit A New Transaction
Body
transactionSubmitTxModelrequiredallowOrphanbooleanfalseParameters
replaceByFeebooleanfalsequeryReplace an existing transaction in the mempool
Response
Successful Response
Bad Request
Validation Error
Authorization
api-keyAuthapiKey in headerCalculate Transaction Mass
This function calculates and returns the mass of a transaction, which is essential for determining the minimum fee. The mass calculation takes into account the storage mass as defined in KIP-0009.
Note: Be aware that if the transaction has a very low output amount or a high number of outputs, the mass can become significantly large.
Body
versionintegerrequiredinputsArray<SubmitTxInput>requiredoutputsArray<SubmitTxOutput>requiredlockTimeinteger0subnetworkIdstringResponse
Successful Response
Validation Error
Authorization
api-keyAuthapiKey in headerVirtual chain
Get Virtual Chain Transactions
EXPERIMENTAL - EXPECT BREAKING CHANGES: Get virtual chain transactions by blue score.
Parameters
blueScoreGteinteger>= 0requiredqueryDivisible by limit
limitinteger1010010queryresolveInputsbooleanfalsequeryincludeCoinbasebooleantruequeryResponse
Successful Response
Validation Error
Authorization
api-keyAuthapiKey in header