UNPKG

@parifi/sdk

Version:

Parifi SDK with common utility functions

1 lines 999 B
{"version":3,"sources":["../../../src/subgraph/scripts/subgraphQueries.ts"],"sourcesContent":["import { gql } from 'graphql-request';\n\n// Fetch all orders by `userAddress`\nexport const fetchIntegratorFeesWithTimestampQuery = (\n startTimeStamp: number, // unix timestamp\n endTimeStamp: number, //unix timestamp\n) =>\n gql`{\n snxAccounts(\n first: 1000\n where: { type: PERP, totalOrdersCount_gt: 0 }) {\n id\n integratorFeesGenerated\n accountId\n owner {\n id\n }\n orders(\n where: {\n status: SETTLED,\n createdTimestamp_gt: ${startTimeStamp},\n createdTimestamp_lt: ${endTimeStamp}\n }\n ) {\n id\n referralFees\n collectedFees\n }\n }\n }\n`;\n"],"mappings":";AAAA,SAAS,WAAW;AAGb,IAAM,wCAAwC,CACnD,gBACA,iBAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iCAa+B,cAAc;AAAA,iCACd,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;","names":[]}