feat(pricing): public CoinGecko coins/list proxy endpoint#3715
Open
TaprootFreak wants to merge 2 commits into
Open
feat(pricing): public CoinGecko coins/list proxy endpoint#3715TaprootFreak wants to merge 2 commits into
TaprootFreak wants to merge 2 commits into
Conversation
Expose GET /pricing/coins-list as a cached, unauthenticated pass-through to CoinGecko's /coins/list using the central CoinGecko Pro key. Optional include_platform query param mirrors CoinGecko's shape; response is cached for 24 h via AsyncCache. Closes #3713
Document the response shape for swagger consumers so the endpoint appears with a typed example instead of an opaque CoinListResponseItem array.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a public, unauthenticated
GET /pricing/coins-listendpoint that proxies CoinGecko's/coins/listthroughapi.dfx.swiss, using the central CoinGecko Pro key and a 24 h in-memory cache. Closes #3713.CoinsListRequestDTO (optionalinclude_platformboolean, defaults tofalse).CoinGeckoService.getCoinsList(); responses cached viaAsyncCachewith separate entries perinclude_platformvalue (24 h TTL — matches the wallet's local cache and CoinGecko's update cadence).@ApiOkResponsewith an example payload.Test plan
curl https://dev.api.dfx.swiss/v1/pricing/coins-list?include_platform=truereturns the full CoinGecko coin list (~2.6 MB)include_platform=false(and omitted) returns the slim shape withoutplatformsfielddfx-wallet) swap ofCOINGECKO_LIST_URLto the new endpoint works end-to-endOut of scope / follow-up
compressiontomain.tswould benefit this and other endpoints — separate PR.