{"id":16956096,"url":"https://github.com/codenix-sv/coingecko-api","last_synced_at":"2025-10-06T21:47:14.583Z","repository":{"id":43067733,"uuid":"249796097","full_name":"codenix-sv/coingecko-api","owner":"codenix-sv","description":"CoinGecko PHP API client for coingecko.com (V3)","archived":false,"fork":false,"pushed_at":"2023-01-14T13:58:47.000Z","size":188,"stargazers_count":136,"open_issues_count":11,"forks_count":61,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-08-28T09:59:31.369Z","etag":null,"topics":["altcoins","coingecko","coingecko-api","coingecko-client","coingecko-php","cryptocurrency","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codenix-sv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-24T19:13:32.000Z","updated_at":"2025-07-11T08:24:27.000Z","dependencies_parsed_at":"2023-02-09T19:30:33.112Z","dependency_job_id":null,"html_url":"https://github.com/codenix-sv/coingecko-api","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/codenix-sv/coingecko-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codenix-sv%2Fcoingecko-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codenix-sv%2Fcoingecko-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codenix-sv%2Fcoingecko-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codenix-sv%2Fcoingecko-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codenix-sv","download_url":"https://codeload.github.com/codenix-sv/coingecko-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codenix-sv%2Fcoingecko-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278686637,"owners_count":26028325,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["altcoins","coingecko","coingecko-api","coingecko-client","coingecko-php","cryptocurrency","php"],"created_at":"2024-10-13T22:14:14.645Z","updated_at":"2025-10-06T21:47:14.550Z","avatar_url":"https://github.com/codenix-sv.png","language":"PHP","readme":"# PHP API client for coingecko.com\n\n[![Build Status](https://travis-ci.com/codenix-sv/coingecko-api.svg?branch=master)](https://travis-ci.com/codenix-sv/coingecko-api)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/codenix-sv/coingecko-api/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/codenix-sv/coingecko-api/?branch=master)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/650015976f280641822a/test_coverage)](https://codeclimate.com/github/codenix-sv/coingecko-api/test_coverage)\n[![Maintainability](https://api.codeclimate.com/v1/badges/650015976f280641822a/maintainability)](https://codeclimate.com/github/codenix-sv/coingecko-api/maintainability)\n[![License: MIT](https://img.shields.io/github/license/codenix-sv/coingecko-api)](https://github.com/codenix-sv/coingecko-api/blob/master/LICENSE)\n\n![image info](./CoinGeckoLogo.png)\n\nA simple API client, written with PHP for [coingecko.com](https://coingecko.com).\n\nCoinGecko provides a fundamental analysis of the crypto market. In addition to tracking price, volume and market capitalization, CoinGecko tracks community growth, open-source code development, major events and on-chain metrics.\n\nFor additional information about API visit [coingecko.com/api](https://www.coingecko.com/api)\n\nCoinGecko API [Terms of Service](https://www.coingecko.com/en/api_terms)\n## Requirements\n\n* PHP \u003e= 7.2\n* ext-json\n\n## Installation\n\nThe preferred way to install this extension is through [composer](http://getcomposer.org/download/).\n\nEither run\n\n```bash\n$ composer require codenix-sv/coingecko-api\n```\nor add\n\n```json\n\"codenix-sv/coingecko-api\": \"^1.0\"\n```\n## Basic usage\n\n### Example\n```php\nuse Codenixsv\\CoinGeckoApi\\CoinGeckoClient;\n\n$client = new CoinGeckoClient();\n$data = $client-\u003eping();\n```\n\nYou can get last response (`ResponseInterface::class`) uses `getLastResponse` method:\n```php\nuse Codenixsv\\CoinGeckoApi\\CoinGeckoClient;\n\n$client = new CoinGeckoClient();\n$data = $client-\u003ederivatives()-\u003egetExchanges();\n$response = $client-\u003egetLastResponse();\n$headers = $response-\u003egetHeaders();\n```\n\n## Available methods\n\n### Ping\n\n#### [ping](https://www.coingecko.com/api/documentations/v3#/ping/get_ping)\n\nCheck API server status\n\n```php\n$data = $client-\u003eping();\n```\n\n### Simple\n\n#### [getPrice](https://www.coingecko.com/api/documentations/v3#/simple/get_simple_price)\n\nGet the current price of any cryptocurrencies in any other supported currencies that you need.\n\n```php\n$data = $client-\u003esimple()-\u003egetPrice('0x,bitcoin', 'usd,rub');\n```\n\n#### [getTokenPrice](https://www.coingecko.com/api/documentations/v3#/simple/get_simple_price)\n\nGet current price of tokens (using contract addresses) for a given platform in any other currency that you need.\n\n```php\n$data = $client-\u003esimple()-\u003egetTokenPrice('ethereum','0xE41d2489571d322189246DaFA5ebDe1F4699F498', 'usd,rub');\n```\n\n#### [getSupportedVsCurrencies](https://www.coingecko.com/api/documentations/v3#/simple/get_simple_supported_vs_currencies)\n\nGet list of supported_vs_currencies.\n\n```php\n$data = $client-\u003esimple()-\u003egetSupportedVsCurrencies();\n```\n\n### Coins\n\n#### [getList](https://www.coingecko.com/api/documentations/v3#/coins/get_coins_list)\n\nList all supported coins id, name and symbol (no pagination required)\n\n```php\n$data = $client-\u003ecoins()-\u003egetList();\n```\n\n#### [getMarkets](https://www.coingecko.com/api/documentations/v3#/coins/get_coins_markets)\n\nList all supported coins price, market cap, volume, and market related data\n\n```php\n$data = $result = $client-\u003ecoins()-\u003egetMarkets('usd');\n```\n\n#### [getCoin](https://www.coingecko.com/api/documentations/v3#/coins/get_coins__id_)\n\nGet current data (name, price, market, ... including exchange tickers) for a coin\n\n```php\n$result = $client-\u003ecoins()-\u003egetCoin('bitcoin', ['tickers' =\u003e 'false', 'market_data' =\u003e 'false']);\n```\n\n#### [getTickers](https://www.coingecko.com/api/documentations/v3#/coins/get_coins__id__tickers)\n\nGet coin tickers (paginated to 100 items)\n\n```php\n$result = $client-\u003ecoins()-\u003egetTickers('bitcoin');\n```\n\n#### [getHistory](https://www.coingecko.com/api/documentations/v3#/coins/get_coins__id__history)\n\nGet historical data (name, price, market, stats) at a given date for a coin\n\n```php\n$result = $client-\u003ecoins()-\u003egetHistory('bitcoin', '30-12-2017');\n```\n\n#### [getMarketChart](https://www.coingecko.com/api/documentations/v3#/coins/get_coins__id__market_chart)\n\nGet historical market data include price, market cap, and 24h volume (granularity auto)\n\n```php\n$result = $client-\u003ecoins()-\u003egetMarketChart('bitcoin', 'usd', 'max');\n```\n\n#### [getMarketChartRange](https://www.coingecko.com/api/documentations/v3#/coins/get_coins__id__market_chart_range)\n\nGet historical market data include price, market cap, and 24h volume within a range of timestamp (granularity auto)\n\n```php\n$result = $client-\u003ecoins()-\u003egetMarketChartRange('bitcoin', 'usd', '1392577232', '1422577232');\n```\n\n#### [getMarketChartRange](https://www.coingecko.com/api/documentations/v3#/coins/get_coins__id__status_updates) [BETA]\n\nGet status updates for a given coin\n\n```php\n$result = $client-\u003ecoins()-\u003egetStatusUpdates('0x');\n```\n\n### Contract\n\n#### [getContract](https://www.coingecko.com/api/documentations/v3#/contract/get_coins__id__contract__contract_address_)\n\nGet coin info from contract address\n\n```php\n$data = $client-\u003econtract()-\u003egetContract('ethereum', '0xE41d2489571d322189246DaFA5ebDe1F4699F498');\n```\n\n#### [getMarketChart](https://www.coingecko.com/api/documentations/v3#/contract/get_coins__id__contract__contract_address__market_chart_)\n\nGet historical market data include price, market cap, and 24h volume (granularity auto) from a contract address\n\n```php\n$result = $client-\u003econtract()-\u003egetMarketChart('ethereum', '0xE41d2489571d322189246DaFA5ebDe1F4699F498', 'usd', '1');\n```\n\n#### [getMarketChartRange](https://www.coingecko.com/api/documentations/v3#/contract/get_coins__id__contract__contract_address__market_chart_range)\n\nGet historical market data include price, market cap, and 24h volume within a range of timestamp (granularity auto) from a contract address\n\n```php\n$result = $result = $client-\u003econtract()-\u003egetMarketChartRange('ethereum', '0xE41d2489571d322189246DaFA5ebDe1F4699F498', 'usd', '11392577232', ' 1422577232');\n```\n\n### Exchange [BETA]\n\n#### [getExchanges](https://www.coingecko.com/api/documentations/v3#/exchanges_(beta)/get_exchanges)\n\nList all exchanges\n\n```php\n$data = $client-\u003eexchanges()-\u003egetExchanges();\n```\n\n#### [getList](https://www.coingecko.com/api/documentations/v3#/exchanges_(beta)/get_exchanges_list)\n\nList all supported markets id and name (no pagination required)\n\n```php\n$data = $client-\u003eexchanges()-\u003egetList();\n```\n\n#### [getExchange](https://www.coingecko.com/api/documentations/v3#/exchanges_(beta)/get_exchanges__id_)\n\nGet exchange volume in BTC and top 100 tickers only\n\n```php\n$data = $client-\u003eexchanges()-\u003egetExchange('binance');\n```\n\n#### [getTickers](https://www.coingecko.com/api/documentations/v3#/exchanges_(beta)/get_exchanges__id__tickers)\n\nGet exchange tickers (paginated)\n\n```php\n$data = $client-\u003eexchanges()-\u003egetTickers('binance', ['coin_ids' =\u003e '0x,bitcoin']);\n```\n\n#### [getStatusUpdates](https://www.coingecko.com/api/documentations/v3#/exchanges_(beta)/get_exchanges__id__status_updates)\n\nGet status updates for a given exchange (beta)\n\n```php\n$data = $client-\u003eexchanges()-\u003egetStatusUpdates('binance');\n```\n\n#### [getVolumeChart](https://www.coingecko.com/api/documentations/v3#/exchanges_(beta)/get_exchanges__id__volume_chart)\n\nGet volume_chart data for a given exchange (beta)\n\n```php\n$data = $client-\u003eexchanges()-\u003egetVolumeChart('binance', '1');\n```\n\n### Finance [BETA]\n\n#### [getPlatforms](https://www.coingecko.com/api/documentations/v3#/finance_(beta)/get_finance_platforms)\n\nList all finance platforms\n\n```php\n$data = $client-\u003efinance()-\u003egetPlatforms();\n```\n\n#### [getProducts](https://www.coingecko.com/api/documentations/v3#/finance_(beta)/get_finance_products)\n\nList all finance products\n\n```php\n$data = $client-\u003efinance()-\u003egetProducts();\n```\n\n### Indexes [BETA]\n\n#### [getIndexes](https://www.coingecko.com/api/documentations/v3#/indexes_(beta)/get_indexes)\n\nList all market indexes\n\n```php\n$data = $client-\u003eindexes()-\u003egetIndexes();\n```\n\n#### [getIndex](https://www.coingecko.com/api/documentations/v3#/indexes_(beta)/get_indexes__id_)\n\nGet market index by id\n\n```php\n$data = $client-\u003eindexes()-\u003egetIndex('BAT');\n```\n\n#### [getList](https://www.coingecko.com/api/documentations/v3#/indexes_(beta)/get_indexes_list)\n\nList market indexes id and name\n\n```php\n$data = $client-\u003eindexes()-\u003egetList();\n```\n\n### Derivatives [BETA]\n\n#### [getDerivatives](https://www.coingecko.com/api/documentations/v3#/derivatives_(beta)/get_derivatives)\n\nList all derivative tickers\n\n```php\n$data = $client-\u003ederivatives()-\u003egetDerivatives();\n```\n\n#### [getExchanges](https://www.coingecko.com/api/documentations/v3#/derivatives_(beta)/get_derivatives_exchanges)\n\nList all derivative exchanges\n\n```php\n$data = $client-\u003ederivatives()-\u003egetExchanges();\n```\n\n#### [getExchange](https://www.coingecko.com/api/documentations/v3#/derivatives_(beta)/get_derivatives_exchanges__id_)\n\nShow derivative exchange data\n\n```php\n$data = $client-\u003ederivatives()-\u003egetExchange('binance_futures');\n```\n\n#### [getExchangeList](https://www.coingecko.com/api/documentations/v3#/derivatives_(beta)/get_derivatives_exchanges_list)\n\nList all derivative exchanges name and identifier\n\n```php\n$data = $client-\u003ederivatives()-\u003egetExchangeList();\n```\n\n\n### Status updates [BETA]\n\n#### [getStatusUpdates](https://www.coingecko.com/api/documentations/v3#/status_updates_(beta)/get_status_updates)\n\nList all status_updates with data (description, category, created_at, user, user_title and pin)\n\n```php\n$data = $client-\u003estatusUpdates()-\u003egetStatusUpdates();\n```\n\n### Events [BETA]\n\n#### [getEvents](https://www.coingecko.com/api/documentations/v3#/events/get_events)\n\nGet events, paginated by 100\n\n```php\n$data = $client-\u003eevents()-\u003egetEvents();\n```\n\n#### [getCountries](https://www.coingecko.com/api/documentations/v3#/events/get_events_countries)\n\nGet list of event countries\n\n```php\n$data = $client-\u003eevents()-\u003egetCountries();\n```\n\n#### [getTypes](https://www.coingecko.com/api/documentations/v3#/events/get_events_types)\n\nGet list of events types\n\n```php\n$data = $client-\u003eevents()-\u003egetTypes();\n```\n\n### Exchange rates [BETA]\n\n#### [getExchangeRates](https://www.coingecko.com/api/documentations/v3#/exchange_rates/get_exchange_rates)\n\nGet BTC-to-Currency exchange rates\n\n```php\n$data = $client-\u003eexchangeRates()-\u003egetExchangeRates();\n```\n\n### Global [BETA]\n\n#### [getGlobal](https://www.coingecko.com/api/documentations/v3#/global/get_global)\n\nGet cryptocurrency global data\n\n```php\n$data = $client-\u003eglobals()-\u003egetGlobal();\n```\n\n## License\n\n`codenix-sv/coingecko-api` is released under the MIT License. See the bundled [LICENSE](./LICENSE) for details.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodenix-sv%2Fcoingecko-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodenix-sv%2Fcoingecko-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodenix-sv%2Fcoingecko-api/lists"}