In this project, we will be implementing a CLI that maps to CoinGecko API https://www.coingecko.com/en/api/documentation#
| Command | Status |
|---|---|
| ping | Done |
| simple | Done |
| coins | |
| contract | |
| asset_platforms | In progress |
| categories | |
| exchanges | |
| indexes | |
| derivatives | |
| nfts | |
| exchange_rates | |
| search | |
| trending | |
| global | |
| companies |
Each of them will have one or more subcommands, you may find more details in the API documentation. Initially, we will be supporting the Free API which currently supports 10-30 calls/minute and doesn't require an API key.
The project will be implemented using Rust.
To install the project, please follow these steps:
-
Clone the repository:
git clone https://github.com/juanpalopez/coingecko-cli.git
-
Change to the project directory:
cd coingecko-cli -
Build the project using Cargo:
# build debug mode cargo build # or # build release mode cargo build --release
Congratulations! The project is now installed and ready to use.
After installing the project, you can run the CLI with the following steps:
-
If you're not already in the project directory, navigate to it:
cd coingecko-cli -
To run the CLI in debug mode, use:
cargo run
-
To run the CLI with arguments, append them after
--in the command line:cargo run -- [arguments]
For example, to run a command
ping, you would use:cargo run -- ping
-
If you built the project in release mode and want to run the release version, navigate to the
target/releasedirectory and run the executable directly:cd target/release ./coingecko-cli [arguments]Replace
[arguments]with any specific commands or options your CLI supports. -
To view all available commands and their descriptions, you can use the help command:
cargo run -- --help
Or, if running a built-release version:
./coingecko-cli --help
Congratulations! You are now running the CLI.