예제 #1
0
        public static void Main()
        {
            try
            {
                using (BterExchange bter = new BterExchange())
                {
                    using (CoinExExchange coinEx = new CoinExExchange())
                    {
                        PublicPrivateKeyPair cryptsyConfiguration = LoadPublicPrivateKeyPair(CRYPTSY_CONFIGURATION_FILENAME);

                        using (CryptsyExchange cryptsy = new CryptsyExchange()
                        {
                            PublicKey = cryptsyConfiguration.PublicKey,
                            PrivateKey = cryptsyConfiguration.PrivateKey
                        }
                               )
                        {
                            PublicPrivateKeyPair vaultOfSatoshiConfiguration = LoadPublicPrivateKeyPair(VAULT_OF_SATOSHI_CONFIGURATION_FILENAME);

                            using (VoSExchange vaultOfSatoshi = new VoSExchange()
                            {
                                PublicKey = vaultOfSatoshiConfiguration.PublicKey,
                                PrivateKey = vaultOfSatoshiConfiguration.PrivateKey
                            }
                                   )
                            {
                                using (VircurexExchange vircurex = new VircurexExchange())
                                {
                                    DoAnalysis(new List <IExchange>()
                                    {
                                        vaultOfSatoshi,
                                        bter,
                                        coinEx,
                                        cryptsy,
                                        vircurex
                                    });
                                }
                            }
                        }
                    }
                }
            }
            catch (ExchangeConfigurationException e)
            {
                Console.WriteLine(e.Message);

                Console.WriteLine("Press any key to exit");
                Console.ReadKey();
            }
        }
예제 #2
0
        private static void TestBter()
        {
            using (BterExchange bter = new BterExchange())
            {
                bter.PublicKey  = "xxxxxx";
                bter.PrivateKey = "topsecret";

                foreach (Wallet wallet in bter.GetAccountInfo().Result.Wallets)
                {
                    Console.WriteLine(wallet.CurrencyCode + ": "
                                      + wallet.Balance);
                }
            }
        }
        private static void TestBter()
        {
            using (BterExchange bter = new BterExchange())
            {
                bter.PublicKey = "xxxxxx";
                bter.PrivateKey = "topsecret";

                foreach (Wallet wallet in bter.GetAccountInfo().Result.Wallets)
                {
                    Console.WriteLine(wallet.CurrencyCode + ": "
                        + wallet.Balance);
                }
            }
        }
예제 #4
0
        public static void Main()
        {
            try
            {
                using (BterExchange bter = new BterExchange())
                {
                    using (CoinExExchange coinEx = new CoinExExchange())
                    {
                        PublicPrivateKeyPair cryptsyConfiguration = LoadPublicPrivateKeyPair(CRYPTSY_CONFIGURATION_FILENAME);

                        using (CryptsyExchange cryptsy = new CryptsyExchange()
                            {
                                PublicKey = cryptsyConfiguration.PublicKey,
                                PrivateKey = cryptsyConfiguration.PrivateKey
                            }
                        )
                        {
                            PublicPrivateKeyPair vaultOfSatoshiConfiguration = LoadPublicPrivateKeyPair(VAULT_OF_SATOSHI_CONFIGURATION_FILENAME);

                            using (VoSExchange vaultOfSatoshi = new VoSExchange()
                                {
                                    PublicKey = vaultOfSatoshiConfiguration.PublicKey,
                                    PrivateKey = vaultOfSatoshiConfiguration.PrivateKey
                                }
                            )
                            {
                                using (VircurexExchange vircurex = new VircurexExchange())
                                {
                                    DoAnalysis(new List<IExchange>() {
                                        vaultOfSatoshi,
                                        bter,
                                        coinEx,
                                        cryptsy,
                                        vircurex
                                    });
                                }
                            }
                        }
                    }
                }
            }
            catch (ExchangeConfigurationException e)
            {
                Console.WriteLine(e.Message);

                Console.WriteLine("Press any key to exit");
                Console.ReadKey();
            }
        }
예제 #5
0
        public void TestBuildBterPublicUrl()
        {
            string url = BterExchange.BuildPublicUrl(BterExchange.Method.pairs);

            Assert.AreEqual("http://bter.com/api/1/pairs", url);
        }