Example #1
0
        public String candlestick2(String symbol, String groupSec, String rangeHour)
        {
            HttpUtilManager httpUtil = HttpUtilManager.getInstance();
            String          param    = "";

            if ((!"".Equals(symbol)) && symbol != null)
            {
                param += symbol;
                if ((!"".Equals(groupSec)) && groupSec != null)
                {
                    param += "?group_sec=" + groupSec;
                    if ((!"".Equals(rangeHour)) && rangeHour != null)
                    {
                        param += "&range_hour=" + rangeHour;
                    }
                }
                else
                {
                    if ((!"".Equals(rangeHour)) && rangeHour != null)
                    {
                        param += "?range_hour=" + rangeHour;
                    }
                }
            }
            String result = httpUtil.doRequest("data", "POST", url_prex + CANDLESTICK2_URL + param, new Dictionary <String, String>());

            return(result);
        }
Example #2
0
        public String balance()
        {
            Dictionary <String, String> Params   = new Dictionary <String, String>();
            HttpUtilManager             httpUtil = HttpUtilManager.getInstance();
            String result = httpUtil.doRequest("data", "post", url_prex + BALANCE_URL, Params);

            return(result);
        }
Example #3
0
        public String depositAddress(String symbol)
        {
            Dictionary <String, String> Params = new Dictionary <String, String>();

            HttpUtilManager httpUtil = HttpUtilManager.getInstance();
            String          result   = httpUtil.doRequest("data", "post", url_prex + DEPOSITADDRESS_URL, Params);

            return(result);
        }
Example #4
0
        public String openOrders()
        {
            Dictionary <String, String> Params = new Dictionary <String, String>();


            HttpUtilManager httpUtil = HttpUtilManager.getInstance();
            String          result   = httpUtil.doRequest("data", "post", url_prex + OPENORDERS_URL, Params);

            return(result);
        }
Example #5
0
        public String myTradeHistory(String currencyPair)
        {
            Dictionary <String, String> Params = new Dictionary <String, String>();

            Params.Add("currencyPair", currencyPair);

            HttpUtilManager httpUtil = HttpUtilManager.getInstance();
            String          result   = httpUtil.doRequest("data", "post", url_prex + MYTRADEHISTORY_URL, Params);

            return(result);
        }
Example #6
0
        public String cancelOrders(String orderJson)
        {
            Dictionary <String, String> Params = new Dictionary <String, String>();

            Params.Add("orders_json", orderJson);

            HttpUtilManager httpUtil = HttpUtilManager.getInstance();
            String          result   = httpUtil.doRequest("data", "post", url_prex + CANCELORDERS_URL, Params);

            return(result);
        }
Example #7
0
        public String getOrder(String orderNumber, String currencyPair)
        {
            Dictionary <String, String> Params = new Dictionary <String, String>();

            Params.Add("orderNumber", orderNumber);
            Params.Add("currencyPair", currencyPair);

            HttpUtilManager httpUtil = HttpUtilManager.getInstance();
            String          result   = httpUtil.doRequest("data", "post", url_prex + GETORDER_URL, Params);

            return(result);
        }
Example #8
0
        public String cancelAllOrders(String type, String currencyPair)
        {
            Dictionary <String, String> Params = new Dictionary <String, String>();

            Params.Add("type", type);
            Params.Add("currencyPair", currencyPair);

            HttpUtilManager httpUtil = HttpUtilManager.getInstance();
            String          result   = httpUtil.doRequest("data", "post", url_prex + CANCELALLORDERS_URL, Params);

            return(result);
        }
Example #9
0
        public String depositsWithdrawals(String startTime, String endTime)
        {
            Dictionary <String, String> Params = new Dictionary <String, String>();

            Params.Add("start", startTime);
            Params.Add("end", endTime);

            HttpUtilManager httpUtil = HttpUtilManager.getInstance();
            String          result   = httpUtil.doRequest("data", "post", url_prex + DEPOSITESWITHDRAWALS_URL, Params);

            return(result);
        }
Example #10
0
        public String withdraw(String currency, String amount, String address)
        {
            Dictionary <String, String> Params = new Dictionary <String, String>();

            Params.Add("currency", currency);
            Params.Add("amount", amount);
            Params.Add("address", address);

            HttpUtilManager httpUtil = HttpUtilManager.getInstance();
            String          result   = httpUtil.doRequest("data", "post", url_prex + WITHDRAW_URL, Params);

            return(result);
        }
Example #11
0
        public String sell(String currencyPair, String rate, String amount)
        {
            Dictionary <String, String> Params = new Dictionary <String, String>();

            Params.Add("currencyPair", currencyPair);
            Params.Add("rate", rate);
            Params.Add("amount", amount);

            HttpUtilManager httpUtil = HttpUtilManager.getInstance();
            String          result   = httpUtil.doRequest("data", "post", url_prex + SELL_URL, Params);

            return(result);
        }
Example #12
0
 public String openOrders(String currencyPair)
 {
     if (currencyPair == null || "".Equals(currencyPair))
     {
         return(openOrders());
     }
     else
     {
         Dictionary <String, String> Params = new Dictionary <String, String>();
         Params.Add("currencyPair", currencyPair);
         HttpUtilManager httpUtil = HttpUtilManager.getInstance();
         String          result   = httpUtil.doRequest("data", "post", url_prex + OPENORDERS_URL, Params);
         return(result);
     }
 }
Example #13
0
        public String myTradeHistory(String currencyPair, String orderNumber)
        {
            if (orderNumber == null || "".Equals(orderNumber))
            {
                return(myTradeHistory(currencyPair));
            }
            else
            {
                Dictionary <String, String> Params = new Dictionary <String, String>();
                Params.Add("currencyPair", currencyPair);
                Params.Add("orderNumber", orderNumber);

                HttpUtilManager httpUtil = HttpUtilManager.getInstance();
                String          result   = httpUtil.doRequest("data", "post", url_prex + MYTRADEHISTORY_URL, Params);
                return(result);
            }
        }