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

503Service Unavailable

Service Unavailable: no synced Kaspa node is reachable

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

503Service Unavailable

Service Unavailable: no synced Kaspa node is reachable

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

503Service Unavailable

Service Unavailable: no synced Kaspa node is reachable

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 full transaction data for the transactions of a given address, newest first. Use limit and offset for paging.

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 full transaction data for the transactions of a given address, newest first. Use limit and before/after for paging.

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

503Service Unavailable

Service Unavailable: no synced Kaspa node is reachable

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

503Service Unavailable

Service Unavailable: no synced Kaspa node is reachable

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

503Service Unavailable

Service Unavailable: no synced Kaspa node is reachable

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

503Service Unavailable

Service Unavailable: no synced Kaspa node is reachable

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

503Service Unavailable

Service Unavailable: no synced Kaspa node is reachable

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 coin as numerical value

Parameters

in_billionbooleanfalsequery

Response

200OK

Successful Response

422Unprocessable Entity

Validation Error

503Service Unavailable

Service Unavailable: no synced Kaspa node is reachable

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 coin as numerical value

Parameters

in_billionbooleanfalsequery

Response

200OK

Successful Response

422Unprocessable Entity

Validation Error

503Service Unavailable

Service Unavailable: no synced Kaspa node is reachable

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

503Service Unavailable

Service Unavailable: no synced Kaspa node is reachable

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

503Service Unavailable

Service Unavailable: no synced Kaspa node is reachable

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. Price info is from coingecko.com

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

503Service Unavailable

Service Unavailable: no synced Kaspa node is reachable

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 highest hashrate observed for Kaspa network in TH/s, and the block it was calculated from.

Response

200OK

Successful Response

503Service Unavailable

Service Unavailable: no synced Kaspa node is reachable

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

503Service Unavailable

Service Unavailable: no synced Kaspa node is reachable

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

503Service Unavailable

Service Unavailable: no synced Kaspa node is reachable

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

503Service Unavailable

Service Unavailable: no synced Kaspa node is reachable

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.

Submit a signed transaction to the Kaspa network and return its transaction id. Both v0 and v1 (Toccata) transactions are supported. For v1, inputs use computeBudget (with sigOpCount 0) and outputs can carry a covenant binding; the transaction can set gas. Both versions accept a hex payload. For v0 transactions the v1-only fields are ignored.

Body

application/json
transactionSubmitTxModelrequired
Show child attributes
versionintegerrequired
inputsArray<SubmitTxInput>required
Show child attributes
previousOutpointSubmitTxOutpointrequired
Show child attributes
transactionIdstringrequired
indexintegerrequired
signatureScriptstringrequired
sequenceintegerrequired
sigOpCountintegerrequired
computeBudgetinteger0

Compute budget of the input (v1 transactions). For v1, sigOpCount must be 0. Ignored for v0.

outputsArray<SubmitTxOutput>required
Show child attributes
amountintegerrequired
scriptPublicKeySubmitTxScriptPublicKeyrequired
Show child attributes
versionintegerrequired
scriptPublicKeystringrequired
covenantSubmitTxCovenantBinding

Covenant binding of an output (v1 transactions).

Show child attributes
authorizingInputintegerrequired
covenantIdstringrequired
lockTimeinteger0
subnetworkIdstring
gasinteger0

Gas (v1 transactions). Forced to 0 for v0.

payloadstring

Hex-encoded transaction payload. Supported for both v0 and v1 transactions.

allowOrphanbooleanfalse

Parameters

replaceByFeebooleanfalsequery

Replace an existing transaction in the mempool

Response

200OK

Successful Response

400Bad Request

Bad Request

422Unprocessable Entity

Validation Error

503Service Unavailable

Service Unavailable: no synced Kaspa node is reachable

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 returned mass is the largest of the compute mass, the storage mass as defined in KIP-0009 and the normalized transient mass, for both v0 and v1 transactions.

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
computeBudgetinteger0

Compute budget of the input (v1 transactions). For v1, sigOpCount must be 0. Ignored for v0.

outputsArray<SubmitTxOutput>required
Show child attributes
amountintegerrequired
scriptPublicKeySubmitTxScriptPublicKeyrequired
Show child attributes
versionintegerrequired
scriptPublicKeystringrequired
covenantSubmitTxCovenantBinding

Covenant binding of an output (v1 transactions).

Show child attributes
authorizingInputintegerrequired
covenantIdstringrequired
lockTimeinteger0
subnetworkIdstring
gasinteger0

Gas (v1 transactions). Forced to 0 for v0.

payloadstring

Hex-encoded transaction payload. Supported for both v0 and v1 transactions.

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