程序员的量化交易之路(22)--Cointrader值货币集合Currencies(10)

转载须注明出处:http://blog.csdn.net/minimicall?viewmode=contentshttp://cloudtrade.top

货币集合Currencies是Currency的集合。主要是定义一些枚举:

代码如下:

public class Currencies {
    // Fiat
    public static final Currency AUD = fiat("AUD", 0.01);
    public static final Currency CAD = fiat("CAD", 0.01);
    public static final Currency CHF = fiat("CHF", 0.05);
    public static final Currency CNY = fiat("CNY", 0.01);
    public static final Currency EUR = fiat("EUR", 0.01);
    public static final Currency GBP = fiat("GBP", 0.01);
    public static final Currency HKD = fiat("HKD", 0.01);
    public static final Currency JPY = fiat("JPY", 1.00);
    public static final Currency MXN = fiat("MXN", 0.01);
    public static final Currency NZD = fiat("NZD", 0.10);
    public static final Currency RUB = fiat("RUB", 0.01);
    public static final Currency SEK = fiat("SEK", 1.00);
    public static final Currency SGD = fiat("SGD", 0.01);
    public static final Currency TRY = fiat("TRY", 0.01);
    public static final Currency USD = fiat("USD", 0.01);

    // Cryptos

    // Base coins Bitcoin, Litecoin, Primecoin, Dogecoin, Nextcoin
    // todo review bases!  they may not be correct
    // todo we need a way for a Market to trade in a different basis than the quote's basis
    public static final Currency AUR = crypto("AUR", 1e-8);
    public static final Currency BTC = crypto("BTC", 1e-8);
    public static final Currency DOGE = crypto("DOGE", 1e-8);
    public static final Currency DRK = crypto("DRK", 1e-7);
    public static final Currency FTC = crypto("FTC", 1e-8);
    public static final Currency LTC = crypto("LTC", 1e-8);
    public static final Currency MEM = crypto("MEM", 1e-8);
    public static final Currency MOON = crypto("MOON", 1e-8);
    public static final Currency NMC = crypto("NMC", 1e-8);
    public static final Currency NVC = crypto("NVC", 1e-8);
    public static final Currency NXT = crypto("NXT", 1e-8);
    public static final Currency XCP = crypto("XCP", 1e-8);
    public static final Currency XPM = crypto("XPM", 1e-8);

    // Altcoins
    // todo review bases!  they may not be correct
    public static final Currency BC = crypto("BC", 1e-8);
    public static final Currency BQC = crypto("BQC", 1e-8);
    public static final Currency BTB = crypto("BTB", 1e-8);
    public static final Currency BTQ = crypto("BTQ", 1e-8);
    public static final Currency BUK = crypto("BUK", 1e-8);
    public static final Currency C2 = crypto("C2", 1e-8);
    public static final Currency CDC = crypto("CDC", 1e-8);
    public static final Currency CENT = crypto("CENT", 1e-8);
    public static final Currency CMC = crypto("CMC", 1e-8);
    public static final Currency CNC = crypto("CNC", 1e-8);
    public static final Currency COMM = crypto("COMM", 1e-8);
    public static final Currency DGC = crypto("DGC", 1e-8);
    public static final Currency DTC = crypto("DTC", 1e-8);
    public static final Currency DVC = crypto("DVC", 1e-8);
    public static final Currency EXC = crypto("EXC", 1e-8);
    public static final Currency FLT = crypto("FLT", 1e-8);
    public static final Currency FRC = crypto("FRC", 1e-8);
    public static final Currency IFC = crypto("IFC", 1e-8);
    public static final Currency KDC = crypto("KDC", 1e-8);
    public static final Currency MAX = crypto("MAX", 1e-8);
    public static final Currency MEC = crypto("MEC", 1e-8);
    public static final Currency MINT = crypto("MINT", 1e-8);
    public static final Currency MMC = crypto("MMC", 1e-8);
    public static final Currency NEC = crypto("NEC", 1e-8);
    public static final Currency NET = crypto("NET", 1e-8);
    public static final Currency PPC = crypto("PPC", 1e-8);
    public static final Currency PRT = crypto("PRT", 1e-8);
    public static final Currency PTS = crypto("PTS", 1e-8);
    public static final Currency QRK = crypto("QRK", 1e-8);
    public static final Currency quute = crypto("quute", 1e-8);
    public static final Currency RDD = crypto("RDD", 1e-8);
    public static final Currency CANN = crypto("CANN", 1e-8);
    public static final Currency RED = crypto("RED", 1e-8);
    public static final Currency SLM = crypto("SLM", 1e-8);
    public static final Currency SRC = crypto("SRC", 1e-8);
    public static final Currency TAG = crypto("TAG", 1e-8);
    public static final Currency TIPS = crypto("TIPS", 1e-8);
    public static final Currency TIX = crypto("TIX", 1e-8);
    public static final Currency VRC = crypto("VRC", 1e-8);
    public static final Currency VTC = crypto("VTC", 1e-8);
    public static final Currency WDC = crypto("WDC", 1e-8);
    public static final Currency XC = crypto("XC", 1e-8);
    public static final Currency YAC = crypto("YAC", 1e-8);
    public static final Currency ZCC = crypto("ZCC", 1e-8);
    public static final Currency ZET = crypto("ZET", 1e-8);

    

    private static Currency fiat(String symbol, double basis) {
        return Currency.forSymbolOrCreate(symbol, true, basis);
    }

    private static Currency crypto(String symbol, double basis) {
        return Currency.forSymbolOrCreate(symbol, false, basis);
    }
}


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值