Download the PHP package pangzlab/coingecko-api without Composer

On this page you can find all versions of the php package pangzlab/coingecko-api. 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-api

chat on Discord

follow on witter

coingecko-api

Coingecko API client for PHP


A simple, intuitive and composable API Client for the CoinGecko REST API Service.

API Version Support

Requirements

Installation

The best and the easiest way to use this library is thru composer. You can also download the source directly and require it to your project.

Just take note of the requirements.

[ Composer ]

composer see packagist.org

OR

[ Direct Download ]

📥 Get it from the release





Library

[ Classes ]

This library provides 2 main classes which you can use depending on the type of endpoints you are accessing.

  • CoinGeckoUrlBuilder
  • CoinGeckoApiClient


  • 📦 CoinGeckoApiClient

    This is the main class that allows building the API endpoints and sending the request.

    This is always required.



    📦 CoinGeckoUrlBuilder

    CoinGecko API endpoints require a URL query which is a set of key value pairs encoded in the URL. This class enables to dynamically create them with ease without worrying the position or the casing of the keys.

    Although by design can be achieved by using the CoinGeckoApiClient class alone, using the CoinGeckoUrlBuilder gives you a finer control over the parameters you set and more flexibility in managing the endpoints you're building.

    This class is optional depending on the endpoint you need.



    Usage

    Accessing the API endpoints are fairly straightforward. If not for convenience, you don't really need a set of manuals to start using this library. You can just go directly to the CoinGecko REST API Official Documenation, find the endpoint you need and start building your request.

    Let's use some examples.

    🔹 Endpoint request "without"🚫 URL query

    🌐 endpoint: /ping

    🔹 Endpoint request "with"✔️ URL query

    🌐 endpoint: /coins/categoreis

    🔹 Endpoint request with path parameter(id)

    🌐 endpoint: /exchanges/{id}/volume_chart

    🔹 Endpoint request with path parameter(id) and URL Query

    🌐 endpoint: /coins/{id}


    Features


    Set Method

    Send Methods ( Community vs Pro )

    CoinGeckoUrlBuilder() Method Call with Prefix



    Bonus Quirks

    There are some benefits of using this CoinGecko client libray.

    Aside from it's not required to learn any methods to use and the parameter positioning of each methods, there are other features which might not be essential but are available and ready to be used to provide manageability and flexibility to your coding.

    1. Use of reset() instead of set()

    ⚠️ Calling set() is always the preferred way but you can also build request using the reset() method to cleanup resource. Just make sure to separate the call to send() method to avoid ParseError.

    2. Case-insensitive method names


    Endpoint name and URL parameter key name are case-insensitive. This means calling ping(), PING() and Ping() are treated the same thing. Additionally you can also use underscore(_) as a separator for names like VS_CURRENCY or vs_Currency. They will be handled properly.


    3. Request reusability


    API Usage

    📋Endpoint List

    1. companies (beta)

    🌐 ping


    1. 📋 endpoint : /ping

    Check API server status

    [ method ] :
    ping()

    💡 sample usage


    🌐 simple


    1. 📋 endpoint : /simple/price

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

    [ method ] :
    simple()->price()

    🔑 URL Keys : 7
    ✔️ withIds('string')❗️
    ✔️ withVsCurrencies('string')❗️
    ✔️ withIncludeMarketCap('string')
    ✔️ withInclude24hrVol('string')
    ✔️ withInclude24hrChange('string')
    ✔️ withIncludeLastUpdatedAt('string')
    ✔️ withPrecision('string')

    url parameters
    1. ids ➞ string (required)

      ◽️ id of coins, comma-separated if querying more than 1 coinrefers to coins/list

    2. vs_currencies ➞ string (required)

      ◽️ vs_currency of coins, comma-separated if querying more than 1 vs_currencyrefers to simple/supported_vs_currencies

    3. include_market_cap ➞ string

      ◽️ true/false to include market_cap, default: false

    4. include_24hr_vol ➞ string

      ◽️ true/false to include 24hr_vol, default: false

    5. include_24hr_change ➞ string

      ◽️ true/false to include 24hr_change, default: false

    6. include_last_updated_at ➞ string

      ◽️ true/false to include last_updated_at of price, default: false

    7. precision ➞ string

      ◽️ full or any value between 0 - 18 to specify decimal place for currency price value, default: 2


    💡 sample usage


    2. 📋 endpoint : /simple/token_price/{id}

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

    endpoint parameters
    1. id

      ➞ The id of the platform issuing tokens (See asset_platforms endpoint for list of options)

    [ method ] :
    simple()->tokenPrice('{id}')

    🔑 URL Keys : 7
    ✔️ withContractAddresses('string')❗️
    ✔️ withVsCurrencies('string')❗️
    ✔️ withIncludeMarketCap('string')
    ✔️ withInclude24hrVol('string')
    ✔️ withInclude24hrChange('string')
    ✔️ withIncludeLastUpdatedAt('string')
    ✔️ withPrecision('string')

    url parameters
    1. contract_addresses ➞ string (required)

      ◽️ The contract address of tokens, comma separated

    2. vs_currencies ➞ string (required)

      ◽️ vs_currency of coins, comma-separated if querying more than 1 vs_currency*refers to simple/supported_vs_currencies

    3. include_market_cap ➞ string

      ◽️ true/false to include market_cap, default: false

    4. include_24hr_vol ➞ string

      ◽️ true/false to include 24hr_vol, default: false

    5. include_24hr_change ➞ string

      ◽️ true/false to include 24hr_change, default: false

    6. include_last_updated_at ➞ string

      ◽️ true/false to include last_updated_at of price, default: false

    7. precision ➞ string

      ◽️ full or any Integer to specify decimal place for currency price value, default: 2


    💡 sample usage


    3. 📋 endpoint : /simple/supported_vs_currencies

    Get list of supported_vs_currencies.

    [ method ] :
    simple()->supportedVsCurrencies()

    💡 sample usage


    🌐 coins


    1. 📋 endpoint : /coins/list

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

    [ method ] :
    coins()->list()

    🔑 URL Keys : 1
    ✔️ withIncludePlatform('boolean')

    url parameters
    1. include_platform ➞ boolean

      ◽️ flag to include platform contract addresses (eg. 0x.... for Ethereum based tokens). valid values: true, false


    💡 sample usage


    2. 📋 endpoint : /coins/markets

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

    [ method ] :
    coins()->markets()

    🔑 URL Keys : 8
    ✔️ withVsCurrency('string')❗️
    ✔️ withIds('string')
    ✔️ withCategory('string')
    ✔️ withOrder('string')
    ✔️ withPerPage('integer')
    ✔️ withPage('integer')
    ✔️ withSparkline('boolean')
    ✔️ withPriceChangePercentage('string')

    url parameters
    1. vs_currency ➞ string (required)

      ◽️ The target currency of market data (usd, eur, jpy, etc.)

    2. ids ➞ string

      ◽️ The ids of the coin, comma separated crytocurrency symbols (base). refers to /coins/list.

    3. category ➞ string

      ◽️ filter by coin category. Refer to /coin/categories/list

    4. order ➞ string

      ◽️ valid values: market_cap_desc, gecko_desc, gecko_asc, market_cap_asc, market_cap_desc, volume_asc, volume_desc, id_asc, id_descsort results by field.

    5. per_page ➞ integer

      ◽️ valid values: 1..250 Total results per page

    6. page ➞ integer

      ◽️ Page through results

    7. sparkline ➞ boolean

      ◽️ Include sparkline 7 days data (eg. true, false)

    8. price_change_percentage ➞ string

      ◽️ Include price change percentage in 1h, 24h, 7d, 14d, 30d, 200d, 1y (eg. '1h,24h,7d' comma-separated, invalid values will be discarded)


    💡 sample usage


    3. 📋 endpoint : /coins/{id}

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

    endpoint parameters
    1. id

      ➞ pass the coin id (can be obtained from /coins) eg. bitcoin

    [ method ] :
    coins('{id}')

    🔑 URL Keys : 6
    ✔️ withLocalization('string')
    ✔️ withTickers('boolean')
    ✔️ withMarketData('boolean')
    ✔️ withCommunityData('boolean')
    ✔️ withDeveloperData('boolean')
    ✔️ withSparkline('boolean')

    url parameters
    1. localization ➞ string

      ◽️ Include all localized languages in response (true/false) [default: true]

    2. tickers ➞ boolean

      ◽️ Include tickers data (true/false) [default: true]

    3. market_data ➞ boolean

      ◽️ Include market_data (true/false) [default: true]

    4. community_data ➞ boolean

      ◽️ Include community_data data (true/false) [default: true]

    5. developer_data ➞ boolean

      ◽️ Include developer_data data (true/false) [default: true]

    6. sparkline ➞ boolean

      ◽️ Include sparkline 7 days data (eg. true, false) [default: false]


    💡 sample usage


    4. 📋 endpoint : /coins/{id}/tickers

    Get coin tickers (paginated to 100 items)

    endpoint parameters
    1. id

      ➞ pass the coin id (can be obtained from /coins/list) eg. bitcoin

    [ method ] :
    coins('{id}')->tickers()

    🔑 URL Keys : 5
    ✔️ withExchangeIds('string')
    ✔️ withIncludeExchangeLogo('string')
    ✔️ withPage('integer')
    ✔️ withOrder('string')
    ✔️ withDepth('string')

    url parameters
    1. exchange_ids ➞ string

      ◽️ filter results by exchange_ids (ref: v3/exchanges/list)

    2. include_exchange_logo ➞ string

      ◽️ flag to show exchange_logo

    3. page ➞ integer

      ◽️ Page through results

    4. order ➞ string

      ◽️ valid values: trust_score_desc (default), trust_score_asc and volume_desc

    5. depth ➞ string

      ◽️ flag to show 2% orderbook depth. valid values: true, false


    💡 sample usage


    5. 📋 endpoint : /coins/{id}/history

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

    endpoint parameters
    1. id

      ➞ pass the coin id (can be obtained from /coins) eg. bitcoin

    [ method ] :
    coins('{id}')->history()

    🔑 URL Keys : 2
    ✔️ withDate('string')❗️
    ✔️ withLocalization('string')

    url parameters
    1. date ➞ string (required)

      ◽️ The date of data snapshot in dd-mm-yyyy eg. 30-12-2017

    2. localization ➞ string

      ◽️ Set to false to exclude localized languages in response


    💡 sample usage


    6. 📋 endpoint : /coins/{id}/market_chart

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

    endpoint parameters
    1. id

      ➞ pass the coin id (can be obtained from /coins) eg. bitcoin

    [ method ] :
    coins('{id}')->marketChart()

    🔑 URL Keys : 3
    ✔️ withVsCurrency('string')❗️
    ✔️ withDays('string')❗️
    ✔️ withInterval('string')

    url parameters
    1. vs_currency ➞ string (required)

      ◽️ The target currency of market data (usd, eur, jpy, etc.)

    2. days ➞ string (required)

      ◽️ Data up to number of days ago (eg. 1,14,30,max)

    3. interval ➞ string

      ◽️ Data interval. Possible value: daily


    💡 sample usage


    7. 📋 endpoint : /coins/{id}/market_chart/range

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

    endpoint parameters
    1. id

      ➞ pass the coin id (can be obtained from /coins) eg. bitcoin

    [ method ] :
    coins('{id}')->marketChart()->range()

    🔑 URL Keys : 3
    ✔️ withVsCurrency('string')❗️
    ✔️ withFrom('string')❗️
    ✔️ withTo('string')❗️

    url parameters
    1. vs_currency ➞ string (required)

      ◽️ The target currency of market data (usd, eur, jpy, etc.)

    2. from ➞ string (required)

      ◽️ From date in UNIX Timestamp (eg. 1392577232)

    3. to ➞ string (required)

      ◽️ To date in UNIX Timestamp (eg. 1422577232)


    💡 sample usage


    🌐 contract


    1. 📋 endpoint : /coins/{id}/contract/{contract_address}

    Get coin info from contract address

    endpoint parameters
    1. id

      ➞ Asset platform (See asset_platforms endpoint for list of options)

    2. contract_address

      ➞ Token's contract address

    [ method ] :
    coins('{id}')->contract('{contract_address}')

    💡 sample usage


    2. 📋 endpoint : /coins/{id}/contract/{contract_address}/market_chart/

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

    endpoint parameters
    1. id

      ➞ The id of the platform issuing tokens (See asset_platforms endpoint for list of options)

    2. contract_address

      ➞ Token's contract address

    [ method ] :
    coins('{id}')->contract('{contract_address}')->marketChart()

    🔑 URL Keys : 2
    ✔️ withVsCurrency('string')❗️
    ✔️ withDays('string')❗️

    url parameters
    1. vs_currency ➞ string (required)

      ◽️ The target currency of market data (usd, eur, jpy, etc.)

    2. days ➞ string (required)

      ◽️ Data up to number of days ago (eg. 1,14,30,max)


    💡 sample usage


    3. 📋 endpoint : /coins/{id}/contract/{contract_address}/market_chart/range

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

    endpoint parameters
    1. id

      ➞ The id of the platform issuing tokens (See asset_platforms endpoint for list of options)

    2. contract_address

      ➞ Token's contract address

    [ method ] :
    coins('{id}')->contract('{contract_address}')->marketChart()->range()

    🔑 URL Keys : 3
    ✔️ withVsCurrency('string')❗️
    ✔️ withFrom('string')❗️
    ✔️ withTo('string')❗️

    url parameters
    1. vs_currency ➞ string (required)

      ◽️ The target currency of market data (usd, eur, jpy, etc.)

    2. from ➞ string (required)

      ◽️ From date in UNIX Timestamp (eg. 1392577232)

    3. to ➞ string (required)

      ◽️ To date in UNIX Timestamp (eg. 1422577232)


    💡 sample usage


    🌐 coins


    1. 📋 endpoint : /coins/{id}/ohlc

    Get coin's OHLC

    endpoint parameters
    1. id

      ➞ pass the coin id (can be obtained from /coins/list) eg. bitcoin

    [ method ] :
    coins('{id}')->ohlc()

    🔑 URL Keys : 2
    ✔️ withVsCurrency('string')❗️
    ✔️ withDays('string')❗️

    url parameters
    1. vs_currency ➞ string (required)

      ◽️ The target currency of market data (usd, eur, jpy, etc.)

    2. days ➞ string (required)

      ◽️ Data up to number of days ago (1/7/14/30/90/180/365/max)


    💡 sample usage


    🌐 asset_platforms


    1. 📋 endpoint : /asset_platforms

    List all asset platforms (Blockchain networks)

    [ method ] :
    assetPlatforms()

    🔑 URL Keys : 1
    ✔️ withFilter('string')

    url parameters
    1. filter ➞ string

      ◽️ apply relevant filters to results valid values: "nft" (asset_platform nft-support)


    💡 sample usage


    🌐 categories


    1. 📋 endpoint : /coins/categories/list

    List all categories

    [ method ] :
    coins()->categories()->list()

    💡 sample usage


    2. 📋 endpoint : /coins/categories

    List all categories with market data

    [ method ] :
    coins()->categories()

    🔑 URL Keys : 1
    ✔️ withOrder('string')

    url parameters
    1. order ➞ string

      ◽️ valid values: market_cap_desc (default), market_cap_asc, name_desc, name_asc, market_cap_change_24h_desc and market_cap_change_24h_asc


    💡 sample usage


    🌐 exchanges


    1. 📋 endpoint : /exchanges

    List all exchanges (Active with trading volumes)

    [ method ] :
    exchanges()

    🔑 URL Keys : 2
    ✔️ withPerPage('integer')
    ✔️ withPage('string')

    url parameters
    1. per_page ➞ integer

      ◽️ Valid values: 1...250Total results per pageDefault value:: 100

    2. page ➞ string

      ◽️ page through results


    💡 sample usage


    2. 📋 endpoint : /exchanges/list

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

    [ method ] :
    exchanges()->list()

    💡 sample usage


    3. 📋 endpoint : /exchanges/{id}

    Get exchange volume in BTC and top 100 tickers only

    endpoint parameters
    1. id

      ➞ pass the exchange id (can be obtained from /exchanges/list) eg. binance

    [ method ] :
    exchanges('{id}')

    💡 sample usage


    4. 📋 endpoint : /exchanges/{id}/tickers

    Get exchange tickers (paginated, 100 tickers per page)

    endpoint parameters
    1. id

      ➞ pass the exchange id (can be obtained from /exchanges/list) eg. binance

    [ method ] :
    exchanges('{id}')->tickers()

    🔑 URL Keys : 5
    ✔️ withCoinIds('string')
    ✔️ withIncludeExchangeLogo('string')
    ✔️ withPage('integer')
    ✔️ withDepth('string')
    ✔️ withOrder('string')

    url parameters
    1. coin_ids ➞ string

      ◽️ filter tickers by coin_ids (ref: v3/coins/list)

    2. include_exchange_logo ➞ string

      ◽️ flag to show exchange_logo

    3. page ➞ integer

      ◽️ Page through results

    4. depth ➞ string

      ◽️ flag to show 2% orderbook depth i.e., cost_to_move_up_usd and cost_to_move_down_usd

    5. order ➞ string

      ◽️ valid values: trust_score_desc (default), trust_score_asc and volume_desc


    💡 sample usage


    🌐 indexes


    1. 📋 endpoint : /indexes

    List all market indexes

    [ method ] :
    indexes()

    🔑 URL Keys : 2
    ✔️ withPerPage('integer')
    ✔️ withPage('integer')

    url parameters
    1. per_page ➞ integer

      ◽️ Total results per page

    2. page ➞ integer

      ◽️ Page through results


    💡 sample usage


    2. 📋 endpoint : /indexes/{market_id}/{id}

    get market index by market id and index id

    endpoint parameters
    1. market_id

      ➞ pass the market id (can be obtained from /exchanges/list)

    2. id

      ➞ pass the index id (can be obtained from /indexes/list)

    [ method ] :
    indexes('{market_id}','{id}')

    💡 sample usage


    3. 📋 endpoint : /indexes/list

    list market indexes id and name

    [ method ] :
    indexes()->list()

    💡 sample usage


    🌐 derivatives


    1. 📋 endpoint : /derivatives

    List all derivative tickers

    [ method ] :
    derivatives()

    🔑 URL Keys : 1
    ✔️ withIncludeTickers('string')

    url parameters
    1. include_tickers ➞ string

      ◽️ ['all', 'unexpired'] - expired to show unexpired tickers, all to list all tickers, defaults to unexpired


    💡 sample usage


    2. 📋 endpoint : /derivatives/exchanges

    List all derivative exchanges

    [ method ] :
    derivatives()->exchanges()

    🔑 URL Keys : 3
    ✔️ withOrder('string')
    ✔️ withPerPage('integer')
    ✔️ withPage('integer')

    url parameters
    1. order ➞ string

      ◽️ order results using following params name_asc,name_desc,open_interest_btc_asc,open_interest_btc_desc,trade_volume_24h_btc_asc,trade_volume_24h_btc_desc

    2. per_page ➞ integer

      ◽️ Total results per page

    3. page ➞ integer

      ◽️ Page through results


    💡 sample usage


    3. 📋 endpoint : /derivatives/exchanges/{id}

    show derivative exchange data

    endpoint parameters
    1. id

      ➞ pass the exchange id (can be obtained from derivatives/exchanges/list) eg. bitmex

    [ method ] :
    derivatives()->exchanges('{id}')

    🔑 URL Keys : 1
    ✔️ withIncludeTickers('string')

    url parameters
    1. include_tickers ➞ string

      ◽️ ['all', 'unexpired'] - expired to show unexpired tickers, all to list all tickers, leave blank to omit tickers data in response


    💡 sample usage


    4. 📋 endpoint : /derivatives/exchanges/list

    List all derivative exchanges name and identifier

    [ method ] :
    derivatives()->exchanges()->list()

    💡 sample usage


    🌐 exchanges


    1. 📋 endpoint : /exchanges/{id}/volume_chart

    Get volume_chart data for a given exchange

    endpoint parameters
    1. id

      ➞ pass the exchange id (can be obtained from /exchanges/list) eg. binance

    [ method ] :
    exchanges('{id}')->volumeChart()

    🔑 URL Keys : 1
    ✔️ withDays('integer')❗️

    url parameters
    1. days ➞ integer (required)

      ◽️ Data up to number of days ago (eg. 1,14,30)


    💡 sample usage


    🌐 nfts (beta)


    1. 📋 endpoint : /nfts/list

    List all supported NFT ids, paginated by 100 items per page, paginated to 100 items

    [ method ] :
    nfts()->list()

    🔑 URL Keys : 4
    ✔️ withOrder('string')
    ✔️ withAssetPlatformId('string')
    ✔️ withPerPage('integer')
    ✔️ withPage('integer')

    url parameters
    1. order ➞ string

      ◽️ valid values: h24_volume_native_asc, h24_volume_native_desc, floor_price_native_asc, floor_price_native_desc, market_cap_native_asc, market_cap_native_desc, market_cap_usd_asc, market_cap_usd_desc

    2. asset_platform_id ➞ string

      ◽️ The id of the platform issuing tokens (See asset_platforms endpoint for list of options)

    3. per_page ➞ integer

      ◽️ Total results per page

    4. page ➞ integer

      ◽️ Page through results


    💡 sample usage


    2. 📋 endpoint : /nfts/{id}

    Get current data (name, price_floor, volume_24h ...) for an NFT collection

    endpoint parameters
    1. id

      ➞ id of nft collection (can be obtained from /nfts/list)

    [ method ] :
    nfts('{id}')

    💡 sample usage


    3. 📋 endpoint : /nfts/{asset_platform_id}/contract/{contract_address}

    Get current data (name, price_floor, volume_24h ...) for an NFT collection

    endpoint parameters
    1. asset_platform_id

      ➞ The id of the platform issuing tokens (See asset_platforms endpoint for list of options, use filter=nft param)

    2. contract_address

      ➞ The contract_address of the nft collection (/nfts/list for list of nft collection with metadata)

    [ method ] :
    nfts('{asset_platform_id}')->contract('{contract_address}')

    💡 sample usage


    🌐 exchange_rates


    1. 📋 endpoint : /exchange_rates

    Get BTC-to-Currency exchange rates

    [ method ] :
    exchangeRates()

    💡 sample usage



    1. 📋 endpoint : /search

    Search for coins, categories and markets on CoinGecko

    [ method ] :
    search()

    🔑 URL Keys : 1
    ✔️ withQuery('string')❗️

    url parameters
    1. query ➞ string (required)

      ◽️ Search string


    💡 sample usage



    1. 📋 endpoint : /search/trending

    Get trending search coins (Top-7) on CoinGecko in the last 24 hours

    [ method ] :
    search()->trending()

    💡 sample usage


    🌐 global


    1. 📋 endpoint : /global

    Get cryptocurrency global data

    [ method ] :
    global()

    💡 sample usage


    2. 📋 endpoint : /global/decentralized_finance_defi

    Get cryptocurrency global decentralized finance(defi) data

    [ method ] :
    global()->decentralizedFinanceDefi()

    💡 sample usage


    🌐 companies (beta)


    1. 📋 endpoint : /companies/public_treasury/{coin_id}

    Get public companies data

    endpoint parameters
    1. coin_id

      ➞ bitcoin or ethereum

    [ method ] :
    companies()->publicTreasury('{coin_id}')

    💡 sample usage



    All versions of coingecko-api with dependencies

    PHP Build Version
    Package Version
    Requires guzzlehttp/guzzle Version ^7.5
    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 pangzlab/coingecko-api contains the following files

    Loading the files please wait ....