Ejemplo n.º 1
0
        public async Task <OrderResponse> LimitOrderAsync(string pair, decimal price, decimal quantity, Side side)
        {
            BittrexApi.NetCore.Entities.Side bittrexSide = this.BittrexSideReConverter(side);

            var response = await bittrex.LimitOrderAsync(pair, bittrexSide, quantity, price);

            return(this.GetOrder(string.Empty, response));
        }
Ejemplo n.º 2
0
        public OrderResponse MarketOrder(string pair, decimal quantity, Side side)
        {
            BittrexApi.NetCore.Entities.Side bittrexSide = this.BittrexSideReConverter(side);

            var response = bittrex.MarketOrder(pair, bittrexSide, quantity);

            return(this.GetOrder(string.Empty, response));
        }
Ejemplo n.º 3
0
        public Contracts.Side BittrexSideConverter(BittrexApi.NetCore.Entities.Side bittrexSide)
        {
            Contracts.Side side;

            switch (bittrexSide)
            {
            case BittrexApi.NetCore.Entities.Side.BUY:
                side = Contracts.Side.Buy;
                break;

            case BittrexApi.NetCore.Entities.Side.SELL:
                side = Contracts.Side.Sell;
                break;

            default:
                side = Contracts.Side.Buy;
                break;
            }

            return(side);
        }