Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TON Pump volume #2205

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

TON Pump volume #2205

wants to merge 2 commits into from

Conversation

pvolnov
Copy link

@pvolnov pvolnov commented Dec 12, 2024

No description provided.

@llamatester
Copy link

The tonpump adapter exports:

> adapters@1.0.0 test
> ts-node --transpile-only cli/testAdapter.ts dexs tonpump

🦙 Running TONPUMP adapter 🦙
---------------------------------------------------
/home/runner/work/dimension-adapters/dimension-adapters/dexs/tonpump/index.js:1
import fetchURL from "../../utils/fetchURL"
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at internalCompileFunction (node:internal/vm:76:18)
    at wrapSafe (node:internal/modules/cjs/loader:1283:20)
    at Module._compile (node:internal/modules/cjs/loader:1328:27)
    at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
    at Object.require.extensions.<computed> [as .js] (/home/runner/work/dimension-adapters/dimension-adapters/node_modules/ts-node/src/index.ts:1608:43)
    at Module.load (node:internal/modules/cjs/loader:1203:32)
    at Function.Module._load (node:internal/modules/cjs/loader:1019:12)
    at Module.require (node:internal/modules/cjs/loader:1231:19)
    at require (node:internal/modules/helpers:177:18)
    at /home/runner/work/dimension-adapters/dimension-adapters/cli/testAdapter.ts:56:49

@llamabutler
Copy link

The tonpump adapter exports:

> adapters@1.0.0 test
> ts-node --transpile-only cli/testAdapter.ts dexs tonpump

🦙 Running TONPUMP adapter 🦙
---------------------------------------------------
Start Date:	Sun, 15 Dec 2024 11:13:08 GMT
End Date:	Mon, 16 Dec 2024 11:13:08 GMT
---------------------------------------------------

[Error: Request failed with status code 429] {
  url: 'https://tonfunstats-eqnd7.ondigitalocean.app/api/v1/getVolume?from=1734261187&to=1734347588&service=hot',
  method: 'GET',
  axiosError: 'Too Many Requests',
  chain: 'ton'
}

@dtmkeng
Copy link
Contributor

dtmkeng commented Dec 16, 2024

@pvolnov could you take a look api it error

const fetch = async (options: FetchOptions) => {
const res = await fetchURL(`${endpoint}?from=${options.startTimestamp}&to=${options.endTimestamp}&service=hot`)
const TON = "coingecko:the-open-network"
const ton_price = await getPrices([TON], options.startTimestamp);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you dont need to fetch ton price, can return as {'the-open-network': res.volume/1e9}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants