Пример #1
0
        public async Task <IPair> PairAsync(string Name, System.Threading.CancellationToken cancellationToken)
        {
            BittrexPair pair = new BittrexPair(Name);
            await pair.InitializeAsync(_stock, cancellationToken);

            return(pair);
        }
Пример #2
0
        public async Task <IMarketStatus> StatusAsync(System.Threading.CancellationToken cancellationToken)
        {
            BittrexPair pair = new BittrexPair("BTC-ETH");
            await pair.InitializeAsync(_stock, cancellationToken);

            return(new BittrexStatus(pair?.Pair != null && pair.Sell > 0 && pair.Buy > 0));
        }
Пример #3
0
        public async Task <IEnumerable <IPair> > PairsAsync(System.Threading.CancellationToken cancellationToken)
        {
            BittrexPair pairBIOBTC = new BittrexPair("BIO-BTC");
            await pairBIOBTC.InitializeAsync(_stock, cancellationToken);

            BittrexPair pairBIORUR = new BittrexPair("BIO-RUR");
            await pairBIORUR.InitializeAsync(_stock, cancellationToken);

            BittrexPair pairBTCETH = new BittrexPair("BTC-ETH");
            await pairBTCETH.InitializeAsync(_stock, cancellationToken);

            BittrexPair pairBTCSIB = new BittrexPair("BTC-SIB");
            await pairBTCSIB.InitializeAsync(_stock, cancellationToken);

            return(new IPair[] { pairBIOBTC, pairBIORUR, pairBTCETH, pairBTCSIB });
        }