コード例 #1
0
        public async Task <IPair> PairAsync(string Name, System.Threading.CancellationToken cancellationToken)
        {
            ProfitBestPair pair = new ProfitBestPair(Name);
            await pair.InitializeAsync(_market, cancellationToken);

            return(pair);
        }
コード例 #2
0
        public async Task <IMarketStatus> StatusAsync(System.Threading.CancellationToken cancellationToken)
        {
            ProfitBestPair pair = new ProfitBestPair("BIO-BTC");
            await pair.InitializeAsync(_market, cancellationToken);

            return(new ProfitBestStatus(pair?.Pair != null && pair.Sell > 0 && pair.Buy > 0));
        }
コード例 #3
0
        public async Task <IEnumerable <IPair> > PairsAsync(System.Threading.CancellationToken cancellationToken)
        {
            ProfitBestPair pairBIOBTC = new ProfitBestPair("BIO-BTC");
            await pairBIOBTC.InitializeAsync(_market, cancellationToken);

            ProfitBestPair pairBIORUR = new ProfitBestPair("BIO-RUR");
            await pairBIORUR.InitializeAsync(_market, cancellationToken);

            ProfitBestPair pairBIOETH = new ProfitBestPair("BIO-ETH");
            await pairBIOETH.InitializeAsync(_market, cancellationToken);

            ProfitBestPair pairBIOSIB = new ProfitBestPair("BIO-SIB");
            await pairBIOSIB.InitializeAsync(_market, cancellationToken);

            return(new IPair[] { pairBIOBTC, pairBIORUR, pairBIOETH, pairBIOSIB });
        }