Skip to content

Commit

Permalink
Fixed wrong error message, fixed trade volume deserialization
Browse files Browse the repository at this point in the history
  • Loading branch information
JKorf committed Aug 9, 2021
1 parent 302a2c3 commit b941f61
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 26 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -348,3 +348,4 @@ healthchecksdb

# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
Kraken.Net/Kraken.Net.xml
100 changes: 77 additions & 23 deletions Kraken.Net/Kraken.Net.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Kraken.Net/KrakenHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
4 changes: 2 additions & 2 deletions Kraken.Net/Objects/KrakenTradeVolume.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ public class KrakenTradeVolume
/// <summary>
/// Fees structure
/// </summary>
public IEnumerable<KrakenFeeStruct> Fees { get; set; } = Array.Empty<KrakenFeeStruct>();
public Dictionary<string, KrakenFeeStruct> Fees { get; set; } = new Dictionary<string, KrakenFeeStruct>();
/// <summary>
/// Maker fees structure
/// </summary>
[JsonProperty("fees_maker")]
public IEnumerable<KrakenFeeStruct> MakerFees { get; set; } = Array.Empty<KrakenFeeStruct>();
public Dictionary<string, KrakenFeeStruct> MakerFees { get; set; } = new Dictionary<string, KrakenFeeStruct>();
}

/// <summary>
Expand Down

0 comments on commit b941f61

Please sign in to comment.