コード例 #1
0
        /// <summary>
        /// </summary>
        /// <param name="market"></param>
        /// <param name="limit"></param>
        /// <returns></returns>
        public BcwMarketDepth GetDepth(BcwMarket market)
        {
            var request = new SynchronousJsonWebRequest <BcwMarketDepthResult>("https://s2.bitcoinwisdom.com/depth", null,
                                                                               Huobi.kGet, RestHelpers.BuildGetArgs("symbol", market.ToString()), 10, Huobi.kRetryCount);

            return(request.Send().@return);
        }
コード例 #2
0
        public override BcwTicker GetTicker(BcwMarket market)
        {
            var request =
                new SynchronousJsonWebRequest <Dictionary <BcwMarket, BcwTicker> >("https://s2.bitcoinwisdom.com/ticker",
                                                                                   null, Huobi.kGet, "", 10, Huobi.kRetryCount);

            return(request.Send()[market]);
        }
コード例 #3
0
        public override HuobiMarketSummary GetMarketSummary(HuobiMarket market)
        {
            var request =
                new SynchronousJsonWebRequest <HuobiMarketSummary>(
                    "http://market.huobi.com/staticmarket/detail_" + market + "_json.js", null, Huobi.kGet, "", 10,
                    Huobi.kRetryCount);

            return(request.Send());
        }
コード例 #4
0
        public override List <BcwTrade> GetPublicTrades(BcwMarket market, long sinceTid = -1)
        {
            string query;

            if (sinceTid == -1)
            {
                query = RestHelpers.BuildGetArgs("symbol", market.ToString());
            }
            else
            {
                query = RestHelpers.BuildGetArgs("symbol", market.ToString(), "since", sinceTid);
            }
            var request = new SynchronousJsonWebRequest <List <BcwTrade> >("https://s2.bitcoinwisdom.com/trades", null,
                                                                           Huobi.kGet, query, 10, Huobi.kRetryCount);

            return(request.Send());
        }