Home

Kaspa REST-API server

v1.0.0
Base URL
https://kas.nownodes.io

This server is to communicate with kaspa network via REST-API

Authentication

api-keyAuthapiKey

API Key: api-key in header

General

Addresses

Get Balance From Kaspa Address

GET
https://kas.nownodes.io/addresses/{kaspaAddress}/balance

Get balance for a given kaspa address

Parameters

kaspaAddressstringrequiredpath

Kaspa address as string e.g. kaspa:qqkqkzjvr7zwxxmjxjkmxxdwju9kjs6e9u82uh59z07vgaks6gg62v8707g73

Response

200OK

Successful Response

422Unprocessable Entity

Validation Error

Authorization

api-keyAuthapiKey in header

Get Utxos For Address

GET
https://kas.nownodes.io/addresses/{kaspaAddress}/utxos

Lists all open utxo for a given kaspa address

Parameters

kaspaAddressstringrequiredpath

Kaspa address as string e.g. kaspa:qqkqkzjvr7zwxxmjxjkmxxdwju9kjs6e9u82uh59z07vgaks6gg62v8707g73

Response

200OK

Successful Response

422Unprocessable Entity

Validation Error

Authorization

api-keyAuthapiKey in header

Get Utxos For Addresses

POST
https://kas.nownodes.io/addresses/utxos

Lists all open utxo for a given kaspa address

Body

application/json
addressesArray<string>kaspa:qqkqkzjvr7zwxxmjxjkmxxdwju9kjs6e9u82uh59z07vgaks6gg62v8707g73

Response

200OK

Successful Response

422Unprocessable Entity

Validation Error

Authorization

api-keyAuthapiKey in header

Get Full Transactions For Address

GET
https://kas.nownodes.io/addresses/{kaspaAddress}/full-transactions

Get all transactions for a given address from database. And then get their related full transaction data

Parameters

kaspaAddressstringrequiredpath

Kaspa address as string e.g. kaspa:qqkqkzjvr7zwxxmjxjkmxxdwju9kjs6e9u82uh59z07vgaks6gg62v8707g73

limitinteger[1, 500]50query

The number of records to get

offsetinteger>= 00query

The offset from which to get records

fieldsstringquery
resolve_previous_outpointsPreviousOutpointLookupModenoquery

Use 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

200OK

Successful Response

422Unprocessable Entity

Validation Error

Authorization

api-keyAuthapiKey in header

Get Addresses Active

POST
https://kas.nownodes.io/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

application/json
addressesArray<string>kaspa:qqkqkzjvr7zwxxmjxjkmxxdwju9kjs6e9u82uh59z07vgaks6gg62v8707g73

Response

200OK

Successful Response

422Unprocessable Entity

Validation Error

Authorization

api-keyAuthapiKey in header

Get Full Transactions For Address Page

GET
https://kas.nownodes.io/addresses/{kaspaAddress}/full-transactions-page

Get all transactions for a given address from database. And then get their related full transaction data

Parameters

kaspaAddressstringrequiredpath

Kaspa address as string e.g. kaspa:qqkqkzjvr7zwxxmjxjkmxxdwju9kjs6e9u82uh59z07vgaks6gg62v8707g73

limitinteger[1, 500]50query

The 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>= 00query

Only include transactions with block time before this (epoch-millis)

afterinteger>= 00query

Only include transactions with block time after this (epoch-millis)

fieldsstringquery
resolve_previous_outpointsPreviousOutpointLookupModenoquery

Use 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.

acceptanceAcceptanceModeacceptedrejectedquery

Response

200OK

Successful Response

422Unprocessable Entity

Validation Error

Authorization

api-keyAuthapiKey in header

Get Transaction Count For Address

GET
https://kas.nownodes.io/addresses/{kaspaAddress}/transactions-count

Count the number of transactions associated with this address

Parameters

kaspaAddressstringrequiredpath

Kaspa address as string e.g. kaspa:qqkqkzjvr7zwxxmjxjkmxxdwju9kjs6e9u82uh59z07vgaks6gg62v8707g73

Response

200OK

Successful Response

422Unprocessable Entity

Validation Error

Authorization

api-keyAuthapiKey in header

Get Addresses Names

GET
https://kas.nownodes.io/addresses/names

Get the name for an address

Response

200OK

Successful Response

Authorization

api-keyAuthapiKey in header

Get Name For Address

GET
https://kas.nownodes.io/addresses/{kaspaAddress}/name

Get the name for an address

Parameters

kaspaAddressstringrequiredpath

Kaspa address as string e.g. kaspa:qqkqkzjvr7zwxxmjxjkmxxdwju9kjs6e9u82uh59z07vgaks6gg62v8707g73

