Coverage Report

Created: 2025-08-11 06:28

/src/quantlib/ql/currencies/crypto.cpp
Line
Count
Source (jump to first uncovered line)
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
27
namespace QuantLib {
28
29
    // Bitcoin
30
    /* https://bitcoin.org/
31
    */
32
0
    BTCCurrency::BTCCurrency() {
33
0
        static auto btcData = ext::make_shared<Data>("Bitcoin", "BTC", 10000, "BTC", "", 100000, Rounding());
34
0
        data_ = btcData;
35
0
    }
36
37
    //! Ethereum
38
    /*! https://www.ethereum.org/
39
    */
40
0
    ETHCurrency::ETHCurrency() {
41
0
        static auto ethData = ext::make_shared<Data>("Ethereum", "ETH", 10001, "ETH", "", 100000, Rounding());
42
0
        data_ = ethData;
43
0
    }
44
45
    //! Ethereum Classic
46
    /*! https://ethereumclassic.github.io/
47
    */
48
0
    ETCCurrency::ETCCurrency() {
49
0
        static auto etcData = ext::make_shared<Data>("Ethereum Classic", "ETC", 10002, "ETC", "", 100000, Rounding());
50
0
        data_ = etcData;
51
0
    }
52
53
    //! Bitcoin Cash
54
    /*! https://www.bitcoincash.org/
55
    */
56
0
    BCHCurrency::BCHCurrency() {
57
0
        static auto bchData = ext::make_shared<Data>("Bitcoin Cash", "BCH", 10003, "BCH", "", 100000, Rounding());
58
0
        data_ = bchData;
59
0
    }
60
61
    //! Ripple
62
    /*! https://ripple.com/
63
    */
64
0
    XRPCurrency::XRPCurrency() {
65
0
        static auto xrpData = ext::make_shared<Data>("Ripple", "XRP", 10004, "XRP", "", 100000, Rounding());
66
0
        data_ = xrpData;
67
0
    }
68
69
    //! Litecoin
70
    /*! https://litecoin.com/
71
    */
72
0
    LTCCurrency::LTCCurrency() {
73
0
        static auto ltcData = ext::make_shared<Data>("Litecoin", "LTC", 10005, "LTC", "", 100000, Rounding());
74
0
        data_ = ltcData;
75
0
    }
76
77
    //! Dash coin
78
    /*! https://www.dash.org/
79
    */
80
0
    DASHCurrency::DASHCurrency() {
81
0
        static auto dashData = ext::make_shared<Data>("Dash coin", "DASH", 10006, "DASH", "", 100000, Rounding());
82
0
        data_ = dashData;
83
0
    }
84
85
    //! Zcash
86
    /*! https://z.cash/
87
    */
88
0
    ZECCurrency::ZECCurrency() {
89
0
        static auto zecData = ext::make_shared<Data>("Zcash", "ZEC", 10007, "ZEC", "", 100000, Rounding());
90
0
        data_ = zecData;
91
0
    }
92
93
}
94