Skip to main content

API Reference: dividendPayment

Executes an automated, snapshot-based dividend payment to all accounts holding a specific Totem at a specified historical block height.


Endpoint Details

  • HTTP Method: POST
  • Gateway Path: /nxt
  • Content-Type: application/x-www-form-urlencoded
  • API Tags: AE, CREATE_TRANSACTION
  • Chain Specific: Yes

Request Parameters

ParameterTypeRequiredDescription
requestTypeStringYesMust be set to dividendPayment.
totemlongYesUnique 6464-bit ID of the Totem distributing dividends.
chainintYesSovereign BetaChain ID.
heightintYesHistorical block height snapshot used for balance calculation.
holdingTypeString/intYesPayment asset class (COIN = 0, TOTEM = 1, CURRENCY = 2).
holdinglongConditionalAsset ID if holdingType is TOTEM or CURRENCY. Omitted if COIN.
amountMTAPerSharelongYesAmount of payment currency per unit share (MTAMTA/QNTQNT).
secretPhraseStringYesPassphrase of the account funding the dividend distribution.
feeNQTlongConditionalTransaction execution fee in base units (NQTNQT).

Example Request

curl -X POST http://localhost:22024/nxt \
-d "requestType=dividendPayment" \
-d "chain=2" \
-d "totem=9876543210123456789" \
-d "height=500000" \
-d "holdingType=CURRENCY" \
-d "holding=5544332211" \
-d "amountMTAPerShare=5000" \
-d "secretPhrase=your_pqc_passphrase" \
-d "feeNQT=100000000"

Successful Response

{
"signatureHash": "d9e8f7a6...",
"unsignedTransactionBytes": "0100...",
"transactionJSON": {
"sender": "1234567890123456789",
"feeNQT": "100000000",
"type": 2,
"subtype": 6,
"attachment": {
"version.DividendPayment": 1,
"totem": "9876543210123456789",
"height": 500000,
"holdingType": 2,
"holding": "5544332211",
"amountMTAPerShare": "5000"
},
"timestamp": 89234300
},
"broadcasted": true,
"transaction": "65123049120394813"
}

Error Codes

Error CodeCause / Description
TOTEM_NOT_ISSUED_YETSpecified historical snapshot height predates the Totem issuance block height.
NOT_ENOUGH_FUNDSSender account balance is insufficient to cover total gross distribution + fees.