Skip to content

Commit

Permalink
README
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianToledano committed Jan 23, 2025
1 parent 2ef474d commit 7e5f293
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,18 @@ Coingecko API client for golang.


## Endpoints

### Simple Endpoints
| Endpoint | Status | Function |
|------------------------------------------------------------|--|---------------------------|
| /ping || Ping |
| /simple/price || SimplePrice |
| /simple/token_price/{id} || SimpleTokenPrice |
| /simple/supported_vs_currencies || SimpleSupportedVsCurrency |

### Coins Endpoints
| Endpoint | Status | Function |
|------------------------------------------------------------|--|---------------------------|
| /coins/list || CoinsList |
| /coins/markets || CoinsMarket |
| /coins/{id} || CoinsId |
Expand All @@ -26,21 +32,37 @@ Coingecko API client for golang.
| /coins/{id}/contract/{contract_address} || ContractInfo |
| /coins/{id}/contract/{contract_address}/market_chart/ || ContractMarketChart |
| /coins/{id}/contract/{contract_address}/market_chart/range || ContractMarketChartRange |
| /asset_platforms || AssetPlatforms |
| /coins/categories/list || CategoriesList |
| /coins/categories/ || Categories |

### Exchange Endpoints
| Endpoint | Status | Function |
|------------------------------------------------------------|--|---------------------------|
| /exchanges || Exchanges |
| /exchanges/list || ExchangesList |
| /exchanges/{id} || ExchangesId |
| /exchanges/{id}/tickers || ExchangesIdTickers |
| /exchanges/{id}/volume_chart || ExchangesIdVolumeChart |

### Derivatives Endpoints
| Endpoint | Status | Function |
|------------------------------------------------------------|--|---------------------------|
| /derivaties || Derivatives |
| /derivaties/exchanges || DerivativesExchanges |
| /derivaties/exchanges/{id} || DerivativesExchangesId |
| /derivaties/exchanges/list || DerivativesExchangesList |

### NFT Endpoints
| Endpoint | Status | Function |
|------------------------------------------------------------|--|---------------------------|
| /nfts/list || NftsList |
| /nfts/{id} || NftsId |
| /nfts/{asset_platform_id}/contract/{contract_address} || NftsContract |

### Other Endpoints
| Endpoint | Status | Function |
|------------------------------------------------------------|--|---------------------------|
| /asset_platforms || AssetPlatforms |
| /exchange_rates || ExchangeRates |
| /search || Search |
| /search/trending || Trending |
Expand Down
4 changes: 2 additions & 2 deletions api/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ import (
)

// proApiHeader returns a function that sets the Pro API key header on requests
func proApiHeader(apiKey string) func(r *http.Request) {
func proApiHeader(apiKey string) geckohttp.ApiHeaderFn {
return func(r *http.Request) {
r.Header.Set("x-cg-pro-api-key", apiKey)
}
}

// demoApiHeader returns a function that sets the Demo API key header on requests
func demoApiHeader(apiKey string) func(r *http.Request) {
func demoApiHeader(apiKey string) geckohttp.ApiHeaderFn {
return func(r *http.Request) {
r.Header.Set("x-cg-demo-api-key", apiKey)
}
Expand Down

0 comments on commit 7e5f293

Please sign in to comment.