Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/drakkar-software/coingecko-openapi-clients
Coingecko api client. Only typescript and python for now
https://github.com/drakkar-software/coingecko-openapi-clients
coingecko coingecko-api coingecko-client coingeckoapi crypto cryptocurrency openapi
Last synced: 4 days ago
JSON representation
Coingecko api client. Only typescript and python for now
- Host: GitHub
- URL: https://github.com/drakkar-software/coingecko-openapi-clients
- Owner: Drakkar-Software
- License: mit
- Created: 2024-03-17T15:11:57.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2024-09-09T19:39:10.000Z (2 months ago)
- Last Synced: 2024-09-10T00:06:05.334Z (2 months ago)
- Topics: coingecko, coingecko-api, coingecko-client, coingeckoapi, crypto, cryptocurrency, openapi
- Language: Python
- Homepage: https://www.coingecko.com/api/documentation
- Size: 95.7 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Coingecko OpenApi clients
## Global configuration
```
export COINGECKO_BASE_URL="https://api.coingecko.com/api/v3"
```API documentation available at https://docs.coingecko.com/v3.0.1/reference/introduction
## Typescript [![NPM](https://img.shields.io/npm/v/coingecko-openapi-client)](https://www.npmjs.com/package/coingecko-openapi-client)
### Install
```
npm i coingecko-openapi-client
yarn add coingecko-openapi-client
pnpm install coingecko-openapi-client
```### Setup
```
pnpm install
pnpm build
```### Usage
```
pnpm start
```## Python [![PYPI](https://img.shields.io/pypi/v/coingecko-openapi-client)](https://pypi.org/project/coingecko-openapi-client/)
### Install
```
pip3 install coingecko-openapi-client
```### Usage
```
python3 examples/python/coins-list.py
```## Developers
### Regenerate client
Download the schema:
```
wget https://www.coingecko.com/api/documentations/v3/swagger.json -O swagger.json
```#### Typescript
```
pnpx openapi-typescript-codegen --input swagger.json --output client/typescript --name CoingeckoAPIClient
```#### Python
```
docker run --rm -v ./:/local swaggerapi/swagger-codegen-cli generate \
-i /local/swagger.json \
-l python \
-o /local/client/python \
--library asyncio \
--additional-properties=packageName=coingecko_openapi_client \
--additional-properties=projectName=coingecko-openapi-client \
--additional-properties=packageUrl=https://github.com/Drakkar-Software/coingecko-openapi-clients
```Then patch the generated client with by replacing all `response_type=None` by `response_type=object`