示例#1
0
        public OrderBook GetOrderBook(Asset amountAsset, Asset priceAsset)
        {
            string path = $"{_host}/matcher/orderbook/{amountAsset.Id}/{priceAsset.Id}";
            var    json = Http.GetObject(path);

            return(OrderBook.CreateFromJson(json, amountAsset, priceAsset));
        }
示例#2
0
        public long GetLastPrice(Asset amountAsset, Asset priceAsset)
        {
            var path = $"{_host}/matcher/orderbook/{amountAsset.Id}/{priceAsset.Id}/status";
            var json = Http.GetObject(path);

            return((long)json["lastPrice"]);
        }
示例#3
0
        public Dictionary <Asset, decimal> GetTradableBalance(string address, Asset amountAsset, Asset priceAsset)
        {
            var url = $"{_host}/matcher/orderbook/{amountAsset.Id}/{priceAsset.Id}/tradableBalance/{address}";

            var response = Http.GetObject(url);

            return(new Dictionary <Asset, decimal>
            {
                { amountAsset, amountAsset.LongToAmount(response.GetLong(amountAsset.Id)) },
                { priceAsset, priceAsset.LongToAmount(response.GetLong(priceAsset.Id)) },
            });
        }
示例#4
0
文件: Node.cs 项目: Axaic/WavesCS
 public DictionaryObject GetObject(string url, params object[] args)
 {
     return(Http.GetObject($"{_host}/{url}", args));
 }
示例#5
0
文件: Node.cs 项目: Axaic/WavesCS
 public long TransactionsCount(long height)
 {
     return(Http.GetObject($"{_host}/blocks/headers/at/{height}").GetInt("transactionCount"));
 }
示例#6
0
文件: Node.cs 项目: bluetsys/WavesCS
        public long GetBlockTotalFee(long height)
        {
            var t = Http.GetObject($"{_host}/blocks/headers/at/{height}");

            return(t.GetLong("totalFee"));
        }
示例#7
0
文件: Node.cs 项目: bluetsys/WavesCS
 public long GetBlockTimestamp(long height)
 {
     return(Http.GetObject($"{_host}/blocks/headers/at/{height}").GetLong("timestamp"));
 }