Skip to main content

SendTransaction

Sends a signed transaction to connected peers without validating or storing it as an unconfirmed transaction. Requires admin password.

Endpoint​

POST /nxt?requestType=sendTransaction

Parameters​

NameTypeRequiredDescription
transactionJSONstringNoSigned transaction JSON
transactionBytesstringNoSigned transaction bytes (hex)
prunableAttachmentJSONstringNoPrunable attachment JSON

At least one of transactionJSON or transactionBytes is required.

Request Example​

curl -X POST http://localhost:22024/nxt \
-d "requestType=sendTransaction" \
-d "transactionBytes=abc123..."

Response​

{
"fullHash": "abc123...",
"numberOfPeers": 5,
"requestProcessingTime": 10
}

Response Fields​

FieldTypeDescription
fullHashstringTransaction full hash
numberOfPeersnumberNumber of peers the transaction was sent to
requestProcessingTimenumberAPI request processing time in milliseconds

Errors​

ErrorDescription
Not connected to any full client peersNo peers available for broadcasting

Notes​

  • Does not validate the transaction
  • Does not store as unconfirmed transaction
  • Does not re-broadcast to peers
  • Requires admin password
  • Requires POST method

Source​

SendTransaction.java

Tags​

TRANSACTIONS