From b941f619364ecea94783658f913f9f706287e326 Mon Sep 17 00:00:00 2001 From: Jkorf Date: Mon, 9 Aug 2021 13:27:18 +0200 Subject: [PATCH] Fixed wrong error message, fixed trade volume deserialization --- .gitignore | 1 + Kraken.Net/Kraken.Net.xml | 100 ++++++++++++++++++------ Kraken.Net/KrakenHelpers.cs | 2 +- Kraken.Net/Objects/KrakenTradeVolume.cs | 4 +- 4 files changed, 81 insertions(+), 26 deletions(-) diff --git a/.gitignore b/.gitignore index 31c4d25..ec128dc 100644 --- a/.gitignore +++ b/.gitignore @@ -348,3 +348,4 @@ healthchecksdb # Backup folder for Package Reference Convert tool in Visual Studio 2017 MigrationBackup/ +Kraken.Net/Kraken.Net.xml diff --git a/Kraken.Net/Kraken.Net.xml b/Kraken.Net/Kraken.Net.xml index cbce200..9cb6449 100644 --- a/Kraken.Net/Kraken.Net.xml +++ b/Kraken.Net/Kraken.Net.xml @@ -54,7 +54,7 @@ Cancellation token Server time - + Get a list of assets and info about them @@ -62,7 +62,7 @@ Cancellation token Dictionary of asset info - + Get a list of symbols and info about them @@ -70,7 +70,15 @@ Cancellation token Dictionary of symbol info - + + + Get tickers for symbol + + Symbol to get tickers for + Cancellation token + Dictionary with ticker info + + Get tickers for symbols @@ -97,7 +105,7 @@ Cancellation token Order book for the symbol - + Get a list of recent trades for a symbol @@ -153,7 +161,17 @@ Cancellation token Closed orders page - + + + Get info on specific order + + Get orders by clientOrderId + Get order by its order id + Password or authentication app code if enabled + Cancellation token + Dictionary with order info + + Get info on specific orders @@ -163,7 +181,7 @@ Cancellation token Dictionary with order info - + Get trade history @@ -174,7 +192,16 @@ Cancellation token Trade history page - + + + Get info on specific trades + + The trade to get info on + Password or authentication app code if enabled + Cancellation token + Dictionary with trade info + + Get info on specific trades @@ -183,7 +210,7 @@ Cancellation token Dictionary with trade info - + Get a list of open positions @@ -205,7 +232,7 @@ Cancellation token Ledger entries page - + Get info on specific ledger entries @@ -214,7 +241,7 @@ Cancellation token Dictionary with ledger entry info - + Get trade volume @@ -307,7 +334,7 @@ Cancellation token - + Withdraw funds @@ -434,7 +461,7 @@ Cancellation token Server time - + Get a list of assets and info about them @@ -442,7 +469,7 @@ Cancellation token Dictionary of asset info - + Get a list of symbols and info about them @@ -450,7 +477,15 @@ Cancellation token Dictionary of symbol info - + + + Get tickers for symbol + + Symbol to get tickers for + Cancellation token + Dictionary with ticker info + + Get tickers for symbols @@ -477,7 +512,7 @@ Cancellation token Order book for the symbol - + Get a list of recent trades for a symbol @@ -533,7 +568,17 @@ Cancellation token Closed orders page - + + + Get info on specific order + + Get orders by clientOrderId + Get order by its order id + Password or authentication app code if enabled + Cancellation token + Dictionary with order info + + Get info on specific orders @@ -543,7 +588,7 @@ Cancellation token Dictionary with order info - + Get trade history @@ -554,7 +599,16 @@ Cancellation token Trade history page - + + + Get info on specific trades + + The trade to get info on + Password or authentication app code if enabled + Cancellation token + Dictionary with trade info + + Get info on specific trades @@ -563,7 +617,7 @@ Cancellation token Dictionary with trade info - + Get a list of open positions @@ -585,7 +639,7 @@ Cancellation token Ledger entries page - + Get info on specific ledger entries @@ -594,7 +648,7 @@ Cancellation token Dictionary with ledger entry info - + Get trade volume @@ -687,9 +741,9 @@ Cancellation token - + - Withdraw funds + Place a withdraw request The asset being withdrawn The withdrawal key name, as set up on your account diff --git a/Kraken.Net/KrakenHelpers.cs b/Kraken.Net/KrakenHelpers.cs index 3950955..c54645f 100644 --- a/Kraken.Net/KrakenHelpers.cs +++ b/Kraken.Net/KrakenHelpers.cs @@ -17,7 +17,7 @@ public static string ValidateKrakenSymbol(this string symbolString) if (string.IsNullOrEmpty(symbolString)) throw new ArgumentException("Symbol is not provided"); if (!Regex.IsMatch(symbolString, "^(([a-z]|[A-Z]|[0-9]|\\.){5,})$")) - throw new ArgumentException($"{symbolString} is not a valid Kraken symbol. Should be [QuoteCurrency][BaseCurrency], e.g. ETHXBT"); + throw new ArgumentException($"{symbolString} is not a valid Kraken symbol. Should be [BaseCurrency][QuoteCurrency], e.g. ETHXBT"); return symbolString; } diff --git a/Kraken.Net/Objects/KrakenTradeVolume.cs b/Kraken.Net/Objects/KrakenTradeVolume.cs index dc6ea5e..e08642f 100644 --- a/Kraken.Net/Objects/KrakenTradeVolume.cs +++ b/Kraken.Net/Objects/KrakenTradeVolume.cs @@ -21,12 +21,12 @@ public class KrakenTradeVolume /// /// Fees structure /// - public IEnumerable Fees { get; set; } = Array.Empty(); + public Dictionary Fees { get; set; } = new Dictionary(); /// /// Maker fees structure /// [JsonProperty("fees_maker")] - public IEnumerable MakerFees { get; set; } = Array.Empty(); + public Dictionary MakerFees { get; set; } = new Dictionary(); } ///