All Projects → codenix-sv → coingecko-api

codenix-sv / coingecko-api

Licence: MIT license
CoinGecko PHP API client for coingecko.com (V3)

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to coingecko-api

CoinGecko
A C++20 library for CoinGecko--a cryptocurrency data service.
Stars: ✭ 69 (-39.47%)
Mutual labels:  coingecko, coingecko-api, coingecko-client
NemosMiner
NemosMiner multi algo profit switching NVIDIA/AMD/CPU miner
Stars: ✭ 20 (-82.46%)
Mutual labels:  altcoins
Crypto-Resources
Resources for trading Bitcoin and Altcoins
Stars: ✭ 22 (-80.7%)
Mutual labels:  altcoins
defi
Tools for use in DeFi. Impermanent Loss calculations, staking and farming strategies, coingecko and pancakeswap API queries, liquidity pools and more
Stars: ✭ 464 (+307.02%)
Mutual labels:  coingecko
cointop
A fast and lightweight interactive terminal based UI application for tracking cryptocurrencies 🚀
Stars: ✭ 3,589 (+3048.25%)
Mutual labels:  coingecko
Cryptocurrency Icons
A set of icons for all the main cryptocurrencies and altcoins, in a range of styles and sizes.
Stars: ✭ 2,116 (+1756.14%)
Mutual labels:  altcoins
Cryptolist
Curated collection of blockchain & cryptocurrency resources.
Stars: ✭ 3,501 (+2971.05%)
Mutual labels:  altcoins
duino-coin
ᕲ Duino-Coin is a coin that can be mined with almost everything, including Arduino boards.
Stars: ✭ 626 (+449.12%)
Mutual labels:  altcoins
paper-wallet-generator
Paper Wallet Generator for Bitcoin & Altcoins
Stars: ✭ 35 (-69.3%)
Mutual labels:  altcoins
altcoin-bitcoin-explorer
PHP Altcoin/Bitcoin Data Explorer
Stars: ✭ 19 (-83.33%)
Mutual labels:  altcoins
wallet-address-validator
Useful library for validation of Bitcoin, Litecoin, Ethereum and other cryptocoin addresses
Stars: ✭ 240 (+110.53%)
Mutual labels:  altcoins
CryptoCurrency
Page to keep track of value & profits of a portfolio of cryptocurrency (based on Coinmarketcap, Bitfinex and Binance)
Stars: ✭ 27 (-76.32%)
Mutual labels:  altcoins
coinolio
Open source Bitcoin and Altcoin portfolio / trades logging and tracking. Including Profit / Loss calculations, Price Charts and realtime updates.
Stars: ✭ 27 (-76.32%)
Mutual labels:  altcoins
denarius
Denarius [$D] is a PoW/PoS Hybrid Cryptocurrency with Tribus a new PoW Hashing Algo built specifically for D, one of a kind hybrid masternodes called Fortuna Stakes, atomic swaps, staking, mining, IPFS, optional Native Tor and I2P, and much more!
Stars: ✭ 105 (-7.89%)
Mutual labels:  altcoins
Cointop
A fast and lightweight interactive terminal based UI application for tracking cryptocurrencies 🚀
Stars: ✭ 2,912 (+2454.39%)
Mutual labels:  coingecko
go-gecko
Simple API Client for CoinGecko written in Go.
Stars: ✭ 91 (-20.18%)
Mutual labels:  coingecko
coinmarketcap-new-listings-sniper-bot
Sniper bot to buy new tokens listed on Coinmarketcap.
Stars: ✭ 55 (-51.75%)
Mutual labels:  coingecko

PHP API client for coingecko.com

Build Status Scrutinizer Code Quality Test Coverage Maintainability License: MIT

image info

A simple API client, written with PHP for coingecko.com.

CoinGecko 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.

For additional information about API visit coingecko.com/api

CoinGecko API Terms of Service

Requirements

  • PHP >= 7.2
  • ext-json

Installation

The preferred way to install this extension is through composer.

Either run

$ composer require codenix-sv/coingecko-api

or add

"codenix-sv/coingecko-api": "^1.0"

Basic usage

Example

use Codenixsv\CoinGeckoApi\CoinGeckoClient;

$client = new CoinGeckoClient();
$data = $client->ping();

You can get last response (ResponseInterface::class) uses getLastResponse method:

use Codenixsv\CoinGeckoApi\CoinGeckoClient;

$client = new CoinGeckoClient();
$data = $client->derivatives()->getExchanges();
$response = $client->getLastResponse();
$headers = $response->getHeaders();

Available methods

Ping

ping

Check API server status

$data = $client->ping();

Simple

getPrice

Get the current price of any cryptocurrencies in any other supported currencies that you need.

