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

Added Enso volumes #2377

Merged
merged 8 commits into from
Feb 5, 2025
Merged

Added Enso volumes #2377

merged 8 commits into from
Feb 5, 2025

Conversation

Brenzee
Copy link
Contributor

@Brenzee Brenzee commented Feb 5, 2025

ENSO_API_KEY is required

@llamabutler
Copy link

The enso adapter exports:

> [email protected] test
> ts-node --transpile-only cli/testAdapter.ts aggregators enso

🦙 Running ENSO adapter 🦙
---------------------------------------------------
Start Date:	Tue, 04 Feb 2025 00:00:00 GMT
End Date:	Wed, 05 Feb 2025 00:00:00 GMT
---------------------------------------------------

[Error: Request failed with status code 401] {
  url: 'https://api.enso.finance/api/v1/volume/42161?timestamp=1738713599',
  method: 'GET',
  axiosError: 'Create your own API key at https://enso.finance/developers to get 10rps',
  chain: 'arbitrum'
}

function fetch(chainId: number) {
return async (timestamp: number): Promise<FetchResultVolume> => {
const res = await httpGet(
`https://api.enso.finance/api/v1/volume/${chainId}?timestamp=${timestamp}`,
Copy link
Member

@0xngmi 0xngmi Feb 5, 2025

Choose a reason for hiding this comment

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

does it work for any timestamp key? if so should use a v2 adapter

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately, we can only do v1 adapter fetches as of now (we can only get volumes in time ranges of 0:00-0:00)

@llamabutler
Copy link

The enso adapter exports:

> [email protected] test
> ts-node --transpile-only cli/testAdapter.ts aggregators enso

🦙 Running ENSO adapter 🦙
---------------------------------------------------
Start Date:	Tue, 04 Feb 2025 14:08:56 GMT
End Date:	Wed, 05 Feb 2025 14:08:56 GMT
---------------------------------------------------

[Error: Request failed with status code 401] {
  url: 'https://api.enso.finance/api/v1/volume/137?timestamp=1738764536',
  method: 'GET',
  axiosError: 'Create your own API key at https://enso.finance/developers to get 10rps',
  chain: 'polygon'
}

@llamabutler
Copy link

The enso adapter exports:

> [email protected] test
> ts-node --transpile-only cli/testAdapter.ts aggregators enso

🦙 Running ENSO adapter 🦙
---------------------------------------------------
Start Date:	Tue, 04 Feb 2025 00:00:00 GMT
End Date:	Wed, 05 Feb 2025 00:00:00 GMT
---------------------------------------------------

[Error: Request failed with status code 401] {
  url: 'https://api.enso.finance/api/v1/volume/8453?timestamp=1738713599',
  method: 'GET',
  axiosError: 'Create your own API key at https://enso.finance/developers to get 10rps',
  chain: 'base'
}

@0xngmi 0xngmi merged commit dfbaa58 into DefiLlama:master Feb 5, 2025
2 checks passed
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.

3 participants