NAV
curl

Introduction

One billion DWA were created in the Genesis Block, and no new DWA will ever be created. Yet internally, the coin is still stored in integer form in units of NQT or NQuant, where 1 DWA = 108 NQT. All parameters and fields in the API involving a quantity of DWA are denominated in units of NQT, for example feeNQT. The only exception is the field effectiveBalanceDWA, used in forging calculations.

NQT DWA
10000000 NQT 0.1 DWA
100000000 NQT 1 DWA
100000000000 NQT 1000 DWA

Other assets/token can be created within DWA. The issuer must specify the number of decimal places to use in quantifying the asset (6 by defaults), and the amount of the asset to create in generic units of QNT or Quant, distinct from NQT. Quantities of assets are stored internally as integers in units of QNT, and assets are priced in NQT per QNT. All API calling asset operation must specify the amount in QNT

QNT Asset DEcimal Asset/token amount
10000000 NQT 6 10
100000000 NQT 5 100
100000000000 NQT 6 1000

Acount RS

This form of address improves reliability by introducing redundancy that can detect and correct errors when entering and using DWA account numbers. These addresses are always in the form of:

where X is a non-ambiguous number or alphabetic character (the letters O and I are not used; nor are the numbers 1 and 0). Addresses are always prefixed with "DWA-", and hyphens are used to separate the address into groups of 4, 4, 4, and then 5 characters. The addresses are NOT case-sensitive.

Account ID

Most of API operation takes account ID as input or output parameter. Account ID is numeric (long integer) interpretation of account RS. Conversion between account RS and account ID can be done using rsConvert API

Minimum Fee

Minimum fee in order to include transaction into blockchain is 0.02 DWA or 2000000(2 x 10) NQT. Transaction fee less than the minimum fee will be rejected.

Testing server (tesnet) :

Wallet API Server PORT
http://31.220.48.81:8346/index.html 31.220.48.81 8346 - http

Change host:port in example request section with testing server ip:port.

Accounts

Get Account Example

curl "http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getAccount&account=DWA-KQT4-X8NK-AKD6-FP8C3" \
  -P "requestType= getAccount"
  -P "account= DWA-KQT4-X8NK-AKD6-FP8C3"
{
  "unconfirmedBalanceNQT": "1999999999997999",
  "accountRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
  "forgedBalanceNQT": "0",
  "balanceNQT": "1999999999997999",
  "publicKey": "2cd98d0f6a138ef25255830cd868106adf3825b4fa24c9ced4134928d905a202",
  "requestProcessingTime": 0,
  "account": "15035502555517475618"
}

Get Account

Get account information given an account ID.

Request
requestType is getAccount
account is the account ID
includeLessors is true to include lessors, lessorsRS and lessorsInfo (optional)
includeAssets is true to include assetBalances and unconfirmedAssetBalances (optional)
includeCurrencies is true to include accountCurrencies (optional)
includeEffectiveBalance is true to include effectiveBalanceNXT and guaranteedBalanceNQT (optional)
requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
Response
unconfirmedBalanceNQT (S) is balanceNQT less unconfirmed outgoing transactions, the balance displayed in the client
effectiveBalanceNXT (N) is the balance (in NXT) of the account available for forging: the unleased guaranteedBalance of this account plus the leased guaranteedBalance of all lessors to this account
lessorsInfo (A) is an array of lessor objects including the fields:
- currentHeightTo (S)
- nextHeightFrom (S)
- effectiveBalanceNXT (S)
- nextLesseeRS (S)
- currentLesseeRS (S)
- currentHeightFrom (S)
- nextHeightTo (S)
lessors (A) is an array of lessor account IDs
currentLessee (S) is the account number of the lessee, if applicable
currentLeasingHeightTo (N) is the block height when the lease completes, if applicable
forgedBalanceNQT (S) is the balance (in NQT) that the account has forged
balanceNQT (S) is the minimally confirmed basic balance (in NQT) of the account
publicKey (S) is the public key of the account
requestProcessingTime (N) is the API request processing time (in millisec)
assetBalances (A) is an array of asset objects including the fields balanceQNT (S) and asset (S) ID
guaranteedBalanceNQT (S) is the balance (in NQT) of the account with at least 1440 confirmations
unconfirmedAssetBalances (A) is an array of asset objects including the fields unconfirmedBalanceQNT (S) and asset (S) ID
currentLesseeRS (S) is the Reed-Solomon address of the lessee account
accountRS (S) is the Reed-Solomon address of the account
lessorsRS (A) is an array of Reed-Solomon lessor account addresses
accountCurrencies (A) is an array of currency objects (refer to Get Account Currencies for details)
name (S) is the name associated with the account, if applicable
description (S) is the description of the account, if applicable
account (S) is the account number
currentLeasingHeightFrom (N) is the block height when the lease starts, if applicable
lastBlock (S) is the last block ID on the blockchain (applies if requireBlock is provided but not requireLastBlock)

Get Account Block Count

Get Account Example

curl "http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getAccountBlockCount&account=DWA-KQT4-X8NK-AKD6-FP8C3" \
  -P "requestType= getAccountBlockCount"
  -P "account= DWA-KQT4-X8NK-AKD6-FP8C3"
{
  "numberOfBlocks": 3959,
  "requestProcessingTime": 3
}

Get the number of blocks forged by an account.

Request
requestType is getAccountBlockCount
account is an account ID
requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
Response
numberOfBlocks (N) is the number of blocks forged by the account
lastBlock (S) is the last block ID on the blockchain (applies if requireBlock is provided but not requireLastBlock)
requestProcessingTime (N) is the API request processing time (in millisec)

Get Account Block Ids

Get Account Block Ids Example

curl "http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getAccountBlockIds&account=DWA-KQT4-X8NK-AKD6-FP8C3"\
-P "requestType=getAccountBlockIds"
-P "account=DWA-KQT4-X8NK-AKD6-FP8C3"
{
  "blockIds": [
    "7248093009490715795",
    "3802495434936506579",
    "14122443404002550009",
    "17699522534016035291",
    "12637894600455765675",
    "2687341866707908686",
    "18000082531600271240",
    "14484675938526148917",
    "9492602406239562380",
    "7394897424991487192",
    "5608562038013243490",
    "7382453586187922296",
    "9819295457446916468",
    "7015339323646101985",
    "16933042941244876012",
    "7474639389045026197",
    "7798242261979951230",
    "13638458287102859258",
    "9812537777076090339",
    "5436867002901006097",
    "15025709640913287795",
    "9761261532509557490",
    "2187483136836676172",
    "16843277435049005854",
    "12599412824401601351",
    "15164540758492559981",
    "5985390039487434739",
    "15628052560333772539",
    "7477641007485658450",
    "16282930545670540282",
    "11538797381978685716",
    "14052597596811454911",
    "597107444413659455",
    "17242770918073858036",
    "2339650294037745795",
    "8782419486098536258",
    "2104290423388555938",
    "12378606179648833112",
    "1718548446742858290",
    "8331012706226634843",
    "4931436079574424276",
    "13890894072978458317",
    "7574202187641046199",
    "2079546654131123029",
    "4339139750837601300",
    "268248795615591573",
    "3111281199601564225",
    "2104894594614322934",
    "10705739702439574465",
    "1189419907429184672",
    "712641059639054309",
    "9268697099197224164",
    "2109014326553227001",
    "11629988009198597393",
    "9307100216306410190",
    "17123701097000078063",
    "1986997047241878976",
    "4970910396328138919",
    "15017561958318973889",
    "856402996473282977",
    "13823401962258737713",
    "10603784900558534470",
    "1276136897945910031",
    "2157970482540261058",
    "1090405842777175480",
    "13995100651484948384",
    "17512879634099288052",
    "14492477306392334821",
    "7850607599103366758",
    "17529199376190176649",
    "16856459644322788715",
    "318132866755198047",
    "17839712418554610331",
    "4425141651411607008",
    "17244095636612896101",
    "13580826454974700991",
    "951006270304710463",
    "10227704967320453888",
    "6174230657907069542",
    "7808003487728358076",
    "4364477786352218110",
    "11674405077127242022",
    "7349932731893191741",
    "15314221978305691085",
    "3010093542752098489",
    "1682062679403945306",
    "2590947667424994263",
    "13682545344176165170",
    "9577451574210946376",
    "13142884952040332893",
    "1514430300091896890",
    "1567180692205232716",
    "9922109096019714868",
    "1973696058645921407",
    "5516416884035264912",
    "3495164325804460595",
    "7295890989406906416",
    "5752681483599317737",
    "2932682409997266824",
    "16789501724948903283"
  ],
  "requestProcessingTime": 11
}

Get the block IDs of all blocks forged (generated) by an account in reverse block height order.

Request
requestType is getAccountBlockIds
account is the account ID
timestamp is the earliest block (in seconds since the genesis block) to retrieve (optional)
firstIndex is a zero-based index to the first block ID to retrieve (optional)
lastIndex is a zero-based index to the last block ID to retrieve (optional)
requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
Request
blockIds (A) is an array of block IDs
lastBlock (S) is the last block ID on the blockchain (applies if requireBlock is provided but not requireLastBlock)
requestProcessingTime (N) is the API request processing time (in millsec)

Get Account Blocks

Get Account Blocks Example

curl "http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getAccountBlocks&account=DWA-KQT4-X8NK-AKD6-FP8C3"
-P "requestType=getAccountBlocks"
-P "account=DWA-KQT4-X8NK-AKD6-FP8C3"
{
    "blocks": [
        {
            "previousBlockHash": "b6cb788577e5c450f7e1bc9b52962f366312749f119bbbfb86ca528f42e1a85d",
            "payloadLength": 0,
            "totalAmountNQT": "0",
            "generationSignature": "fd474e25babf2432277a8d87797bd4a01b74e33729fc89af75ec595c26adc011",
            "generator": "15035502555517475618",
            "generatorPublicKey": "2cd98d0f6a138ef25255830cd868106adf3825b4fa24c9ced4134928d905a202",
            "baseTarget": "27868",
            "payloadHash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
            "generatorRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
            "numberOfTransactions": 0,
            "blockSignature": "92fb35d50e41c6bf81117debbc0e59d4973d456490ba900f0075fc4b6350cb0fb00e925eda1c2c32a92756725186bbd8bdb1130e29136f1703e71d65c9a73682",
            "transactions": [],
            "version": 3,
            "totalFeeNQT": "0",
            "previousBlock": "5820028919972678582",
            "cumulativeDifficulty": "12696523254152066854",
            "block": "4418201716611205973",
            "height": 17536,
            "timestamp": 25199114
        },
        {
            "previousBlockHash": "191f9a5e1885eb4497939b6dc43b448ae6b033d545b4a36f7e349c2d4928f1dd",
            "payloadLength": 0,
            "totalAmountNQT": "0",
            "generationSignature": "71bf65085d6c6d62bc041920d688521bd763b751cc265dc0e7072b8d5f454f0c",
            "generator": "15035502555517475618",
            "generatorPublicKey": "2cd98d0f6a138ef25255830cd868106adf3825b4fa24c9ced4134928d905a202",
            "baseTarget": "27868",
            "payloadHash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
            "generatorRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
            "nextBlock": "4418201716611205973",
            "numberOfTransactions": 0,
            "blockSignature": "50404a5e22f6552a6aa4d0201c4239e97a6262a8c1dc80a6c87e70ed2cca680fc40f905135d2ca652f8d0d2c0aae8fe97af33e442f229c0dca4dca78b38b1dce",
            "transactions": [],
            "version": 3,
            "totalFeeNQT": "0",
            "previousBlock": "4966209353818971929",
            "cumulativeDifficulty": "12695861321323241336",
            "block": "5820028919972678582",
            "height": 17535,
            "timestamp": 25199049
     },
     
    ],
    "requestProcessingTime": 14
}

Get all blocks forged (generated) by an account in reverse block height order.

Request
requestType is getAccountBlocks
account is the account ID
timestamp is the earliest block (in seconds since the genesis block) to retrieve (optional)
firstIndex is a zero-based index to the first block to retrieve (optional)
lastIndex is a zero-based index to the last block to retrieve (optional)
includeTransactions is true to retrieve transaction details, otherwise only transaction IDs are retrieved (optional)
requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
Response
blocks (A) is an array of blocks (refer to Get Block for details)
lastBlock (S) is the last block ID on the blockchain (applies if requireBlock is provided but not requireLastBlock)
requestProcessingTime (N) is the API request processing time (in millisec)

Get Account Id

Get an account ID given a secret passphrase or public key. POST only.

Request
requestType is getAccountId
secretPhrase is the secret passphrase of the account (optional)
publicKey is the public key of the account (optional if secretPhrase provided)
Response
accountRS (S) is the Reed-Solomon address of the account
publicKey (S) is the public key of the account
requestProcessingTime (N) is the API request processing time (in millisec)
account (S) is the account number

Get Account Id Example

curl "http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getAccountId&secretPhrase=makandirumah"\
-P "requestType=getAccountId"
-P "secretPhrase=makandirumah"
{
    "accountRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
    "publicKey": "2cd98d0f6a138ef25255830cd868106adf3825b4fa24c9ced4134928d905a202",
    "requestProcessingTime": 0,
    "account": "15035502555517475618"
}

Get Account Ledger

Get multiple account ledger entries.

Request
requestType is getAccountLedger
account is the account ID (optional)
firstIndex is a zero-based index to the first block to retrieve (optional)
• lastIndex is a zero-based index to the last block to retrieve (optional)
• event is the event ID (optional)
• eventType is a string representing the event type (optional)
• holdingType is a string representing the holding type (optional)
• holding is the holding ID (optional)
• includeTransactions is true to retrieve transaction details, otherwise only transaction IDs are retrieved (optional)
• includeHoldingInfo is true to retrieve asset or currency info (optional) with each ledger entry. The default is false.
• requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
• requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
Response
• entries (A) is an array of ledger objects including the fields:
o change (S) is the change in the balance for the holding identified by 'holdingType'
o eventType (S) is the event type causing the account change
o ledgerId (S) is the ledger entry ID
o holding (S) is the item identifier for an asset or currency balance
o isTransactionEvent (B) is true if the event is associated with a transaction and false if it is associated with a block.
o balance (S) is the balance for the holding identified by 'holdingType'
o holdingType (S) is the item being changed (account balance, asset balance or currency balance)
o accountRS (S) is the Reed-Solomon address of the account
o block (S) is the block ID that created the ledger entry
o event (S) is the block or transaction associated with the event
o account (S) is the account number
o height (N) is the the block height associated with the event
o timestamp (N) is the the block timestamp associated with the event
• requestProcessingTime (N) is the API request processing time (in millisec)

Get Account Ledger Example

curl "http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getAccountLedger&account=DWA-KQT4-X8NK-AKD6-FP8C3"\
-P "requestType=getAccountLedger&account=DWA-KQT4-X8NK-AKD6-FP8C3"
{
    "entries": [
        {
            "ledgerId": "25",
            "isTransactionEvent": true,
            "balance": "1999999999997999",
            "holdingType": "UNCONFIRMED_DWA_BALANCE",
            "accountRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
            "change": "-1000",
            "block": "321580845485310987",
            "eventType": "ORDINARY_PAYMENT",
            "event": "673072622659186174",
            "account": "15035502555517475618",
            "height": 3,
            "timestamp": 24036833
        },
        {
            "ledgerId": "24",
            "isTransactionEvent": true,
            "balance": "1999999999998999",
            "holdingType": "UNCONFIRMED_DWA_BALANCE",
            "accountRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
            "change": "-1",
            "block": "321580845485310987",
            "eventType": "TRANSACTION_FEE",
            "event": "673072622659186174",
            "account": "15035502555517475618",
            "height": 3,
            "timestamp": 24036833
        },
        {
            "change": "1000000000000000",
            "eventType": "ASSET_ISSUANCE",
            "ledgerId": "23",
            "holding": "15418948120526107039",
            "isTransactionEvent": true,
            "balance": "1000000000000000",
            "holdingType": "UNCONFIRMED_ASSET_BALANCE",
            "accountRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
            "block": "15761948602402226210",
            "event": "15418948120526107039",
            "account": "15035502555517475618",
            "height": 2,
            "timestamp": 24036799
        },
        {
            "ledgerId": "21",
            "isTransactionEvent": true,
            "balance": "1999999999999000",
            "holdingType": "UNCONFIRMED_DWA_BALANCE",
            "accountRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
            "change": "-1000",
            "block": "15761948602402226210",
            "eventType": "TRANSACTION_FEE",
            "event": "15418948120526107039",
            "account": "15035502555517475618",
            "height": 2,
            "timestamp": 24036799
        }
    ],
    "requestProcessingTime": 5
}

Get Account Ledger Entry

Get a specific account ledger entry.

Request
• requestType is getAccountLedgerEntry
• ledgerId is the ledger ID
• includeTransactions is true to retrieve transaction details, otherwise only transaction IDs are retrieved (optional)
• includeHoldingInfo is true to retrieve asset or currency info (optional) with the ledger entry. The default is false.
Response
• change (S) is the change in the balance for the holding identified by 'holdingType'
• eventType (S) is the event type causing the account change
• ledgerId (S) is the ledger entry ID
• holding (S) is the item identifier for an asset or currency balance
• isTransactionEvent (B) is true if the event is associated with a transaction and false if it is associated with a block.
• balance (S) is the balance for the holding identified by 'holdingType'
• holdingType (S) is the item being changed (account balance, asset balance or currency balance)
• accountRS (S) is the Reed-Solomon address of the account
• block (S) is the block ID that created the ledger entry
• event (S) is the block or transaction associated with the event
• account (S) is the account number
• height (N) is the the block height associated with the event
• timestamp (N) is the the block timestamp associated with the event
• requestProcessingTime (N) is the API request processing time (in millisec)

Get Account Ledger Entry Example

curl "http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getAccountLedgerEntry&ledgerId=25"\
-P "requestType=getAccountLedgerEntry"
-P "ledgerId=25"
{
    "change": "-1000",
    "eventType": "ORDINARY_PAYMENT",
    "requestProcessingTime": 0,
    "ledgerId": "25",
    "isTransactionEvent": true,
    "balance": "1999999999997999",
    "holdingType": "UNCONFIRMED_DWA_BALANCE",
    "accountRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
    "block": "321580845485310987",
    "event": "673072622659186174",
    "account": "15035502555517475618",
    "height": 3,
    "timestamp": 24036833
}

Get Account Lessors

Get the lessors to an account.

Request
• requestType is getAccountLessors
• account is the account ID
• height is the height of the blockchain to determine the lessors (optional, default is last block)
• requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
• requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
Response
• accountRS (S) is the Reed-Solomon address of the account
• account (S) is the account number
• height (N) is the height of the blockchain
• lastBlock (S) is the last block ID on the blockchain (applies if requireBlock is provided but not requireLastBlock)
• requestProcessingTime (N) is the API request processing time (in millisec)
• lessors (A) is an array of lessor objects including the fields:
o lessorRS (S)
o lessor (S)
o guaranteedBalanceNQT (S)

Get Account Lessors Example

