Adapter

Quickswap Fees

Quickswap is a permissionless, decentralized exchange

Sub-Adapters 1

Preview and test each sub adapter.

Quickswap (quickswap)

Metadata

ID
quickswap
name

"Quickswap"

icon
category

"dex"

description

"Quickswap is a permissionless, decentralized exchange"

feeDescription

"Trading fees are paid by traders to liquidity providers"

website

"https://quickswap.exchange"

blockchain

"Polygon"

source

"The Graph Protocol"

tokenTicker

"QUICK"

tokenCoingecko

"quick"

protocolLaunch

"2020-11-03"

tokenLaunch

"2021-02-15"

Queries

Adapter Code

Check the entire code written for the Adapter.

Source code

Showing TS source.
1export const name = 'Quickswap Fees';
2export const version = '0.1.1';
3export const license = 'MIT';
4
5export function setup(sdk: Context) {
6  async function getQuickswapData(date: string): Promise<number> {
7    const graphQuery = `query fees($date: Int!) {
8      uniswapDayDatas(where: {date: $date}) {
9        date
10        dailyVolumeUSD
11      }
12    }`;
13
14    const timestamp = sdk.date.dateToTimestamp(date);
15    const data = await sdk.graph.query('https://cryptostats-api-proxy.vercel.app/api/v1/quickswap', graphQuery, {
16      date: timestamp
17    });
18
19    const oneDayVolume = parseFloat(
20      data.uniswapDayDatas[data.uniswapDayDatas.length - 1].dailyVolumeUSD
21    );
22    const oneDay = oneDayVolume * 0.003;
23
24    return oneDay;
25  }
26
27  sdk.register({
28    id: 'quickswap',
29    queries: {
30      oneDayTotalFees: getQuickswapData,
31    },
32    metadata: {
33      name: 'Quickswap',
34      icon: sdk.ipfs.getDataURILoader('QmTW6Ch8FJoQCcjTKwmUyTZCzGEnjiW7w219zP3NPg1q6Z', 'image/png'),
35      category: 'dex',
36      description: 'Quickswap is a permissionless, decentralized exchange',
37      feeDescription: 'Trading fees are paid by traders to liquidity providers',
38      website: 'https://quickswap.exchange',
39      blockchain: 'Polygon',
40      source: 'The Graph Protocol',
41      tokenTicker: 'QUICK',
42      tokenCoingecko: 'quick',
43      protocolLaunch: '2020-11-03',
44      tokenLaunch: '2021-02-15',
45    },
46  });
47}
48

It's something off?

Report it to the discussion board on Discord, we will take care of it.

Adapter Info

Version

0.1.1

License

MIT

IPFS CID

QmS7i42eNUR7Mw9T5HuBji63QaknSnHzPTosC3J1iFY5hj

CID (source)

QmWSh8mvCvG8SjpgrTf6tKVhWiaJFnEhcVCyyM9DipwXw4

Collections

Author

mihal.eth