Response

200OK

Successful Response

422Unprocessable Entity

Validation Error

Authorization

api-keyAuthapiKey in header

Get Balances From Addresses

POST
https://kas.nownodes.io/addresses/balances

Get balances for multiple Addresses

Body

application/json
addressesArray<string>kaspa:qqkqkzjvr7zwxxmjxjkmxxdwju9kjs6e9u82uh59z07vgaks6gg62v8707g73

Response

200OK

Successful Response

422Unprocessable Entity

Validation Error

Authorization

api-keyAuthapiKey in header

Info

Get Virtual Selected Parent Blue Score

GET
https://kas.nownodes.io/info/virtual-chain-blue-score

Returns the blue score of the sink

Response

200OK

Successful Response

Authorization

api-keyAuthapiKey in header

Get Network

GET
https://kas.nownodes.io/info/network

Alias for /info/blockdag

Response

200OK

Successful Response

Authorization

api-keyAuthapiKey in header

Get Blockdag

GET
https://kas.nownodes.io/info/blockdag

Get Kaspa BlockDAG information

Response

200OK

Successful Response

Authorization

api-keyAuthapiKey in header

Get Coinsupply

GET
https://kas.nownodes.io/info/coinsupply

Get $KAS coin supply information

Response

200OK

Successful Response

Authorization

api-keyAuthapiKey in header

Get Circulating Coins

GET
https://kas.nownodes.io/info/coinsupply/circulating

Get circulating amount of $KAS token as numerical value

Parameters

in_billionbooleanfalsequery

Response

200OK

Successful Response

422Unprocessable Entity

Validation Error

Authorization

api-keyAuthapiKey in header

Get Total Coins

GET
https://kas.nownodes.io/info/coinsupply/total

Get total amount of $KAS token as numerical value

Parameters

in_billionbooleanfalsequery

Response

200OK

Successful Response

422Unprocessable Entity

Validation Error

Authorization

api-keyAuthapiKey in header

Get Kaspad Info

GET
https://kas.nownodes.io/info/kaspad

Get some information for kaspad instance, which is currently connected.

Response

200OK

Successful Response

Authorization

api-keyAuthapiKey in header

Get Fee Estimate

GET
https://kas.nownodes.io/info/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

200OK

Successful Response

Authorization

api-keyAuthapiKey in header

Get Price

GET
https://kas.nownodes.io/info/price

Returns the current price for Kaspa in USD.

Parameters

stringOnlybooleanfalsequery

Response

200OK

Successful Response

422Unprocessable Entity

Validation Error

Authorization

api-keyAuthapiKey in header

Get Blockreward

GET
https://kas.nownodes.io/info/blockreward

Returns the current blockreward in KAS/block

Parameters

stringOnlybooleanfalsequery

Response

200OK

Successful Response

422Unprocessable Entity

Validation Error

Authorization

api-keyAuthapiKey in header

Get Halving

GET
https://kas.nownodes.io/info/halving

Returns information about chromatic halving

Parameters

fieldstringquery

Response

200OK

Successful Response

422Unprocessable Entity

Validation Error

Authorization

api-keyAuthapiKey in header

Get Hashrate

GET
https://kas.nownodes.io/info/hashrate

Returns the current hashrate for Kaspa network in TH/s.

Parameters

stringOnlybooleanfalsequery

Response

200OK

Successful Response

422Unprocessable Entity

Validation Error

Authorization

api-keyAuthapiKey in header

Get Max Hashrate

GET
https://kas.nownodes.io/info/hashrate/max

Returns the current hashrate for Kaspa network in TH/s.

Response

200OK

Successful Response

Authorization

api-keyAuthapiKey in header

Get Hashrate History

GET
https://kas.nownodes.io/info/hashrate/history

Get historical hashrate samples with optional resolution (default = 1h)

Parameters

resolutionstring1h3h1d7dquery

Response

200OK

Successful Response

422Unprocessable Entity

Validation Error

Authorization

api-keyAuthapiKey in header

Health State

GET
https://kas.nownodes.io/info/health

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

200OK

Successful Response

Authorization

api-keyAuthapiKey in header

Get Marketcap

GET
https://kas.nownodes.io/info/marketcap

Get $KAS price and market cap. Price info is from coingecko.com

Parameters

stringOnlybooleanfalsequery

Response

200OK

Successful Response

422Unprocessable Entity

Validation Error

Authorization

api-keyAuthapiKey in header

Blocks

Get Block

GET
https://kas.nownodes.io/blocks/{blockId}

Get block information for a given block id

Parameters

