Giter Site home page Giter Site logo

gdax.netcore's People

Contributors

davidmarker avatar jlehman17 avatar markwkjr avatar sefbkn avatar universalae avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gdax.netcore's Issues

RequestAuthenticator

        public AuthenticationToken GetAuthenticationToken(ApiRequest request)

in RequestAuthenticator.cs

        public AuthenticationToken(string key, string passphrase, string signature, string timestamp)

call is:

            return new AuthenticationToken(_apiKey, signature, timestamp, _passphrase);

Should be

            return new AuthenticationToken(_apiKey, signature, timestamp, _passphrase);

ClientWebSocket truncates large messages.

I implemented Snapshot message for realtime client and it is quite large (I guess around 100K) but EndOfMessage becomes true around 60-80K hence I get always a part of it. and there is no way around.

Any help will be appreciated

Keep getting "user-agent header is required" message from gdax api.

Hi, I'm experimenting with this in my project and trying to get the list of products I keep getting the same response from the Gdax api saying I should add a User-Agent header. The code seems to be doing this, but apparently something is going wrong. Am I the only one having this problem? Maybe someone could give me a hint as to why this is happening? Thanks a bunch.

RealTimeClient Updates

What is the best way to update this library. I am not familiar with github?

I have made some fixes locally on your lib for real time sockets and also your auth mechanism seemed to be incorrect (passphrase and signature was the wrong way around).

Should I fork or send a PR?

Nuget package

Hey @sefbkn,

do you plan to publish a nuget package for this wrapper?

Cheers,
Wojtek

Looks like there is an error in RequestAuthenticator -> GetAuthenticationToken parameter order

    public AuthenticationToken GetAuthenticationToken(ApiRequest request)
    {
        var timestamp = (request.Timestamp).ToString(System.Globalization.CultureInfo.InvariantCulture);
        var signature = ComputeSignature(request);
        // the following construction has the parameters specified in an incorrect order
        // return new AuthenticationToken(_apiKey, signature, timestamp, _passphrase);
        // should be
        return new AuthenticationToken(_apiKey, _passphrase, signature, timestamp);
    }

Example code

Hello,

since I am not an advanced programmer, would you be so kind to share with me a short example of a code where you use HTTP request ?
for example GET/accounts

Thank you very much,

Robert

await keyword in example is throwing an error

Here's the entire program:

using System;
using System.Net;
using Boukenken.Gdax;

namespace GDAXtest
{
class Program
{
static void Main(string[] args)
{
var baseUrl = "https://api.gdax.com/";
var apiKey = "";
var secret = "";
var passphrase = "";

		var requestAuthenticator = new RequestAuthenticator(apiKey, passphrase, secret);
		var productClient = new ProductClient(baseUrl, requestAuthenticator);
		var productResponse = await productClient.GetProductTickerAsync("BTC-USD");

		if (productResponse.StatusCode == HttpStatusCode.OK)
		{
			var ticker = productResponse.Value;
			Console.WriteLine("Price: {0}", ticker.price);
		}
	}
}

}

Throws this compiler error:

Error CS4033 The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.

I'm boggled because I believe your library defines GetProductTickerAsync properly with the async modifier. Is there something I am missing in the usage of your example?

accountClient requests hang

Thanks for responding to my async/await problem. It got me over the hump and request ticker is working as expected. I am encountering a new problem. I constructed an account client and am attempting to retrieve the list of accounts. The await command hangs and never returns with an answer. Here is the code:

           public static bool AccountInfoAvailable = false;

	public static async Task AccountMethodAsync()
	{
		var baseUrl = "https://api.gdax.com/";
		var apiKey = "fffffffffffffffffffffffff";
		var secret = "dddddddddddddddddddddddddddddddddd";
		var passphrase = "eeeeeeeeeeeee";

		var requestAuthenticator = new RequestAuthenticator(apiKey, passphrase, secret);
		var accountClient = new AccountClient(baseUrl, requestAuthenticator);

		var accountResponse = await accountClient.ListAccountsAsync();

break point never reached =>
the following code is never executed.

		AccountInfoAvailable = true;

	}

I am using the same key,secret,passphrase as ticker data request and it is running simultaneously as expected.

Do you have any suggestions?

Websocket

Can someone please provide an example of how to use the RealtimeClient websocket?

I am learning how to code and can't figure this part out. I have gotten everything else in this library working except this part.

I started like this:

` string[] prods = {"BTC-USD"};

        var realtimeClient = new RealtimeClient(new Uri("wss://ws-feed.gdax.com"), prods);`

I can't figure out where to go from here. realtimeClient.SubscribeAsync(messageRecieved)...?
what message goes in here?

Thanks in advance for any help.

ComputeSignature localisation problem

var prehash = request.Timestamp + request.HttpMethod.ToString().ToUpper() + request.RequestUrl + request.RequestBody;

Should be

var prehash = request.Timestamp.ToString(System.Globalization.CultureInfo.InvariantCulture) + request.HttpMethod.ToString().ToUpper() + request.RequestUrl + request.RequestBody;

when i place order on sandbox - it gives error "Missing product_id"

I am able to use all other API functions other than placing a new order.

I am passing parameters as following:
/orders?product_id=BTC-USD&size=1&price=1&side=buy
and every time i get error "Missing product_id"

Any help??

Following is my code (for placing a hard-coded test order)

public async Task<ApiResponse<Object>> PlaceOrder() {
            var response = await this.GetResponseAsync<Object>(
             new ApiRequest(HttpMethod.Post, $"/orders?product_id=BTC-USD&size=1&price=1&side=buy&","")             
            );

            return response;
        }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.