Skip to content

Commit

Permalink
Change Symbol.Cache keys to match symbol.ToString() values
Browse files Browse the repository at this point in the history
Update static assets and symbols.
  • Loading branch information
sonvister committed May 11, 2018
1 parent 01792f0 commit f8678fd
Show file tree
Hide file tree
Showing 4 changed files with 336 additions and 320 deletions.
2 changes: 1 addition & 1 deletion samples/BinanceCodeGenerator/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ private static async Task Main()

foreach (var symbol in group)
{
lines.Insert(index++, $" public static Symbol {symbol.BaseAsset}_{symbol.QuoteAsset} => Cache.Get(\"{symbol.BaseAsset}_{symbol.QuoteAsset}\");");
lines.Insert(index++, $" public static Symbol {symbol.BaseAsset}_{symbol.QuoteAsset} => Cache.Get(\"{symbol.BaseAsset}{symbol.QuoteAsset}\");");
}

lines.Insert(index++, string.Empty);
Expand Down
8 changes: 4 additions & 4 deletions samples/BinanceCodeGenerator/Symbol.template.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ static Symbol()
});

// Redirect (BCH) Bitcoin Cash (BCC = BitConnect)
Cache.Set("BCH_USDT", Cache.Get("BCC_USDT"));
Cache.Set("BCH_BNB", Cache.Get("BCC_BNB"));
Cache.Set("BCH_BTC", Cache.Get("BCC_BTC"));
Cache.Set("BCH_ETH", Cache.Get("BCC_ETH"));
Cache.Set("BCHUSDT", Cache.Get("BCCUSDT"));
Cache.Set("BCHBNB", Cache.Get("BCCBNB"));
Cache.Set("BCHBTC", Cache.Get("BCCBTC"));
Cache.Set("BCHETH", Cache.Get("BCCETH"));
}
catch (Exception e)
{
Expand Down
6 changes: 5 additions & 1 deletion src/Binance/Asset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public sealed class Asset : IComparable<Asset>, IEquatable<Asset>
/// <summary>
/// When the assets were last updated.
/// </summary>
public static readonly long LastUpdateAt = 1525448255603;
public static readonly long LastUpdateAt = 1526068613045;

public static Asset ADA => Cache.Get("ADA");
public static Asset ADX => Cache.Get("ADX");
Expand All @@ -29,6 +29,7 @@ public sealed class Asset : IComparable<Asset>, IEquatable<Asset>
public static Asset BAT => Cache.Get("BAT");
public static Asset BCC => Cache.Get("BCC");
public static Asset BCD => Cache.Get("BCD");
public static Asset BCN => Cache.Get("BCN");
public static Asset BCPT => Cache.Get("BCPT");
public static Asset BLZ => Cache.Get("BLZ");
public static Asset BNB => Cache.Get("BNB");
Expand Down Expand Up @@ -104,6 +105,7 @@ public sealed class Asset : IComparable<Asset>, IEquatable<Asset>
public static Asset QTUM => Cache.Get("QTUM");
public static Asset RCN => Cache.Get("RCN");
public static Asset RDN => Cache.Get("RDN");
public static Asset REP => Cache.Get("REP");
public static Asset REQ => Cache.Get("REQ");
public static Asset RLC => Cache.Get("RLC");
public static Asset RPX => Cache.Get("RPX");
Expand Down Expand Up @@ -205,6 +207,7 @@ static Asset()
new Asset("BAT", 8),
new Asset("BCC", 8),
new Asset("BCD", 8),
new Asset("BCN", 8),
new Asset("BCPT", 8),
new Asset("BLZ", 8),
new Asset("BNB", 8),
Expand Down Expand Up @@ -280,6 +283,7 @@ static Asset()
new Asset("QTUM", 8),
new Asset("RCN", 8),
new Asset("RDN", 8),
new Asset("REP", 8),
new Asset("REQ", 8),
new Asset("RLC", 8),
new Asset("RPX", 8),
Expand Down
Loading

0 comments on commit f8678fd

Please sign in to comment.