Exemple #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");
        }
Exemple #2
0
        public WithdrawalsServiceTests()
        {
            var options = new DbContextOptionsBuilder <TrainConnectedDbContext>()
                          .UseInMemoryDatabase(Guid.NewGuid().ToString())
                          .Options;
            var dbContext = new TrainConnectedDbContext(options);

            AutoMapperConfig.RegisterMappings(new[]
            {
                typeof(ErrorViewModel).GetTypeInfo().Assembly,
                typeof(WorkoutActivityEditInputModel).GetTypeInfo().Assembly,
            });

            this.withdrawalsRepository = new EfRepository <Withdrawal>(dbContext);
            this.usersRepository       = new EfRepository <TrainConnectedUser>(dbContext);
            this.withdrawalsService    = new WithdrawalsService(this.withdrawalsRepository, this.usersRepository);
        }
Exemple #3
0
        public GDAXClient(Authenticator authenticator, bool sandBox = false)
        {
            this.authenticator = authenticator;

            var httpClient = new HttpClient.HttpClient();
            var clock      = new Clock();
            var httpRequestMessageService = new Services.HttpRequest.HttpRequestMessageService(clock, sandBox);

            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);
            CurrenciesService       = new CurrenciesService(httpClient, httpRequestMessageService, authenticator);
        }
        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);
        }
Exemple #5
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;
        }