@f5i23q999d/cow-sdk
Version:
<p align="center"> <img width="400" src="https://github.com/cowprotocol/cow-sdk/raw/main/docs/images/CoW.png" /> </p>
46 lines • 1.25 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.LAST_HOURS_VOLUME_QUERY = exports.LAST_DAYS_VOLUME_QUERY = exports.TOTALS_QUERY = void 0;
const graphql_request_1 = require("graphql-request");
/**
* GraphQL query for the total number of tokens, orders, traders, settlements, volume, and fees.
*/
exports.TOTALS_QUERY = (0, graphql_request_1.gql) `
query Totals {
totals {
tokens
orders
traders
settlements
volumeUsd
volumeEth
feesUsd
feesEth
}
}
`;
/**
* GraphQL query for the total volume over the last N days.
* @param days The number of days to query.
*/
exports.LAST_DAYS_VOLUME_QUERY = (0, graphql_request_1.gql) `
query LastDaysVolume($days: Int!) {
dailyTotals(orderBy: timestamp, orderDirection: desc, first: $days) {
timestamp
volumeUsd
}
}
`;
/**
* GraphQL query for the total volume over the last N hours.
* @param hours The number of hours to query.
*/
exports.LAST_HOURS_VOLUME_QUERY = (0, graphql_request_1.gql) `
query LastHoursVolume($hours: Int!) {
hourlyTotals(orderBy: timestamp, orderDirection: desc, first: $hours) {
timestamp
volumeUsd
}
}
`;
//# sourceMappingURL=queries.js.map