Git Product home page Git Product logo

gdax-dotnet's People

Contributors

aidangarnish avatar christopherhaws avatar sergiomcalzada avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gdax-dotnet's Issues

A compatible SDK version for global.json version: [2.0.0-preview2-006497]

Only have the most recent SDK on my machine
>dotnet --list-sdks 1.1.0 [C:\Program Files\dotnet\sdk] 2.2.101 [C:\Program Files\dotnet\sdk]
And receive the following error when attempting to open Solution/repository

A compatible SDK version for global.json version: [2.0.0-preview2-006497] from [C:\gdax-dotnet\global.json] was not found Did you mean to run dotnet SDK commands? Please install dotnet SDK from: http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409 Done: 2147516561.
Able to fix by changing global.json to support newest stable version of .NET Core

{
  "sdk": {
    "version": "2.2.101"
  }
}

Working on a PR

HttpMethod.Post - Not passing parameters

I know you have not implemented any Post requests, but when I am sending a post request for an order or withdrawal, it does not seem to pass any params.

I have added the params, and also tried with no Post params at all, and the error is always ;

{"message":"Missing product_id"}
{"message":"currency is required"}

`public async Task<Order> SubmitMarketOrderCrypto(Side side, String productID, Double size, Double funds, OrderType orderType = OrderType.Market)
		{
			var request = new GdaxRequestBuilder("/orders", HttpMethod.Post)
				
				.AddParameterIfNotNull("side", ((Side)side).ToString())
				.AddParameterIfNotNull("product_id", productID)
				.AddParameterIfNotNull("type", ((OrderType)orderType).ToString())
				.AddParameterIfNotNull("size", ((Double)size).ToString())
				.AddParameterIfNotNull("funds", ((double)size).ToString())

				.Build();

			return (await this.GetResponse<Order>(request).ConfigureAwait(false)).Value;

		}`

Payment Methods JSON

This was working in my Branch, its no longer working.

Inner Exception 1:
JsonSerializationException: Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'Gdax.Models.PaymentMethodLimit' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly.
To fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List<T> that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array.
Path '[0].limits.buy', line 1, position 416.

failing test - GetOrders_ShouldAllowOlderAndNewerPage

Have set up sandbox correctly and modified secrets. All tests pass except one. I do have orders in the sandbox account. Noob dev here so troubleshooting tests is challenging. Output of failing test:

Test Name:	Gdax.Tests.Orders.GetOrdersQueryTests.GetOrders_ShouldAllowOlderAndNewerPage
Test FullName:	Gdax.Tests.Orders.GetOrdersQueryTests.GetOrders_ShouldAllowOlderAndNewerPage (88cce4e0ae8de4f259a987a892197b44a7dffbd8)
Test Source:	C:\Users\delan\Documents\GitHub\gdax-dotnet\Gdax.Tests\Orders\GetOrdersQueryTests.cs : line 26
Test Outcome:	Failed
Test Duration:	0:00:00.783

Result StackTrace:	
at Gdax.PagedResults2.PreviousPage() in C:\Users\delan\Documents\GitHub\gdax-dotnet\Gdax\Paging\PagedResults.cs:line 30
   at Gdax.Tests.Orders.GetOrdersQueryTests.<GetOrders_ShouldAllowOlderAndNewerPage>d__1.MoveNext() in C:\Users\delan\Documents\GitHub\gdax-dotnet\Gdax.Tests\Orders\GetOrdersQueryTests.cs:line 39
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Result Message:	Gdax.GdaxException : Cannot determine before page.

GetFills_ShouldAllowOlderAndNewerPage Gdax.GdaxException : query must contained either product_id or order_id

Guessing this is perhaps an API change since they've added so many new Products. But need Product now to perform this.

Fixing this with client.GetFills(productId: "BTC-USD", paging: new PagingOptions<Int32?>.
Working on PR.

Test Name:	Gdax.Fills.GetFillsQueryTests.GetFills_ShouldAllowOlderAndNewerPage
Test FullName:	Gdax.Fills.GetFillsQueryTests.GetFills_ShouldAllowOlderAndNewerPage
Test Source:	C:\gdax-dotnet\Gdax.Tests\Fills\GetFillsQueryTests.cs : line 26
Test Outcome:	Failed
Test Duration:	0:00:24.669

Result StackTrace:	
at Gdax.GdaxClient.GetResponse(GdaxRequest request) in C:\gdax-dotnet\Gdax\GdaxClient.cs:line 75
   at Gdax.GdaxClient.GetResponse[TResponse](GdaxRequest request) in C:\gdax-dotnet\Gdax\GdaxClient.cs:line 50
   at Gdax.GdaxClient.GetFills(String orderId, String productId, PagingOptions`1 paging) in C:\gdax-dotnet\Gdax\GdaxClient.Fills.cs:line 18
   at Gdax.Fills.GetFillsQueryTests.GetFills_ShouldAllowOlderAndNewerPage() in C:\gdax-dotnet\Gdax.Tests\Fills\GetFillsQueryTests.cs:line 51
--- End of stack trace from previous location where exception was thrown ---
Result Message:	Gdax.GdaxException : query must contained either product_id or order_id

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.