Пример #1
0
        public GDAXIntegration(IMarketPriceObserver[] priceObservers, Exchange[] exchanges) : base(priceObservers, exchanges)
        {
            this.Exchange = exchanges[0];
            GdaxAuthenticator auth = new GdaxAuthenticator(this.Exchange.GetSetting("ApiKey"), this.Exchange.GetSetting("ApiPassPhrase"), this.Exchange.GetSetting("ApiSecret"));

            gdaxClient = new GdaxClient(auth);
        }
Пример #2
0
        public GDAXIntegration(Exchange[] exchanges) : base(exchanges)
        {
            this.Exchange = exchanges[0];

            GdaxAuthenticator auth = new GdaxAuthenticator(this.Exchange.GetSetting("ApiKey"), this.Exchange.GetSetting("ApiPassPhrase"), this.Exchange.GetSetting("ApiSecret"));

            gdaxClient = new GdaxClient(auth);
        }
Пример #3
0
        public void GetAuthenticationToken_ReturnsCorrectSignature(Int32 timestamp, String method, String request, String body, String signiture)
        {
            var auth = new GdaxAuthenticator("thisisafakekeythisisafakekey1234", "thisisafake", "thisisafakesecretthisisafakesecretthisisafakesecretthisisafakesecretthisisafakesecret+==");

            var token = auth.GetAuthenticationToken(new GdaxRequest(new HttpMethod(method), request, body)
            {
                Timestamp = timestamp
            });

            Assert.Equal(signiture, token.Signature);
        }