Account Operations
Delete Account Property
Deletes an account property. POST only.
Request:
- requestTypeis- deleteAccountProperty
- propertyis the name of the property
- recipientis the account where a property should be removed (optional)
- setteris the account who set the property (optional)
Response: Refer to Create Transaction Response.
Example: Refer to Delete Account Property example.
Get Account
Get account information given an account ID.
Request:
- requestTypeis- getAccount
- accountis the account ID
- includeLessorsis- trueto include- lessors,- lessorsRSand- lessorsInfo(optional)
- includeAssetsis- trueto include- assetBalancesand- unconfirmedAssetBalances(optional)
- includeCurrenciesis- trueto include- accountCurrencies(optional)
- includeEffectiveBalanceis- trueto include- effectiveBalanceNXTand- guaranteedBalanceNQT(optional)
- requireBlockis the block ID of a block that must be present in the blockchain during execution (optional)
- requireLastBlockis the block ID of a block that must be last in the blockchain during execution (optional)
Response:
- unconfirmedBalanceNQT(S) is- balanceNQTless unconfirmed outgoing transactions, the balance displayed in the client
- effectiveBalanceNXT(N) is the balance (in BLX) 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- requireBlockis provided but not- requireLastBlock)
Example: Refer to Get Account example.
Get Account Block Count
Get the number of blocks forged by an account.
Request:
- requestTypeis- getAccountBlockCount
- accountis an account ID
- requireBlockis the block ID of a block that must be present in the blockchain during execution (optional)
- requireLastBlockis 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- requireBlockis provided but not- requireLastBlock)
- requestProcessingTime(N) is the API request processing time (in millisec)
Example: Refer to Get Account Block Count example.
Get Account Block Ids
Get the block IDs of all blocks forged (generated) by an account in reverse block height order.
Request:
- requestTypeis- getAccountBlockIds
- accountis the account ID
- timestampis the earliest block (in seconds since the genesis block) to retrieve (optional)
- firstIndexis a zero-based index to the first block ID to retrieve (optional)
- lastIndexis a zero-based index to the last block ID to retrieve (optional)
- requireBlockis the block ID of a block that must be present in the blockchain during execution (optional)
- requireLastBlockis the block ID of a block that must be last in the blockchain during execution (optional)
Response:
- blockIds(A) is an array of block IDs
- lastBlock(S) is the last block ID on the blockchain (applies if- requireBlockis provided but not- requireLastBlock)
- requestProcessingTime(N) is the API request processing time (in millsec)
Example: Refer to Get Account Block Ids example.
Get Account Blocks
Get all blocks forged (generated) by an account in reverse block height order.
Request:
- requestTypeis- getAccountBlocks
- accountis the account ID
- timestampis the earliest block (in seconds since the genesis block) to retrieve (optional)
- firstIndexis a zero-based index to the first block to retrieve (optional)
- lastIndexis a zero-based index to the last block to retrieve (optional)
- includeTransactionsis- trueto retrieve transaction details, otherwise only transaction IDs are retrieved (optional)
- requireBlockis the block ID of a block that must be present in the blockchain during execution (optional)
- requireLastBlockis 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- requireBlockis provided but not- requireLastBlock)
- requestProcessingTime(N) is the API request processing time (in millisec)
Example: Refer to Get Account Blocks example.
Get Account Id
Get an account ID given a secret passphrase or public key. POST only.
Request:
- requestTypeis- getAccountId
- secretPhraseis the secret passphrase of the account (optional)
- publicKeyis the public key of the account (optional if- secretPhraseprovided)
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
Example: Refer to Get Account Id example.
Get Account Ledger
Get multiple account ledger entries.
Request:
- requestTypeis- getAccountLedger
- accountis the account ID (optional)
- firstIndexis a zero-based index to the first block to retrieve (optional)
- lastIndexis a zero-based index to the last block to retrieve (optional)
- eventis the event ID (optional)
- eventTypeis a string representing the event type (optional)
- holdingTypeis a string representing the holding type (optional)
- holdingis the holding ID (optional)
- includeTransactionsis true to retrieve transaction details, otherwise only transaction IDs are retrieved (optional)
- includeHoldingInfois true to retrieve asset or currency info (optional) with each ledger entry. The default is false.
- requireBlockis the block ID of a block that must be present in the blockchain during execution (optional)
- requireLastBlockis 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:- 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)
Example: Refer to Get Account Ledger example.
Get Account Ledger Entry
Get a specific account ledger entry.
Request:
- requestTypeis- getAccountLedgerEntry
- ledgerIdis the ledger ID
- includeTransactionsis true to retrieve transaction details, otherwise only transaction IDs are retrieved (optional)
- includeHoldingInfois- trueto 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)
Example: Refer to Get Account Ledger Entry example.
Get Account Lessors
Get the lessors to an account.
Request:
- requestTypeis- getAccountLessors
- accountis the account ID
- heightis the height of the blockchain to determine the lessors (optional, default is last block)
- requireBlockis the block ID of a block that must be present in the blockchain during execution (optional)
- requireLastBlockis 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:
- 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- requireBlockis 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:- lessorRS(S)
- lessor(S)
- guaranteedBalanceNQT(S)
 
