Displaying historical purchases over API
If you want to display the history of purchases made by your customer's on a front end, follow the below steps:
-
Execute some buys or sells.
-
Hit the GET /trades endpoint and use the
party_codequery parameter, specifying the 6 digit participant code associated with the customer of interest.
Pick and choose relevant fields of your choice, ie trade_quantity, trade_price, side (ensure that this is the side associated with the customer), symbol, or accepted_timestamp (this is when Zero Hash received the transaction), and symbol. Among others.
The records returned from the GET /trades endpoint will be sorted by last_update in ascending order, with the most recent timestamp at the top of the response.
Updated 2 months ago
