Example #1
0
        private Models.ITradeStatus GetStatus()
        {
            ProductType   productType = Utils.GetProductType(this.Currency);
            ProductTicker ticker      = client.GetProductTickerSync(productType);

            TradeStatus status = new TradeStatus();

            status.Price = ticker.Price;
            return(status);
        }
Example #2
0
 public GdaxTicker(ProductTicker pt)
 {
     trade_id = pt.Trade_id;
     price    = pt.Price;
     size     = pt.Size;
     bid      = pt.Bid;
     ask      = pt.Ask;
     volume   = pt.Volume;
     time     = pt.Time.ToDateTimeString();
 }
Example #3
0
        public ProductTicker GetProductTickerSync(ProductType productPair)
        {
            ProductTicker res = null;

            try
            {
                res = Task.Run(async() => { return(await this.ProductsService.GetProductTickerAsync(productPair)); }).Result;
            }
            catch (Exception ex)
            {
                ex = null;
            }
            return(res);
        }