Open djeck1432 opened 3 hours ago
I am applying to this issue via OnlyDust platform.
Software engineering background majored in backend smart contract development. Looking to make first contribution on this project
Procedure:
Define the Endpoint (GET) Endpoint: /api/stats
Implement the get_stats Method Functionality: This method will return the total amount of user transactions and the number of unique users.
Define a function (e.g., get_stats) that handles the logic for fetching user amounts and unique users. Query Database:
Use a query to get the total amount of transactions for all users. Use another query to get the count of unique users. Return Response:
Return the results in JSON format.
get_stats
methodGET
which will return all user amounts andnumber of unique users
amounts
for all users where position.status isopened
unique users