QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
crypto.cpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2004, 2005 StatPro Italia srl
5
6 This file is part of QuantLib, a free-software/open-source library
7 for financial quantitative analysts and developers - http://quantlib.org/
8
9 QuantLib is free software: you can redistribute it and/or modify it
10 under the terms of the QuantLib license. You should have received a
11 copy of the license along with this program; if not, please email
12 <quantlib-dev@lists.sf.net>. The license is also available online at
13 <http://quantlib.org/license.shtml>.
14
15 This program is distributed in the hope that it will be useful, but WITHOUT
16 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 FOR A PARTICULAR PURPOSE. See the license for more details.
18*/
19
20/*
21 Data from http://fx.sauder.ubc.ca/currency_table.html
22 and http://www.thefinancials.com/vortex/CurrencyFormats.html
23*/
24
25#include <ql/currencies/crypto.hpp>
26
27namespace QuantLib {
28
29 // Bitcoin
30 /* https://bitcoin.org/
31 */
33 static ext::shared_ptr<Data> btcData(
34 new Data("Bitcoin", "BTC", 10000,
35 "BTC", "", 100000,
36 Rounding(),
37 "%3% %1$.5f"));
38 data_ = btcData;
39 }
40
42
45 static ext::shared_ptr<Data> ethData(
46 new Data("Ethereum", "ETH", 10001,
47 "ETH", "", 100000,
48 Rounding(),
49 "%3% %1$.5f"));
50 data_ = ethData;
51 }
52
54
57 static ext::shared_ptr<Data> etcData(
58 new Data("Ethereum Classic", "ETC", 10002,
59 "ETC", "", 100000,
60 Rounding(),
61 "%3% %1$.5f"));
62 data_ = etcData;
63 }
64
66
69 static ext::shared_ptr<Data> bchData(
70 new Data("Bitcoin Cash", "BCH", 10003,
71 "BCH", "", 100000,
72 Rounding(),
73 "%3% %1$.5f"));
74 data_ = bchData;
75 }
76
78
81 static ext::shared_ptr<Data> xrpData(
82 new Data("Ripple", "XRP", 10004,
83 "XRP", "", 100000,
84 Rounding(),
85 "%3% %1$.5f"));
86 data_ = xrpData;
87 }
88
90
93 static ext::shared_ptr<Data> ltcData(
94 new Data("Litecoin", "LTC", 10005,
95 "LTC", "", 100000,
96 Rounding(),
97 "%3% %1$.5f"));
98 data_ = ltcData;
99 }
100
102
105 static ext::shared_ptr<Data> dashData(
106 new Data("Dash coin", "DASH", 10006,
107 "DASH", "", 100000,
108 Rounding(),
109 "%2% %1$.5f"));
110 data_ = dashData;
111 }
112
114
117 static ext::shared_ptr<Data> zecData(
118 new Data("Zcash", "ZEC", 10007,
119 "ZEC", "", 100000,
120 Rounding(),
121 "%3% %1$.5f"));
122 data_ = zecData;
123 }
124}
125
BCHCurrency()
Bitcoin Cash.
Definition: crypto.cpp:68
ext::shared_ptr< Data > data_
Definition: currency.hpp:91
DASHCurrency()
Dash coin.
Definition: crypto.cpp:104
ETCCurrency()
Ethereum Classic.
Definition: crypto.cpp:56
ETHCurrency()
Ethereum.
Definition: crypto.cpp:44
LTCCurrency()
Litecoin.
Definition: crypto.cpp:92
basic rounding class
Definition: rounding.hpp:35
XRPCurrency()
Ripple.
Definition: crypto.cpp:80
Definition: any.hpp:35