Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Latest commit

 

History

History
46 lines (41 loc) · 845 Bytes

README.md

File metadata and controls

46 lines (41 loc) · 845 Bytes

Relaychain analytics squid for Kusama

Custom resolver for fetching transactions totals in specified datetime range and interval:

query MyQuery {
  transactionsChart(from: "2020-03-11T06:33:48.000000Z", to: "2020-03-12T06:48:24.000000Z", interval: "hour") {
    amount
    count
    datetime
  }
}

Params from & to are not required but can be used only together.

Response:

[
  {
    "amount": "11982314960800000",
    "count": "16",
    "datetime": "2020-03-11T06:00:00.000Z"
  },
  {
    "amount": "1010000000000",
    "count": "2",
    "datetime": "2020-03-11T07:00:00.000Z"
  },
  {
    "amount": "519841306240000",
    "count": "19",
    "datetime": "2020-03-11T08:00:00.000Z"
  }
]
enum TransactionsChartInterval {
  minute = 'minute',
  hour = 'hour',
  day = 'day',
  month = 'month'
}