public void GetTicker_Test() { // Arrange var pair = "ETHBTC"; // Act var ticker = _svc.GetTicker(pair).Result; // Assert Assert.NotNull(ticker); Assert.Equal(@"ETH/BTC", ticker.Pair); }
/// <summary> /// Place a market order /// </summary> /// <param name="pair">Trading pair</param> /// <param name="quantity">Order quantity</param> /// <param name="side">Order side</param> /// <returns>New order id</returns> public static async Task <string> MarketOrder(this IBilaxyDotNet service, string pair, decimal price, decimal quantity, Side side) { var asset = await GetTradingPair(service, pair); var ticker = await service.GetTicker(asset.AssetId); return(await service.PlaceOrder(asset.AssetId, quantity, ticker.Last, side)); }
/// <summary> /// Get ticker for a trading pair /// </summary> /// <param name="pair">Trading pair</param> /// <returns>Ticker object</returns> public static async Task <Ticker> GetTicker(this IBilaxyDotNet service, string pair) { var asset = await GetTradingPair(service, pair); return(await service.GetTicker(asset.AssetId)); }