blockIdstringrequiredpath
includeTransactionsbooleantruequery
includeColorbooleanfalsequery

Response

200OK

Successful Response

422Unprocessable Entity

Validation Error

Authorization

api-keyAuthapiKey in header

Get Blocks

GET
https://kas.nownodes.io/blocks

Lists block beginning from a low hash (block id).

Parameters

lowHashstringrequiredquery
includeBlocksbooleanfalsequery
includeTransactionsbooleanfalsequery

Response

200OK

Successful Response

422Unprocessable Entity

Validation Error

Authorization

api-keyAuthapiKey in header

Get Blocks From Bluescore

GET
https://kas.nownodes.io/blocks-from-bluescore

Lists blocks of a given blueScore

Parameters

blueScoreinteger43679173query
includeTransactionsbooleanfalsequery

Response

200OK

Successful Response

422Unprocessable Entity

Validation Error

Authorization

api-keyAuthapiKey in header

Transactions

Get Transaction

GET
https://kas.nownodes.io/transactions/{transactionId}

Get details for a given transaction id

Parameters

transactionIdstringrequiredpath
blockHashstringquery

Specify a containing block (if known) for faster lookup

inputsbooleantruequery
outputsbooleantruequery
resolve_previous_outpointsPreviousOutpointLookupModenoquery

Use 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

200OK

Successful Response

422Unprocessable Entity

Validation Error

Authorization

api-keyAuthapiKey in header

Search For Transactions

POST
https://kas.nownodes.io/transactions/search

Search for transactions by transaction_ids or blue_score

Body

application/json
transactionIdsArray<string>
acceptingBlueScoresTxSearchAcceptingBlueScores
Show child attributes
gteintegerrequired
ltintegerrequired

Parameters

fieldsstringquery
resolve_previous_outpointsPreviousOutpointLookupModenoquery

Use 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.

acceptanceAcceptanceModequery

Only used when searching using transactionIds

Response

200OK

Successful Response

422Unprocessable Entity

Validation Error

Authorization

api-keyAuthapiKey in header

Get Transaction Acceptance

POST
https://kas.nownodes.io/transactions/acceptance

Given a list of transaction_ids, return whether each one is accepted and the accepting blue score.

Body

application/json
transactionIdsArray<string>required

Response

200OK

Successful Response

422Unprocessable Entity

Validation Error

Authorization

api-keyAuthapiKey in header

Submit A New Transaction

POST
https://kas.nownodes.io/transactions

Body

application/json
transactionSubmitTxModelrequired
Show child attributes
versionintegerrequired
inputsArray<SubmitTxInput>required
Show child attributes
previousOutpointSubmitTxOutpointrequired
Show child attributes
transactionIdstringrequired
indexintegerrequired
signatureScriptstringrequired
sequenceintegerrequired
sigOpCountintegerrequired
outputsArray<SubmitTxOutput>required
Show child attributes
amountintegerrequired
scriptPublicKeySubmitTxScriptPublicKeyrequired
Show child attributes
versionintegerrequired
scriptPublicKeystringrequired
lockTimeinteger0
subnetworkIdstring
allowOrphanbooleanfalse

Parameters

replaceByFeebooleanfalsequery

Replace an existing transaction in the mempool

Response

200OK

Successful Response

400Bad Request

Bad Request

422Unprocessable Entity

Validation Error

Authorization

api-keyAuthapiKey in header

Calculate Transaction Mass

POST
https://kas.nownodes.io/transactions/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

application/json
versionintegerrequired
inputsArray<SubmitTxInput>required
Show child attributes
previousOutpointSubmitTxOutpointrequired
Show child attributes
transactionIdstringrequired
indexintegerrequired
signatureScriptstringrequired
sequenceintegerrequired
sigOpCountintegerrequired
outputsArray<SubmitTxOutput>required
Show child attributes
amountintegerrequired
scriptPublicKeySubmitTxScriptPublicKeyrequired
Show child attributes
versionintegerrequired
scriptPublicKeystringrequired
lockTimeinteger0
subnetworkIdstring

Response

200OK

Successful Response

422Unprocessable Entity

Validation Error

Authorization

api-keyAuthapiKey in header

Virtual chain

Get Virtual Chain Transactions

GET
https://kas.nownodes.io/virtual-chain

EXPERIMENTAL - EXPECT BREAKING CHANGES: Get virtual chain transactions by blue score.

Parameters

blueScoreGteinteger>= 0requiredquery

Divisible by limit

limitinteger1010010query
resolveInputsbooleanfalsequery
includeCoinbasebooleantruequery

Response

200OK

Successful Response

422Unprocessable Entity

Validation Error

Authorization

api-keyAuthapiKey in header