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); }
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); }
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); }