Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing OrderType in OrderTypeConverter #1

Closed
dlmac opened this issue Sep 21, 2019 · 3 comments
Closed

Missing OrderType in OrderTypeConverter #1

dlmac opened this issue Sep 21, 2019 · 3 comments

Comments

@dlmac
Copy link

dlmac commented Sep 21, 2019

An order type from Kraken JSON data shows "ordertype": "stop market", which looks to be missing from the converter.

Error:
Cannot map enum. Type: Kraken.Net.Objects.OrderType, Value: stop market
Exception thrown: 'System.NullReferenceException' in Newtonsoft.Json.dll

Method:
var history = await client.GetTradeHistoryAsync(resultOffset: offset);

"TDSUTH-DO3XV-V67G37": {
"ordertxid": "ODBUJA-CTRWB-YJSTLF",
"postxid": "T5XXXZ-KAHYB-W6RQKR",
"pair": "XXBTZUSD",
"time": 1483734622.6224,
"type": "sell",
"ordertype": "stop market",
"price": "877.55000",
"cost": "1652.37592",
"fee": "4.29618",
"vol": "1.88294218",
"margin": "550.79197",
"misc": "closing"
},

I can send full JSON if needed.

@JKorf
Copy link
Owner

JKorf commented Sep 23, 2019

Hm that's interesting. I'll add it to the enum. Do you know if there are any other types which might not be in the enum? I implemented the order types enum according to the Kraken api documentation at https://www.kraken.com/features/api#add-standard-order . The stop market order type is not in that list, which raises the question if there are any other types which aren't in that list.

@dlmac
Copy link
Author

dlmac commented Sep 23, 2019

Maybe it is an order type that is no longer available to use. It is also only one trade of 1105. Could even be an error on Krakens end. Can't hurt to add it in, if it happens again I can reach out to Kraken Support.

image

@JKorf
Copy link
Owner

JKorf commented Sep 24, 2019

Fixed in the latest version

@JKorf JKorf closed this as completed Sep 24, 2019
JKorf pushed a commit that referenced this issue Jul 7, 2020
JKorf pushed a commit that referenced this issue Oct 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants