Skip to content

Application Analytics

Base Url: api.decentscan.xyz
Endpoint: /getTxStats

Decent provides analytics endpoints so that you can quickly access key statistics about your application's transactions. Decent provides daily data for your applications':

  • Transaction volume
  • Unique users
  • Count of bridge transactions
  • Count of swap transactions
  • USD volume
  • USD fee revenue

Analytics are grouped by application ID and by Org. Each app ID corresponds to a unique API key, and keys are grouped by org so that you can easily pull data across individual apps. You can find your app ID in the dashboard of the Developer Console by clicking on the Details button listed in the app actions. Your API KEY only allows you to pull statistics from your applications.

Query Parameters

ParameterDescriptionTypeRequiredDefault
appIdQuery specific app ID.stringfalseIf omitted, returns statistics for all apps in org.

Sample Request

Node Fetch
  const queryParams = new URLSearchParams({
    appId: appId
  });
 
  const options = { method: 'GET', headers: { 'x-api-key': `${process.env.DECENT_API_KEY}` }}
 
  fetch(`https://api.decentscan.xyz/getTxStats?{queryParams}`, options)
    .then(response => response.json())
    .then(response => console.log(response))
    .catch(err => console.error(err));

Response Schema

Response
[{
  appId: `0x${string}`,
  affiliateId: `0x${string}`,
  dailyData: [
    {
      day: Date,
      txCount: number,
      uniqueUsers: `0x${string}`[],
      txBridge: number,
      txSwap: number,
      usdVolume: number,
      feeUsdVolume: number
    },
  ],
  org: `string`
}]