No commit activity in last 3 years
No release in over 3 years
A gem that calculates the exchange rate using published rates from uphold.com. Compatible with the money gem
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.11
~> 10.0
~> 3.0
~> 0.37.2
~> 2.1.0

Runtime

~> 6.12
 Project Readme

Money Uphold Bank

Build Status Code Climate

A gem that calculates the exchange rate using published rates from https://uphold.com

To be used as an exchange rate provider for the money gem

Uphold API

[{
  "ask": "1",
  "bid": "1",
  "currency": "BTC",
  "pair": "BTCBTC"
}, {
  "ask": "440.99",
  "bid": "440",
  "currency": "USD",
  "pair": "BTCUSD"
}]

Full description of the ticker endpoint: https://uphold.com/en/developer/api/documentation/#get-all-tickers Full Uphold API specification: https://uphold.com/en/developer/api/documentation

Features

  • Calculates exchange rates based on the mid market price, as specified by Uphold itself
  • Supports all Uphold currencies, including Bitcoin, Litecoin, and Voxelus
  • Caches API response for a customizable time

Installation

Add this line to your application's Gemfile:

gem 'money-uphold-bank'

And then execute:

$ bundle

Or install it yourself as:

$ gem install money-uphold-bank

Usage

# Minimal requirements
require "money/bank/uphold"

bank = Money::Bank::Uphold.new

# (optional)
# Set the number of seconds after which the rates are automatically expired.
# By default, they expire every hour
bank.ttl_in_seconds = 3600

Money.default_bank = bank

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/subvisual/money-uphold-bank. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.