curl "http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getAccountLessors&account=DWA-KQT4-X8NK-AKD6-FP8C3"\
-P "requestType=getAccountLessors"
-P "account=DWA-KQT4-X8NK-AKD6-FP8C3"
{
    "change": "-1000",
    "eventType": "ORDINARY_PAYMENT",
    "requestProcessingTime": 0,
    "ledgerId": "25",
    "isTransactionEvent": true,
    "balance": "1999999999997999",
    "holdingType": "UNCONFIRMED_DWA_BALANCE",
    "accountRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
    "block": "321580845485310987",
    "event": "673072622659186174",
    "account": "15035502555517475618",
    "height": 3,
    "timestamp": 24036833
}

Get Account Properties

Get Account Properties

Request
• requestType is getAccountProperties
• recipient is the account ID to which the property is attached to
• setter is the account ID who set the property (optional if recipient provided)
• property is the property key (optional)
• firstIndex is a zero-based index to the first block to retrieve (optional)
• lastIndex is a zero-based index to the last block to retrieve (optional)
• requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
• requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
Response
• setterRS: (S) is the Reed-Solomon address of the setter account (only if setter is defined in the request)
• recipientRS: (S) is the Reed-Solomon address of the recipient account (only if recipient is defined in the request)
• recipient: (S) is the account number of the recipient account (only if recipient is defined in the request)
• requestProcessingTime (N) is the API request processing time (in millisec)
• setter: (S) is the account number of the setter account (only if setter is defined in the request)
• properties: (A) is an array of properties including the fields:
o setterRS: (S) is the Reed-Solomon address of the setter account (only if setter is omitted in the request)
o recipientRS: (S) is the Reed-Solomon address of the recipient account (only if recipient is omitted in the request)
o recipient: (S) is the account number of the recipient account (only if recipient is omitted in the request)
o property: (S) property name
o setter: (S) is the account number of the setter account (only if setter is omitted in the request)
o value: (S) property value

Get Account Properties

curl " http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getAccountProperties&recipient=DWA-KQT4-X8NK-AKD6-FP8C3"\
-P "requestType=getAccountProperties"
-P "recipient=DWA-KQT4-X8NK-AKD6-FP8C3"
{
    "recipientRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
    "recipient": "15035502555517475618",
    "requestProcessingTime": 1,
    "properties": []
}

Get Account Public Key

Get the public key associated with an account ID.

Request
• requestType is getAccountPublicKey
• account is the account ID
• requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
• requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
Response
• publicKey (S) is the 32-byte public key associated with the account, returned as a hex string
• lastBlock (S) is the last block ID on the blockchain (applies if requireBlock is provided but not requireLastBlock)
• requestProcessingTime (N) is the API request processing time (in millisec)

Get Account Public Key Example

curl "http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getAccountPublicKey&account=DWA-KQT4-X8NK-AKD6-FP8C3"\
-P "requestType=getAccountPublicKey"
-P "account=DWA-KQT4-X8NK-AKD6-FP8C3"
{
    "publicKey": "2cd98d0f6a138ef25255830cd868106adf3825b4fa24c9ced4134928d905a202",
    "requestProcessingTime": 1
}

RS Convert

Get Rs Convert

curl "http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=rsConvert&account=DWA-KQT4-X8NK-AKD6-FP8C3"\
-P "requestType=rsConvert"
-P "account=DWA-KQT4-X8NK-AKD6-FP8C3"

Success

{
    "accountRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
    "accountLongId": "-3411241518192075998",
    "requestProcessingTime": 0,
    "account": "15035502555517475618"
}

Error

{
    "errorDescription": "Incorrect \"account\"",
    "errorCode": 4
}

Get both the Reed-Solomon account address and the account number given an account ID.

Request
• requestType is rsConvert
• account is an account ID (either RS address or number)
Response
• accountRS (S) is the Reed-Solomon address of the account
• requestProcessingTime (N) is the API request processing time (in millisec)
• account (S) is the account number

Get Balance

Get the balance of an account.

Request
• requestType is getBalance
• account is an account ID
• includeEffectiveBalance is true to include effectiveBalanceNXT and guaranteedBalanceNQT (optional)
• height is the height to retrieve account balance for, if still available (optional)
• requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
• requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
Response
• unconfirmedBalanceNQT (S) is balanceNQT less unconfirmed outgoing transactions, the balance displayed in the client
• guaranteedBalanceNQT (S) is the balance (in NQT) of the account with at least 1440 confirmations
• effectiveBalanceNXT (N) is the balance (in NXT) of the account available for forging: the unleased guaranteedBalance of this account plus the leased guaranteedBalance of all lessors to this account
• forgedBalanceNQT (S) is the balance (in NQT) that the account has forged
• balanceNQT (S) is the minimally confirmed basic balance (in NQT) of the account
• lastBlock (S) is the last block ID on the blockchain (applies if requireBlock is provided but not requireLastBlock)
• requestProcessingTime (N) is the API request processing time (in millisec)

Get Balance Example

curl "http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getBalance&account=DWA-KQT4-X8NK-AKD6-FP8C3"\
-P "requestType=getBalance"
-P "account=DWA-KQT4-X8NK-AKD6-FP8C3"
{
    "unconfirmedBalanceNQT": "1999999999997999",
    "forgedBalanceNQT": "0",
    "balanceNQT": "1999999999997999",
    "requestProcessingTime": 1
}

Get Blockchain Transactions

Get the transactions associated with an account in reverse block timestamp order.

Request
• requestType is getBlockchainTransactions
• account is the account ID
• timestamp is the earliest block (in seconds since the genesis block) to retrieve (optional)
• type is the type of transactions to retrieve (optional)
• subtype is the subtype of transactions to retrieve (optional)
• firstIndex is a zero-based index to the first transaction to retrieve (optional)
• lastIndex is a zero-based index to the last transaction to retrieve (optional)
• numberOfConfirmations is the required number of confirmations per transaction (optional)
• withMessage is true to retrieve only only transactions having a message attachment, either non-encrypted or decryptable by the account (optional)
• phasedOnly is true to retrieve only phased transactions (optional unless nonPhasedOnly provided)
• nonPhasedOnly is true to retrieve only nonphased transactions (optional unless phasedOnly provided)
• includeExpiredPrunable is true' to retrieve pruned data if available (optional)
• includePhasingResult is true to retrieve execution status of each phased transaction (optional)
• executedOnly is true to exclude phased transactions that are not yet executed (optional)
• requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
• requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
Response
• transactions (A) is an array of transactions (refer to Get Transaction for details)
• lastBlock (S) is the last block ID on the blockchain (applies if requireBlock is provided but not requireLastBlock)
• requestProcessingTime (N) is the API request processing time (in millisec)

Get Blockchain Transactions Example

curl "http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getBlockchainTransactions&account=DWA-KQT4-X8NK-AKD6-FP8C3"
-P "requestType=getBlockchainTransactions"
-P "account=DWA-KQT4-X8NK-AKD6-FP8C3"
{
    "requestProcessingTime": 1,
    "transactions": [
        {
            "signature": "c8656816da94d545708a92df1323a0e0b9053cb07737b487c5c8d595d7a13f03257c66eba171065933bf5a8ed4c304155e72668a47fcad81aa1628fd4fc9d953",
            "transactionIndex": 0,
            "type": 0,
            "phased": false,
            "ecBlockId": "3601852901353591864",
            "signatureHash": "8fbc792534a8ce2ccd4d1b827dc1f2f674ab9f84eb5490f79238f7eaee37746c",
            "attachment": {
                "version.OrdinaryPayment": 0
            },
            "senderRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
            "subtype": 0,
            "amountNQT": "1000",
            "recipientRS": "DWA-E6UB-G2MQ-4DAU-4H8XP",
            "block": "321580845485310987",
            "blockTimestamp": 24036833,
            "deadline": 10,
            "timestamp": 24036823,
            "height": 3,
            "senderPublicKey": "2cd98d0f6a138ef25255830cd868106adf3825b4fa24c9ced4134928d905a202",
            "feeNQT": "1",
            "confirmations": 17560,
            "fullHash": "fe2da4f5fb3b570918bbc052ed081924e1e6923de45968104fb26f4eb303d6bd",
            "version": 1,
            "sender": "15035502555517475618",
            "recipient": "3095326924514661193",
            "ecBlockHeight": 0,
            "transaction": "673072622659186174"
        },
        {
            "senderPublicKey": "2cd98d0f6a138ef25255830cd868106adf3825b4fa24c9ced4134928d905a202",
            "signature": "b4aa0cdc8553fecb8c68ee4586643141665d9d64cf0d40a26bd237d0c111b20746367da0013cea159c604bea3e247eb3a680fb458d470603d645f47907df9871",
            "feeNQT": "1000",
            "transactionIndex": 0,
            "type": 2,
            "confirmations": 17561,
            "fullHash": "9fb1225e9f1bfbd5cd5ea047fd64285b6def4f40b66827ee6f70f751c0bc25bc",
            "version": 1,
            "phased": false,
            "ecBlockId": "3601852901353591864",
            "signatureHash": "16e88e1618815d75dd4832ef1dcd965a83265074c90c51aca472ed5253983c4f",
            "attachment": {
                "name": "OOK",
                "quantityQNT": "1000000000000000",
                "description": "OOK Token",
                "version.AssetIssuance": 1,
                "decimals": 3
            },
            "senderRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
            "subtype": 0,
            "amountNQT": "0",
            "sender": "15035502555517475618",
            "ecBlockHeight": 0,
            "block": "15761948602402226210",
            "blockTimestamp": 24036799,
            "deadline": 60,
            "transaction": "15418948120526107039",
            "timestamp": 24036766,
            "height": 2
        },
        {
            "senderPublicKey": "1259ec21d31a30898d7cd1609f80d9668b4778e3d97e941044b39f0c44d2e51b",
            "signature": "7a1e1bb1207398e4cb6d78798dbfa965170a7a651d20383fe9d0cd331084d706b931ec1ac741312d0731823686d501fb6f7568757e72b34281ce450e46493c70",
            "feeNQT": "0",
            "transactionIndex": 1,
            "type": 0,
            "confirmations": 17563,
            "fullHash": "e21b5df45fa969010cf467a63a192344a69a143c92644c9343c2c0c06599da3f",
            "version": 0,
            "phased": false,
            "signatureHash": "6b7f9ca0feb1565e917581a483e0513c3d75d507f12f07581a5f91760ce11af4",
            "attachment": {
                "version.OrdinaryPayment": 0
            },
            "senderRS": "DWA-MRCC-2YLS-8M54-3CMAJ",
            "subtype": 0,
            "amountNQT": "2000000000000000",
            "sender": "1739068987193023818",
            "recipientRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
            "recipient": "15035502555517475618",
            "block": "3601852901353591864",
            "blockTimestamp": 0,
            "deadline": 0,
            "transaction": "101798696179276770",
            "timestamp": 0,
            "height": 0
        }
    ]
}

Get Guaranteed Balance

Get the guaranteed balance of an account. This is the minimum balance the account had in the interval

Amounts in unconfirmed transactions are not deduced from the result (or included to the result).

Request
• requestType is getGuaranteedBalance
• account is an account ID
• numberOfConfirmations is the minimum number of confirmations for a transaction to be included in the guaranteed balance (optional, if omitted or zero then minimally confirmed transactions are included)
• requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
• requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
Response
• guaranteedBalanceNQT (S) is the balance (in NQT) of the account with at least numberOfConfirmations confirmations
• lastBlock (S) is the last block ID on the blockchain (applies if requireBlock is provided but not requireLastBlock)
• requestProcessingTime (N) is the API request processing time (in millisec)

Get Guaranteed Balance Example

curl "http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getGuaranteedBalance&account=DWA-KQT4-X8NK-AKD6-FP8C3"\
-P "requestType=getGuaranteedBalance"
-P "account=DWA-KQT4-X8NK-AKD6-FP8C3"
{
    "guaranteedBalanceNQT": "1999999999997999",
    "requestProcessingTime": 0
}

Get Unconfirmed Transaction Ids

Get a list of unconfirmed transaction IDs associated with an account.

Request
• requestType is getUnconfirmedTransactionIds
• account is one account ID (optional)
• account is one account ID (optional)
• requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
• requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
• firstIndex is a zero-based index to the first transaction ID to retrieve (optional)
• lastIndex is a zero-based index to the last transaction ID to retrieve (optional)
Response
• unconfirmedTransactionIds (A) is an array of unconfirmed transaction IDs
• lastBlock (S) is the last block ID on the blockchain (applies if requireBlock is provided but not requireLastBlock)
• requestProcessingTime (N) is the API request processing time (in millisec)

Get Unconfirmed Transaction Ids Example

curl "http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getUnconfirmedTransactionIds&account=DWA-KQT4-X8NK-AKD6-FP8C3"
-P "requestType=getUnconfirmedTransactionIds"
-P "account=DWA-KQT4-X8NK-AKD6-FP8C3"
{
    "requestProcessingTime": 2,
    "unconfirmedTransactionIds": []
}

Get Unconfirmed Transactions

Get a list of unconfirmed transactions associated with an account.

Request
• requestType is getUnconfirmedTransactions
• account is one account ID (optional)
• account is one account ID (optional)
• requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
• requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
• firstIndex is a zero-based index to the first unconfirmed transaction to retrieve (optional)
Response
• lastIndex is a zero-based index to the last unconfirmed transaction to retrieve (optional)
• unconfirmedTransactions (A) is an array of unconfirmed transactions (refer to Get Transaction for details)
• lastBlock (S) is the last block ID on the blockchain (applies if requireBlock is provided but not requireLastBlock)
• requestProcessingTime (N) is the API request processing time (in millisec)

Get Unconfirmed Transactions Example

curl "http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getUnconfirmedTransactions&account=DWA-KQT4-X8NK-AKD6-FP8C3"
-P "requestType=getUnconfirmedTransactions"
-P "account=DWA-KQT4-X8NK-AKD6-FP8C3"
{
    "unconfirmedTransactions": [],
    "requestProcessingTime": 1
}

Search Accounts

Get accounts having a name or description that match a given query in reverse relevance order.

Request
• requestType is searchAccounts
• query is a full text query on the account fields name (S) and description (S) in the standard Lucene syntax
• firstIndex is a zero-based index to the first account to retrieve (optional)
• lastIndex is a zero-based index to the last account to retrieve (optional)
• requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
• requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
Response
• accounts (A) is an array of account objects with the following fields:
o account (S) is the account number
o accountRS (S) is the Reed-Solomon address of the account
o name (S) is the name of the account
o description (S) is the description of the account (if applicable)
• lastBlock (S) is the last block ID on the blockchain (applies if requireBlock is provided but not requireLastBlock)
• requestProcessingTime (N) is the API request processing time (in millisec)

Search Accounts Example

curl "http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=searchAccounts&query=DWA-KQT4-X8NK-AKD6-FP8C3&adminPassword=dwaAdmin"
-P "requestType=searchAccounts"
-P "query=DWA-KQT4-X8NK-AKD6-FP8C3"
-P "adminPassword=dwaAdmin"
{
    "accounts": [],
    "requestProcessingTime": 3
}

Send Money

Send NXT to an account. POST only.

Request
Refer to Create Transaction Request for common parameters.
• requestType is sendMoney
• amountNQT is the amount (in NQT) in the transaction
• recipient is the account ID of the recipient
• recipientPublicKey is the public key of the receiving account (optional, enhances security of a new account)
Response
Refer to Create Transaction Response

Send Money Example

curl "http://165.22.48.164:7876/dwa?requestType=sendMoney"
-P "requestType=sendMoney"
-P "recipient=DWA-KQT4-X8NK-AKD6-FP8C3"
-P "amountNQT=amountNQT"
-P "secretPhrase=minumdirumah"
-P "feeNQT=1000"
-P "deadline=24"
{
    "signatureHash": "500386e78366a6915d1cfdd0460f676fc9ca6bde20719f347ce6b1904ce7ee40",
    "transactionJSON": {
        "senderPublicKey": "c22d2cd58d0123a8a66353bc4ba431810b240051720cbd5e8ede9caddae1f374",
        "signature": "a1f4bdc5fb3d98a1b1f344044f0f2e5d0a1ad723591679c74b798dfde6935c04f1afc2f03a99b0a8c812d9ac180563eee16e4e7e526042a58f366a524662c8d0",
        "feeNQT": "1000",
        "type": 0,
        "fullHash": "7cb991a32117e2f5d45f46b1982e501ad52fda38e3829486a06eeca459625fc1",
        "version": 1,
        "phased": false,
        "ecBlockId": "6245170468022072342",
        "signatureHash": "500386e78366a6915d1cfdd0460f676fc9ca6bde20719f347ce6b1904ce7ee40",
        "attachment": {
            "version.OrdinaryPayment": 0
        },
        "senderRS": "DWA-K2JJ-SFYW-AKYF-4HVUA",
        "subtype": 0,
        "amountNQT": "1000",
        "sender": "2624314093293044240",
        "recipientRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
        "recipient": "15035502555517475618",
        "ecBlockHeight": 23889,
        "deadline": 24,
        "transaction": "17717749317274548604",
        "timestamp": 25666660,
        "height": 2147483647
    },
    "unsignedTransactionBytes": "001064a487011800c22d2cd58d0123a8a66353bc4ba431810b240051720cbd5e8ede9caddae1f37422db18a9e9d5a8d0e803000000000000e80300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000515d0000163437cc734dab56",
    "broadcasted": true,
    "requestProcessingTime": 4,
    "transactionBytes": "001064a487011800c22d2cd58d0123a8a66353bc4ba431810b240051720cbd5e8ede9caddae1f37422db18a9e9d5a8d0e803000000000000e8030000000000000000000000000000000000000000000000000000000000000000000000000000a1f4bdc5fb3d98a1b1f344044f0f2e5d0a1ad723591679c74b798dfde6935c04f1afc2f03a99b0a8c812d9ac180563eee16e4e7e526042a58f366a524662c8d000000000515d0000163437cc734dab56",
    "fullHash": "7cb991a32117e2f5d45f46b1982e501ad52fda38e3829486a06eeca459625fc1",
    "transaction": "17717749317274548604"
}

Set Account Info

Set account information. POST only.

