Download the PHP package tigusigalpa/coingecko-php without Composer

On this page you can find all versions of the php package tigusigalpa/coingecko-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package coingecko-php

CoinGecko Client/SDK/Library for PHP and Laravel

CoinGecko PHP SDK

Latest Version on Packagist Tests Coverage CodeQL Codecov PHP Version License

One small client for the parts of the CoinGecko API you use most: prices, markets, historical charts, exchanges, NFTs, public treasuries, and WebSocket subscription messages. It works in a plain PHP app and feels at home in Laravel.

Responses are returned as arrays on purpose. CoinGecko adds fields regularly, so you can use newly available response data without waiting for an SDK update.

Examples


Why use it?

Requirements

Install

Install it with Composer:

Laravel setup

Laravel discovers the service provider automatically. Publish the config only when you want to control the key, API tier or timeout from .env:

Set COINGECKO_IS_PRO=true for a paid Pro API key. Keep API keys on the server; do not expose them in browser code.

Quick start

Plain PHP

Laravel

Common tasks

Cache a price in Laravel

CoinGecko data changes at different intervals depending on the endpoint and plan. Caching prevents duplicate work during a busy request and helps stay inside your rate limit.

Build a small market widget

Handle a failed request

Search before saving a coin ID

Names and ticker symbols are not unique, so let a person choose from CoinGecko's matches before storing an ID in a watchlist or portfolio.

API reference

The client is split into small API groups:


Simple API

Get cryptocurrency prices and basic market data quickly.

Get Coin Prices

Get Token Prices by Contract Address

Get Supported Currencies


Coins API

Access detailed coin information, market data, and historical charts.

List All Coins

Top Gainers & Losers

Recently Added Coins

Coins Market Data

Detailed Coin Data

Coin Tickers

Historical Data

Market Chart Data

OHLC Chart Data

Supply Charts


Contract API

Get token data using contract addresses on various blockchain platforms.

Get Token Data by Contract Address

Token Market Chart by Contract


Asset Platforms API

Get information about blockchain platforms and their tokens.

Get Asset Platforms List

Get Token Lists by Platform


Categories API

Access cryptocurrency categories and their market data.

Get Categories List (ID Map)

Get Categories with Market Data


Exchanges API

Access exchange data, tickers, and volume information.

Get Exchanges List with Data

Get Exchanges List (ID Map)

Get Exchange Data by ID

Get Exchange Tickers

Get Exchange Volume Chart


Derivatives API

Access derivatives market data and exchanges.

Get Derivatives Tickers

Get Derivatives Exchanges

Get Derivatives Exchange by ID

Get Derivatives Exchanges List (ID Map)


Entities API

Access crypto treasury holdings and transaction history.

Get Entities List (ID Map)

Get Crypto Treasury Holdings by Coin ID

Get Crypto Treasury Holdings by Entity ID

Get Treasury Historical Chart

Get Treasury Transaction History


NFTs API

Access NFT collections and market data.

Get NFTs List (ID Map)

Get NFT Collection Data by ID

Get NFT Collection by Contract Address

Get NFTs List with Market Data

Get NFT Collection Market Chart

Get NFT Collection Tickers


Exchange Rates API

Get BTC-to-currency exchange rates.

Get BTC Exchange Rates


Search API

Search for coins, exchanges, and categories, and get trending data.

Search Queries

Get Trending Search List


Global API

Access global cryptocurrency and DeFi market data.

Get Crypto Global Market Data

Get Global DeFi Market Data

Get Global Market Cap Chart


WebSocket API

Helpers for constructing real-time WebSocket subscription messages. WebSocket access requires a paid CoinGecko plan and a WebSocket client that supplies your Pro API key securely (prefer the x-cg-pro-api-key connection header).

Get WebSocket URL

Subscribe to a Channel

Create Simple Price Subscription

Create Onchain Token Price Subscription

Create Onchain Trade Subscription

Create Onchain OHLCV Subscription

Unsubscribe


Ping API

Check API server status and monitor your API usage.

Check Server Status

Check API Usage (Pro API only)


Examples

Practical use cases

Portfolio Tracker

Price Alert System

Market Analysis Dashboard

Historical Price Comparison

DeFi Token Tracker


Configuration and production notes

Use your own Guzzle client

Error Handling

Rate limits and caching

Limits vary by CoinGecko plan and endpoint, so check the current allowance in your CoinGecko account rather than relying on a hard-coded number. This package does not queue or retry requests automatically. Cache repeated reads and use queue backoff for background work when you receive a 429 response.


Testing

Contributing

Bug reports, documentation improvements and pull requests are welcome. Please keep a change focused, add or update a test when behaviour changes, and run the test suite before opening a pull request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Security

If you discover any security-related issues, please email [email protected] instead of using the issue tracker.

License

The MIT License (MIT). Please see License File for more information.

Credits

Links


All versions of coingecko-php with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
guzzlehttp/guzzle Version ^7.0
illuminate/support Version ^9.0|^10.0|^11.0|^12.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package tigusigalpa/coingecko-php contains the following files

Loading the files please wait ...