$data = $client->simple()->getPrice('0x,bitcoin', 'usd,rub');

getTokenPrice

Get current price of tokens (using contract addresses) for a given platform in any other currency that you need.

$data = $client->simple()->getTokenPrice('ethereum','0xE41d2489571d322189246DaFA5ebDe1F4699F498', 'usd,rub');

getSupportedVsCurrencies

Get list of supported_vs_currencies.

$data = $client->simple()->getSupportedVsCurrencies();

Coins

getList

List all supported coins id, name and symbol (no pagination required)

$data = $client->coins()->getList();

getMarkets

List all supported coins price, market cap, volume, and market related data

$data = $result = $client->coins()->getMarkets('usd');

getCoin

Get current data (name, price, market, ... including exchange tickers) for a coin

$result = $client->coins()->getCoin('bitcoin', ['tickers' => 'false', 'market_data' => 'false']);

getTickers

Get coin tickers (paginated to 100 items)

$result = $client->coins()->getTickers('bitcoin');

getHistory

Get historical data (name, price, market, stats) at a given date for a coin

$result = $client->coins()->getHistory('bitcoin', '30-12-2017');

getMarketChart

Get historical market data include price, market cap, and 24h volume (granularity auto)

$result = $client->coins()->getMarketChart('bitcoin', 'usd', 'max');

getMarketChartRange

Get historical market data include price, market cap, and 24h volume within a range of timestamp (granularity auto)

$result = $client->coins()->getMarketChartRange('bitcoin', 'usd', '1392577232', '1422577232');

getMarketChartRange [BETA]

Get status updates for a given coin

$result = $client->coins()->getStatusUpdates('0x');

Contract

getContract

Get coin info from contract address

$data = $client->contract()->getContract('ethereum', '0xE41d2489571d322189246DaFA5ebDe1F4699F498');

getMarketChart

Get historical market data include price, market cap, and 24h volume (granularity auto) from a contract address

$result = $client->contract()->getMarketChart('ethereum', '0xE41d2489571d322189246DaFA5ebDe1F4699F498', 'usd', '1');

getMarketChartRange

Get historical market data include price, market cap, and 24h volume within a range of timestamp (granularity auto) from a contract address

$result = $result = $client->contract()->getMarketChartRange('ethereum', '0xE41d2489571d322189246DaFA5ebDe1F4699F498', 'usd', '11392577232', ' 1422577232');

Exchange [BETA]

getExchanges

List all exchanges

$data = $client->exchanges()->getExchanges();

getList

List all supported markets id and name (no pagination required)

$data = $client->exchanges()->getList();

getExchange

Get exchange volume in BTC and top 100 tickers only

$data = $client->exchanges()->getExchange('binance');

getTickers

Get exchange tickers (paginated)

$data = $client->exchanges()->getTickers('binance', ['coin_ids' => '0x,bitcoin']);

getStatusUpdates

Get status updates for a given exchange (beta)

$data = $client->exchanges()->getStatusUpdates('binance');

getVolumeChart

Get volume_chart data for a given exchange (beta)

$data = $client->exchanges()->getVolumeChart('binance', '1');

Finance [BETA]

getPlatforms

List all finance platforms

$data = $client->finance()->getPlatforms();

getProducts

List all finance products

$data = $client->finance()->getProducts();

Indexes [BETA]

getIndexes

List all market indexes

$data = $client->indexes()->getIndexes();

getIndex

Get market index by id

$data = $client->indexes()->getIndex('BAT');

getList

List market indexes id and name

$data = $client->indexes()->getList();

Derivatives [BETA]

getDerivatives

List all derivative tickers

$data = $client->derivatives()->getDerivatives();

getExchanges

List all derivative exchanges

$data = $client->derivatives()->getExchanges();

getExchange

Show derivative exchange data

$data = $client->derivatives()->getExchange('binance_futures');

getExchangeList

List all derivative exchanges name and identifier

$data = $client->derivatives()->getExchangeList();

Status updates [BETA]

getStatusUpdates

List all status_updates with data (description, category, created_at, user, user_title and pin)

$data = $client->statusUpdates()->getStatusUpdates();

Events [BETA]

getEvents

Get events, paginated by 100

$data = $client->events()->getEvents();

getCountries

Get list of event countries

$data = $client->events()->getCountries();

getTypes

Get list of events types

$data = $client->events()->getTypes();

Exchange rates [BETA]

getExchangeRates

Get BTC-to-Currency exchange rates

$data = $client->exchangeRates()->getExchangeRates();

Global [BETA]

getGlobal

Get cryptocurrency global data

$data = $client->globals()->getGlobal();

License

codenix-sv/coingecko-api is released under the MIT License. See the bundled LICENSE for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].