Request
Refer to Create Transaction Request for common parameters.
• requestType is setAccountInfo
• name is a name to associate with the account (optional)
• description is a description to associate with the account (optional)
• messagePatternRegex is a regular expression pattern following the java.util.regex.Pattern specification; incoming transactions are only accepted if they contain a plain text message which matches this pattern (disabled indefinitely due to a security issue)
• messagePatternFlags is a bitmask of java.util.regex.Pattern flags, such as 2 (Pattern.CASE_INSENSITIVE)
Response
Refer to [[[Create_Transaction#Create_Transaction_Response

Set Account Info Example

curl "http://165.22.48.164:7876/dwa?requestType=setAccountInfo"
-P "requestType=setAccountInfo"
-P "secretPhrase=minumdirumah"
-P "feeNQT=1000"
-P "deadline= 24"
{
    "signatureHash": "56667d61b3d5ba3eabb4e9ba0a1173f42a2f1f919aced8223f6722b75bdc9d91",
    "transactionJSON": {
        "senderPublicKey": "c22d2cd58d0123a8a66353bc4ba431810b240051720cbd5e8ede9caddae1f374",
        "signature": "8c4269d18b76e2fd7d338f629d9a71f8222495670eef89c31f2eabed7edcee02baf8c7d4b0dd21716035ec07fb996a50473ee62856403b836aea3accd863a098",
        "feeNQT": "1000",
        "type": 1,
        "fullHash": "333fbc929d3a64b4aa2a9b5993085bc2ef80907cf9184cbab69864f06e551560",
        "version": 1,
        "phased": false,
        "ecBlockId": "10958209072246812116",
        "signatureHash": "56667d61b3d5ba3eabb4e9ba0a1173f42a2f1f919aced8223f6722b75bdc9d91",
        "attachment": {
            "name": "",
            "description": "",
            "version.AccountInfo": 1
        },
        "senderRS": "DWA-K2JJ-SFYW-AKYF-4HVUA",
        "subtype": 5,
        "amountNQT": "0",
        "sender": "2624314093293044240",
        "ecBlockHeight": 23894,
        "deadline": 24,
        "transaction": "12998578872944181043",
        "timestamp": 25667002,
        "height": 2147483647
    },
    "unsignedTransactionBytes": "0115baa587011800c22d2cd58d0123a8a66353bc4ba431810b240051720cbd5e8ede9caddae1f3744add89a5076a22180000000000000000e80300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000565d0000d4edbb951761139801000000",
    "broadcasted": true,
    "requestProcessingTime": 3,
    "transactionBytes": "0115baa587011800c22d2cd58d0123a8a66353bc4ba431810b240051720cbd5e8ede9caddae1f3744add89a5076a22180000000000000000e80300000000000000000000000000000000000000000000000000000000000000000000000000008c4269d18b76e2fd7d338f629d9a71f8222495670eef89c31f2eabed7edcee02baf8c7d4b0dd21716035ec07fb996a50473ee62856403b836aea3accd863a09800000000565d0000d4edbb951761139801000000",
    "fullHash": "333fbc929d3a64b4aa2a9b5993085bc2ef80907cf9184cbab69864f06e551560",
    "transaction": "12998578872944181043"
}

Set Account Property

Set account property. POST only.

Request
Refer to Create Transaction Request for common parameters.
• requestType is setAccountProperty
• recipient is the account ID of the recipient.
• property is the property name.
• value is the property value
Response
Refer to Create Transaction Response

Set Account Property Example

curl "http://165.22.48.164:7876/dwa?requestType=setAccountProperty"
-P "requestType=setAccountProperty"
-P "recipient=DWA-KQT4-X8NK-AKD6-FP8C3"
-P "property=0"
-P "secretPhrase+minumdirumah"
-P "feeNQT=1000"
-P "deadline=24"
{
    "signatureHash": "6d279f906e071fba66a36b6959f4f2f489c584a070fe1706ef6d130338864909",
    "transactionJSON": {
        "senderPublicKey": "c22d2cd58d0123a8a66353bc4ba431810b240051720cbd5e8ede9caddae1f374",
        "signature": "2c120de0bbb80093d27d5b7dbb421548049f7713eabab0d0405b2a67c253f90287c947223822e677e79d9c4e4384535cfc5855a3ea58c8bbe5b99b08c6cab560",
        "feeNQT": "1000",
        "type": 1,
        "fullHash": "4e1fd0536f78fa59c27a16fde97c5bd5a765fb7efd2ba02a33501565425bc59f",
        "version": 1,
        "phased": false,
        "ecBlockId": "11818555328984459455",
        "signatureHash": "6d279f906e071fba66a36b6959f4f2f489c584a070fe1706ef6d130338864909",
        "attachment": {
            "property": "0",
            "value": "",
            "version.AccountProperty": 1
        },
        "senderRS": "DWA-K2JJ-SFYW-AKYF-4HVUA",
        "subtype": 10,
        "amountNQT": "0",
        "sender": "2624314093293044240",
        "recipientRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
        "recipient": "15035502555517475618",
        "ecBlockHeight": 23897,
        "deadline": 24,
        "transaction": "6483627033096101710",
        "timestamp": 25667123,
        "height": 2147483647
    },
    "unsignedTransactionBytes": "011a33a687011800c22d2cd58d0123a8a66353bc4ba431810b240051720cbd5e8ede9caddae1f37422db18a9e9d5a8d00000000000000000e80300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000595d0000bf286b4e74f103a401013000",
    "broadcasted": true,
    "requestProcessingTime": 3,
    "transactionBytes": "011a33a687011800c22d2cd58d0123a8a66353bc4ba431810b240051720cbd5e8ede9caddae1f37422db18a9e9d5a8d00000000000000000e80300000000000000000000000000000000000000000000000000000000000000000000000000002c120de0bbb80093d27d5b7dbb421548049f7713eabab0d0405b2a67c253f90287c947223822e677e79d9c4e4384535cfc5855a3ea58c8bbe5b99b08c6cab56000000000595d0000bf286b4e74f103a401013000",
    "fullHash": "4e1fd0536f78fa59c27a16fde97c5bd5a765fb7efd2ba02a33501565425bc59f",
    "transaction": "6483627033096101710"
}

Start Funding Monitor

Starts a funding monitor that will transfer NXT, ASSET or CURRENCY from the funding account to a recipient account when the amount held by the recipient account drops below the threshold. The transfer will not be done until the current block height

is greater than equal to the block height of the last transfer plus the interval. The funding account is identified by the secret phrase.

The recipient accounts are identified by the specified account property (see Set Account Property). Each account that has this property set by the funding account will be monitored for changes. The property value can be omitted or it can consist of a JSON string containing one or more values in the format: {"amount":long,"threshold":long,"interval":integer} . POST only.

Request
• requestType is startFundingMonitor
• property is the name of the account property
• amount is the amount to fund the recipient account with (in NQT or QNT)
• threshold is the threshold
• interval is the the number of blocks to wait after before funding the recipient
• secretPhrase is the secret phrase of the funding account
• holdingType is a string representing the holding type (optional)
• holding is the holding ID (optional)
Response
• started (B) is true if the monitor has been started
• requestProcessingTime (N) is the API request processing time (in millisec)

Start Funding Monitor Example

curl "(POST) http://165.22.48.164:7876/dwa?requestType=startFundingMonitor"\
-P "requestType=startFundingMonitor"
-P "property=0"
-P "amount=30000"
-P "threshold=1"
-P "interval=11"
-P "secretPhrase=minumdirumah"
{
    "started": true,
    "requestProcessingTime": 12
}

Stop Funding Monitor

Stop a funding monitor. When the secret phrase is specified, a single monitor will be stopped. The monitor is identified by the secret phrase, holding and account property. The administrator password is not required and will be ignored.

When the administrator password is specified, a single monitor can be stopped by specifying the funding account, holding and account property. If no account is specified, all monitors will be stopped.

The holding type and account property name must be specified when the secret phrase or account is specified. Holding type codes are listed in getConstants. In addition, the holding identifier must be specified when the holding type is ASSET or CURRENCY. POST only.

Request
• requestType is stopFundingMonitor
• secretPhrase is the secret phrase of the funding account, used to stop a single monitor. (optional)
• adminPassword is the admin password, used to stop a single monitor or all monitors (optional if secretPhrase is provided)
• property is the name of the account property (optional)
• holdingType is a string representing the holding type (optional)
• holding is the holding ID (optional)
• account is the account ID (optional)
Response
• stopped (N) is the number of the monitors that have been stopped
• requestProcessingTime (N) is the API request processing time (in millisec)

Stop Funding Monitor Example

curl "(POST) http://165.22.48.164:7876/dwa?requestType=stopFundingMonitor"\
-P "requestType=stopFundingMonitor"
-P "property=0"
-P "secretPhrase=makandirumah"
-P "account=DWA-KQT4-X8NK-AKD6-FP8C3"
-P "adminPassword=dwaAdmin"
{
    "stopped": 1,
    "requestProcessingTime": 1
}

Delete Account Property

Deletes an account property. POST only.

Request
• requestType is deleteAccountProperty
• property is the name of the property
• recipient is the account where a property should be removed (optional)
• setter is the account who did set the property (optional)
Response
Refer to Create Transaction Response
curl "(POST) http://165.22.48.164:7876/dwa?requestType=deleteAccountProperty"
-P "requestType=deleteAccountProperty"
-P "recipient=DWA-KQT4-X8NK-AKD6-FP8C3"
-P "property=0"
-P "secretPhrase=minumdirumah"
-P "feeNQT=1000"
-P "deadline=24"
{
    "signatureHash": "2124aa252a2c01093e697de87971118a807a2185416a7cbd5c93920c762e6152",
    "transactionJSON": {
        "senderPublicKey": "c22d2cd58d0123a8a66353bc4ba431810b240051720cbd5e8ede9caddae1f374",
        "signature": "252ef649b1b0399627144b044281e0e9968175543b0c09f848a0a660d181a9033f3642e616ebeb5d3207dcedaa03b46a54f7e4ef1d374548410c7630d62265fc",
        "feeNQT": "1000",
        "type": 1,
        "fullHash": "22c315ec17d6241576a47a79707ff5cd225ea3aeceb407840eee61941615af83",
        "version": 1,
        "phased": false,
        "ecBlockId": "18172412074728577785",
        "signatureHash": "2124aa252a2c01093e697de87971118a807a2185416a7cbd5c93920c762e6152",
        "attachment": {
            "property": "6483627033096101710",
            "version.AccountPropertyDelete": 1
        },
        "senderRS": "DWA-K2JJ-SFYW-AKYF-4HVUA",
        "subtype": 11,
        "amountNQT": "0",
        "sender": "2624314093293044240",
        "recipientRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
        "recipient": "15035502555517475618",
        "ecBlockHeight": 23900,
        "deadline": 24,
        "transaction": "1523577972191511330",
        "timestamp": 25667466,
        "height": 2147483647
    },
    "unsignedTransactionBytes": "011b8aa787011800c22d2cd58d0123a8a66353bc4ba431810b240051720cbd5e8ede9caddae1f37422db18a9e9d5a8d00000000000000000e803000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005c5d0000f95a371a806031fc014e1fd0536f78fa59",
    "broadcasted": true,
    "requestProcessingTime": 4,
    "transactionBytes": "011b8aa787011800c22d2cd58d0123a8a66353bc4ba431810b240051720cbd5e8ede9caddae1f37422db18a9e9d5a8d00000000000000000e8030000000000000000000000000000000000000000000000000000000000000000000000000000252ef649b1b0399627144b044281e0e9968175543b0c09f848a0a660d181a9033f3642e616ebeb5d3207dcedaa03b46a54f7e4ef1d374548410c7630d62265fc000000005c5d0000f95a371a806031fc014e1fd0536f78fa59",
    "fullHash": "22c315ec17d6241576a47a79707ff5cd225ea3aeceb407840eee61941615af83",
    "transaction": "1523577972191511330"
}

Blocks

Get Block

Get a block object given a block ID or block height.

Request
• requestType is getBlock
• block is the block ID (optional)
• height is the block height (optional if block provided)
• timestamp is the timestamp (in seconds since the genesis block) of the block (optional if height provided)
• includeTransactions is true to include transaction details (optional)
• includeExecutedPhased is true to include approved and executed phased transactions (optional)
• requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
• requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
Response
• previousBlockHash (S) is the 32-byte hash of the previous block
• payloadLength (N) is the length (in bytes) of all transactions included in the block
• totalAmountNQT (S) is the total amount (in NQT) of the transactions in the block
• generationSignature (S) is the 32-byte generation signature of the generating account
• generator (S) is the generating account number
• generatorPublicKey (S) is the 32-byte public key of the generating account
• baseTarget (S) is the base target for the next block generation
• payloadHash (S) is the 32-byte hash of the payload (all transactions)
• generatorRS (S) is the Reed-Solomon address of the generating account
• nextBlock (S) is the next block ID
• numberOfTransactions (N) is the number of transactions in the block
• blockSignature (S) is the 64-byte block signature
• transactions (A) is an array of transaction IDs or transaction objects (if includeTransactions provided, refer to Get Transaction for details)
• executedPhasedTransactions (A) is an array of transaction IDs or transaction objects (if includeExecutedPhased provided, refer to Get Transaction for details)
• version (N) is the block version
• totalFeeNQT (S) is the total fee (in NQT) of the transactions in the block
• previousBlock (S) is the previous block ID
• cumulativeDifficulty (S) is the cumulative difficulty for the next block generation
• block (S) is the block ID
• height (N) is the zero-based block height
• timestamp (N) is the timestamp (in seconds since the genesis block) of the block
• lastBlock (S) is the last block ID on the blockchain (applies if requireBlock is provided but not requireLastBlock)
• requestProcessingTime (N) is the API request processing time (in millisec)

Get Block Example

curl ="http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getBlock&height=23545"\
-P "requestType=getBlock"
-P "height=23545"
{
    "previousBlockHash": "64a43922bbef97e6f7b1fcfa1b4cd88fe2093f52abf7b4b5b71369cbde1c8951",
    "payloadLength": 0,
    "totalAmountNQT": "0",
    "generationSignature": "db223b891ba037545815b5ed88bcee3cd59a3732310030b6b5d0891a838ab1bf",
    "generator": "15035502555517475618",
    "generatorPublicKey": "2cd98d0f6a138ef25255830cd868106adf3825b4fa24c9ced4134928d905a202",
    "baseTarget": "27518",
    "payloadHash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "generatorRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
    "nextBlock": "17516944627297869967",
    "requestProcessingTime": 0,
    "numberOfTransactions": 0,
    "blockSignature": "16e4c33ea2048ccd0e562d0b36678743f045ffa863c7875220943e7bb6139c06d31c28bed007d0c668da6cdb301c2a6da90d8a6a063ba711fad40904672df74b",
    "transactions": [],
    "version": 3,
    "totalFeeNQT": "0",
    "previousBlock": "16616012937218860132",
    "cumulativeDifficulty": "17002187796006925465",
    "block": "3163612023435519843",
    "height": 23545,
    "timestamp": 25595652
}

Get Block Id

Get a block ID given a block height.

Request
• requestType is getBlockId
• height is the block height
• requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
• requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
Response
• block (S) is the block ID
• lastBlock (S) is the last block ID on the blockchain (applies if requireBlock is provided but not requireLastBlock)
• requestProcessingTime (N) is the API request processing time (in millisec)

Get Block Id Example

curl ="http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getBlockId&height=23545"\
-p "requestType=getBlockId"
-p "height=23545"
{
    "block": "3163612023435519843",
    "requestProcessingTime": 0
} 

Get Blocks

Get blocks from the blockchain in reverse block height order.

Request
• requestType is getBlocks
• timestamp is the earliest block (in seconds since the genesis block) to retrieve (optional)
• firstIndex is first block to retrieve (optional, default is zero or the last block on the blockchain)
• lastIndex is the last block to retrieve (optional, default is firstIndex + 99)
• includeTransactions is true to include transaction details (optional)
• includeExecutedPhased is true to include approved and executed phased transactions (optional)
• requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
• requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
Response
• blocks (A) is an array of blocks retrieved (refer to Get Block for details)
• lastBlock (S) is the last block ID on the blockchain (applies if requireBlock is provided but not requireLastBlock)
• requestProcessingTime (N) is the API request processing time (in millisec)

Get Block Example

curl ="http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getBlocks&firstIndex=76&lastIndex=77"\
-P "requestType=getBlocks"
-P "firstIndex=76"
-P "lastIndex=77"
{"blocks": [
        {
            "previousBlockHash": "fe7c50e9b8b4082cb32cda903987803fb83de83c4ce467ac45379b9ff60ff82f",
            "payloadLength": 0,
            "totalAmountNQT": "0",
            "generationSignature": "bf263651f037fe12876ecf07a9d93649f980c1d0d02befbd8392d43a8680e628",
            "generator": "18182564914556605320",
            "generatorPublicKey": "4a3cd754a0459502238aaf5a75cae8c1e85044395e18ffc8972a69f6d601e361",
            "baseTarget": "22069",
            "payloadHash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
            "generatorRS": "DWA-36WA-GKCU-FAPD-HLDPS",
            "nextBlock": "498976065377243126",
            "numberOfTransactions": 0,
            "blockSignature": "41924ffa35e256596787c0e812388118004b225e25128c28861135f61a96bb045e698d7070c23eeae79a0ca3e9d6a740c0684256cecb563343e71e4cea5c478f",
            "transactions": [],
            "version": 3,
            "totalFeeNQT": "0",
            "previousBlock": "3172984643763862782",
            "cumulativeDifficulty": "15007559757367294432",
            "block": "16204984114732613638",
            "height": 20776,
            "timestamp": 25410234
        },
        {
            "previousBlockHash": "dc4af03c37597591d3e132551b00f83e464099c358911949f2b7c5b3ced8cc85",
            "payloadLength": 0,
            "totalAmountNQT": "0",
            "generationSignature": "49cc7b920e56e82022ac764dc983876a268d89cf67c335aa1c27013687a2ca18",
            "generator": "12836715814796865978",
            "generatorPublicKey": "0fa7ea9c3280631491f82f57b8fde3573ed62e8f089f4b2b969bc85f714c745d",
            "baseTarget": "22069",
            "payloadHash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
            "generatorRS": "DWA-QEFU-2Q9T-QDQN-DFBB6",
            "nextBlock": "16204984114732613638",
            "numberOfTransactions": 0,
            "blockSignature": "9ec56cc649b13968cf64d669b01ccd0e460b3185ace08ad0f3004428a8e9940daa8bdbde7144626e32dcf7d83a6f474227f49d2dc99529ad4e696f0471d62e3a",
            "transactions": [],
            "version": 3,
            "totalFeeNQT": "0",
            "previousBlock": "10481381801555151580",
            "cumulativeDifficulty": "15006723890582496320",
            "block": "3172984643763862782",
            "height": 20775,
            "timestamp": 25410202
        }
    ],
    "requestProcessingTime": 0
}

Get EC Block

Get Economic Cluster block data.

Request
• requestType is getECBlock
• timestamp is the timestamp (in seconds since the genesis block) of the EC block (optional, default (or zero) is the current timestamp)
• requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
• requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
Response
• ecBlockHeight (N) is the EC block height
• ecBlockId (S) is the EC block ID
• timestamp (N) is the timestamp (in seconds since the genesis block) of the EC block
• lastBlock (S) is the last block ID on the blockchain (applies if requireBlock is provided but not requireLastBlock)
• requestProcessingTime (N) is the API request processing time (in millisec)

Get Block Example

curl ="http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getECBlock&timestamp=241561855"\
-P "requestType=getECBlock"
-P "timestamp=241561855"
{
    "ecBlockHeight": 20137,
    "requestProcessingTime": 0,
    "ecBlockId": "9559657109279680989",
    "timestamp": 241561855
}

Transactions

Broadcast Transaction

Broadcast a transaction to the network. POST only.

Request:
• requestType is broadcastTransaction
• transactionBytes is the bytecode of a signed transaction (optional)
• transactionJSON is the transaction object (optional if transactionBytes provided)
• prunableAttachmentJSON is the attachment object embedded in transactionJSON containing a prunable message (required if transactionJSON not provided because transactionBytes never includes prunable data)
Response:
• requestProcessingTime (N) is the API request processing time (in millisec)
• fullHash (S) is the full hash of the signed transaction
• transaction (S) is the transaction ID

Broadcast Transaction Example

curl ="(POST)://165.22.48.164:7876/dwa?requestType=broadcastTransaction"
-P "requestType=broadcastTransaction"
-P "transactionBytes=011a1ea6800101002cd98d0f6a138ef25255830cd868106adf3825b4fa24c9ced4134928d905a20222db18a9e9d5a8d00000000000000000e80300000000000000000000000000000000000000000000000000000000000000000000000000005d9bbd5b256a4a1877398c1ee30f284af44b44d8752800f1a0ce16d2a46b4b039d6b7c6563a09a06c43be7d9795885fac8c3733a628c4b187e3a5e81d415049e0000000034420000019eac6356c1b7410101300131"
{
  "requestProcessingTime": 0,
  "fullHash": "efd4e91ca0e4229c5ad11c27d62e56df5058ab9326919652a1f2cfb1138de57f",
  "transaction": "11250806195455907055"
}

Calculate Full Hash

Calculate the full hash of a transaction.

Request:
• requestType is calculateFullHash
• unsignedTransactionJSON is the unsigned transaction JSON object (optional)
• unsignedTransactionBytes are the unsigned bytes of a transaction (optional if unsignedTransactionJSON is provided)
• signatureHash is a SHA-256 hash of the transaction signature
Response:
• requestProcessingTime (N) is the API request processing time (in millisec)
• fullHash (S) is the full hash of the signed transaction

Calculate Full Hash Example

curl = "(GET)http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=calculateFullHash&unsignedTransactionBytes=011a1ea6800101002cd98d0f6a138ef25255830cd868106adf3825b4fa24c9ced4134928d905a20222db18a9e9d5a8d00000000000000000e80300000000000000000000000000000000000000000000000000000000000000000000000000005d9bbd5b256a4a1877398c1ee30f284af44b44d8752800f1a0ce16d2a46b4b039d6b7c6563a09a06c43be7d9795885fac8c3733a628c4b187e3a5e81d415049e0000000034420000019eac6356c1b7410101300131&signatureHash=5d9bbd5b256a4a1877398c1ee30f284af44b44d8752800f1a0ce16d2a46b4b039d6b7c6563a09a06c43be7d9795885fac8c3733a628c4b187e3a5e81d415049e"
-P "requestType=calculateFullHash"
-P "unsignedTransactionBytes=011a1ea6800101002cd98d0f6a138ef25255830cd868106adf3825b4fa24c9ced4134928d905a20222db18a9e9d5a8d00000000000000000e80300000000000000000000000000000000000000000000000000000000000000000000000000005d9bbd5b256a4a1877398c1ee30f284af44b44d8752800f1a0ce16d2a46b4b039d6b7c6563a09a06c43be7d9795885fac8c3733a628c4b187e3a5e81d415049e0000000034420000019eac6356c1b7410101300131"
-P "signatureHash=5d9bbd5b256a4a1877398c1ee30f284af44b44d8752800f1a0ce16d2a46b4b039d6b7c6563a09a06c43be7d9795885fac8c3733a628c4b187e3a5e81d415049e"
{
"requestProcessingTime": 1,
"fullHash": "f738129cf07a186649c8793cc2bde940069cde8dcc39d9c0fcfb4106f3dbec71"
}

Get Expected Transactions

Returns the non-phased unconfirmed transactions expected to be included in the next block (only), plus the phased transactions scheduled to finish in that block (whether approved or not).

Request:
• requestType is getExpectedTransactions
• account is one account ID (optional)
• account is one account ID (optional)
• requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
• requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
Response:
• expectedTransactions (A) is an array of expected transactions (refer to Get Transaction for details)
• requestProcessingTime (N) is the API request processing time (in millisec)

Get Expected Transactions Example

curl="(GET)http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getExpectedTransactions&account=DWA-KQT4-X8NK-AKD6-FP8C3"
-P "requestType=getExpectedTransactions"
-P "account=DWA-KQT4-X8NK-AKD6-FP8C3"
{
"expectedTransactions": [],
"requestProcessingTime": 2
}

Get Referencing Transactions

Gets the transactions referencing a given transaction id.

Request:
• requestType is getReferencingTransactions
• transaction is one transaction ID
• firstIndex is a zero-based index to the first block ID to retrieve (optional)
• lastIndex is a zero-based index to the last block ID to retrieve (optional)
• requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
• requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
Response:
• transactions (A) is an array of transactions (refer to Get Transaction for details)
• requestProcessingTime (N) is the API request processing time (in millisec)

Get Referencing Transactions Example

curl="(GET) http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getReferencingTransactions&transaction=11250806195455907055"

-P "requestType=getReferencingTransactions"
-P "transaction=11250806195455907055"
{
"requestProcessingTime": 0,
"transactions": []
}

Get Transaction

Get a transaction object given a transaction ID.

Request:
• requestType is getTransaction
• transaction is the transaction ID (optional)
• fullHash is the full hash of the transaction (optional if transaction ID is provided)
• includePhasingResult is true to retrieve execution status of each phased transaction (optional)
• requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
• requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
Response:
• sender (S) is the account ID of the sender
• senderRS (S) is the Reed-Solomon address of the sender
• feeNQT (S) is the fee (in NQT) of the transaction
• amountNQT (S) is the amount (in NQT) of the transaction
• transactionIndex (N) is a zero-based index giving the order of the transaction in its block
• timestamp (N) is the time (in seconds since the genesis block) of the transaction
• referencedTransactionFullHash (S) is the full hash of a transaction referenced by this one, omitted if no previous transaction is referenced
• confirmations (N) is the number of transaction confirmations
• subtype (N) is the transaction subtype (refer to Get Constants for a current list of subtypes)
• block (S) is the ID of the block containing the transaction
• blockTimestamp (N) is the timestamp (in seconds since the genesis block) of the block
• height (N) is the height of the block in the blockchain
• senderPublicKey (S) is the public key of the sending account for the transaction
• type (N) is the transaction type (refer to Get Constants for a current list of types)
• deadline (N) is the deadline (in minutes) for the transaction to be confirmed
• signature (S) is the digital signature of the transaction
• recipient (S) is the account number of the recipient, if applicable
• recipientRS (S) is the Reed-Solomon address of the recipient, if applicable
• fullHash (S) is the full hash of the signed transaction
• signatureHash (S) is a SHA-256 hash of the transaction signature
• approved (B) is a boolean indicating if the transaction is approved (only included when includePhasingResult is true and the transaction is phased)
• result (S) is a string containing the result of the transaction (only included when includePhasingResult is true and the transaction is phased)
• executionHeight (N) is the height the transaction was executed (only included when includePhasingResult is true and the transaction is phased)
• transaction (S) is the transaction ID
• version (N) is the transaction version number
• phased (B) is true if the transaction is phased, false otherwise
• ecBlockId (N) is the economic clustering block ID
• ecBlockHeight (N) is the economic clustering block height
• attachment (O) is an object containing any additional data needed for the transaction, if applicable
• lastBlock (S) is the last block ID on the blockchain (applies if requireBlock is provided but not requireLastBlock)
• requestProcessingTime (N) is the API request processing time (in millisec)

Get Transaction Example

crul ="(GET) http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getTransaction&transaction=11641969357956393211"
- P "requestType=getTransaction"
- P "transaction=11641969357956393211"
{
"senderPublicKey": "c22d2cd58d0123a8a66353bc4ba431810b240051720cbd5e8ede9caddae1f374",
"signature": "14ccfe7444eb07fd5ece40809aefd6381f39bce397fef975fa053f182357ea067c1cd6bd9029e3ceb3762b9f2627d453da78161adb625493ad536523d600c041",
"feeNQT": "1000",
"transactionIndex": 0,
"requestProcessingTime": 0,
"type": 4,
"confirmations": 71,
"fullHash": "fb28f902739590a1912bab66c958714fa8e8b9ec57c248645c9648cd0875a0b6",
"version": 1,
"phased": false,
"ecBlockId": "7447561837090630062",
"signatureHash": "2e27e5262eaaf67470d0251e460c485ef8b3994f4baeef470b5a16631d0e7e47",
"attachment": {
"version.SetPhasingOnly": 1,
"controlMaxFees": "0",
"controlMinDuration": 0,
"controlMaxDuration": 0,
"phasingControlParams": {
"phasingHolding": "0",
"phasingQuorum": 1,
"phasingMinBalance": 0,
"phasingMinBalanceModel": 0,
"phasingVotingModel": 1
}
},
"senderRS": "DWA-K2JJ-SFYW-AKYF-4HVUA",
"subtype": 1,
"amountNQT": "0",
"sender": "2624314093293044240",
"ecBlockHeight": 23906,
"block": "15315123364240448846",
"blockTimestamp": 25667883,
"deadline": 24,
"transaction": "11641969357956393211",
"timestamp": 25667846,
"height": 24627
}

Get Transaction Bytes

Get the bytecode of a transaction.

Request:
• requestType is getTransactionBytes
• transaction is a transaction ID
• requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
• requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
Response:
• confirmations (N) is the number of transaction confirmations
• transactionBytes (S) are the bytes contained in the transaction
• unsignedTransactionBytes (S) are the unsigned bytes contained in the transaction
• prunableAttachmentJSON (O) is the prunable attachment JSON object, if applicable, because transactionBytes never includes prunable data
• lastBlock (S) is the last block ID on the blockchain (applies if requireBlock is provided but not requireLastBlock)
• requestProcessingTime (N) is the API request processing time (in millisec)

Get Transaction Bytes Example

curl="(GET) http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getTransactionBytes&transaction=11250806195455907055"
-P "requestType=getTransactionBytes"
-P "transaction=11250806195455907055"
{
"unsignedTransactionBytes": "011a1ea6800101002cd98d0f6a138ef25255830cd868106adf3825b4fa24c9ced4134928d905a20222db18a9e9d5a8d00000000000000000e8030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034420000019eac6356c1b7410101300131",
"requestProcessingTime": 0,
"confirmations": 3861,
"transactionBytes": "011a1ea6800101002cd98d0f6a138ef25255830cd868106adf3825b4fa24c9ced4134928d905a20222db18a9e9d5a8d00000000000000000e80300000000000000000000000000000000000000000000000000000000000000000000000000005d9bbd5b256a4a1877398c1ee30f284af44b44d8752800f1a0ce16d2a46b4b039d6b7c6563a09a06c43be7d9795885fac8c3733a628c4b187e3a5e81d415049e0000000034420000019eac6356c1b7410101300131"
}

Parse Transaction

Get a transaction object given a (signed or unsigned) transaction bytecode, or re-parse a transaction object. Verify the signature.

Request:
• requestType is parseTransaction
• transactionBytes is the signed or unsigned bytecode of the transaction (optional)
• transactionJSON is the transaction object (optional if transactionBytes is included)
• requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
• requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
Response: Refer to Get Transaction for additional fields.
• verify (B) is true if the signature is verified, false otherwise

Parse Transaction Example shell curl="(GET) http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=parseTransaction&transactionBytes=011a1ea6800101002cd98d0f6a138ef25255830cd868106adf3825b4fa24c9ced4134928d905a20222db18a9e9d5a8d00000000000000000e80300000000000000000000000000000000000000000000000000000000000000000000000000005d9bbd5b256a4a1877398c1ee30f284af44b44d8752800f1a0ce16d2a46b4b039d6b7c6563a09a06c43be7d9795885fac8c3733a628c4b187e3a5e81d415049e0000000034420000019eac6356c1b7410101300131" -P "requestType=parseTransaction" -P "transactionBytes=011a1ea6800101002cd98d0f6a138ef25255830cd868106adf3825b4fa24c9ced4134928d905a20222db18a9e9d5a8d00000000000000000e80300000000000000000000000000000000000000000000000000000000000000000000000000005d9bbd5b256a4a1877398c1ee30f284af44b44d8752800f1a0ce16d2a46b4b039d6b7c6563a09a06c43be7d9795885fac8c3733a628c4b187e3a5e81d415049e0000000034420000019eac6356c1b7410101300131"

{
"senderPublicKey": "2cd98d0f6a138ef25255830cd868106adf3825b4fa24c9ced4134928d905a202",
"signature": "5d9bbd5b256a4a1877398c1ee30f284af44b44d8752800f1a0ce16d2a46b4b039d6b7c6563a09a06c43be7d9795885fac8c3733a628c4b187e3a5e81d415049e",
"feeNQT": "1000",
"requestProcessingTime": 1,
"type": 1,
"fullHash": "efd4e91ca0e4229c5ad11c27d62e56df5058ab9326919652a1f2cfb1138de57f",
"version": 1,
"phased": false,
"ecBlockId": "4735466109986971137",
"signatureHash": "2c7290e52faacd96ae17a27aa2e24ef345abf8c5467d9c69244d8cfcc3388568",
"attachment": {
"property": "0",
"value": "1",
"version.AccountProperty": 1
},
"senderRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
"subtype": 10,
"amountNQT": "0",
"sender": "15035502555517475618",
"recipientRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
"recipient": "15035502555517475618",
"ecBlockHeight": 16948,
"verify": true,
"deadline": 1,
"transaction": "11250806195455907055",
"timestamp": 25208350,
"height": 2147483647
}

Retrieve Pruned Transaction

Force retrieval of the prunable data for a given transaction, even if past the configured nxt.maxPrunableLifetime.

Request:
• requestType is retrievePrunedTransaction
• transaction is transaction ID
Response: Refer to Get Transaction for fields.

Retrieve Pruned Transaction Example

curl="(POST) http://165.22.48.164:7876/dwa?requestType=retrievePrunedTransaction"
-P "requestType: retrievePrunedTransaction"
-P "transaction: 11250806195455907055"
{
"signature": "5d9bbd5b256a4a1877398c1ee30f284af44b44d8752800f1a0ce16d2a46b4b039d6b7c6563a09a06c43be7d9795885fac8c3733a628c4b187e3a5e81d415049e",
"transactionIndex": 0,
"type": 1,
"phased": false,
"ecBlockId": "4735466109986971137",
"signatureHash": "2c7290e52faacd96ae17a27aa2e24ef345abf8c5467d9c69244d8cfcc3388568",
"attachment": {
"property": "0",
"value": "1",
"version.AccountProperty": 1
},
"senderRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
"subtype": 10,
"amountNQT": "0",
"recipientRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
"block": "5303130298842033851",
"blockTimestamp": 25208402,
"deadline": 1,
"timestamp": 25208350,
"height": 17669,
"senderPublicKey": "2cd98d0f6a138ef25255830cd868106adf3825b4fa24c9ced4134928d905a202",
"feeNQT": "1000",
"requestProcessingTime": 1,
"confirmations": 3838,
"fullHash": "efd4e91ca0e4229c5ad11c27d62e56df5058ab9326919652a1f2cfb1138de57f",
"version": 1,
"sender": "15035502555517475618",
"recipient": "15035502555517475618",
"ecBlockHeight": 16948,
"transaction": "11250806195455907055"
}

Send Transaction

It broadcasts a transaction to the network without validating it, without re-broadcasting it and without adding it locally as unconfirmed transaction. Specially intended for roaming or light clients to send transactions to remote peers. POST only.

Request:
• requestType is sendTransaction
• transactionBytes is the bytecode of a signed transaction (optional)
• transactionJSON is the transaction object (optional if transactionBytes provided)
• prunableAttachmentJSON is the attachment object embedded in transactionJSON containing a prunable message (required if transactionJSON not provided because transactionBytes never includes prunable data)
• adminPassword is a string with the admin password (optional)
Response:
• requestProcessingTime (N) is the API request processing time (in millisec)
• fullHash (S) is the full hash of the signed transaction
• transaction (S) is the transaction ID

Send Transaction Example

curl="(POST) http://165.22.48.164:7876/dwa?requestType=sendTransaction"
-P "requestType: sendTransaction"
-P "transactionBytes: 011a1ea6800101002cd98d0f6a138ef25255830cd868106adf3825b4fa24c9ced4134928d905a20222db18a9e9d5a8d00000000000000000e80300000000000000000000000000000000000000000000000000000000000000000000000000005d9bbd5b256a4a1877398c1ee30f284af44b44d8752800f1a0ce16d2a46b4b039d6b7c6563a09a06c43be7d9795885fac8c3733a628c4b187e3a5e81d415049e0000000034420000019eac6356c1b7410101300131"
-P "adminPassword: dwaAdmin"
{
"requestProcessingTime": 0,
"fullHash": "efd4e91ca0e4229c5ad11c27d62e56df5058ab9326919652a1f2cfb1138de57f",
"transaction": "11250806195455907055"
}

Sign Transaction

Calculates the full hash, signature hash, and transaction ID of an unsigned transaction.

Request:
• requestType is signTransaction
• unsignedTransactionJSON is the transactionJSON field of the transaction, without a signature subfield
• unsignedTransactionBytes is the unsignedTransactionBytes field of the transaction (optional, if unsignedTransactionJSON provided)
• prunableAttachmentJSON is a prunable attachment JSON object, if applicable, because unsignedTransactionBytes never includes prunable data (optional if the transaction has already been broadcast and the prunable message can still be retrieved from the database)
• secretPhrase is the secret passphrase of the signing account
• validate is false to skip validation of the transaction bytes being signed (useful on nodes where the full blockchain is not downloaded)
• requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
• requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
Response:
• signatureHash (S) is a SHA-256 hash of the transaction signature, used in escrow transactions
• verify (B) is true the signature is verified, false if not
• transactionJSON (O) is the signed transaction JSON object
• transactionBytes (S) are the signed transaction bytes
• fullHash (S) is the full hash of the signed transaction
• prunableAttachmentJSON (O) is the prunable attachment JSON object, if applicable, because transactionBytes never includes prunable data
• transaction (S) is the transaction ID, derived from the fullHash
• lastBlock (S) is the last block ID on the blockchain (applies if requireBlock is provided but not requireLastBlock)
• requestProcessingTime (N) is the API request processing time (in millisec)

Sign Transaction Example

curl="(GET) http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=signTransaction&unsignedTransactionBytes=011a1ea6800101002cd98d0f6a138ef25255830cd868106adf3825b4fa24c9ced4134928d905a20222db18a9e9d5a8d00000000000000000e8030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034420000019eac6356c1b7410101300131&secretPhrase=makandirumah"
-P "requestType=signTransaction"
-P "unsignedTransactionBytes=011a1ea6800101002cd98d0f6a138ef25255830cd868106adf3825b4fa24c9ced4134928d905a20222db18a9e9d5a8d00000000000000000e8030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034420000019eac6356c1b7410101300131"
-P "secretPhrase=makandirumah"
{
"signatureHash": "2c7290e52faacd96ae17a27aa2e24ef345abf8c5467d9c69244d8cfcc3388568",
"transactionJSON": {
"senderPublicKey": "2cd98d0f6a138ef25255830cd868106adf3825b4fa24c9ced4134928d905a202",
"signature": "5d9bbd5b256a4a1877398c1ee30f284af44b44d8752800f1a0ce16d2a46b4b039d6b7c6563a09a06c43be7d9795885fac8c3733a628c4b187e3a5e81d415049e",
"feeNQT": "1000",
"type": 1,
"fullHash": "efd4e91ca0e4229c5ad11c27d62e56df5058ab9326919652a1f2cfb1138de57f",
"version": 1,
"phased": false,
"ecBlockId": "4735466109986971137",
"signatureHash": "2c7290e52faacd96ae17a27aa2e24ef345abf8c5467d9c69244d8cfcc3388568",
"attachment": {
"property": "0",
"value": "1",
"version.AccountProperty": 1
},
"senderRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
"subtype": 10,
"amountNQT": "0",
"sender": "15035502555517475618",
"recipientRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
"recipient": "15035502555517475618",
"ecBlockHeight": 16948,
"deadline": 1,
"transaction": "11250806195455907055",
"timestamp": 25208350,
"height": 2147483647
},
"verify": true,
"requestProcessingTime": 2,
"transactionBytes": "011a1ea6800101002cd98d0f6a138ef25255830cd868106adf3825b4fa24c9ced4134928d905a20222db18a9e9d5a8d00000000000000000e80300000000000000000000000000000000000000000000000000000000000000000000000000005d9bbd5b256a4a1877398c1ee30f284af44b44d8752800f1a0ce16d2a46b4b039d6b7c6563a09a06c43be7d9795885fac8c3733a628c4b187e3a5e81d415049e0000000034420000019eac6356c1b7410101300131",
"fullHash": "efd4e91ca0e4229c5ad11c27d62e56df5058ab9326919652a1f2cfb1138de57f",
"transaction": "11250806195455907055"
}

Aliases

Buy / Sell Alias

Buy or sell an alias. POST only.

Request
• requestType is either buyAlias or sellAlias
• alias is the ID of the alias (optional)
• aliasName is the alias name (optional if alias provided)
• priceNQT is the asking price (in NQT) of the alias (sellAlias only)
• amountNQT is the amount (in NQT) offered for an alias for sale (buyAlias only)
• recipient is the account ID of the recipient (only required for sellAlias and only if there is a designated recipient)
• recipientPublicKey is the public key of the recipient account (only applicable if recipient provided; optional, enhances security of a new account)
Response:
Refer to Create Transaction Response.

Buy / Sell Alias Example

curl ="http://165.22.48.164:7876/dwa?requestType=sellAlias"\
-P "requestType: sellAlias"
-P "aliasName: Aku"
-P "recipient: DWA-KQT4-X8NK-AKD6-FP8C3"
-P "priceNQT: 10"
-P "secretPhrase: minumdirumah"
-P "feeNQT: 1000"
-P "deadline: 24"
{"signatureHash": "70ba4b86d3b5469f2876091414d730cd09981b47d4c59da68eb279604eac1a77",
    "transactionJSON": {
        "senderPublicKey": "c22d2cd58d0123a8a66353bc4ba431810b240051720cbd5e8ede9caddae1f374",
        "signature": "1499b6765aa6dca38e7e3c57c413de1090ee259e57f767ffb2224e5e75915701e86feaa9da350fb932679b22da637cd6aae0c2e39a3c0fc32e34644adf4e5e85",
        "feeNQT": "1000",
        "type": 1,
        "fullHash": "6471e9ed65f2f99737b106b09a239efe0fa39cf64cf2590d49c7f493cf1b8231",
        "version": 1,
        "phased": false,
        "ecBlockId": "3658733398238130159",
        "signatureHash": "70ba4b86d3b5469f2876091414d730cd09981b47d4c59da68eb279604eac1a77",
        "attachment": {
            "priceNQT": "10",
            "alias": "Aku",
            "version.AliasSell": 1
        },
        "senderRS": "DWA-K2JJ-SFYW-AKYF-4HVUA",
        "subtype": 6,
        "amountNQT": "0",
        "sender": "2624314093293044240",
        "recipientRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
        "recipient": "15035502555517475618",
        "ecBlockHeight": 23832,
        "deadline": 24,
        "transaction": "10951050488525189476",
        "timestamp": 25662260,
        "height": 2147483647
    },
    "unsignedTransactionBytes": "0116349387011800c22d2cd58d0123a8a66353bc4ba431810b240051720cbd5e8ede9caddae1f37422db18a9e9d5a8d00000000000000000e80300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000185d0000ef6fd711a46ec6320103416b750a00000000000000",
    "broadcasted": true,
    "requestProcessingTime": 5,
    "transactionBytes": "0116349387011800c22d2cd58d0123a8a66353bc4ba431810b240051720cbd5e8ede9caddae1f37422db18a9e9d5a8d00000000000000000e80300000000000000000000000000000000000000000000000000000000000000000000000000001499b6765aa6dca38e7e3c57c413de1090ee259e57f767ffb2224e5e75915701e86feaa9da350fb932679b22da637cd6aae0c2e39a3c0fc32e34644adf4e5e8500000000185d0000ef6fd711a46ec6320103416b750a00000000000000",
    "fullHash": "6471e9ed65f2f99737b106b09a239efe0fa39cf64cf2590d49c7f493cf1b8231",
    "transaction": "10951050488525189476"
}

Buy Alias

Refer to Buy / Sell Alias.

Sell Alias

Refer to Buy / Sell Alias.

Set Alias

Create and/or assign an alias. POST only.

Request:
• requestType is setAlias
• aliasName is the alias name
• aliasURI is the alias URI (e.g. http://www.google.com/)
Refer to Create Transaction Request for common parameters.
Response:
Refer to Create Transaction Response. The transaction ID is also the alias ID.

Set Alias Example

curl ="http://165.22.48.164:7876/dwa?requestType=setAlias"\
-P "requestType: setAlias"
-P "aliasName: myali"
-P "aliasURI: http://165.22.48.164:7876/"
-P "secretPhrase: minumdirumah"
-P "feeNQT: 1000000"
-P "deadline: 24"
{    "signatureHash": "c5515a358d6fa44d76880bcea1f6160d4c1fb945f1c90208fc3fca785bee2654",
    "transactionJSON": {
        "senderPublicKey": "c22d2cd58d0123a8a66353bc4ba431810b240051720cbd5e8ede9caddae1f374",
        "signature": "f846b9b2d913cb6277bdb6325dcca0cb88526ca5edceef29b106b21746915a0285f6f39746612cb5f9928e7e2bac697605bfe002dc677cb8b493a64915ef12dc",
        "feeNQT": "1000000",
        "type": 1,
        "fullHash": "d2178cc7c3d2fdcdcd70a19a10130426f6f02117c299670a63e7a7c84e49debf",
        "version": 1,
        "phased": false,
        "ecBlockId": "11066648275888307580",
        "signatureHash": "c5515a358d6fa44d76880bcea1f6160d4c1fb945f1c90208fc3fca785bee2654",
        "attachment": {
            "alias": " myali",
            "version.AliasAssignment": 1,
            "uri": "http://165.22.48.164:7876/"
        },
        "senderRS": "DWA-K2JJ-SFYW-AKYF-4HVUA",
        "subtype": 1,
        "amountNQT": "0",
        "sender": "2624314093293044240",
        "ecBlockHeight": 23828,
        "deadline": 24,
        "transaction": "14843251685191325650",
        "timestamp": 25661792,
        "height": 2147483647
    },
    "unsignedTransactionBytes": "0111609187011800c22d2cd58d0123a8a66353bc4ba431810b240051720cbd5e8ede9caddae1f3744add89a5076a2218000000000000000040420f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000145d00007cfd822af9a194990103416b751a00687474703a2f2f3136352e32322e34382e3136343a373837362f",
    "broadcasted": true,
    "requestProcessingTime": 3,
    "transactionBytes": "0111609187011800c22d2cd58d0123a8a66353bc4ba431810b240051720cbd5e8ede9caddae1f3744add89a5076a2218000000000000000040420f00000000000000000000000000000000000000000000000000000000000000000000000000f846b9b2d913cb6277bdb6325dcca0cb88526ca5edceef29b106b21746915a0285f6f39746612cb5f9928e7e2bac697605bfe002dc677cb8b493a64915ef12dc00000000145d00007cfd822af9a194990103416b751a00687474703a2f2f3136352e32322e34382e3136343a373837362f",
    "fullHash": "d2178cc7c3d2fdcdcd70a19a10130426f6f02117c299670a63e7a7c84e49debf",
    "transaction": "14843251685191325650"
}

Delete Alias

Delete an alias given an alias ID or name. POST only.

Request
• requestType is deleteAlias
• alias is the alias ID (optional)
• aliasName is the alias name to be deleted (optional if alias provided)

Response: Refer to Create Transaction Response.

Delete Alias Example

curl ="http://165.22.48.164:7876/dwa?requestType=deleteAlias"\
-P "requestType: deleteAlias"
-P "aliasName: Aku"
-P "secretPhrase: minumdirumah"
-P "feeNQT: 1000"
-P "deadline: 24"
{"signatureHash": "1c62c6df402c4730a7303ac3d4eca020af75181d080be97c6c447d77c80e10ef",
    "transactionJSON": {
        "senderPublicKey": "c22d2cd58d0123a8a66353bc4ba431810b240051720cbd5e8ede9caddae1f374",
        "signature": "29b1a1f6b0c38b1e1cfa1fa8a34aa07e64e672aa6323f3a763e018f860b9ab0663eb051aff4ca5fc5b6896664c62a2c7930679d267f5d2488d16387631a827dc",
        "feeNQT": "1000",
        "type": 1,
        "fullHash": "2f2fcfff0da8228c694d95e8068befe5e3078e8378f871460c40ce428bd3e995",
        "version": 1,
        "phased": false,
        "ecBlockId": "14367234386897990065",
        "signatureHash": "1c62c6df402c4730a7303ac3d4eca020af75181d080be97c6c447d77c80e10ef",
        "attachment": {
            "version.AliasDelete": 1,
            "alias": "Aku"
        },
        "senderRS": "DWA-K2JJ-SFYW-AKYF-4HVUA",
        "subtype": 8,
        "amountNQT": "0",
        "sender": "2624314093293044240",
        "ecBlockHeight": 23838,
        "deadline": 24,
        "transaction": "10097818092597882671",
        "timestamp": 25662980,
        "height": 2147483647
    },
    "unsignedTransactionBytes": "0118049687011800c22d2cd58d0123a8a66353bc4ba431810b240051720cbd5e8ede9caddae1f3744add89a5076a22180000000000000000e803000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e5d0000b1f1d4d38dab62c70103416b75",
    "broadcasted": true,
    "requestProcessingTime": 4,
    "transactionBytes": "0118049687011800c22d2cd58d0123a8a66353bc4ba431810b240051720cbd5e8ede9caddae1f3744add89a5076a22180000000000000000e803000000000000000000000000000000000000000000000000000000000000000000000000000029b1a1f6b0c38b1e1cfa1fa8a34aa07e64e672aa6323f3a763e018f860b9ab0663eb051aff4ca5fc5b6896664c62a2c7930679d267f5d2488d16387631a827dc000000001e5d0000b1f1d4d38dab62c70103416b75",
    "fullHash": "2f2fcfff0da8228c694d95e8068befe5e3078e8378f871460c40ce428bd3e995",
    "transaction": "10097818092597882671"
}

Get Alias

Get information about a given alias

Request
• requestType is getAlias
• alias is the alias ID (optional)
• aliasName is the name of the alias (optional if alias provided)
• requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
• requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
Response
• timestamp (N) is the time (in seconds since the genesis block) when the alias was created or last transferred
• aliasName (S) is the name of the alias
• account (S) is the number of the account that owns the alias
• accountRS (S) is the Reed-Solomon address of the account that owns the alias
• aliasURI (S) is what the alias points to, in URI format
• alias (S) is the alias ID
• priceNQT (S) is the asking price (in NQT) of the alias if it is for sale
• buyer (S) is the account number of the buyer if the alias is for sale and a buyer is specified
• lastBlock (S) is the last block ID on the blockchain (applies if requireBlock is provided but not requireLastBlock)
• requestProcessingTime (N) is the API request processing time (in millisec)

Get Alias Example

curl ="http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getAlias&aliasName=aliasku"\
-P "requestType=getAlias"
-P "aliasName=aliasku"
{    "aliasURI": "http://165.22.48.164:7876/",
    "aliasName": "aliasku",
    "accountRS": "DWA-K2JJ-SFYW-AKYF-4HVUA",
    "alias": "16585128267457528818",
    "requestProcessingTime": 1,
    "account": "2624314093293044240",
    "timestamp": 25663201
}

Get Alias Count

Get the number of aliases owned by an account given the account ID.

Request
• requestType is getAliasCount
• account is the account ID
• requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
• requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
Response
• numberOfAliases (N) is the number of aliases owned by the account
• lastBlock (S) is the last block ID on the blockchain (applies if requireBlock is provided but not requireLastBlock)
• requestProcessingTime (N) is the API request processing time (in millisec)

Get Alias Count Example

curl ="http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getAliasCount&account=DWA-K2JJ-SFYW-AKYF-4HVUA"\
-P "requestType=getAliasCount"
-P "account=DWA-K2JJ-SFYW-AKYF-4HVUA"
{
     "numberOfAliases": 1,
    "requestProcessingTime": 0
}

Get Aliases

Get information on aliases owned by a given account in alias name order.

Request
• requestType is getAliases
• account is the ID of the account that owns the aliases
• timestamp is the earliest creation time (in seconds since the genesis block) of the aliases (optional)
• firstIndex is a zero-based index to the first alias to retrieve (optional)
• lastIndex is a zero-based index to the last alias to retrieve (optional)
• requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
• requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
Response
• aliases (A) is an array of alias objects (refer to Get Alias for details)
• lastBlock (S) is the last block ID on the blockchain (applies if requireBlock is provided but not requireLastBlock)
• requestProcessingTime (N) is the API request processing time (in millisec)

Get Aliases Example

curl ="http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getAliases&account=DWA-K2JJ-SFYW-AKYF-4HVUA"\
-P "requestType=getAliases"
-P "account=DWA-K2JJ-SFYW-AKYF-4HVUA"
{
   "aliases": [
        {
            "aliasURI": "http://165.22.48.164:7876/",
            "aliasName": "aliasku",
            "accountRS": "DWA-K2JJ-SFYW-AKYF-4HVUA",
            "alias": "16585128267457528818",
            "account": "2624314093293044240",
            "timestamp": 25663201
        }
    ],
    "requestProcessingTime": 1
}

Get Aliases Like

Get all aliases starting with a given prefix in alias name order.

Request
• requestType is getAliasesLike
• aliasPrefix is the prefix (at least 2 characters long) of the aliasName
• firstIndex is a zero-based index to the first alias to retrieve (optional)
• lastIndex is a zero-based index to the last alias to retrieve (optional)
• requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
• requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
Response
• aliases (A) is an array of alias objects (refer to Get Alias for details)
• lastBlock (S) is the last block ID on the blockchain (applies if requireBlock is provided but not requireLastBlock)
• requestProcessingTime (N) is the API request processing time (in millisec)

Get Aliases Like Example

curl ="http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getAliasesLike&aliasPrefix=ali"\
-P "requestType=getAliasesLike"
-P "aliasPrefix=ali"
{
    "aliases": [
        {
            "aliasURI": "http://165.22.48.164:7876/",
            "aliasName": "aliasku",
            "accountRS": "DWA-K2JJ-SFYW-AKYF-4HVUA",
            "alias": "16585128267457528818",
            "account": "2624314093293044240",
            "timestamp": 25663201
        }
    ],
    "requestProcessingTime": 1
}

Forging

Start / Stop / Get Forging

Start or stop forging with an account or check to see if an account is forging. POST only.

Request:
• requestType is either startForging, stopForging or getForging
• secretPhrase is the secret passphrase of the account (optional for stopForging and getForging if password protected like the Debug Operations)
Response:
• deadline (N) is the estimated time (in seconds since the last block) until the account will forge a block (startForging and getForging only)
• hitTime (N) is the estimated time (in seconds since the genesis block) when the account will forge a block (startForging and getForging only)
• remaining (N) is the deadline less the elapsed time since the last block (getForging only)
• foundAndStopped (B) is true if forging was stopped, false if forging was already stopped (stopForging only)
• account (S) is the account number (getForging only)
• accountRS (S) is the Reed-Solomon address of the account (getForging only)
• requestProcessingTime (N) is the API request processing time (in millisec)

Get Forging

Refer to Start / Stop / Get Forging.

Get Forging Example

curl="(GET) http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getForging&secretPhrase=makandirumah&adminPassword=dwaAdmin"
-P "requestType=getForging"
-P "secretPhrase=makandirumah"
-P "adminPassword=dwaAdmin"
{
  "accountRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
  "requestProcessingTime": 1,
  "deadline": 351,
  "account": "15035502555517475618",
  "remaining": 319,
  "hitTime": 25658372
}

Start Forging

Refer to Start / Stop / Get Forging.

Start Forging Example

(POST) http://165.22.48.164:7876/dwa?requestType=startForging
Param:
requestType: startForging
secretPhrase: makandirumah
{
  "requestProcessingTime": 1,
  "deadline": 0,
  "hitTime": 0
}

Stop Forging

Refer to Start / Stop / Get Forging.

Stop Forging Example

curl="(POST) http://165.22.48.164:7876/dwa?requestType=stopForging"
-P "requestType: stopForging"
-P "secretPhrase: makandirumah"
-P "adminPassword: dwaAdmin"
{
  "foundAndStopped": true,
  "forgersCount": 1,
  "requestProcessingTime": 0
}

Lease Balance

Lease the entire guaranteed balance of NXT to another account, after 1440 confirmations. POST only.

Request: Refer to Create Transaction Request for common parameters.
• requestType is leaseBalance
• period is the lease period (in number of blocks, 1440 minimum)
• recipient is the lessee (recipient) account
• recipientPublicKey is the public key of the lessee (recipient) account (optional, enhances security of a new account)
Response: Refer to Create Transaction Response.

Lease Balance Example

curl="(POST) http://165.22.48.164:7876/dwa?requestType=leaseBalance"

first login to http://165.22.48.164:7876/
using below account: DWA-K2JJ-SFYW-AKYF-4HVUA

-P "requestType: leaseBalance"
-P "period: 1444"
-P "recipient: DWA-KQT4-X8NK-AKD6-FP8C3"
-P "secretPhrase: makandirumah"
-P "feeNQT: 1000"
-P "deadline: 24"
{
  "signatureHash": "8ea7945e32724339fad38fd60ef6d4a5ad2f8c8b9368b34462eb14cf1b6882fd",
  "transactionJSON": {
    "senderPublicKey": "c22d2cd58d0123a8a66353bc4ba431810b240051720cbd5e8ede9caddae1f374",
    "signature": "489f6aa365e2c7afb7564da139262bb2e3d45aa49f5510a5f09768e96c1b82076cb3f30707e88149c7631d5d005ad70bb0d8623c0af4c779ef3b97c8a70921be",
    "feeNQT": "1000",
    "type": 4,
    "fullHash": "933856114bb43fd215368b0fe280bc92924a1d54c85872aec35c25be92fc1cda",
    "version": 1,
    "phased": false,
    "ecBlockId": "15667918259137832441",
    "signatureHash": "8ea7945e32724339fad38fd60ef6d4a5ad2f8c8b9368b34462eb14cf1b6882fd",
    "attachment": {
      "version.EffectiveBalanceLeasing": 1,
      "period": 1444
    },
    "senderRS": "DWA-K2JJ-SFYW-AKYF-4HVUA",
    "subtype": 0,
    "amountNQT": "0",
    "sender": "2624314093293044240",
    "recipientRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
    "recipient": "15035502555517475618",
    "ecBlockHeight": 23784,
    "deadline": 24,
    "transaction": "15150025906004048019",
    "timestamp": 25658985,
    "height": 2147483647
  },
  "unsignedTransactionBytes": "0410698687011800c22d2cd58d0123a8a66353bc4ba431810b240051720cbd5e8ede9caddae1f37422db18a9e9d5a8d00000000000000000e80300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e85c0000f965c4fda4a06fd901a405",
  "broadcasted": true,
  "requestProcessingTime": 4,
  "transactionBytes": "0410698687011800c22d2cd58d0123a8a66353bc4ba431810b240051720cbd5e8ede9caddae1f37422db18a9e9d5a8d00000000000000000e8030000000000000000000000000000000000000000000000000000000000000000000000000000489f6aa365e2c7afb7564da139262bb2e3d45aa49f5510a5f09768e96c1b82076cb3f30707e88149c7631d5d005ad70bb0d8623c0af4c779ef3b97c8a70921be00000000e85c0000f965c4fda4a06fd901a405",
  "fullHash": "933856114bb43fd215368b0fe280bc92924a1d54c85872aec35c25be92fc1cda",
  "transaction": "15150025906004048019"
}

Get Next Block Generators

Returns the next block generators ordered by hit time. The list of currently active forgers is first initialized using the block generators with at least 2 blocks generated within the previous 10,000 blocks, excluding accounts without a public key. The list is updated as new blocks are processed. The results are not 100% correct since previously active generators may no longer be running and new generators won't be known until they generate a block.

Request:
• requestType is getNextBlockGenerators
• limit (N) is the number of next block generators to display.
Response:
• activeCount (N) is the number of active forging accounts
• lastBlock (S) is the last block ID on the blockchain
• generators (A) is an array containing the number of next block generators requested
◦ effectiveBalanceNXT (N) is the balance (in NXT) of the account available for forging: the unleased guaranteedBalance of this account plus the leased guaranteedBalance of all lessors to this account
◦ accountRS (S) is the Reed-Solomon address of the account
◦ deadline (N) is the estimated time (in seconds since the last block) until the account will forge a block
◦ account (S) is the account number
◦ hitTime (N) is the estimated time (in seconds since the genesis block) when the account will forge a block
• requestProcessingTime (N) is the API request processing time (in millisec)
• timestamp (N) is the timestamp (in seconds since the genesis block) when the request was executed
• height (N) is the height of the blockchain

Get Next Block Generators Example

curl="(GET) http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getNextBlockGenerators&limit=1"
-P "requestType=getNextBlockGenerators"
-P "limit=1"
{
  "activeCount": 5,
  "lastBlock": "7849635732146621139",
  "generators": [
    {
      "accountRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
      "deadline": 18,
      "account": "15035502555517475618",
      "effectiveBalanceDWA": 1999999998986,
      "hitTime": 25659348
    }
  ],
  "requestProcessingTime": 2,
  "timestamp": 25659330,
  "height": 24509
}

Account Control

Get All Phasing Only Controls

Retrieve all accounts subject to phasing control with their respective restrictions.

Request
• requestType is getAllPhasingOnlyControls
• firstIndex is a zero-based index to the first block ID to retrieve (optional)
• lastIndex is a zero-based index to the last block ID to retrieve (optional)
• requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
• requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
• requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
Response
• phasingOnlyControls (A) is an array with phasing only controls objects (Refer to Get Phasing Only Control for details)
• requestProcessingTime (N) is the API request processing time (in millisec)

Get All Phasing Only Controls Example

curl ="http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getAllPhasingOnlyControls&adminPassword=dwaAdmin"\
-P "requestType=getAllPhasingOnlyControls"
-P "adminPassword=dwaAdmin"
{
"phasingOnlyControls": [
     "minDuration": 0,
     "votingModel": 1,
     "minBalance": "0",
     "accountRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
     "quorum": "1",
     "maxFees": "0",
     "whitelist": [],
     "minBalanceModel": 0,
     "account": "15035502555517475618",
     "maxDuration": 0

  ],
    "requestProcessingTime": 1

}

Get Phasing Only Control

Retrieve phasing control with their respective restrictions for a specific account.

Request
• requestType is getPhasingOnlyControl
• account is the account ID
• requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
• requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
Response
• account (S) is the account number
• accountRS (S) is the Reed-Solomon address of the account
• quorum (S) is the minimum number of votes needed to approve the transaction
• whitelist (A) is an array with the whitelisted accounts including the fields:
• whitelisted (S) is the account number
• whitelistedRS (S) is the Reed-Solomon address of the account
• maxFees (S) is the maximum fees the account can spend per block
• minDuration (N) is the minimum duration of the phasing period
• maxDuration (N) is the maximum duration of the phasing period
• votingModel (N) is an integer code for the method of approval
• minBalance (S) is the minimum balance (in NQT or QNT) required for voting
• minBalanceModel (N) is the minimum balance model
• holding (S) is the asset or currency ID (only included if holding != 0)
• requestProcessingTime (N) is the API request processing time (in millisec)

Get Phasing Only Control Example

curl ="http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getPhasingOnlyControl&account=DWA-
KQT4-X8NK-AKD6-FP8C3"\
-P "requestType=getPhasingOnlyControl"
-P "account=DWA-KQT4-X8NK-AKD6-FP8C3"
{
    "minDuration": 0,
    "votingModel": 1,
    "minBalance": "0",
    "accountRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
    "quorum": "1",
    "maxFees": "0",
    "whitelist": [],
    "requestProcessingTime": 1,
    "minBalanceModel": 0,
    "account": "15035502555517475618",
    "maxDuration": 0
}


Set Phasing Only Control

Sets (or removes) phasing control for a specific account. POST only.

Request:
• requestType is setPhasingOnlyControl
• controlVotingModel is the voting model or -1 to remove phasing control
• controlQuorum is the expected quorum (optional)
• controlMinBalance is the expected minimum balance (optional)
• controlMinBalanceModel is the expected minimum balance model (optional)
• controlHolding is the holding ID (optional)
• controlWhitelisted is the whitelisted accounts (optional, multiple values)
• controlWhitelisted is the whitelisted accounts (optional, multiple values)
• controlMaxFees is the maximum allowed accumulated total fees for not yet finished phased transactions (optional)
• controlMinDuration is the minimum duration in block height (optional)
• controlMaxDuration is the maximum phasing duration in block height (optional)
Refer to Create Transaction Request for common parameters.
Response:
Refer to Create Transaction Response.

Get Phasing Only Control Example

curl ="http://165.22.48.164:7876/dwa?requestType=setPhasingOnlyControl"\
-P "requestType: setPhasingOnlyControl"
-P "controlVotingModel: 1"
-P "controlQuorum: 1"
-P "secretPhrase: minumdirumah"
-P "feeNQT: 1000"
-P "cdeadline: 24"
{
    "signatureHash": "2e27e5262eaaf67470d0251e460c485ef8b3994f4baeef470b5a16631d0e7e47",
    "transactionJSON": {
        "senderPublicKey": "c22d2cd58d0123a8a66353bc4ba431810b240051720cbd5e8ede9caddae1f374",
        "signature": "14ccfe7444eb07fd5ece40809aefd6381f39bce397fef975fa053f182357ea067c1cd6bd9029e3ceb3762b9f2627d453da78161adb625493ad536523d600c041",
        "feeNQT": "1000",
        "type": 4,
        "fullHash": "fb28f902739590a1912bab66c958714fa8e8b9ec57c248645c9648cd0875a0b6",
        "version": 1,
        "phased": false,
        "ecBlockId": "7447561837090630062",
        "signatureHash": "2e27e5262eaaf67470d0251e460c485ef8b3994f4baeef470b5a16631d0e7e47",
        "attachment": {
            "version.SetPhasingOnly": 1,
            "controlMaxFees": "0",
            "controlMinDuration": 0,
            "controlMaxDuration": 0,
            "phasingControlParams": {
                "phasingHolding": "0",
                "phasingQuorum": 1,
                "phasingMinBalance": 0,
                "phasingMinBalanceModel": 0,
                "phasingVotingModel": 1
            }
        },
        "senderRS": "DWA-K2JJ-SFYW-AKYF-4HVUA",
        "subtype": 1,
        "amountNQT": "0",
        "sender": "2624314093293044240",
        "ecBlockHeight": 23906,
        "deadline": 24,
        "transaction": "11641969357956393211",
        "timestamp": 25667846,
        "height": 2147483647
    },
    "unsignedTransactionBytes": "041106a987011800c22d2cd58d0123a8a66353bc4ba431810b240051720cbd5e8ede9caddae1f3744add89a5076a22180000000000000000e80300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000625d0000aee98a2e080e5b6701010100000000000000000000000000000000000000000000000000000000000000000000000000",
    "broadcasted": true,
    "requestProcessingTime": 5,
    "transactionBytes": "041106a987011800c22d2cd58d0123a8a66353bc4ba431810b240051720cbd5e8ede9caddae1f3744add89a5076a22180000000000000000e803000000000000000000000000000000000000000000000000000000000000000000000000000014ccfe7444eb07fd5ece40809aefd6381f39bce397fef975fa053f182357ea067c1cd6bd9029e3ceb3762b9f2627d453da78161adb625493ad536523d600c04100000000625d0000aee98a2e080e5b6701010100000000000000000000000000000000000000000000000000000000000000000000000000",
    "fullHash": "fb28f902739590a1912bab66c958714fa8e8b9ec57c248645c9648cd0875a0b6",
    "transaction": "11641969357956393211"
}

Asset Exchange

Delete Asset Shares

Permanently deletes a specified quantity of owned asset shares.

Request: Refer to Create Transaction Request for common parameters.
• requestType is deleteAssetShares
• asset is the asset ID
• quantityQNT is the quantity (in QNT) of the asset to be deleted
Response: Refer to Create Transaction Response.

Delete Asset Shares Example

curl="(POST) http://165.22.48.164:7876/dwa?requestType=deleteAssetShares"
-P "requestType: deleteAssetShares"
-P "asset: 15418948120526107039"
-P "quantityQNT: 10"
-P "secretPhrase: makandirumah"
-P "feeNQT: 1000"
-P "deadline: 24"
{
  "signatureHash": "5a1462b5f4f62d04098cc77be13f3f69ed4d4e774116097a1ac7fe6924a5988d",
  "transactionJSON": {
    "senderPublicKey": "2cd98d0f6a138ef25255830cd868106adf3825b4fa24c9ced4134928d905a202",
    "signature": "4a632f7814c05c1e72224ad2d1739879d61640bd797d100146e4e7a467964c0ba1cb9f49da11967aeae296044f834e248b5fa958bd38f9283e2bd47e919a3f28",
    "feeNQT": "1000",
    "type": 2,
    "fullHash": "b9b4a42137889f546b91ad4ff6d1f18173ef4c532da0abeba8978efc6378f209",
    "version": 1,
    "phased": false,
    "ecBlockId": "14478125203214652233",
    "signatureHash": "5a1462b5f4f62d04098cc77be13f3f69ed4d4e774116097a1ac7fe6924a5988d",
    "attachment": {
      "quantityQNT": "10",
      "version.AssetDelete": 1,
      "asset": "15418948120526107039"
    },
    "senderRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
    "subtype": 7,
    "amountNQT": "0",
    "sender": "15035502555517475618",
    "ecBlockHeight": 23537,
    "deadline": 1,
    "transaction": "6097742190851962041",
    "timestamp": 25643676,
    "height": 2147483647
  },
  "unsignedTransactionBytes": "02179c4a870101002cd98d0f6a138ef25255830cd868106adf3825b4fa24c9ced4134928d905a2024add89a5076a22180000000000000000e80300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f15b000049533df729a2ecc8019fb1225e9f1bfbd50a00000000000000",
  "broadcasted": true,
  "requestProcessingTime": 4,
  "transactionBytes": "02179c4a870101002cd98d0f6a138ef25255830cd868106adf3825b4fa24c9ced4134928d905a2024add89a5076a22180000000000000000e80300000000000000000000000000000000000000000000000000000000000000000000000000004a632f7814c05c1e72224ad2d1739879d61640bd797d100146e4e7a467964c0ba1cb9f49da11967aeae296044f834e248b5fa958bd38f9283e2bd47e919a3f2800000000f15b000049533df729a2ecc8019fb1225e9f1bfbd50a00000000000000",
  "fullHash": "b9b4a42137889f546b91ad4ff6d1f18173ef4c532da0abeba8978efc6378f209",
  "transaction": "6097742190851962041"
}

Dividend Payment

Pay dividend to all shareholders of an asset. POST only.

Request: Refer to Create Transaction Request for common parameters.
• requestType is dividendPayment
• asset is the asset ID
• holdingType is a string representing the holding type (optional)
• holding is the holding ID (optional)
• height is the blockchain height at which asset holders shares will be counted (must be less than 1440 blocks in the past)
• amountNQTPerQNT is dividend amount (in NQT per QNT of the asset)
Response: Refer to Create Transaction Response.

Dividend Payment Example

curl="(POST) http://165.22.48.164:7876/dwa?requestType=dividendPayment"
-P "requestType: dividendPayment"
-P "asset: 15418948120526107039"
-P "height: 23545"
-P "amountNQTPerQNT: 1"
-P "secretPhrase: makandirumah"
-P "feeNQT: 1000"
-P "deadline: 24"
{
  "signatureHash": "9c151ca184c8278a0d69ee00556e6faaa1749eaff6ceb249844dea1abe16551e",
  "transactionJSON": {
    "senderPublicKey": "2cd98d0f6a138ef25255830cd868106adf3825b4fa24c9ced4134928d905a202",
    "signature": "3fdbc84cf8a4b29c8c7119c49998afb291349d859d591ca833e4dff3560cc00213ea90c4ba56d4c41f272092bd538ad884e279e40df283b9765f74d5439dcaed",
    "feeNQT": "1000",
    "type": 2,
    "fullHash": "c4b06444bcf1b215cef18fcc03430f7b1b95ca4ff3a5c75a1c2556da4273917a",
    "version": 1,
    "phased": false,
    "ecBlockId": "3163612023435519843",
    "signatureHash": "9c151ca184c8278a0d69ee00556e6faaa1749eaff6ceb249844dea1abe16551e",
    "attachment": {
      "version.DividendPayment": 1,
      "amountNQTPerQNT": "1",
      "asset": "15418948120526107039",
      "height": 24074
    },
    "senderRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
    "subtype": 6,
    "amountNQT": "0",
    "sender": "15035502555517475618",
    "ecBlockHeight": 23545,
    "deadline": 1,
    "transaction": "1563577811554578628",
    "timestamp": 25644017,
    "height": 2147483647
  },
  "unsignedTransactionBytes": "0216f14b870101002cd98d0f6a138ef25255830cd868106adf3825b4fa24c9ced4134928d905a2024add89a5076a22180000000000000000e80300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f95b0000636707b05f68e72b019fb1225e9f1bfbd50a5e00000100000000000000",
  "broadcasted": true,
  "requestProcessingTime": 6,
  "transactionBytes": "0216f14b870101002cd98d0f6a138ef25255830cd868106adf3825b4fa24c9ced4134928d905a2024add89a5076a22180000000000000000e80300000000000000000000000000000000000000000000000000000000000000000000000000003fdbc84cf8a4b29c8c7119c49998afb291349d859d591ca833e4dff3560cc00213ea90c4ba56d4c41f272092bd538ad884e279e40df283b9765f74d5439dcaed00000000f95b0000636707b05f68e72b019fb1225e9f1bfbd50a5e00000100000000000000",
  "fullHash": "c4b06444bcf1b215cef18fcc03430f7b1b95ca4ff3a5c75a1c2556da4273917a",
  "transaction": "1563577811554578628"
}

Get Account Asset Count

Get the number of assets owned by an account given the account ID.

Request:
• requestType is getAccountAssetCount
• account is the account ID
• height is the height of the blockchain to determine the asset count (optional, default is last block)
• requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
• requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
Response:
• numberOfAssets (N) is the number of assets owned by the account
• lastBlock (S) is the last block ID on the blockchain (applies if requireBlock is provided but not requireLastBlock)
• requestProcessingTime (N) is the API request processing time (in millisec)

Example

(GET) http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getAccountAssetCount&account=DWA-KQT4-X8NK-AKD6-FP8C3
requestType=getAccountAssetCount
account=DWA-KQT4-X8NK-AKD6-FP8C3
{
  "requestProcessingTime": 0,
  "numberOfAssets": 1
}

Get Account Assets

Get the assets owned by a given account in reverse quantity order.

Request:
• requestType is getAccountAssets
• account is the account ID
• asset is an asset ID filter (optional)
• height is the blockchain height at which to retrieve balances (optional, default is the last block in the blockchain)
• includeAssetInfo is true if asset information is to be included (optional)
• requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
• requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
Response:
• accountAssets (A) is an array of asset objects (unless the asset parameter is specified) with the following fields for each asset:
◦ quantityQNT (S) is the quantity (in QNT) of the asset
◦ unconfirmedQuantityQNT (S) is the unconfirmed quantity (in QNT) of the asset
◦ decimals (N) is the number of decimal places used by the asset (if includeAssetInfo is true)
◦ name (S) is the asset name (if includeAssetInfo is true)
◦ asset (S) is the asset ID
• lastBlock (S) is the last block ID on the blockchain (applies if requireBlock is provided but not requireLastBlock)
• requestProcessingTime (N) is the API request processing time (in millisec)

Get Account Assets Example

curl="(GET) http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getAccountAssets&account=DWA-KQT4-X8NK-AKD6-FP8C3"
-P "requestType=getAccountAssets"
-P "account=DWA-KQT4-X8NK-AKD6-FP8C3"
{
  "accountAssets": [
    {
      "quantityQNT": "1000000000000000",
      "unconfirmedQuantityQNT": "1000000000000000",
      "asset": "15418948120526107039"
    },
    {
      "quantityQNT": "10",
      "unconfirmedQuantityQNT": "10",
      "asset": "7211520941614985245"
    }
  ],
  "requestProcessingTime": 0
}

Get All Assets

Get all assets in the exchange in reverse block height of creation order.

Request:
• requestType is getAllAssets
• firstIndex is a zero-based index to the first asset to retrieve (optional)
• lastIndex is a zero-based index to the last asset to retrieve (optional)
• includeCounts is true if the fields beginning with numberOf... are to be included (optional)
• requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
• requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
Response:
• assets (A) is an array of asset objects (refer to Get Asset)
• lastBlock (S) is the last block ID on the blockchain (applies if requireBlock is provided but not requireLastBlock)
• requestProcessingTime (N) is the API request processing time (in millisec)

Get All Assets Example

curl="(GET) http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getAllAssets&adminPassword=dwaAdmin"
-P "requestType=getAllAssets"
-P "adminPassword=dwaAdmin"
{
  "assets": [
    {
      "initialQuantityQNT": "1000000000000000",
      "quantityQNT": "1000000000000000",
      "accountRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
      "decimals": 3,
      "name": "OOK",
      "description": "OOK Token",
      "asset": "15418948120526107039",
      "account": "15035502555517475618"
    },
    {
      "initialQuantityQNT": "10",
      "quantityQNT": "10",
      "accountRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
      "decimals": 6,
      "name": "OOX",
      "description": "",
      "asset": "7211520941614985245",
      "account": "15035502555517475618"
    }
  ],
  "requestProcessingTime": 1
}

Get All Trades

Get all trades since a given timestamp in reverse block height order.

Request:
• requestType is getAllTrades
• timestamp is the timestamp (in seconds since the genesis block) to begin retrieving trades (optional, default 0)
• firstIndex is a zero-based index to the first trade to retrieve (optional)
• lastIndex is a zero-based index to the last trade to retrieve (optional)
• includeAssetInfo is true if asset information is to be included in the result (optional)
• requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
• requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)

Note: If timestamp is omitted or zero, and no index is given, all trades in the entire blockchain will be retrieved, which may timeout or crash your system.

Response:
• trades (A) is an array of trade objects (refer to Get Trades)
• lastBlock (S) is the last block ID on the blockchain (applies if requireBlock is provided but not requireLastBlock)
• requestProcessingTime (N) is the API request processing time (in millisec)

Get All Trades Example

curl="(GET) http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getAllTrades"
-P "requestType=getAllTrades"
{
  "trades": [
    {
      "seller": "15035502555517475618",
      "quantityQNT": "10",
      "bidOrder": "13840365185673164075",
      "sellerRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
      "buyer": "15035502555517475618",
      "priceNQT": "10",
      "askOrder": "5527193704330676776",
      "buyerRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
      "block": "16544444416830521454",
      "asset": "15418948120526107039",
      "askOrderHeight": 24418,
      "bidOrderHeight": 24423,
      "tradeType": "buy",
      "timestamp": 25653836,
      "height": 24423
    },
    {
      "seller": "15035502555517475618",
      "quantityQNT": "10",
      "bidOrder": "1777069409333409884",
      "sellerRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
      "buyer": "15035502555517475618",
      "priceNQT": "10",
      "askOrder": "2469598018030510777",
      "buyerRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
      "block": "533686489258077029",
      "asset": "15418948120526107039",
      "askOrderHeight": 24382,
      "bidOrderHeight": 24387,
      "tradeType": "buy",
      "timestamp": 25651790,
      "height": 24387
    },
    {
      "seller": "15035502555517475618",
      "quantityQNT": "10",
      "bidOrder": "12470420817686783296",
      "sellerRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
      "buyer": "15035502555517475618",
      "priceNQT": "10",
      "askOrder": "817324287775535530",
      "buyerRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
      "block": "8018722500683036154",
      "asset": "15418948120526107039",
      "askOrderHeight": 24069,
      "bidOrderHeight": 24074,
      "tradeType": "buy",
      "timestamp": 25631329,
      "height": 24074
    }
  ],
  "requestProcessingTime": 0
}

Get Asset

Get asset information given an asset ID.

Request:
• requestType is getAsset
• asset is the asset ID
• includeCounts is true if the fields beginning with numberOf... are to be included (optional)
• requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
• requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
Response:
• account (S) is the number of the account that issued the asset
• accountRS (S) is the Reed-Solomon address of the account that issued the asset
• name (S) is the asset name
• description (S) is the asset description
• quantityQNT (S) is the total asset quantity (in QNT) in existence
• asset (N) is the asset ID
• decimals (N) is the number of decimal places used by the asset
• numberOfAccounts (N) is the number of accounts that own the asset
• numberOfTrades (N) is the number of trades of this asset
• numberOfTransfers (N) is the number of transfers of this asset
• lastBlock (S) is the last block ID on the blockchain (applies if requireBlock is provided but not requireLastBlock)

| • requestProcessingTime (N) is the API request processing time (in millisec)

Get Asset Example

curl="(GET) http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getAsset&asset=15418948120526107039"
-P "requestType=getAsset"
-P "asset=15418948120526107039"
{
  "initialQuantityQNT": "1000000000000000",
  "quantityQNT": "1000000000000000",
  "accountRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
  "decimals": 3,
  "name": "OOK",
  "description": "OOK Token",
  "requestProcessingTime": 1,
  "asset": "15418948120526107039",
  "account": "15035502555517475618"
}

Get Asset Account Count

Get the number of accounts that own an asset given the asset ID.

Request:
• requestType is getAssetAccountCount
• asset is the asset ID
• height is the height of the blockchain to determine the account count (optional, default is last block)
• requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
• requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)

Note: If table trimming is enabled (default), the height must be within 1440 blocks of the last block.

Response:
• numberOfAccounts (N) is the number of accounts that own the asset
• lastBlock (S) is the last block ID on the blockchain (applies if requireBlock is provided but not requireLastBlock)
• requestProcessingTime (N) is the API request processing time (in millisec)

Get Asset Account Count Example

curl="(GET) http://165.22.48.164:7876/nxt?=%2Fdwa&requestType=getAssetAccountCount&asset=15418948120526107039"
-P "requestType= getAssetAccountCount"
-P "asset=15418948120526107039"
{
  "numberOfAccounts": 1,
  "requestProcessingTime": 1
}

Get Asset Accounts

Get the accounts that own an asset given the asset ID in reverse quantity order.

Request:
• requestType is getAssetAccounts
• asset is the asset ID
• height is the height of the blockchain to determine the accounts (optional, default is last block)
• firstIndex is a zero-based index to the first account to retrieve (optional)
• lastIndex is a zero-based index to the last account to retrieve (optional)
• requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
• requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)

Note: If table trimming is enabled (default), the height must be within 1440 blocks of the last block. |

Response:
• accountAssets (A) is an array of asset objects with the following fields for each asset:
◦ quantityQNT (S) is the quantity (in QNT) of the asset
◦ accountRS (S) is the Reed-Solomon address of the account that owns the asset
◦ unconfirmedQuantityQNT (S) is the unconfirmed quantity (in QNT) of the asset
◦ asset (S) is the asset ID
◦ account (S) is the number of the account that owns the asset
• lastBlock (S) is the last block ID on the blockchain (applies if requireBlock is provided but not requireLastBlock)
• requestProcessingTime (N) is the API request processing time (in millisec)

Get Asset Accounts Example

(GET) http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getAssetAccounts&asset=15418948120526107039
requestType=getAssetAccounts
asset=15418948120526107039
{
  "accountAssets": [
    {
      "quantityQNT": "1000000000000000",
      "accountRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
      "unconfirmedQuantityQNT": "1000000000000000",
      "asset": "15418948120526107039",
      "account": "15035502555517475618"
    }
  ],
  "requestProcessingTime": 1
}

Get Asset Deletes

Get asset deletions for a specific asset or account.

Request:
• requestType is getAssetDeletes
• asset is the asset ID (optional if account is provided)
• account is the account ID (optional if asset is provided)
• firstIndex is a zero-based index to the first phased transaction to retrieve (optional)
• lastIndex is a zero-based index to the last phased transaction to retrieve (optional)
• timestamp is the earliest deletion (in seconds since the genesis block) to retrieve (optional)
• includeAssetInfo is true if asset information is to be included (optional)
• requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
• requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
Response:
• deletes (A) is an array of asset delete objects with following properties:
◦ quantityQNT (S) is the number of shares that was deleted
◦ assetDelete (S) is the transaction ID
◦ account (S) is the account ID
◦ accountRS (S) is the account Reed Solomon address
◦ asset (S) is the asset ID
◦ height (N) is the block height of the delete
◦ timestamp (N) is the block timestamp of the delete
◦ decimals (N) is the number of decimal places used by the asset (if includeAssetInfo is true)
◦ name (S) is the asset name (if includeAssetInfo is true)

Get Asset Deletes Example

curl="(GET) http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getAssetDeletes&asset=15418948120526107039&account=DWA-KQT4-X8NK-AKD6-FP8C3"
- P "requestType=getAssetDeletes"
- P "asset=15418948120526107039"
- P "account=DWA-KQT4-X8NK-AKD6-FP8C3"
{
  "deletes": [],
  "requestProcessingTime": 0
}

Get Asset Dividends

Get the dividend payment history for a specific asset.

Request:
• requestType is getAssetDividends
• asset is the asset ID
• firstIndex is a zero-based index to the first dividend payment to retrieve (optional)
• lastIndex is a zero-based index to the last dividend payment to retrieve (optional)
• timestamp is the earliest dividend payment (in seconds since the genesis block) to retrieve (optional)
• adminPassword is a string with the admin password (optional)
• requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
• requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
Response:
• dividends (A) is an array of dividend transactions with the following properties:
◦ assetDividend (S) is the dividend payment transaction ID
◦ numberOfAccounts (N) is the number of accounts that received a dividend
◦ amountNQTPerQNT (S) is the amount of NXT (in NQT) paid per quantity (in QNT) of the asset
◦ totalDividend (S) is the total amount of NXT (in NQT) sent in the dividend payment
◦ dividendHeight (N) is the block height of the dividend calculation
◦ asset (S) is the asset ID
◦ height (N) is the block height of the dividend payment
◦ timestamp (N) is the block timestamp of the dividend payment

Get Asset Dividends Example

curl="(GET) http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getAssetDividends&asset=15418948120526107039&adminPassword=dwaAdmin"
-P "requestType=getAssetDividends"
-P "asset=15418948120526107039"
-P "adminPassword=dwaAdmin"
{
  "dividends": [
    {
      "assetDividend": "1563577811554578628",
      "numberOfAccounts": 0,
      "amountNQTPerQNT": "1",
      "totalDividend": "0",
      "dividendHeight": 24074,
      "asset": "15418948120526107039",
      "height": 24266,
      "timestamp": 25644076
    }
  ],
  "requestProcessingTime": 0
}

Get Asset Ids

Get the IDs of all assets in the exchange in reverse block height of creation order.

Request:
• requestType is getAssetIds
• firstIndex is a zero-based index to the first asset ID to retrieve (optional)
• lastIndex is a zero-based index to the last asset ID to retrieve (optional)
• requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
• requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
Response:
• assets (A) is an array of asset IDs
• lastBlock (S) is the last block ID on the blockchain (applies if requireBlock is provided but not requireLastBlock)
• requestProcessingTime (N) is the API request processing time (in millisec)

Get Asset Ids Example

curl="(GET) http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getAssetIds&adminPassword=dwaAdmin"
-P "requestType=getAssetIds"
-P "adminPassword=dwaAdmin"
{
  "assetIds": ["15418948120526107039"],
  "requestProcessingTime": 1
}

Get Asset Transfers

Get transfers associated with a given asset and/or account in reverse block height order (or in the expected order of execution for expected transfers).

Request:
• requestType is either getAssetTransfers or getExpectedAssetTransfers, where expected transfers are from the unconfirmed transactions pool or are phased transactions scheduled to finish in the next block
• asset is the asset ID (optional)
• account is the account ID (optional if asset provided)
• timestamp is the earliest transfer (in seconds since the genesis block) to retrieve (optional, does not apply to expected transfers)
• firstIndex is a zero-based index to the first transfer to retrieve (optional, does not apply to expected transfers)
• lastIndex is a zero-based index to the last transfer to retrieve (optional, does not apply to expected transfers)
• includeAssetInfo is true if the decimals and name fields are to be included (optional, does not apply to expected transfers)
• requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
• requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
Response:
• transfers (A) is an array of transfer objects with the following fields for each transfer:
◦ quantityQNT (S) is the quantity (in QNT) of the asset traded
◦ senderRS (S) is the Reed-Solomon address of the sender
◦ assetTransfer (S) is the transaction ID of the asset transfer
◦ sender (S) is the account number of the sender
◦ recipientRS (S) is the Reed-Solomon address of the recipient
◦ decimals (N) is the number of decimal places used by the asset (if includeAssetInfo is true)
◦ recipient (S) is the account number of the recipient
◦ name (S) is the name of the asset (if includeAssetInfo is true)
◦ asset (S) is the asset ID
◦ height (N) is the height of the transfer block
◦ timestamp (N) is the timestamp (in seconds since the genesis block) of the transfer block, does not apply to an expected transfer
◦ phased (B) is true if the transaction is phased, false otherwise, applies only to an expected transfer
• lastBlock (S) is the last block ID on the blockchain (applies if requireBlock is provided but not requireLastBlock)

| • requestProcessingTime (N) is the API request processing time (in millisec)

Get Asset Transfers Example

curl="(GET) http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getAssetTransfers&asset=15418948120526107039&adminPassword=dwaAdmin"
-P "requestType=getAssetTransfers"
-P "asset=15418948120526107039"
-P "adminPassword=dwaAdmin"
{
  "transfers": [
    {
      "quantityQNT": "10",
      "senderRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
      "assetTransfer": "11869778154184135304",
      "sender": "15035502555517475618",
      "recipientRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
      "recipient": "15035502555517475618",
      "asset": "15418948120526107039",
      "height": 24390,
      "timestamp": 25652086
    }
  ],
  "requestProcessingTime": 0
}

Get Expected Asset Transfers

Refer to Get Asset Transfers.

Get Assets

Get asset information given multiple asset IDs

Request:
• requestType is getAssets
• assets is one the multiple asset IDs
• assets is one the multiple asset IDs
• includeCounts is true if the fields beginning with numberOf... are to be included (optional)
• requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
• requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
Response:
• assets (A) is an array of asset objects (refer to Get Asset)
• lastBlock (S) is the last block ID on the blockchain (applies if requireBlock is provided but not requireLastBlock)
• requestProcessingTime (N) is the API request processing time (in millisec)

Get Assets Example

curl="(GET) http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getExpectedAssetTransfers&asset=15418948120526107039&account=DWA-KQT4-X8NK-AKD6-FP8C3"
-P "requestType=getExpectedAssetTransfers"
-P "asset=15418948120526107039"
-P "account=DWA-KQT4-X8NK-AKD6-FP8C3"
{
  "transfers": [],
  "requestProcessingTime": 7
}

Get Assets By Issuer

Get asset information given multiple creation account IDs in reverse block height of creation order.

Request:
• requestType is getAssetsByIssuer
• account is one of the multiple account IDs
• account is one of the multiple account IDs
• firstIndex is a zero-based index to the first asset to retrieve (optional)
• lastIndex is a zero-based index to the last asset to retrieve (optional)
• includeCounts is true if the fields beginning with numberOf... are to be included (optional)
• requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
• requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
Response:
• assets (A) is an array of asset objects (refer to Get Asset)
• lastBlock (S) is the last block ID on the blockchain (applies if requireBlock is provided but not requireLastBlock)
• requestProcessingTime (N) is the API request processing time (in millisec)

Get Assets By Issuer Example

curl="(GET) http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getAssetsByIssuer&account=DWA-KQT4-X8NK-AKD6-FP8C3&adminPassword=dwaAdmin"
-P "requestType=getAssetsByIssuer"
-P "account=DWA-KQT4-X8NK-AKD6-FP8C3"
-P "adminPassword=dwaAdmin"
{
  "assets": [
    [
      {
        "initialQuantityQNT": "1000000000000000",
        "quantityQNT": "1000000000000000",
        "accountRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
        "decimals": 3,
        "name": "OOK",
        "description": "OOK Token",
        "asset": "15418948120526107039",
        "account": "15035502555517475618"
      },
      {
        "initialQuantityQNT": "10",
        "quantityQNT": "10",
        "accountRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
        "decimals": 6,
        "name": "OOX",
        "description": "",
        "asset": "7211520941614985245",
        "account": "15035502555517475618"
      }
    ]
  ],
  "requestProcessingTime": 1
}

Get Expected Asset Deletes

Gets asset deletes which are expected to be executed in the next block.

Request:
• requestType is either getExpectedAssetDeletes
• asset is the asset ID (optional)
• account is the account ID (optional)
• firstIndex is a zero-based index to the first phased transaction to retrieve (optional)
• lastIndex is a zero-based index to the last phased transaction to retrieve (optional)
• timestamp is the earliest deletion (in seconds since the genesis block) to retrieve (optional)
• includeAssetInfo is true if asset information is to be included (optional)
• requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
• requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
Response:
• deletes (A) is an array of expected asset delete objects with following properties:
◦ assetDelete (S) is the transaction ID
◦ asset (S) is the asset ID
◦ account (S) is the account ID
◦ accountRS (S) is the account Reed Solomon address
◦ quantityQNT (S) is the number of shares that will be deleted
◦ decimals (N) is the number of decimal places used by the asset (if includeAssetInfo is true)
◦ name (S) is the asset name (if includeAssetInfo is true)
• requestProcessingTime (N) is the API request processing time (in millisec)

Get Expected Asset Deletes Example

curl="(GET) http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getExpectedAssetDeletes&asset=15418948120526107039&account=DWA-KQT4-X8NK-AKD6-FP8C3"
-P "requestType=getExpectedAssetDeletes"
-P "asset=15418948120526107039"
-P "account=DWA-KQT4-X8NK-AKD6-FP8C3"
{
  "deletes": [],
  "requestProcessingTime": 1
}

Get Expected Order Cancellations

Get all expected order cancellations in the order in which they are expected to be executed.

Request:
• requestType is getExpectedOrderCancellations, where expected cancellations are from the unconfirmed transactions pool or are phased transactions scheduled to finish in the next block
• requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
• requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
Response:
• orderCancellations (A) is an array of order cancellation objects with the following fields for each transfer:
◦ account (S) is the cancelling account number
◦ accountRS (S) is the Reed-Solomon address of the account
◦ order (S) is the ID of the order to be cancelled
◦ height (N) is the block height of the order cancellation transaction
◦ phased (B) is true if the order cancellation transaction is phased
• lastBlock (S) is the last block ID on the blockchain (applies if requireBlock is provided but not requireLastBlock)
• requestProcessingTime (N) is the API request processing time (in millisec)

Get Expected Order Cancellations Example

curl="(GET) http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getExpectedOrderCancellations"
-P "requestType=getExpectedOrderCancellations"
{
  "orderCancellations": [],
  "requestProcessingTime": 0
}

Get Last Trades

Get the last trade of each of multiple assets.

Request:
• requestType is getLastTrades
• assets is one of multiple asset IDs
• assets is one of multiple asset IDs
• requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
• requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
Response:
• trades (A) is an array of trade objects (refer to Get Trades without name and decimals for details)
• requestProcessingTime (N) is the API request processing time (in millisec)

Get Last Trades Example

(GET) http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getLastTrades&assets=15418948120526107039
-P "requestType=getLastTrades"
-P "assets=15418948120526107039"
{
  "trades": [
    {
      "seller": "15035502555517475618",
      "quantityQNT": "10",
      "bidOrder": "12470420817686783296",
      "sellerRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
      "buyer": "15035502555517475618",
      "priceNQT": "10",
      "askOrder": "817324287775535530",
      "buyerRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
      "block": "8018722500683036154",
      "asset": "15418948120526107039",
      "askOrderHeight": 24069,
      "bidOrderHeight": 24074,
      "tradeType": "buy",
      "timestamp": 25631329,
      "height": 24074
    }
  ],
  "requestProcessingTime": 1
}

Get Order Trades

Get all trades that were executed as a result of a given askOrder and/or bidOrder in reverse block height order.

Request:
• requestType is getOrderTrades
• askOrder is an ask order ID (optional)
• bidOrder is a bid order ID (optional if askOrder provided)
• firstIndex is a zero-based index to the first trade to retrieve (optional)
• lastIndex is a zero-based index to the last trade to retrieve (optional)
• includeAssetInfo is true if the decimals and name fields are to be included (optional)
• requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
• requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
Response: Refer to Get Trades.

Get Order Trades Example

curl="(GET) http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getOrderTrades&askOrder=817324287775535530"
-P "requestType=getOrderTrades"
-P "askOrder=817324287775535530"
{{
    "trades": [
        {
            "seller": "15035502555517475618",
            "quantityQNT": "10",
            "bidOrder": "12470420817686783296",
            "sellerRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
            "buyer": "15035502555517475618",
            "priceNQT": "10",
            "askOrder": "817324287775535530",
            "buyerRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
            "block": "8018722500683036154",
            "asset": "15418948120526107039",
            "askOrderHeight": 24069,
            "bidOrderHeight": 24074,
            "tradeType": "buy",
            "timestamp": 25631329,
            "height": 24074
        }
    ],
    "requestProcessingTime": 0
}

Get Trades

Get trades associated with a given asset and/or account in reverse block height order.

Request:
• requestType is getTrades
• asset is the asset ID (optional)
• account is the account ID (optional if asset provided)
• firstIndex is a zero-based index to the first trade to retrieve (optional)
• lastIndex is a zero-based index to the last trade to retrieve (optional)
• timestamp is the earliest block (in seconds since the genesis block) to retrieve (optional)
• includeAssetInfo is true if the decimals and name fields are to be included (optional)
• requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
• requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
Response:
• trades (A) is an array of trade objects with the following fields for each trade:
◦ seller (S) is the account number of the seller
◦ quantityQNT (S) is the quantity (in QNT) of the asset traded
◦ bidOrder (S) is the bid order ID
◦ sellerRS (S) is the Reed-Solomon address of the seller
◦ buyer (S) is the account number of the buyer
◦ priceNQT (S) is the trade price (in NQT, the ask price for a buy or the bid price for a sell)
◦ askOrder (S) is the ask order ID
◦ buyerRS (S) is the Reed-Solomon address of the buyer
◦ decimals (N) is the number of decimal places used by the asset
◦ name (S) is the name of the asset (if includeAssetInfo is true)
◦ block (S) is the block ID of the trade (if includeAssetInfo is true)
◦ asset (S) is the asset ID
◦ askOrderHeight (N) is the block height of the ask order
◦ bidOrderHeight (N) is the block height of the bid order
◦ tradeType (S) is the trade type (sell or buy, where buy implies that the bid occurred after the ask, or if in the same block, has a greater order ID)
◦ timestamp (N) is the timestamp (in seconds since the genesis block) of the trade block
◦ height (N) is the height of the trade block
• lastBlock (S) is the last block ID on the blockchain (applies if requireBlock is provided but not requireLastBlock)
• requestProcessingTime (N) is the API request processing time (in millisec)

Get Trades Example

curl="(GET) http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=getTrades&asset=15418948120526107039&account=DWA-KQT4-X8NK-AKD6-FP8C3&adminPassword=dwaAdmin"
-P "requestType=getTrades&asset=15418948120526107039"
-P "account=DWA-KQT4-X8NK-AKD6-FP8C3"
-P "adminPassword=dwaAdmin"
{
  "trades": [
    {
      "seller": "15035502555517475618",
      "quantityQNT": "10",
      "bidOrder": "13840365185673164075",
      "sellerRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
      "buyer": "15035502555517475618",
      "priceNQT": "10",
      "askOrder": "5527193704330676776",
      "buyerRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
      "block": "16544444416830521454",
      "asset": "15418948120526107039",
      "askOrderHeight": 24418,
      "bidOrderHeight": 24423,
      "tradeType": "buy",
      "timestamp": 25653836,
      "height": 24423
    },
    {
      "seller": "15035502555517475618",
      "quantityQNT": "10",
      "bidOrder": "1777069409333409884",
      "sellerRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
      "buyer": "15035502555517475618",
      "priceNQT": "10",
      "askOrder": "2469598018030510777",
      "buyerRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
      "block": "533686489258077029",
      "asset": "15418948120526107039",
      "askOrderHeight": 24382,
      "bidOrderHeight": 24387,
      "tradeType": "buy",
      "timestamp": 25651790,
      "height": 24387
    },
    {
      "seller": "15035502555517475618",
      "quantityQNT": "10",
      "bidOrder": "12470420817686783296",
      "sellerRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
      "buyer": "15035502555517475618",
      "priceNQT": "10",
      "askOrder": "817324287775535530",
      "buyerRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
      "block": "8018722500683036154",
      "asset": "15418948120526107039",
      "askOrderHeight": 24069,
      "bidOrderHeight": 24074,
      "tradeType": "buy",
      "timestamp": 25631329,
      "height": 24074
    }
  ],
  "requestProcessingTime": 0
}

Issue Asset

Create an asset on the exchange. POST only.

Request: Refer to Create Transaction Request for common parameters.
• requestType is issueAsset
• name is the name of the asset
• description is a url-encoded description of the asset in UTF-8 with a maximum length of 1000 bytes (optional)
• quantityQNT is the total amount (in QNT) of the asset in existence
• decimals is the number of decimal places used by the asset (optional, zero default)
Response: Refer to Create Transaction Response. The transaction ID is also the asset ID.

Issue Asset Example

curl="(POST) http://165.22.48.164:7876/dwa?requestType=issueAsset"
-P "requestType: issueAsset"
-P "name: OOX"
-P "description: desc"
-P "quantityQNT: 1000000000"
-P "decimals: 6"
-P "secretPhrase: makandirumah"
-P "feeNQT: 1000000"
-P "deadline: 24"
{
  "signatureHash": "faf0d3d31824542b367158b15026e8e986023f33a04a0bb1045be09162dbc8a8",
  "transactionJSON": {
    "senderPublicKey": "2cd98d0f6a138ef25255830cd868106adf3825b4fa24c9ced4134928d905a202",
    "signature": "391e4926c9ab3b8e22ae67848bbdfe69af92af564706419e97aa689ebd41f600110fd670e3d26e1a83c55f47800474a2ef1b3d2ff595f5268bf072867f8b43f2",
    "feeNQT": "1000000",
    "type": 2,
    "fullHash": "1d70408f16781464b80e528472b2db865ae6686e75dc5eeb4e3394dd0427e573",
    "version": 1,
    "phased": false,
    "ecBlockId": "7995528858402746119",
    "signatureHash": "faf0d3d31824542b367158b15026e8e986023f33a04a0bb1045be09162dbc8a8",
    "attachment": {
      "name": "OOX",
      "quantityQNT": "1000000000",
      "description": "",
      "version.AssetIssuance": 1,
      "decimals": 6
    },
    "senderRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
    "subtype": 0,
    "amountNQT": "0",
    "sender": "15035502555517475618",
    "ecBlockHeight": 23654,
    "deadline": 24,
    "transaction": "7211520941614985245",
    "timestamp": 25651219,
    "height": 2147483647
  },
  "unsignedTransactionBytes": "02101368870118002cd98d0f6a138ef25255830cd868106adf3825b4fa24c9ced4134928d905a2024add89a5076a2218000000000000000040420f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000665c000007ef7a7422d3f56e01034f4f5800000a0000000000000006",
  "broadcasted": true,
  "requestProcessingTime": 4,
  "transactionBytes": "02101368870118002cd98d0f6a138ef25255830cd868106adf3825b4fa24c9ced4134928d905a2024add89a5076a2218000000000000000040420f00000000000000000000000000000000000000000000000000000000000000000000000000391e4926c9ab3b8e22ae67848bbdfe69af92af564706419e97aa689ebd41f600110fd670e3d26e1a83c55f47800474a2ef1b3d2ff595f5268bf072867f8b43f200000000665c000007ef7a7422d3f56e01034f4f5800000a0000000000000006",
  "fullHash": "1d70408f16781464b80e528472b2db865ae6686e75dc5eeb4e3394dd0427e573",
  "transaction": "7211520941614985245"
}

Place Order

Place an asset order. POST only.

Request: Refer to Create Transaction Request for common parameters.
• requestType is either placeBidOrder or placeAskOrder
• asset is the asset ID of the asset being ordered
• quantityQNT is the amount (in QNT) of the asset being ordered
• priceNQT is the bid/ask price (in NQT)

| Response: Refer to Create Transaction Response. The transaction ID is also the order ID. |

Place Ask Order

Refer to Place Order.

Place Ask Order Example

curl="(POST) http://165.22.48.164:7876/dwa?requestType=placeAskOrder"
-P "requestType: placeAskOrder"
-P "asset: 15418948120526107039"
-P "quantityQNT: 10"
-P "priceNQT: 10"
-P "secretPhrase: makandirumah"
-P "feeNQT: 1000"
-P "deadline: 24"
{
  "signatureHash": "21c12d354697956742caaf56b76beb222229ccc63b1b7053c82f7888c11caff7",
  "transactionJSON": {
    "senderPublicKey": "2cd98d0f6a138ef25255830cd868106adf3825b4fa24c9ced4134928d905a202",
    "signature": "dc7ee9008847b16bcfadb5c26361c05640a9cfaa3d87028e39a7fd442e5a6a06300ce3cbec4c972ee1ed9d93b13bd852e60dc795db7c6ff82dab1316ea23d671",
    "feeNQT": "1000",
    "type": 2,
    "fullHash": "b9a2b71a50c64522698a22d08880593672c3cd16fd79ec9c2bb67f0df4545826",
    "version": 1,
    "phased": false,
    "ecBlockId": "13907357036714425007",
    "signatureHash": "21c12d354697956742caaf56b76beb222229ccc63b1b7053c82f7888c11caff7",
    "attachment": {
      "version.AskOrderPlacement": 1,
      "quantityQNT": "10",
      "priceNQT": "10",
      "asset": "15418948120526107039",
      "feeQNT": "12"
    },
    "senderRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
    "subtype": 2,
    "amountNQT": "0",
    "sender": "15035502555517475618",
    "ecBlockHeight": 23661,
    "deadline": 24,
    "transaction": "2469598018030510777",
    "timestamp": 25651499,
    "height": 2147483647
  },
  "unsignedTransactionBytes": "02122b69870118002cd98d0f6a138ef25255830cd868106adf3825b4fa24c9ced4134928d905a2024add89a5076a22180000000000000000e803000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006d5c0000af7ae4618adb00c1019fb1225e9f1bfbd50a000000000000000a000000000000000c00000000000000",
  "broadcasted": true,
  "requestProcessingTime": 4,
  "transactionBytes": "02122b69870118002cd98d0f6a138ef25255830cd868106adf3825b4fa24c9ced4134928d905a2024add89a5076a22180000000000000000e8030000000000000000000000000000000000000000000000000000000000000000000000000000dc7ee9008847b16bcfadb5c26361c05640a9cfaa3d87028e39a7fd442e5a6a06300ce3cbec4c972ee1ed9d93b13bd852e60dc795db7c6ff82dab1316ea23d671000000006d5c0000af7ae4618adb00c1019fb1225e9f1bfbd50a000000000000000a000000000000000c00000000000000",
  "fullHash": "b9a2b71a50c64522698a22d08880593672c3cd16fd79ec9c2bb67f0df4545826",
  "transaction": "2469598018030510777"
}

Place Bid Order

Refer to Place Order.

Place Bid Order Example

curl="(POST) http://165.22.48.164:7876/dwa?requestType=placeBidOrder"
-P "requestType: placeBidOrder"
-P "asset: 15418948120526107039"
-P "quantityQNT: 10"
-P "priceNQT: 10"
-P "secretPhrase: makandirumah"
-P "feeNQT: 1000"
-P "deadline: 24"
{
  "signatureHash": "794e36ab6bee3b4e82c1ec0085ce3ea6b5160ad5c8b5a0852bb9295210be7013",
  "transactionJSON": {
    "senderPublicKey": "2cd98d0f6a138ef25255830cd868106adf3825b4fa24c9ced4134928d905a202",
    "signature": "53bb15c107e4ac2066fe4e3bf3b0cd1cefc890fba7e5a2963456bf7cfb9d5d0c7739823c4ffd5b7d44640fd10411a3243944a990571005b3ddecc089beecb100",
    "feeNQT": "1000",
    "type": 2,
    "fullHash": "5cf88764366ba918f0de4b0af1e3cdefd983cb679e95c2cfc957e9e4149c4ff8",
    "version": 1,
    "phased": false,
    "ecBlockId": "16354212907215947464",
    "signatureHash": "794e36ab6bee3b4e82c1ec0085ce3ea6b5160ad5c8b5a0852bb9295210be7013",
    "attachment": {
      "quantityQNT": "10",
      "priceNQT": "10",
      "asset": "15418948120526107039",
      "feeQNT": "0",
      "version.BidOrderPlacement": 1
    },
    "senderRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
    "subtype": 3,
    "amountNQT": "0",
    "sender": "15035502555517475618",
    "ecBlockHeight": 23666,
    "deadline": 24,
    "transaction": "1777069409333409884",
    "timestamp": 25651756,
    "height": 2147483647
  },
  "unsignedTransactionBytes": "02132c6a870118002cd98d0f6a138ef25255830cd868106adf3825b4fa24c9ced4134928d905a2024add89a5076a22180000000000000000e80300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000725c0000c806b7a3fdd5f5e2019fb1225e9f1bfbd50a000000000000000a000000000000000000000000000000",
  "broadcasted": true,
  "requestProcessingTime": 4,
  "transactionBytes": "02132c6a870118002cd98d0f6a138ef25255830cd868106adf3825b4fa24c9ced4134928d905a2024add89a5076a22180000000000000000e803000000000000000000000000000000000000000000000000000000000000000000000000000053bb15c107e4ac2066fe4e3bf3b0cd1cefc890fba7e5a2963456bf7cfb9d5d0c7739823c4ffd5b7d44640fd10411a3243944a990571005b3ddecc089beecb10000000000725c0000c806b7a3fdd5f5e2019fb1225e9f1bfbd50a000000000000000a000000000000000000000000000000",
  "fullHash": "5cf88764366ba918f0de4b0af1e3cdefd983cb679e95c2cfc957e9e4149c4ff8",
  "transaction": "1777069409333409884"
}

Search Assets

Get assets having a name or description that match a given query in reverse relevance order.

Request:
• requestType is searchAssets
• query is a full text query on the asset fields name (S) and description (S) in the standard Lucene syntax
• firstIndex is a zero-based index to the first asset to retrieve (optional)
• lastIndex is a zero-based index to the last asset to retrieve (optional)
• includeCounts is true if the fields beginning with numberOf... are to be included (optional)
• requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
• requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
Response:
• assets (A) is an array of asset objects (refer to Get Asset)
• lastBlock (S) is the last block ID on the blockchain (applies if requireBlock is provided but not requireLastBlock)
• requestProcessingTime (N) is the API request processing time (in millisec)

Search Assets Example

curl="(GET) http://165.22.48.164:7876/dwa?=%2Fdwa&requestType=searchAssets&query=ook"
-P "requestType=searchAssets"
-P "query=ook"
{
  "assets": [
    {
      "initialQuantityQNT": "1000000000000000",
      "quantityQNT": "1000000000000000",
      "accountRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
      "decimals": 3,
      "name": "OOK",
      "description": "OOK Token",
      "asset": "15418948120526107039",
      "account": "15035502555517475618"
    }
  ],
  "requestProcessingTime": 3
}

Transfer Asset

Transfer a quantity of an asset from one account to another. POST only.

Request: Refer to Create Transaction Request for common parameters.
• requestType is transferAsset
• recipient is the recipient account ID
• recipientPublicKey is the public key of the recipient account (optional, enhances security of a new account)
• asset is the ID of the asset being transferred
• quantityQNT is the amount (in QNT) of the asset being transferred
Response: Refer to Create Transaction Response. The transaction ID is also the transfered asset ID.

Transfer Asset Example

curl="(POST) http://165.22.48.164:7876/dwa?requestType=transferAsset"
-P "requestType: transferAsset"
-P "recipient: DWA-KQT4-X8NK-AKD6-FP8C3"
-P "asset: 15418948120526107039"
-P "quantityQNT: 10"
-P "secretPhrase: makandirumah"
-P "feeNQT: 1000"
-P "deadline: 24"
{
  "signatureHash": "3dd31c2534d9a4ca0bdcc5694ce630f88611b990518b7987054b4ce33cf18010",
  "transactionJSON": {
    "senderPublicKey": "2cd98d0f6a138ef25255830cd868106adf3825b4fa24c9ced4134928d905a202",
    "signature": "e59fdf04e0c130c86bbffd3d4a5447a4cbf9da3771b06a0c79c7a981f74e7308804a5f47cbcc2d12469195b91ba13077071e6f317f5d3401c9a676239cae3469",
    "feeNQT": "1000",
    "type": 2,
    "fullHash": "8852d6aa57ecb9a477039d20a93d9c2b642dd6b7cf285e55c39e57ec3f3ae1ea",
    "version": 1,
    "phased": false,
    "ecBlockId": "5349735253130559351",
    "signatureHash": "3dd31c2534d9a4ca0bdcc5694ce630f88611b990518b7987054b4ce33cf18010",
    "attachment": {
      "version.AssetTransfer": 1,
      "quantityQNT": "10",
      "asset": "15418948120526107039",
      "feeQNT": "12"
    },
    "senderRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
    "subtype": 1,
    "amountNQT": "0",
    "sender": "15035502555517475618",
    "recipientRS": "DWA-KQT4-X8NK-AKD6-FP8C3",
    "recipient": "15035502555517475618",
    "ecBlockHeight": 23669,
    "deadline": 24,
    "transaction": "11869778154184135304",
    "timestamp": 25652012,
    "height": 2147483647
  },
  "unsignedTransactionBytes": "02112c6b870118002cd98d0f6a138ef25255830cd868106adf3825b4fa24c9ced4134928d905a20222db18a9e9d5a8d00000000000000000e80300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000755c0000773f3b5dde133e4a019fb1225e9f1bfbd50a000000000000000c00000000000000",
  "broadcasted": true,
  "requestProcessingTime": 5,
  "transactionBytes": "02112c6b870118002cd98d0f6a138ef25255830cd868106adf3825b4fa24c9ced4134928d905a20222db18a9e9d5a8d00000000000000000e8030000000000000000000000000000000000000000000000000000000000000000000000000000e59fdf04e0c130c86bbffd3d4a5447a4cbf9da3771b06a0c79c7a981f74e7308804a5f47cbcc2d12469195b91ba13077071e6f317f5d3401c9a676239cae346900000000755c0000773f3b5dde133e4a019fb1225e9f1bfbd50a000000000000000c00000000000000",
  "fullHash": "8852d6aa57ecb9a477039d20a93d9c2b642dd6b7cf285e55c39e57ec3f3ae1ea",
  "transaction": "11869778154184135304"
}

Errors

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your API key is wrong.
403 Forbidden -- The kitten requested is hidden for administrators only.
404 Not Found -- The specified kitten could not be found.
405 Method Not Allowed -- You tried to access a kitten with an invalid method.
406 Not Acceptable -- You requested a format that isn't json.
410 Gone -- The kitten requested has been removed from our servers.
418 I'm a teapot.
429 Too Many Requests -- You're requesting too many kittens! Slow down!
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.