QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
crypto.cpp
Go to the documentation of this file.
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
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
41 //! Ethereum
42 /*! https://www.ethereum.org/
43 */
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
53 //! Ethereum Classic
54 /*! https://ethereumclassic.github.io/
55 */
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
65 //! Bitcoin Cash
66 /*! https://www.bitcoincash.org/
67 */
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
77 //! Ripple
78 /*! https://ripple.com/
79 */
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
89 //! Litecoin
90 /*! https://litecoin.com/
91 */
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
101 //! Dash coin
102 /*! https://www.dash.org/
103 */
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
113 //! Zcash
114 /*! https://z.cash/
115 */
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:108
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
crypto currencies
Definition: any.hpp:35