Example #1
0
            public void OnPriceChange(PriceChange pc)
            {
                if (sortedArbList.Contains(pc.CurrencyPair))
                {
                    var arbOpp = ArbitrationTracker
                                 .FindArbitrationOpportunitiesForExchangeCurrency(
                        pc.Exchange,
                        getCurrencyPair(pc.CurrencyPair).currency);

                    if (arbOpp != null)
                    {
                        Console.WriteLine(arbOpp);
                    }
                }

                (string basePair, string currency) getCurrencyPair(string input)
                {
                    var split = input.Split('-');

                    return(split[0], split[1]);
                }
            }