Get Exchanges
Get currency exchanges given a currency and/or an account in reverse chronological order.
Request:
- requestType is getExchanges
- currency is a currency ID (optional)
- account is an account ID (optional if currency provided)
- firstIndex is a zero-based index to the first currency exchange to retrieve (optional)
- lastIndex is a zero-based index to the last currency exchange to retrieve (optional)
- timestamp is the earliest block (in seconds since the genesis block) to retrieve (optional)
- includeCurrencyInfo is true to include several currency-related fields (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:
- exchanges (A) is an array of exchange objects with the following fields for each exchange:
- seller (S) is the seller account number
- code (S) is the currency code
- sellerRS (S) is the Reed-Solomon address of the seller account
- units (S) is the amount of currency exchanged (in QNT)
- issuanceHeight (N) is the blockchain height of currency issuance for a reservable currency
- type (N) is the currency type bitmask
- rateTQT (S) is the currency exchange rate (in TQT per QNT)
- buyer (S) is the account number of the buyer
- offer (S) is the offer ID
- buyerRS (S) is the Reed-Solomon address of the buyer account
- decimals (N) is the number of decimal places used by the currency
- name (S) is the currency name
- currency (S) is the currency ID
- block (S) is the block ID of the block containing the exchange transaction
- transaction (S) is the transaction ID of the exchange
- timestamp (N) is the timestamp (in seconds since the genesis block) of the exchange
- height is the blockchain height of the block containing the exchange transaction
- issuerAccountRS (S) is the Reed-Solomon address of the issuer account
- issuerAccount (S) is the issuer account 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)