tosunthex / CoinGecko

CoinGecko .Net Standard api wrapper
111 stars 46 forks source link

Added constructor overload to force public api usage #57

Closed cashidze closed 2 months ago

cashidze commented 2 months ago

Currently there is a "demo" subscription on coingecko, which allows limited access to public api.

Current constructors of CoinGeckoClient are forcing to use "pro" api, hence - does not support "demo" keys.

This is the fix for such behavior, allowing library consumer to propagate "isPublicApiForced" flag to constructor and use "demo" subscription key with public api.

sachiew commented 2 months ago

hey, note that the query param to supply api key is: x_cg_demo_api_key

Reference: https://docs.coingecko.com/v3.0.1/reference/authentication

cashidze commented 2 months ago

hey, note that the query param to supply api key is: x_cg_demo_api_key

Reference: https://docs.coingecko.com/v3.0.1/reference/authentication

true, replaced with proper one