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

Kaspa REST-API server

Addresses

Get Balance From Kaspa Address

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

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

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

Get Utxos For Address

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

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

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

Get Utxos For Addresses

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

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Lists all open utxo for a given kaspa address

Body

application/json
addressesArray<string>kaspa:qqkqkzjvr7zwxxmjxjkmxxdwju9kjs6e9u82uh59z07vgaks6gg62v8707g73

Response

200OK

Successful Response

422Unprocessable Entity

Validation Error

Get Full Transactions For Address

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

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

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

Get Addresses Active

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

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

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

Get Full Transactions For Address Page

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

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

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

Get Transaction Count For Address

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

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

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

Get Addresses Names

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

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Get the name for an address

Response

200OK

Successful Response

Get Name For Address

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

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Get the name for an address

Parameters

kaspaAddressstringrequiredpath

Kaspa address as string e.g. kaspa:qqkqkzjvr7zwxxmjxjkmxxdwju9kjs6e9u82uh59z07vgaks6gg62v8707g73

Response

200OK

Successful Response

422Unprocessable Entity

Validation Error

Get Balances From Addresses

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

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Get balances for multiple Addresses

Body

application/json
addressesArray<string>kaspa:qqkqkzjvr7zwxxmjxjkmxxdwju9kjs6e9u82uh59z07vgaks6gg62v8707g73

Response

200OK

Successful Response

422Unprocessable Entity

Validation Error

Info

Get Virtual Selected Parent Blue Score

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

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Returns the blue score of the sink

Response

200OK

Successful Response

Get Network

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

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Alias for /info/blockdag

Response

200OK

Successful Response

Get Blockdag

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

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Get Kaspa BlockDAG information

Response

200OK

Successful Response

Get Coinsupply

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

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Get $KAS coin supply information

Response

200OK

Successful Response

Get Circulating Coins

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

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Get circulating amount of $KAS token as numerical value

Parameters

in_billionbooleanfalsequery

Response

200OK

Successful Response

422Unprocessable Entity

Validation Error

Get Total Coins

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

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Get total amount of $KAS token as numerical value

Parameters

in_billionbooleanfalsequery

Response

200OK

Successful Response

422Unprocessable Entity

Validation Error

Get Kaspad Info

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

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

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

Response

200OK

Successful Response

Get Fee Estimate

GET
https://kas.nownodes.io/info/fee-estimate

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

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

Get Price

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

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Returns the current price for Kaspa in USD.

Parameters

stringOnlybooleanfalsequery

Response

200OK

Successful Response

422Unprocessable Entity

Validation Error

Get Blockreward

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

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Returns the current blockreward in KAS/block

Parameters

stringOnlybooleanfalsequery

Response

200OK

Successful Response

422Unprocessable Entity

Validation Error

Get Halving

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

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Returns information about chromatic halving

Parameters

fieldstringquery

Response

200OK

Successful Response

422Unprocessable Entity

Validation Error

Get Hashrate

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

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

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

Parameters

stringOnlybooleanfalsequery

Response

200OK

Successful Response

422Unprocessable Entity

Validation Error

Get Max Hashrate

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

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

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

Response

200OK

Successful Response

Get Hashrate History

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

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

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

Parameters

resolutionstring1h3h1d7dquery

Response

200OK

Successful Response

422Unprocessable Entity

Validation Error

Health State

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

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

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

Get Marketcap

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

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

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

Parameters

stringOnlybooleanfalsequery

Response

200OK

Successful Response

422Unprocessable Entity

Validation Error

Blocks

Get Block

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

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Get block information for a given block id

Parameters

blockIdstringrequiredpath
includeTransactionsbooleantruequery
includeColorbooleanfalsequery

Response

200OK

Successful Response

422Unprocessable Entity

Validation Error

Get Blocks

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

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

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

Parameters

lowHashstringrequiredquery
includeBlocksbooleanfalsequery
includeTransactionsbooleanfalsequery

Response

200OK

Successful Response

422Unprocessable Entity

Validation Error

Get Blocks From Bluescore

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

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Lists blocks of a given blueScore

Parameters

blueScoreinteger43679173query
includeTransactionsbooleanfalsequery

Response

200OK

Successful Response

422Unprocessable Entity

Validation Error

Transactions

Get Transaction

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

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

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

Search For Transactions

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

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

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

Get Transaction Acceptance

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

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

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

Submit A New Transaction

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

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

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

Calculate Transaction Mass

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

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

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

Virtual chain

Get Virtual Chain Transactions

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

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

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