Asset Exchange Operations
Cancel Order
Cancel an existing asset order. POST only.
Request: Refer to Create Transaction Request for common parameters.
requestType
is eithercancelBidOrder
orcancelAskOrder
order
is the order ID of the order being canceled
Response: Refer to Create Transaction Response.
Example: Refer to Cancel Order example.
Cancel Ask Order
Refer to Cancel Order.
Cancel Bid Order
Refer to Cancel Order.
Delete Asset Shares
Permanently deletes a specified quantity of owned asset shares.
Request: Refer to Create Transaction Request for common parameters.
requestType
isdeleteAssetShares
asset
is the asset IDquantityQNT
is the quantity (in QNT) of the asset to be deleted
Response: Refer to Create Transaction Response.
Example: Refer to Delete Asset Shares example.
Dividend Payment
Pay dividend to all shareholders of an asset. POST only.
Request: Refer to Create Transaction Request for common parameters.
requestType
isdividendPayment
asset
is the asset IDheight
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.
Example: Refer to Dividend Payment example.
Get Account Asset Count
Get the number of assets owned by an account given the account ID.
Request:
requestType
isgetAccountAssetCount
account
is the account IDheight
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)
Note: If table trimming is enabled (default), the height must be within 1440 blocks of the last block.
Response:
numberOfAssets
(N) is the number of assets owned by the accountlastBlock
(S) is the last block ID on the blockchain (applies ifrequireBlock
is provided but notrequireLastBlock
)requestProcessingTime
(N) is the API request processing time (in millisec)
Example: Refer to Get Account Asset Count example.
Get Account Assets
Get the assets owned by a given account in reverse quantity order.
Request:
requestType
isgetAccountAssets
account
is the account IDasset
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
istrue
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)
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 (unless theasset
parameter is specified) with the following fields for each asset:quantityQNT
(S) is the quantity (in QNT) of the assetunconfirmedQuantityQNT
(S) is the unconfirmed quantity (in QNT) of the assetdecimals
(N) is the number of decimal places used by the asset (ifincludeAssetInfo
istrue
)name
(S) is the asset name (ifincludeAssetInfo
istrue
)asset
(S) is the asset ID
lastBlock
(S) is the last block ID on the blockchain (applies ifrequireBlock
is provided but notrequireLastBlock
)requestProcessingTime
(N) is the API request processing time (in millisec)
Example: Refer to Get Account Assets example.
Get Account Current Order Ids
Get current asset order IDs given an account ID in reverse block height order.
Request:
requestType
is eithergetAccountCurrentBidOrderIds
orgetAccountCurrentAskOrderIds
account
is the account IDasset
is an asset ID filter (optional)firstIndex
is a zero-based index to the first order ID to retrieve (optional)lastIndex
is a zero-based index to the last order 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:
bidOrderIds
oraskOrderIds
(A) is an array of order IDslastBlock
(S) is the last block ID on the blockchain (applies ifrequireBlock
is provided but notrequireLastBlock
)requestProcessingTime
(N) is the API request processing time (in millisec)
Example: Refer to Get Account Current Order Ids example.
Get Account Current Ask Order Ids
Refer to Get Account Current Order Ids.
Get Account Current Bid Order Ids
Refer to Get Account Current Order Ids.
Get Account Current Orders
Get current asset orders given an account ID in reverse block height order.
Request:
requestType
is eithergetAccountCurrentBidOrders
orgetAccountCurrentAskOrders
account
is the account IDasset
is an asset ID filter (optional)firstIndex
is a zero-based index to the first order to retrieve (optional)lastIndex
is a zero-based index to the last order 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:
bidOrders
oraskOrders
(A) is an array of order objects (refer to Get Order for details)lastBlock
(S) is the last block ID on the blockchain (applies ifrequireBlock
is provided but notrequireLastBlock
)requestProcessingTime
(N) is the API request processing time (in millisec)
Example: Refer to Get Account Current Orders example.
Get Account Current Ask Orders
Refer to Get Account Current Orders.
Get Account Current Bid Orders
Refer to Get Account Current Orders.
Get All Assets
Get all assets in the exchange in reverse block height of creation order.
Request:
requestType
isgetAllAssets
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
istrue
if the fields beginning withnumberOf...
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 ifrequireBlock
is provided but notrequireLastBlock
)requestProcessingTime
(N) is the API request processing time (in millisec)
Example: Refer to Get All Assets example.
Get All Open Orders
Get all open bid/ask orders in reverse block height order.
Request:
requestType
is eithergetAllOpenBidOrders
orgetAllOpenAskOrders
firstIndex
is a zero-based index to the first order to retrieve (optional)lastIndex
is a zero-based index to the last order 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:
openOrders
(A) is an array of order objects (refer to Get Order for details)lastBlock
(S) is the last block ID on the blockchain (applies ifrequireBlock
is provided but notrequireLastBlock
)requestProcessingTime
(N) is the API request processing time (in millisec)
Example: Refer to Get All Open Orders example.
Get All Open Ask Orders
Refer to Get All Open Orders.
Get All Open Bid Orders
Refer to Get All Open Orders.
Get All Trades
Get all trades since a given timestamp in reverse block height order.
Request:
requestType
isgetAllTrades
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
istrue
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 ifrequireBlock
is provided but notrequireLastBlock
)requestProcessingTime
(N) is the API request processing time (in millisec)
Example: Refer to Get All Trades example.
Get Asset
Get asset information given an asset ID.
Request:
requestType
isgetAsset
asset
is the asset IDincludeCounts
istrue
if the fields beginning withnumberOf...
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 assetaccountRS
(S) is the Reed-Solomon address of the account that issued the assetname
(S) is the asset namedescription
(S) is the asset descriptionquantityQNT
(S) is the total asset quantity (in QNT) in existenceasset
(N) is the asset IDdecimals
(N) is the number of decimal places used by the assetnumberOfAccounts
(N) is the number of accounts that own the assetnumberOfTrades
(N) is the number of trades of this assetnumberOfTransfers
(N) is the number of transfers of this assetlastBlock
(S) is the last block ID on the blockchain (applies ifrequireBlock
is provided but notrequireLastBlock
)requestProcessingTime
(N) is the API request processing time (in millisec)
Example: Refer to Get Asset example.
Get Asset Account Count
Get the number of accounts that own an asset given the asset ID.
Request:
requestType
isgetAssetAccountCount
asset
is the asset IDheight
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 assetlastBlock
(S) is the last block ID on the blockchain (applies ifrequireBlock
is provided but notrequireLastBlock
)requestProcessingTime
(N) is the API request processing time (in millisec)
Example: Refer to Get Asset Account Count example.
Get Asset Accounts
Get the accounts that own an asset given the asset ID in reverse quantity order.
Request:
requestType
isgetAssetAccounts
asset
is the asset IDheight
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 assetaccountRS
(S) is the Reed-Solomon address of the account that owns the assetunconfirmedQuantityQNT
(S) is the unconfirmed quantity (in QNT) of the assetasset
(S) is the asset IDaccount
(S) is the number of the account that owns the asset
lastBlock
(S) is the last block ID on the blockchain (applies ifrequireBlock
is provided but notrequireLastBlock
)requestProcessingTime
(N) is the API request processing time (in millisec)
Example: Refer to Get Asset Accounts example.
Get Asset Deletes
Get asset deletions for a specific asset or account.
Request:
requestType
isgetAssetDeletes
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
istrue
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 deletedassetDelete
(S) is the transaction IDaccount
(S) is the account IDaccountRS
(S) is the account Reed Solomon addressasset
(S) is the asset IDheight
(N) is the block height of the deletetimestamp
(N) is the block timestamp of the deletedecimals
(N) is the number of decimal places used by the asset (ifincludeAssetInfo
istrue
)name
(S) is the asset name (ifincludeAssetInfo
istrue
)
Example: Refer to Get Asset Deletes example.
Get Asset Dividends
Get the dividend payment history for a specific asset.
Request:
requestType
isgetAssetDividends
asset
is the asset IDfirstIndex
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 IDnumberOfAccounts
(N) is the number of accounts that received a dividendamountNQTPerQNT
(S) is the amount of BLX (in NQT) paid per quantity (in QNT) of the assettotalDividend
(S) is the total amount of BLX (in NQT) sent in the dividend paymentdividendHeight
(N) is the block height of the dividend calculationasset
(S) is the asset IDheight
(N) is the block height of the dividend paymenttimestamp
(N) is the block timestamp of the dividend payment
Example: Refer to Get Asset Dividends example.
Get Asset Ids
Get the IDs of all assets in the exchange in reverse block height of creation order.
Request:
requestType
isgetAssetIds
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 IDslastBlock
(S) is the last block ID on the blockchain (applies ifrequireBlock
is provided but notrequireLastBlock
)requestProcessingTime
(N) is the API request processing time (in millisec)
Example: Refer to Get Asset Ids example.
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 eithergetAssetTransfers
orgetExpectedAssetTransfers
, where expected transfers are from the unconfirmed transactions pool or are phased transactions scheduled to finish in the next blockasset
is the asset ID (optional)account
is the account ID (optional ifasset
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
istrue
if thedecimals
andname
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 tradedsenderRS
(S) is the Reed-Solomon address of the senderassetTransfer
(S) is the transaction ID of the asset transfersender
(S) is the account number of the senderrecipientRS
(S) is the Reed-Solomon address of the recipientdecimals
(N) is the number of decimal places used by the asset (ifincludeAssetInfo
istrue
)recipient
(S) is the account number of the recipientname
(S) is the name of the asset (ifincludeAssetInfo
istrue
)asset
(S) is the asset IDheight
(N) is the height of the transfer blocktimestamp
(N) is the timestamp (in seconds since the genesis block) of the transfer block, does not apply to an expected transferphased
(B) istrue
if the transaction is phased,false
otherwise, applies only to an expected transfer
lastBlock
(S) is the last block ID on the blockchain (applies ifrequireBlock
is provided but notrequireLastBlock
)requestProcessingTime
(N) is the API request processing time (in millisec)
Example: Refer to Get Asset Transfers example.
Get Expected Asset Transfers
Refer to Get Asset Transfers.
Get Assets
Get asset information given multiple asset IDs
Request:
requestType
isgetAssets
assets
is one the multiple asset IDsassets
is one the multiple asset IDsincludeCounts
istrue
if the fields beginning withnumberOf...
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 ifrequireBlock
is provided but notrequireLastBlock
)requestProcessingTime
(N) is the API request processing time (in millisec)
Example: Refer to Get Assets example.
Get Assets By Issuer
Get asset information given multiple creation account IDs in reverse block height of creation order.
Request:
requestType
isgetAssetsByIssuer
account
is one of the multiple account IDsaccount
is one of the multiple account IDsfirstIndex
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
istrue
if the fields beginning withnumberOf...
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 ifrequireBlock
is provided but notrequireLastBlock
)requestProcessingTime
(N) is the API request processing time (in millisec)
Example: Refer to Get Assets By Issuer example.
Get Expected Asset Deletes
Gets asset deletes which are expected to be executed in the next block.
Request:
requestType
is eithergetExpectedAssetDeletes
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
istrue
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 IDasset
(S) is the asset IDaccount
(S) is the account IDaccountRS
(S) is the account Reed Solomon addressquantityQNT
(S) is the number of shares that will be deleteddecimals
(N) is the number of decimal places used by the asset (ifincludeAssetInfo
istrue
)name
(S) is the asset name (ifincludeAssetInfo
istrue
)
requestProcessingTime
(N) is the API request processing time (in millisec)
Example: Refer to Get Expected Asset Deletes example.
Get Order
Get a bid/ask order given an order ID.
Request:
requestType
is eithergetBidOrder
orgetAskOrder
order
is the Order IDrequireBlock
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 associated with the orderaccountRS
(S) is the Reed-Solomon address of the accountasset
(S) is the ID of the asset being orderedquantityQNT
(S) is the order quantity (in QNT)priceNQT
(S) is the order price (in NQT)height
(N) is the block height of the order transactiontransactionHeight
(N) is the transaction heighttransactionIndex
(N) is a zero-based index giving the order of the transaction in its blockorder
(S) is the ID of the ordertype
(S) is the type of order (bid
orask
)lastBlock
(S) is the last block ID on the blockchain (applies ifrequireBlock
is provided but notrequireLastBlock
)requestProcessingTime
(N) is the API request processing time (in millisec)
Example: Refer to Get Order example.
Get Ask Order
Refer to Get Order.
Get Bid Order
Refer to Get Order.
Get Order Ids
Get bid/ask order IDs given an asset ID, in order of decreasing bid price or increasing ask price.
Request:
requestType
is eithergetBidOrderIds
orgetAskOrderIds
asset
is the asset IDfirstIndex
is a zero-based index to the first order ID to retrieve (optional)lastIndex
is a zero-based index to the last order 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:
bidOrderIds
oraskOrderIds
(A) is an array of order IDslastBlock
(S) is the last block ID on the blockchain (applies ifrequireBlock
is provided but notrequireLastBlock
)requestProcessingTime
(N) is the API request processing time (in millisec)
Example: Refer to Get Order Ids example.
Get Ask Order Ids
Refer to Get Order Ids.
Get Bid Order Ids
Refer to Get Order Ids.
Get Orders
Get bid/ask orders given an asset ID, in order of decreasing bid price or increasing ask price (if sortByPrice
is true
for expected orders, otherwise in the expected order of execution).
Request:
requestType
is one ofgetBidOrders
,getAskOrders
,getExpectedBidOrders
orgetExpectedAskOrders
, where expected orders are from the unconfirmed transactions pool or are phased transactions scheduled to finish in the next blockasset
is the asset IDsortByPrice
istrue
to sort by price (optional, applies only to expected orders, which are returned in expected order of execution by default)showExpectedCancellations
istrue
to include orders that are expected to be cancelled in the next block, based on the content of the unconfirmed transactions pool and the phased transactions expected to finish in the next block (optional, does not apply to expected orders)firstIndex
is a zero-based index to the first order to retrieve (optional, does not apply to expected orders)lastIndex
is a zero-based index to the last order to retrieve (optional, does not apply to expected orders)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:
bidOrders
oraskOrders
(A) is an array of order objects (refer to Get Order for details) with the following additional field only for an expected order:phased
(B) istrue
if the order is phased,false
otherwise
lastBlock
(S) is the last block ID on the blockchain (applies ifrequireBlock
is provided but notrequireLastBlock
)requestProcessingTime
(N) is the API request processing time (in millisec)
Example: Refer to Get Orders example.
Get Ask Orders
Refer to Get Orders.
Get Bid Orders
Refer to Get Orders.
Get Expected Ask Orders
Refer to Get Orders.
Get Expected Bid Orders
Refer to Get Orders.
Get Expected Order Cancellations
Get all expected order cancellations in the order in which they are expected to be executed.
Request:
requestType
isgetExpectedOrderCancellations
, where expected cancellations are from the unconfirmed transactions pool or are phased transactions scheduled to finish in the next blockrequireBlock
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 numberaccountRS
(S) is the Reed-Solomon address of the accountorder
(S) is the ID of the order to be cancelledheight
(N) is the block height of the order cancellation transactionphased
(B) istrue
if the order cancellation transaction is phased
lastBlock
(S) is the last block ID on the blockchain (applies ifrequireBlock
is provided but notrequireLastBlock
)requestProcessingTime
(N) is the API request processing time (in millisec)
Example: Refer to Get Expected Order Cancellations example.
Get Last Trades
Get the last trade of each of multiple assets.
Request:
requestType
isgetLastTrades
assets
is one of multiple asset IDsassets
is one of multiple asset IDsrequireBlock
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 withoutname
anddecimals
for details)requestProcessingTime
(N) is the API request processing time (in millisec)
Example: Refer to Get Last Trades example.
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
isgetOrderTrades
askOrder
is an ask order ID (optional)bidOrder
is a bid order ID (optional ifaskOrder
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
istrue
if thedecimals
andname
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.
Example: Refer to Get Order Trades example.
Get Trades
Get trades associated with a given asset and/or account in reverse block height order.
Request:
requestType
isgetTrades
asset
is the asset ID (optional)account
is the account ID (optional ifasset
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
istrue
if thedecimals
andname
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 sellerquantityQNT
(S) is the quantity (in QNT) of the asset tradedbidOrder
(S) is the bid order IDsellerRS
(S) is the Reed-Solomon address of the sellerbuyer
(S) is the account number of the buyerpriceNQT
(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 IDbuyerRS
(S) is the Reed-Solomon address of the buyerdecimals
(N) is the number of decimal places used by the assetname
(S) is the name of the asset (ifincludeAssetInfo
istrue
)block
(S) is the block ID of the trade (ifincludeAssetInfo
istrue
)asset
(S) is the asset IDaskOrderHeight
(N) is the block height of the ask orderbidOrderHeight
(N) is the block height of the bid ordertradeType
(S) is the trade type (sell
orbuy
, wherebuy
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 blockheight
(N) is the height of the trade block
lastBlock
(S) is the last block ID on the blockchain (applies ifrequireBlock
is provided but notrequireLastBlock
)requestProcessingTime
(N) is the API request processing time (in millisec)
Example: Refer to Get Trades example.
Issue Asset
Create an asset on the exchange. POST only.
Request: Refer to Create Transaction Request for common parameters.
requestType
isissueAsset
name
is the name of the assetdescription
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 existencedecimals
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.
Example: Refer to Issue Asset example.
Place Order
Place an asset order. POST only.
Request: Refer to Create Transaction Request for common parameters.
requestType
is eitherplaceBidOrder
orplaceAskOrder
asset
is the asset ID of the asset being orderedquantityQNT
is the amount (in QNT) of the asset being orderedpriceNQT
is the bid/ask price (in NQT)
Response: Refer to Create Transaction Response. The transaction ID is also the order ID.
Example: Refer to Place Order example.
Place Ask Order
Refer to Place Order.
Place Bid Order
Refer to Place Order.
Search Assets
Get assets having a name or description that match a given query in reverse relevance order.
Request:
requestType
issearchAssets
query
is a full text query on the asset fieldsname
(S) anddescription
(S) in the standard Lucene syntax (opens in a new tab)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
istrue
if the fields beginning withnumberOf...
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 ifrequireBlock
is provided but notrequireLastBlock
)requestProcessingTime
(N) is the API request processing time (in millisec)
Example: Refer to Search Assets example.
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
istransferAsset
recipient
is the recipient account IDrecipientPublicKey
is the public key of the recipient account (optional, enhances security of a new account)asset
is the ID of the asset being transferredquantityQNT
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.
Example: Refer to Transfer Asset example.