Wallet Analytics Examples
A common use case is to see the number of wallets that are integrated with your project. We have a variety of endpoints that can be used for tracking and reporting fine-grained data such as device, country, and more so you can precisely identify
Fetch wallets for a time interval for a project ID
Here we can pass a specific date range along with the dateInterval parameter in order to get wallets within a time interval. The endpoints can use "DAY", "WEEK" or "MONTH" as possible options.
curl 'https://api.sequence.build/rpc/Builder/WalletsDaily' \
-H 'accept: */*' \
-H 'authorization: BEARER <SECRET_API_ACCESS_KEY>' \
-H 'content-type: application/json' \
--data-raw '{"filter":{"projectId":<PROJECT_ID>,"startDate":"2024-04-23","endDate":"2024-05-23", "dateInterval":"DAY"}}'
Fetch wallets by Country
You can also fetch wallets by country to see where your users are logged in from.
curl 'https://api.sequence.build/rpc/Builder/WalletsByCountry' \
-H 'accept: */*' \
-H 'authorization: BEARER <SECRET_API_ACCESS_KEY>' \
-H 'content-type: application/json' \
--data-raw '{"filter":{"projectId":<PROJECT_ID>,"startDate":"2024-04-23","endDate":"2024-05-23", "dateInterval":"DAY"}}'
Fetch wallets by Device
Additionally, you may want to query by device to get an aggregrated snapshot of where your users are authenticating from.
curl 'https://api.sequence.build/rpc/Builder/WalletsByDevice' \
-H 'accept: */*' \
-H 'authorization: BEARER <SECRET_API_ACCESS_KEY>' \
-H 'content-type: application/json' \
--data-raw '{"filter":{"projectId":<PROJECT_ID>,"startDate":"2024-04-23","endDate":"2024-05-23", "dateInterval":"DAY"}}'
Fetch transactions by wallets
Lastly, you may want to fetch the number of transactions by wallets - these can used either by total or a fixed time interval.
Total
curl 'https://api.sequence.build/rpc/Builder/WalletsTxnSentTotal' \
-H 'accept: */*' \
-H 'authorization: BEARER <SECRET_API_ACCESS_KEY>' \
-H 'content-type: application/json' \
--data-raw '{"filter":{"projectId":<PROJECT_ID>,"startDate":"2024-04-23","endDate":"2024-05-23"}}'
Time Interval
curl 'https://api.sequence.build/rpc/Builder/WalletsTxnSentDaily' \
-H 'accept: */*' \
-H 'authorization: BEARER <SECRET_API_ACCESS_KEY>' \
-H 'content-type: application/json' \
--data-raw '{"filter":{"projectId":<PROJECT_ID>,"startDate":"2024-04-23","endDate":"2024-05-23", "dateInterval":"DAY"}}'
Schema
All wallet analytic endpoints follow a similar request schema
- Request: POST
- Content-Type: application/json
- Body (in JSON):
projectId
(uint64) -- projectID of your project, can be found in the URL of the Builder project.startDate
(timestamp) -- starting date of the query in YYYY--MM--DD formatendDate
(timestamp) -- ending date of the query in YYYY--MM--DD formatdateInterval
(string) -- date interval for the query, options are "DAY", "WEEK", or "MONTH"
- Response (in JSON):
walletStats
(walletStats[]) [value
(uint64) -- # of wallets matching the querylabel
(string) -- label associated with the corresponding endpoint ]