//========================================================== public void GetOrderBook(Bittrex B, String Market, BittrexOrderBook.Type OrderBookType, Int32 Depth) { BittrexResult <BittrexOrderBook> BOB = B.GetOrderBook(Market, OrderBookType, Depth); if (GetIsResultValid(BOB)) { Console.WriteLine(BOB.Result.ToString()); } }
//========================================================== public static Boolean GetIsMarketValid(Bittrex B, String Market) { if (String.IsNullOrEmpty(Market) || Market.Length != 7) { return(false); } return(B.GetOrderBook(Market, BittrexOrderBook.Type.Buy, 1).Success); }
//========================================================== public void GetDepositAddress(Bittrex B, String Currency) { BittrexResult <BittrexAddress> BA = B.GetDepositAddress(Currency); if (GetIsResultValid(BA)) { Console.WriteLine(BA.Result.ToString()); } }
//========================================================== public void GetBalance(Bittrex B, String Currency) { BittrexResult <BittrexBalance> BB = B.GetBalance(Currency); if (GetIsResultValid(BB)) { Console.WriteLine(BB.Result.ToString()); } }
//========================================================== public void GetMarketSummary(Bittrex B, String Market) { BittrexResult <List <BittrexMarketSummary> > BMS = B.GetMarketSummary(Market); if (GetIsResultValid(BMS)) { Console.WriteLine(BMS.Result[0].ToString()); } }
//========================================================== public void GetTicker(Bittrex B, String Market) { BittrexResult <BittrexTicker> BT = B.GetTicker(Market); if (GetIsResultValid(BT)) { Console.WriteLine(BT.Result.ToString()); } }
//========================================================== public void GetCurrencies(Bittrex B) { BittrexResult <List <BittrexCurrency> > Currencies = B.GetCurrencies(); if (GetIsResultValid(Currencies)) { foreach (BittrexCurrency BC in Currencies.Result) { Console.WriteLine(BC.ToString()); } } }
//========================================================== public void GetMarkets(Bittrex B) { BittrexResult <List <BittrexMarket> > Markets = B.GetMarkets(); if (GetIsResultValid(Markets)) { foreach (BittrexMarket BM in Markets.Result) { Console.WriteLine(BM.ToString()); } } }
//========================================================== public void GetDepositHistory(Bittrex B, String Currency) { BittrexResult <List <BittrexDeposit> > Deposits = B.GetDepositHistory(Currency); if (GetIsResultValid(Deposits)) { foreach (BittrexDeposit BD in Deposits.Result) { Console.WriteLine(BD.ToString()); } } }
//========================================================== public void GetWithdrawalHistory(Bittrex B, String Currency) { BittrexResult <List <BittrexWithdrawal> > Withdrawals = B.GetWithdrawalHistory(Currency); if (GetIsResultValid(Withdrawals)) { foreach (BittrexWithdrawal BW in Withdrawals.Result) { Console.WriteLine(BW.ToString()); } } }
//========================================================== public void GetOrderHistory(Bittrex B, String Market) { BittrexResult <List <BittrexOrder1> > Orders = B.GetOrderHistory(Market); if (GetIsResultValid(Orders)) { foreach (BittrexOrder1 BO1 in Orders.Result) { Console.WriteLine(BO1.ToString()); } } }
//========================================================== public void GetBalances(Bittrex B) { BittrexResult <List <BittrexBalance> > Balances = B.GetBalances(); if (GetIsResultValid(Balances)) { foreach (BittrexBalance BB in Balances.Result) { Console.WriteLine(BB.ToString()); } } }
//========================================================== public void GetMarketHistory(Bittrex B, String Market) { BittrexResult <List <BittrexTrade> > MarketHistory = B.GetMarketHistory(Market); if (GetIsResultValid(MarketHistory)) { foreach (BittrexTrade BT in MarketHistory.Result) { Console.WriteLine(BT.ToString()); } } }
//========================================================== public void GetMarketSummaries(Bittrex B) { BittrexResult <List <BittrexMarketSummary> > MarketSummaries = B.GetMarketSummaries(); if (GetIsResultValid(MarketSummaries)) { foreach (BittrexMarketSummary BMS in MarketSummaries.Result) { Console.WriteLine(BMS.ToString()); } } }
//========================================================== public void Run(Bittrex B) { //TestGetMarkets( B ); //TestGetCurrencies( B ); //TestGetTicker( B, "ETH-ZEC" ); //TestGetMarketSummaries( B ); //TestGetMarketSummary( B, "ETH-ZEC" ); //TestGetOrderBook( B, "ETH-ZEC", BittrexOrderBook.Type.Both, 5 ); //TestGetMarketHistory( B, "ETH-ZEC" ); //TestGetBalances( B ); //TestGetBalance( B, "ZEC" ); //TestGetBalance( B, "ETH" ); //TestGetOpenOrders( B, "ETH-ZEC" ); //TestGetOrderHistory( B, "ETH-ZEC" ); //TestGetWithdrawalHistory( B, "ETH" ); //TestGetDepositHistory( B, "ZEC" ); //TestGetDepositAddress( B, "ZEC" ); //TestGetDepositAddress( B, "ETH" ); }