https://github.com/toreserter/coinmarketcal
Unofficial gem for the CoinMarketCal API
https://github.com/toreserter/coinmarketcal
coinmarketcal cryptocurrency rest-api ruby
Last synced: 10 months ago
JSON representation
Unofficial gem for the CoinMarketCal API
- Host: GitHub
- URL: https://github.com/toreserter/coinmarketcal
- Owner: toreserter
- License: mit
- Created: 2018-07-03T14:34:30.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-04T17:54:08.000Z (about 8 years ago)
- Last Synced: 2025-02-20T09:39:12.750Z (over 1 year ago)
- Topics: coinmarketcal, cryptocurrency, rest-api, ruby
- Language: Ruby
- Homepage:
- Size: 15.6 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Coinmarketcal [](https://badge.fury.io/rb/coinmarketcal)
Unofficial gem for the CoinMarketCal API.
CoinMarketCal is the economic calendar for the cryptocurrency market. Evidence-based and community-driven.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'coinmarketcal'
```
And then execute:
$ bundle
Or install it yourself as:
$ gem install coinmarketcal
## Usage
You can authenticate access to your CoinMarketCal account by configuring your implementation of the coinmarketcal gem. This is accomplished by using a config block at the top of your application.
Set up your keys at: https://api.coinmarketcal.com/developer/dashboard
```ruby
Coinmarketcal.config do |c|
c.client_id = 'your-client-id'
c.client_secret = 'your-client-secret'
end
```
To retrieve list of coins:
```ruby
Coinmarketcal::Coin.all
```
To retrieve list of events:
```ruby
Coinmarketcal::Event.all coins: "bitcoin,ethereum",
max: 10,
sort_by: "created_desc",
date_range_start: "30/07/2018",
date_range_end: "30/08/2018"
```
To retrieve list of categories:
```ruby
Coinmarketcal::Category.all
```
For more information about API, visit https://api.coinmarketcal.com/
## Contributing
1. Fork it ( https://github.com/toreserter/coinmarketcal/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).