You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+69-11Lines changed: 69 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -120,28 +120,86 @@ Total account balance for specified account, in CHEQ.
120
120
121
121
The standard Cosmos SDK REST API for account balances returns JSON with the account balances along with its denomination, usually the lowest denomination. This is hard to parse in applications such as Google Sheets (e.g., to monitor the account balance by fetching a response from a REST API directly in Google Sheets). This API returns a plain number that can be directly plugged into such applications, without having to parse JSON.
***DIDs and DLRs combined** (harder to paginate): [`data-api.cheqd.io/analytics/testnet`](https://data-api.cheqd.io/analytics/mainnet)
129
138
130
139
#### Response
131
140
132
-
Returns current price of CHEQ token among different markets along with an evaluation of whether they are at risk of arbitrage opportunities.
141
+
Returns the identity transactions data for the specified network in JSON format.
142
+
By default, the endpoint returns the data for the **last 30 days**.
143
+
144
+
If `did` or `resource` is not specified, it will both DID and DLR analytics data, sorted by date in descending order.
145
+
By default, the response is paginated with a limit of **100 results per page**. It's harder to paginate through responses on the combined endpoints, so where possible it is recommended to query DIDs and DLRs separately.
146
+
147
+
#### Optional Query Parameters
148
+
149
+
These optional query paramaters can be used to filter the results that are returned from the API.
150
+
151
+
*`startDate`: Start date for the analytics data. If you provide *just* this parameter, the *current* date will be considered the end date.
152
+
*`endDate`: End date for the analytics data. If you provide *just* this parameter, the start date will be considered as 30 days prior to this date.
153
+
*`operationType`: Operation type for the analytics data. It accepts the following values:
154
+
*`createDid`
155
+
*`updateDid`
156
+
*`deactivateDid`
157
+
*`createResource`
158
+
*`ledgerOperationType`: Ledger operation type for the analytics data. (Only relevant if the underlying operation types on ledger go through a breaking change in version number and you want to filter by specific operation type. Otherwise, use above.)
159
+
*`cheqd.did.v2.MsgCreateDid`
160
+
*`cheqd.did.v2.MsgUpdateDid`
161
+
*`cheqd.did.v2.MsgDeactivateDid`
162
+
*`cheqd.resource.v2.MsgCreateResource`
163
+
*`denom`: Friendly denomination used for paying fees, e.g. `CHEQ` or `USDC`. Note that by default the results are returned in **main denomination**, i.e., the on-ledger value in `ncheq` is convert to CHEQ.
164
+
*`ledgerDenom`: Ledger denomination used for paying fees, e.g. `ncheq` or `ibc/498A0751C798A0D9A389AA3691123DADA57DAA4FE165D5C75894505B876BA6E4`.
*`success` (boolean; default: `true`): Whether transaction was successful or not. By default, only successful transactions are returned. Allows for specifically fetching failed transaction details.
167
+
*`page` (default: `1`): Page number for pagination.
168
+
*`limit` (default: `100`): Number of results per page.
133
169
134
170
#### Rationale
135
171
136
-
The CHEQ token trades on multiple markets/exchanges (e.g., [Osmosis](https://app.osmosis.zone), [Gate.io](https://www.gate.io/trade/CHEQ_USDT), [BitMart](https://www.bitmart.com/trade/en?layout=basic&symbol=CHEQ_USDT), [LBank](https://www.lbank.info/exchange/cheq/usdt), [Uniswap](https://app.uniswap.org/#/swap?inputCurrency=0x70edf1c215d0ce69e7f16fd4e6276ba0d99d4de7&outputCurrency=0xdac17f958d2ee523a2206206994597c13d831ec7&chain=mainnet)). This is typically established as CHEQ along with another token pair or currency.
172
+
The purpose of this API is to provide more granular data and help us to understand the usage of identity modules and how they are used by the community.
137
173
138
-
Fluctuations in the exchange rate between CHEQ and other tokens pairs can give rise to opportunities for arbitrage. Having a significant market arbitrage among different exchanges creates a [market inefficiencies](https://www.investopedia.com/terms/i/inefficientmarket.asp). Extreme market inefficiencies result [market failure](https://www.investopedia.com/terms/m/marketfailure.asp) and [deadweight loss](https://www.investopedia.com/terms/d/deadweightloss.asp).
174
+
#### Example
139
175
140
-
Having monitoring capabilities for arbitrage gives opportunities for the cheqd community to rectify potential liquidity issues and aware of exchange rate movements.
141
-
142
-
#### Alerting via Zapier
176
+
```bash
177
+
curl -X GET "https://data-api.cheqd.io/analytics/mainnet?startDate=2024-01-01&endDate=2024-01-31&operationType=createDid&denom=CHEQ&&success=true&limit=1"
178
+
```
143
179
144
-
To alert a significant market arbitrages for CHEQ listings on different exchanges, we pull latest markets data from the [CoinGecko API for cheqd's ticker page](https://www.coingecko.com/en/coins/cheqd-network) via our Market Monitoring API [Monitor Markets API](https://github.com/cheqd/market-monitoring). If an arbitrage threshold is exceeded, a webhook trigger is sent to [Zapier](https://zapier.com/) for alerting via different channels (such as Slack).
0 commit comments