Transactions

Get Transaction

get

Get details for a given transaction id

Authorizations
Path parameters
transactionIdstringRequiredPattern: [a-f0-9]{64}
Query parameters
blockHashstringOptional

Specify a containing block (if known) for faster lookup

inputsbooleanOptionalDefault: true
outputsbooleanOptionalDefault: true
resolve_previous_outpointsall ofOptional

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.

Default: no
string · enumOptional

An enumeration.

Possible values:
Responses
200
Successful Response
application/json
get
GET /transactions/{transactionId} HTTP/1.1
Host: kas.nownodes.io
api-key: YOUR_API_KEY
Accept: */*
{
  "subnetwork_id": "text",
  "transaction_id": "text",
  "hash": "text",
  "mass": "text",
  "payload": "text",
  "block_hash": [
    "text"
  ],
  "block_time": 1,
  "is_accepted": true,
  "accepting_block_hash": "text",
  "accepting_block_blue_score": 1,
  "accepting_block_time": 1,
  "inputs": [
    {
      "transaction_id": "text",
      "index": 1,
      "previous_outpoint_hash": "text",
      "previous_outpoint_index": "text",
      "previous_outpoint_resolved": {
        "transaction_id": "text",
        "index": 1,
        "amount": 1,
        "script_public_key": "text",
        "script_public_key_address": "text",
        "script_public_key_type": "text",
        "accepting_block_hash": "text"
      },
      "previous_outpoint_address": "text",
      "previous_outpoint_amount": 1,
      "signature_script": "text",
      "sig_op_count": "text"
    }
  ],
  "outputs": [
    {
      "transaction_id": "text",
      "index": 1,
      "amount": 1,
      "script_public_key": "text",
      "script_public_key_address": "text",
      "script_public_key_type": "text",
      "accepting_block_hash": "text"
    }
  ]
}

Search For Transactions

post

Search for transactions by transaction_ids or blue_score

Authorizations
Query parameters
fieldsstringOptionalDefault: ""
resolve_previous_outpointsall ofOptional

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.

Default: no
string · enumOptional

An enumeration.

Possible values:
acceptanceall ofOptional

Only used when searching using transactionIds

string · enumOptional

An enumeration.

Possible values:
Body
transactionIdsstring[]Optional
Responses
200
Successful Response
application/json
post
POST /transactions/search HTTP/1.1
Host: kas.nownodes.io
api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 66

{
  "transactionIds": [
    "text"
  ],
  "acceptingBlueScores": {
    "gte": 1,
    "lt": 1
  }
}
[
  {
    "subnetwork_id": "text",
    "transaction_id": "text",
    "hash": "text",
    "mass": "text",
    "payload": "text",
    "block_hash": [
      "text"
    ],
    "block_time": 1,
    "is_accepted": true,
    "accepting_block_hash": "text",
    "accepting_block_blue_score": 1,
    "accepting_block_time": 1,
    "inputs": [
      {
        "transaction_id": "text",
        "index": 1,
        "previous_outpoint_hash": "text",
        "previous_outpoint_index": "text",
        "previous_outpoint_resolved": {
          "transaction_id": "text",
          "index": 1,
          "amount": 1,
          "script_public_key": "text",
          "script_public_key_address": "text",
          "script_public_key_type": "text",
          "accepting_block_hash": "text"
        },
        "previous_outpoint_address": "text",
        "previous_outpoint_amount": 1,
        "signature_script": "text",
        "sig_op_count": "text"
      }
    ],
    "outputs": [
      {
        "transaction_id": "text",
        "index": 1,
        "amount": 1,
        "script_public_key": "text",
        "script_public_key_address": "text",
        "script_public_key_type": "text",
        "accepting_block_hash": "text"
      }
    ]
  }
]

Get Transaction Acceptance

post

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

Authorizations
Body
transactionIdsstring[]RequiredExample: ["b9382bdee4aa364acf73eda93914eaae61d0e78334d1b8a637ab89ef5e224e41","1e098b3830c994beb28768f7924a38286cec16e85e9757e0dc3574b85f624c34","000ad5138a603aadc25cfcca6b6605d5ff47d8c7be594c9cdd199afa6dc76ac6"]
Responses
200
Successful Response
application/json
post
POST /transactions/acceptance HTTP/1.1
Host: kas.nownodes.io
api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 221

{
  "transactionIds": [
    "b9382bdee4aa364acf73eda93914eaae61d0e78334d1b8a637ab89ef5e224e41",
    "1e098b3830c994beb28768f7924a38286cec16e85e9757e0dc3574b85f624c34",
    "000ad5138a603aadc25cfcca6b6605d5ff47d8c7be594c9cdd199afa6dc76ac6"
  ]
}
[
  {
    "transactionId": "b9382bdee4aa364acf73eda93914eaae61d0e78334d1b8a637ab89ef5e224e41",
    "accepted": true,
    "acceptingBlueScore": 1
  }
]

Submit A New Transaction

post
Authorizations
Query parameters
replaceByFeebooleanOptional

Replace an existing transaction in the mempool

Default: false
Body
allowOrphanbooleanOptionalDefault: false
Responses
200
Successful Response
application/json
post
POST /transactions HTTP/1.1
Host: kas.nownodes.io
api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 286

{
  "transaction": {
    "version": 1,
    "inputs": [
      {
        "previousOutpoint": {
          "transactionId": "text",
          "index": 1
        },
        "signatureScript": "text",
        "sequence": 1,
        "sigOpCount": 1
      }
    ],
    "outputs": [
      {
        "amount": 1,
        "scriptPublicKey": {
          "version": 1,
          "scriptPublicKey": "text"
        }
      }
    ],
    "lockTime": 0,
    "subnetworkId": "text"
  },
  "allowOrphan": false
}
{
  "transactionId": "text",
  "error": "text"
}

Calculate Transaction Mass

post

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.

Authorizations
Body
versionintegerRequired
lockTimeintegerOptionalDefault: 0
subnetworkIdstringOptional
Responses
200
Successful Response
application/json
post
POST /transactions/mass HTTP/1.1
Host: kas.nownodes.io
api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 250

{
  "version": 1,
  "inputs": [
    {
      "previousOutpoint": {
        "transactionId": "text",
        "index": 1
      },
      "signatureScript": "text",
      "sequence": 1,
      "sigOpCount": 1
    }
  ],
  "outputs": [
    {
      "amount": 1,
      "scriptPublicKey": {
        "version": 1,
        "scriptPublicKey": "text"
      }
    }
  ],
  "lockTime": 0,
  "subnetworkId": "text"
}
{
  "mass": 1,
  "storage_mass": 1,
  "compute_mass": 1
}