Example: Refer to Get Account Lessors example.
Get Account Properties
Get the Account properties for a specific account or setter.
Request:
- requestTypeis- getAccountProperties
- recipientis the account ID to which the property is attached to
- setteris the account ID who set the property (optional if- recipientprovided)
- propertyis the property key (optional)
- firstIndexis a zero-based index to the first block to retrieve (optional)
- lastIndexis a zero-based index to the last block to retrieve (optional)
- requireBlockis the block ID of a block that must be present in the blockchain during execution (optional)
- requireLastBlockis 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:- setterRS: (S) is the Reed-Solomon address of the setter account (only if setter is omitted in the request)
- recipientRS: (S) is the Reed-Solomon address of the recipient account (only if recipient is omitted in the request)
- recipient: (S) is the account number of the recipient account (only if recipient is omitted in the request)
- property: (S) property name
- setter: (S) is the account number of the setter account (only if setter is omitted in the request)
- value: (S) property value
 
Example: Refer to Get Account Properties example.
Get Account Public Key
Get the public key associated with an account ID.
Request:
- requestTypeis- getAccountPublicKey
- accountis the account ID
- requireBlockis the block ID of a block that must be present in the blockchain during execution (optional)
- requireLastBlockis 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- requireBlockis provided but not- requireLastBlock)
- requestProcessingTime(N) is the API request processing time (in millisec)
Example: Refer to Get Account Public Key example.
Get Balance
Get the balance of an account.
Request:
- requestTypeis- getBalance
- accountis an account ID
- includeEffectiveBalanceis- trueto include- effectiveBalanceNXTand- guaranteedBalanceNQT(optional)
- heightis the height to retrieve account balance for, if still available (optional)
- requireBlockis the block ID of a block that must be present in the blockchain during execution (optional)
- requireLastBlockis the block ID of a block that must be last in the blockchain during execution (optional)
Response:
- unconfirmedBalanceNQT(S) is- balanceNQTless 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 Blue0x) 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- requireBlockis provided but not- requireLastBlock)
- requestProcessingTime(N) is the API request processing time (in millisec)
Example: Refer to Get Balance example.
Get Blockchain Transactions
Get the transactions associated with an account in reverse block timestamp order.
Request:
- requestTypeis- getBlockchainTransactions
- accountis the account ID
- timestampis the earliest block (in seconds since the genesis block) to retrieve (optional)
- typeis the type of transactions to retrieve (optional)
- subtypeis the subtype of transactions to retrieve (optional)
- firstIndexis a zero-based index to the first transaction to retrieve (optional)
- lastIndexis a zero-based index to the last transaction to retrieve (optional)
- numberOfConfirmationsis the required number of confirmations per transaction (optional)
- withMessageis- trueto retrieve only only transactions having a message attachment, either non-encrypted or decryptable by the account (optional)
- phasedOnlyis- trueto retrieve only phased transactions (optional unless- nonPhasedOnlyprovided)
- nonPhasedOnlyis- trueto retrieve only nonphased transactions (optional unless- phasedOnlyprovided)
- includeExpiredPrunableis- true' to retrieve pruned data if available (optional)
- includePhasingResultis- trueto retrieve execution status of each phased transaction (optional)
- executedOnlyis- trueto exclude phased transactions that are not yet executed (optional)
- requireBlockis the block ID of a block that must be present in the blockchain during execution (optional)
- requireLastBlockis 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- requireBlockis provided but not- requireLastBlock)
- requestProcessingTime(N) is the API request processing time (in millisec)
Example: Refer to Get Blockchain Transactions example.
Get Guaranteed Balance
Get the balance of an account that is confirmed at least a specified number of times.
Request:
- requestTypeis- getGuaranteedBalance
- accountis an account ID
- numberOfConfirmationsis 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)
- requireBlockis the block ID of a block that must be present in the blockchain during execution (optional)
- requireLastBlockis 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- numberOfConfirmationsconfirmations
- lastBlock(S) is the last block ID on the blockchain (applies if- requireBlockis provided but not- requireLastBlock)
- requestProcessingTime(N) is the API request processing time (in millisec)
Example: Refer to Get Guaranteed Balance example.
Get Unconfirmed Transaction Ids
Get a list of unconfirmed transaction IDs associated with an account.
Request:
- requestTypeis- getUnconfirmedTransactionIds
- accountis one account ID (optional)
- accountis one account ID (optional)
- requireBlockis the block ID of a block that must be present in the blockchain during execution (optional)
- requireLastBlockis the block ID of a block that must be last in the blockchain during execution (optional)
- firstIndexis a zero-based index to the first transaction ID to retrieve (optional)
- lastIndexis 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- requireBlockis provided but not- requireLastBlock)
- requestProcessingTime(N) is the API request processing time (in millisec)
Example: Refer to Get Unconfirmed Transaction Ids example.
Get Unconfirmed Transactions
Get a list of unconfirmed transactions associated with an account.
Request:
- requestTypeis- getUnconfirmedTransactions
- accountis one account ID (optional)
- accountis one account ID (optional)
- requireBlockis the block ID of a block that must be present in the blockchain during execution (optional)
- requireLastBlockis the block ID of a block that must be last in the blockchain during execution (optional)
- firstIndexis a zero-based index to the first unconfirmed transaction to retrieve (optional)
- lastIndexis a zero-based index to the last unconfirmed transaction to retrieve (optional)
Response:
- 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- requireBlockis provided but not- requireLastBlock)
- requestProcessingTime(N) is the API request processing time (in millisec)
Example: Refer to Get Unconfirmed Transactions example.
Search Accounts
Get accounts having a name or description that match a given query in reverse relevance order.
Request:
- requestTypeis- searchAccounts
- queryis a full text query on the account fields- name(S) and- description(S) in the standard Lucene syntax (opens in a new tab)
- firstIndexis a zero-based index to the first account to retrieve (optional)
- lastIndexis a zero-based index to the last account to retrieve (optional)
- requireBlockis the block ID of a block that must be present in the blockchain during execution (optional)
- requireLastBlockis 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:- account(S) is the account number
- accountRS(S) is the Reed-Solomon address of the account
- name(S) is the name of the account
- description(S) is the description of the account (if applicable)
 
