{"repo":"crystal-money/money","free":true,"listed":false,"github":"https://github.com/crystal-money/money","clone":"git clone https://github.com/crystal-money/money.git","description":"💰 Crystal shard for dealing with money and currency conversion","language":"Crystal","stars":44,"topics":["crystal","money","currency","cryptocurrency","conversion","exchange"],"license":"MIT","category":"blockchain-web3","readme_excerpt":"money Hey there! 👋 Welcome to money , a Crystal shard for handling money and currency conversion, inspired by RubyMoney. Why Use This Library? Here’s what you get out of the box: - A Money class to represent amounts and their currencies. - A flexible Money::Currency class for all your currency info needs. - A growing list of 200+ supported currencies (metals, fiat, cryptocurrencies). - BigDecimal -based values — i.e. no more floating point rounding headaches! - Easy APIs for currency exchange. - Multiple exchange rate providers (use built-in or roll your own). - Comprehensive support for formatting and parsing money values. - Mathematical operations on Money objects: - Arithmetic: addition, subtraction, multiplication, division, etc. - Rounding and truncation helpers. - Allocation and splitting. - Money ranges. - JSON/YAML serialization and deserialization support. - Extensible architecture of exchange rate providers and stores. Installation Add this to your application's shard.yml : Then run: And require it in your project: [!TIP] If you wish to use YAML serialization, remember to require \"yaml\" before requiring money . Quick Examples Creating Money [!NOTE] Money.new first positional argument will treat the given value as the fractional if it's an integer, and the amount otherwise. From fractional amount From whole amount Comparing Money [!NOTE] Performs currency conversion if necessary. Strict Comparison ( == / != ) [!NOTE] Does not perform currency conversion. Loose Compa","default_branch":null,"files":null,"tree":[],"storefront":"/r/crystal-money","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/crystal-money/money/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}