Repository navigation
Releases: cointokio/coingecko-api-client
Releases · cointokio/coingecko-api-client
Release list
2.1.0
Added
- Configurable API endpoint.
Client::__construct()andRequest::__construct()now accept a second$endpointargument. - Automatic auth-header selection. The correct header is picked from the configured host:
x-cg-pro-api-keyforpro-api.coingecko.com,x-cg-demo-api-keyforapi.coingecko.com. Client::companies()accessor. TheCompaniesendpoint class existed but was not reachable fromClient.- Retry with backoff on transient failures.
Request::get()now retries once on network errors, HTTP 429, and HTTP 5xx. - Explicit 20s request timeout for the non-VIP
wp_remote_get()path.
Changed
- Default endpoint is now the Demo host (
https://api.coingecko.com/api/v3). WP_Errorcode on HTTP > 399 is now namespaced ashttp_<status>(e.g.http_429,http_500,http_404) instead of the previous catch-allcoingecko_api_response.- Error message extraction now also reads
status.error_messagefrom Pro-API error envelopes. - JSON decode failures now report
json_last_error_msg()instead of the numericjson_last_error(). Request::get()refactored into smaller, individually testable helpers:do_request(),backoff_us(),retry_after_seconds(), and the existingparse_response().
Fixed
- Docblock
@paramforRequest::get( $path, $args )corrected fromstringtoarray. Categories::get_categories( $order )no longer drops theorderargument.- Path segments are URL-encoded.
Client::categories()docblock@returncorrected fromCoinstoCategories.Client::companies()heCompaniesclass was unreachable fromClient.
Full Changelog: v2.0.0...v2.1.0
2.0.0
- Add API key support
- Update endpoint to https://pro-api.coingecko.com/api/v3
v1.0.1
- Add WordPress coding standards checks
- Fix coding standards violations
- Fix missing Client->categories()
- Fix missing Client->asset_platforms()