- lastBlock(S) is the last block ID on the blockchain (applies if- requireBlockis provided but not- requireLastBlock)
- requestProcessingTime(N) is the API request processing time (in millisec)
Example: Refer to Search Accounts example.
Send Money
Send Blue0x to another account. POST only.
Request: Refer to Create Transaction Request for common parameters.
- requestTypeis- sendMoney
- amountNQTis the amount (in NQT) in the transaction
- recipientis the account ID of the recipient
- recipientPublicKeyis the public key of the receiving account (optional, enhances security of a new account)
Response: Refer to Create Transaction Response.
Example: Refer to Send Money example.
Send BLX
Refer to Send Money.
Set Account Info
Set account information. POST only.
Request: Refer to Create Transaction Request for common parameters.
- requestTypeis- setAccountInfo
- nameis a name to associate with the account (optional)
- descriptionis a description to associate with the account (optional)
- messagePatternRegexis 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)
- messagePatternFlagsis a bitmask of java.util.regex.Pattern flags, such as 2 (Pattern.CASE\INSENSITIVE)
Response: Refer to Create Transaction Response.
Example: Refer to Set Account Info example.
Set Account Property
Set account property. POST only.
Request: Refer to Create Transaction Request for common parameters.
- requestTypeis- setAccountProperty
- recipientis the account ID of the recipient.
- propertyis the property name.
- valueis the property value.
Response: Refer to Create Transaction Response.
Example: Refer to Set Account Property example.
Start Funding Monitor
Starts a funding monitor that will transfer BLX, an ASSET or a 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:
- requestTypeis- startFundingMonitor
- propertyis the name of the account property
- amountis the amount to fund the recipient account with (in NQT or QNT)
- thresholdis the threshold
- intervalis the the number of blocks to wait after before funding the recipient
- secretPhraseis the secret phrase of the funding account
- holdingTypeis a string representing the holding type (optional)
- holdingis the holding ID (optional)
Response:
- started(B) is- trueif the monitor has been started
- requestProcessingTime(N) is the API request processing time (in millisec)
Example: Refer to Start Funding Monitor example.
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:
- requestTypeis- stopFundingMonitor
- secretPhraseis the secret phrase of the funding account, used to stop a single monitor. (optional)
- adminPasswordis the admin password, used to stop a single monitor or all monitors (optional if- secretPhraseis provided)
- propertyis the name of the account property (optional)
- holdingTypeis a string representing the holding type (optional)
- holdingis the holding ID (optional)
- accountis 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)
Example: Refer to Stop Funding Monitor example.
Account Control Operations
Get All Phasing Only Controls
Retrieve all accounts subject to phasing control with their respective restrictions.
Request:
- requestTypeis- getAllPhasingOnlyControls
- firstIndexis a zero-based index to the first block ID to retrieve (optional)
- lastIndexis a zero-based index to the last block ID to retrieve (optional)
- requireBlockis the block ID of a block that must be present in the blockchain during execution (optional)
- requireLastBlockis 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)
Example: Refer to Get All Phasing Only Controls example.
Get Phasing Only Control
Retrieve phasing control with their respective restrictions for a specific account.
Request:
- requestTypeis- getPhasingOnlyControl
- accountis the account ID
- requireBlockis the block ID of a block that must be present in the blockchain during execution (optional)
- requireLastBlockis 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)
Example: Refer to Get Phasing Only Control example.
Set Phasing Only Control
Sets (or removes) phasing control for a specific account. POST only.
Request: Refer to Create Transaction Request for common parameters.
- requestTypeis- setPhasingOnlyControl
- controlVotingModelis the voting model or -1 to remove phasing control
- controlQuorumis the expected quorum (optional)
- controlMinBalanceis the expected minimum balance (optional)
- controlMinBalanceModelis the expected minimum balance model (optional)
- controlHoldingis the holding ID (optional)
- controlWhitelistedis the whitelisted accounts (optional, multiple values)
- controlWhitelistedis the whitelisted accounts (optional, multiple values)
- controlMaxFeesis the maximum allowed accumulated total fees for not yet finished phased transactions (optional)
- controlMinDurationis the minimum duration in block height (optional)
- controlMaxDurationis the maximum phasing duration in block height (optional)
Response: Refer to Create Transaction Response.
Example: Refer to Set Phasing Only Control example.