Example #1
0
        public CoinbaseProClient(
            IAuthenticator authenticator,
            IHttpClient httpClient,
            bool sandBox = false)
        {
            var clock = new Clock();
            var httpRequestMessageService = new HttpRequestMessageService(authenticator, clock, sandBox);
            var createWebSocketFeed       = (Func <IWebSocketFeed>)(() => new WebSocketFeed(sandBox));
            var queryBuilder = new QueryBuilder();

            AccountsService              = new AccountsService(httpClient, httpRequestMessageService);
            CoinbaseAccountsService      = new CoinbaseAccountsService(httpClient, httpRequestMessageService);
            OrdersService                = new OrdersService(httpClient, httpRequestMessageService, queryBuilder);
            PaymentsService              = new PaymentsService(httpClient, httpRequestMessageService);
            WithdrawalsService           = new WithdrawalsService(httpClient, httpRequestMessageService);
            DepositsService              = new DepositsService(httpClient, httpRequestMessageService);
            ProductsService              = new ProductsService(httpClient, httpRequestMessageService, queryBuilder);
            CurrenciesService            = new CurrenciesService(httpClient, httpRequestMessageService);
            FillsService                 = new FillsService(httpClient, httpRequestMessageService);
            FundingsService              = new FundingsService(httpClient, httpRequestMessageService, queryBuilder);
            ReportsService               = new ReportsService(httpClient, httpRequestMessageService);
            UserAccountService           = new UserAccountService(httpClient, httpRequestMessageService);
            StablecoinConversionsService = new StablecoinConversionsService(httpClient, httpRequestMessageService);
            FeesService     = new FeesService(httpClient, httpRequestMessageService);
            ProfilesService = new ProfilesService(httpClient, httpRequestMessageService);
            WebSocket       = new WebSocket.WebSocket(createWebSocketFeed, authenticator, clock);

            Log.Information("CoinbaseProClient constructed");
        }
Example #2
0
        public GDAXClient(IHttpClient httpClient, bool sandBox = false)
        {
            var clock = new Clock();
            var httpRequestMessageService = new HttpRequestMessageService(clock, sandBox);
            var queryBuilder = new QueryBuilder();

            ProductsService = new ProductsService(httpClient, httpRequestMessageService, queryBuilder);
        }
        public GDAXClient(
            IAuthenticator authenticator,
            bool sandBox = false)
        {
            var httpClient = new HttpClient.HttpClient();
            var clock      = new Clock();
            var httpRequestMessageService = new HttpRequestMessageService(clock, sandBox);
            var queryBuilder = new QueryBuilder();

            AccountsService         = new AccountsService(httpClient, httpRequestMessageService, authenticator);
            CoinbaseAccountsService = new CoinbaseAccountsService(httpClient, httpRequestMessageService, authenticator);
            OrdersService           = new OrdersService(httpClient, httpRequestMessageService, authenticator);
            PaymentsService         = new PaymentsService(httpClient, httpRequestMessageService, authenticator);
            WithdrawalsService      = new WithdrawalsService(httpClient, httpRequestMessageService, authenticator);
            DepositsService         = new DepositsService(httpClient, httpRequestMessageService, authenticator);
            ProductsService         = new ProductsService(httpClient, httpRequestMessageService, authenticator, queryBuilder);
            CurrenciesService       = new CurrenciesService(httpClient, httpRequestMessageService, authenticator);
            FillsService            = new FillsService(httpClient, httpRequestMessageService, authenticator);
            FundingsService         = new FundingsService(httpClient, httpRequestMessageService, authenticator, queryBuilder);
        }
Example #4
0
        public GDAXClient(
            IAuthenticator authenticator,
            IHttpClient httpClient,
            bool sandBox = false)
        {
            var clock = new Clock();
            var httpRequestMessageService = new HttpRequestMessageService(authenticator, clock, sandBox);
            var webSocket    = new WebSocket.WebSocket(authenticator, clock, sandBox);
            var queryBuilder = new QueryBuilder();

            AccountsService         = new AccountsService(httpClient, httpRequestMessageService);
            CoinbaseAccountsService = new CoinbaseAccountsService(httpClient, httpRequestMessageService);
            OrdersService           = new OrdersService(httpClient, httpRequestMessageService);
            PaymentsService         = new PaymentsService(httpClient, httpRequestMessageService);
            WithdrawalsService      = new WithdrawalsService(httpClient, httpRequestMessageService);
            DepositsService         = new DepositsService(httpClient, httpRequestMessageService);
            ProductsService         = new ProductsService(httpClient, httpRequestMessageService, queryBuilder);
            CurrenciesService       = new CurrenciesService(httpClient, httpRequestMessageService);
            FillsService            = new FillsService(httpClient, httpRequestMessageService);
            FundingsService         = new FundingsService(httpClient, httpRequestMessageService, queryBuilder);
            ReportsService          = new ReportsService(httpClient, httpRequestMessageService);
            UserAccountService      = new UserAccountService(httpClient, httpRequestMessageService);
            WebSocket = webSocket;
        }