public GdaxRestApiClientTests()
        {
            var configuration = GdaxHelpers.GetGdaxConfiguration();

            _api = new GdaxRestApi(configuration.ApiKey, configuration.ApiSecret, configuration.PassPhrase,
                                   configuration.RestEndpointUrl, configuration.UserAgent);
        }
Ejemplo n.º 2
0
        public GdaxOrderBooksHarvester(GdaxExchangeConfiguration configuration, ILog log,
                                       IHandler <OrderBook> orderBookHandler)
            : base(GdaxExchange.Name, configuration, log, orderBookHandler)
        {
            _configuration = configuration;
            _symbolsLastSequenceNumbers = new ConcurrentDictionary <string, long>();
            _queuedOrderBookItems       = new Dictionary <string, Queue <GdaxQueueOrderItem> >();

            _websocketApi = CreateWebSocketsApiClient();
            _restApi      = CreateRestApiClient();
            _converters   = new GdaxConverters(_configuration.SupportedCurrencySymbols,
                                               ExchangeName, configuration);
        }
Ejemplo n.º 3
0
        // Display account balances for each exchange
        static void DisplayAllExchangeBalances()
        {
            DisplayBalances("KRAKEN", "btcusd");
            DisplayBalances("BITFINEX", "btcusd");
            DisplayBalances("BINANCE", "btcusdt");
            DisplayBalances("BITTREX", "btcusdt");
            DisplayBalances("POLONIEX", "btcusdt");
            DisplayBalances("GDAX", "btcusd");

            try
            {
                GdaxRestApi api = m_factory.Get("GDAX") as GdaxRestApi;
                api.PrintCoinbaseAccounts().Wait();
            }
            catch (Exception ex)
            {
                Console.WriteLine("\nGDAX Coinbase Error: {0}", ex.Message);
            }
        }