Skip to content

Get Account Exchange Requests

Get the exchange requests associated with a given account and/or currency in reverse chronological order (or in expected order of execution for expected requests).

Request:

  • requestType is either getAccountExchangeRequests or getExpectedExchangeRequests, where expected requests are from the unconfirmed transactions pool or are phased transactions scheduled to finish in the next block
  • account is the account ID (optional for expected requests)
  • currency is the currency ID (optional for expected requests if account provided)
  • includeCurrencyInfo is true to include the response fields code, decimals, name, issuanceHeight, type, timestamp, issuerAccountRS and issuerAccount (optional, applies only to expected requests)
  • firstIndex is a zero-based index to the first request to retrieve (optional, does not apply to expected requests)
  • lastIndex is a zero-based index to the last request to retrieve (optional, does not apply to expected requests)
  • 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:

  • exchangeRequests (A) is an array of requests with the following fields for each request:
    • code (S) is a currency code
    • subtype (N) is 5 for buy and 6 for sell
    • decimals (N) is the number of decimal places
    • name (S) is the currency name
    • units (S) is the number of currency units to buy or sell (in QNT)
    • issuanceHeight (N) is the blockchain height of issuance for a reservable currency, zero otherwise
    • type (N) is the currency type bitmask
    • transaction (S) is the transaction ID
    • timestamp (N) is the timestamp (in seconds since the genesis block) of the block when the request was executed
    • rateTQT (S) is the exchange rate (in TQT per QNT)
    • issuerAccountRS (S) is the Reed-Solomon address of the issuer account
    • issuerAccount (S) is the issuer account ID
    • phased (B) is true if the transaction is phased (applies only to expected requests)
  • 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)