Skip to main content

GetOrderTrades

Retrieves trades for specific ask or bid orders.

Endpoint: GET /nxt?requestType=GetOrderTrades

Parameters:

  • askOrderFullHash (bytes, optional): Full hash of the ask order
  • bidOrderFullHash (bytes, optional): Full hash of the bid order
  • includeTotemInfo (boolean, optional, default: false): Include totem information in results
  • firstIndex (int, optional, default: 0): Starting index for pagination
  • lastIndex (int, optional, default: 99): Ending index for pagination

Request Example: /nxt?requestType=GetOrderTrades&askOrderFullHash=abc123...&includeTotemInfo=true

Response:

{
"trades": [
{
"timestamp": 123456789,
"quantityQNT": "100000000",
"currency": "1",
"priceQNTPerShare": "100000000",
"totem": "123456789",
"askOrderFullHash": "abc123...",
"bidOrderFullHash": "def456...",
"askOrderHeight": 123450,
"bidOrderHeight": 123455,
"seller": "111111111",
"buyer": "222222222",
"block": "1234567890",
"height": 123456,
"tradeType": "buy"
}
]
}

Response Fields:

  • trades: array - Array of trade objects
  • trades[].timestamp: number - Timestamp of the trade
  • trades[].quantityQNT: string - Quantity traded in Quantum Units
  • trades[].currency: string - Currency ID (unsigned string)
  • trades[].priceQNTPerShare: string - Price per share in Quantum Units
  • trades[].totem: string - Totem ID (unsigned string)
  • trades[].askOrderFullHash: string - Full hash of the ask order
  • trades[].bidOrderFullHash: string - Full hash of the bid order
  • trades[].askOrderHeight: number - Block height of ask order placement
  • trades[].bidOrderHeight: number - Block height of bid order placement
  • trades[].seller: string - Seller account ID (unsigned string)
  • trades[].buyer: string - Buyer account ID (unsigned string)
  • trades[].block: string - Block ID (unsigned string)
  • trades[].height: number - Block height where trade occurred
  • trades[].tradeType: string - "buy" or "sell"
  • trades[].totemInfo: object - Only if includeTotemInfo=true, contains totem details from putTotemInfo()

Source: GetOrderTrades.java, JSONData.trade() Notes: At least one of askOrderFullHash or bidOrderFullHash must be provided. Can query by chain.