nmoschkin / kucoin.net Goto Github PK
View Code? Open in Web Editor NEWKuCoin API Libraries written in .NET 6.0 and Standard 2.0
License: Apache License 2.0
KuCoin API Libraries written in .NET 6.0 and Standard 2.0
License: Apache License 2.0
If I have just one coin or fifty coins the Console app crashes within 2-10 minutes.
Running the Console published or in debug mode consistently surfaces Null Reference Exceptions.
==== some text deleted.
A Credential problem related to the other issue posted?
Pilot error?
API Key permissions problem? The API Key used is limited to "General" read-only permissions. Trade and Withdrawal are not enabled.
Thanks!
James
================ 02-10-21022 Update:
-Trying to solve a bug is a great way to learn a bit of code
-It appears that despite the Credential Tool error message the API key was saved and is working successfully
Regarding the Null Reference Exception that appear after running the console for 2 - 10 mins:
I am using either the default 10 or more commonly using just 3-4 symbols so I am testing with a lighter load than implied default of 10 symbols.
I am commonly seeing Null Reference Exceptions at these line numbers in the Console project's program.cs: 1124, 1128, 1190, 1246 and 1327. See doc image and txt file attached below.
I added an image of the KuCoinNet Console after freezing upon a Null Ref Exception while running just three symbols.
In all cases the first NullRefException is thrown at Console program.cs line # 1124 or 1128
1124 lock (a.Level3OrderBook.LockObject) >> NullReferenceException
1128 lock (b.Level3OrderBook.LockObject) >> NullReferenceException
The image below shows that a.Level3OrderBook is NULL as the cause of the exception.
This image shows that in sortobs[1] (BTC) the Level3OrderBook value was NULL so is no surprise a.Level3OrderBook.LockObject was found to be NULL.
Root Cause? Possible Fixes?
The current question is why is Observers item.Level3OrderBook frequently null and can that be fixed.
If consistent inclusion of tem.Level3OrderBook can not be fixed then the question turns to what do we do to find a reliable resolution.
What I tried so far: In Line# 1118 I added a null reference check item.Level3OrderBook as a condition for inclusion in the sortobs list but the did not work out well.
Your thoughts on the assessment and do you have a recommendation for a fix?
Thanks!
James
KuCoinNET Sample Console Program-NULL-EXCEPTIONS-.txt
==== UPDATE: Feb 12th 2022
I spent a few minutes on this again today. All of the Null Ref Exception trouble I have seen is related to the intermittent null value for Level3Orderbook within Observers and sortobs entries.
Still not sure if this is:
Any insight?
James
Very nice work on this app! Thank you for letting us have a look.
I compile with Visual Studio 2022, an Intel x64 six core processor and a Windows 10 machine reasonably well updated.
I have tried a number of different compile options, normal and elevated user permissions, the NET6 and NET Framework editions, published compiles independent of Visual Studio and running in debug mode within Visual Studio
I tried entering the KuCoin API secret both with and without the hyphens.
In all cases after loading or editing in the "KuCoin API Credentials" form and clicking the "Save" button I see an error message popup that reads "Error: The Request is not supported : "C:\User... \AppData\Roaming\KuCoin.NET\48....DA.2
This passphrase has one special character, an " ! " - an exclamation point.
When I use the pin to re-open the Credentials app the credentials appear on the screen as if they have been saved correctly.
Is this a bug .. or what can I do to put this error messaging to bed.
Thanks!
James
When running the console application
market = KuCoin.Market; is null
KucoinBaseRestApi line 531 is not going to line 532, it's just returning to the program.cs
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.