Skip to content

Commit

Permalink
Update static assets and symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
sonvister committed Dec 7, 2018
1 parent 22e8de8 commit a2070b2
Show file tree
Hide file tree
Showing 4 changed files with 461 additions and 415 deletions.
2 changes: 1 addition & 1 deletion samples/BinanceCodeGenerator/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ private static async Task Main()
foreach(var symbol in symbols)
{
var orderTypes = string.Join(",", symbol.OrderTypes.Select(_ => "OrderType." + _));
lines.Insert(index++, $" new Symbol(SymbolStatus.{symbol.Status}, Asset.{symbol.BaseAsset}, Asset.{symbol.QuoteAsset}, ({Convert.ToString(symbol.Quantity.Minimum, CultureInfo.InvariantCulture)}m, {Convert.ToString(symbol.Quantity.Maximum, CultureInfo.InvariantCulture)}m, {Convert.ToString(symbol.Quantity.Increment, CultureInfo.InvariantCulture)}m), ({Convert.ToString(symbol.Price.Minimum, CultureInfo.InvariantCulture)}m, {Convert.ToString(symbol.Price.Maximum, CultureInfo.InvariantCulture)}m, {Convert.ToString(symbol.Price.Increment, CultureInfo.InvariantCulture)}m), {Convert.ToString(symbol.NotionalMinimumValue, CultureInfo.InvariantCulture)}m, {symbol.IsIcebergAllowed.ToString().ToLowerInvariant()}, new List<OrderType> {{{orderTypes}}}),");
lines.Insert(index++, $" new Symbol(SymbolStatus.{symbol.Status}, Asset.{symbol.BaseAsset}, Asset.{symbol.QuoteAsset}, ({Convert.ToString(symbol.Quantity.Minimum, CultureInfo.InvariantCulture)}m, {Convert.ToString(symbol.Quantity.Maximum, CultureInfo.InvariantCulture)}m, {Convert.ToString(symbol.Quantity.Increment, CultureInfo.InvariantCulture)}m), ({Convert.ToString(0, CultureInfo.InvariantCulture)}m, {Convert.ToString(0, CultureInfo.InvariantCulture)}m, {Convert.ToString(symbol.Price.Increment, CultureInfo.InvariantCulture)}m), {Convert.ToString(symbol.NotionalMinimumValue, CultureInfo.InvariantCulture)}m, {symbol.IsIcebergAllowed.ToString().ToLowerInvariant()}, new List<OrderType> {{{orderTypes}}}),");
}

// Save the generated source code (replacing original).
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 = 1542548896815;
public static readonly long LastUpdateAt = 1544198726245;

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 ARN => Cache.Get("ARN");
public static Asset AST => Cache.Get("AST");
public static Asset BAT => Cache.Get("BAT");
public static Asset BCC => Cache.Get("BCC");
public static Asset BCD => Cache.Get("BCD");
public static Asset BCHABC => Cache.Get("BCHABC");
public static Asset BCHSV => Cache.Get("BCHSV");
Expand Down Expand Up @@ -127,6 +128,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 REN => Cache.Get("REN");
public static Asset REP => Cache.Get("REP");
public static Asset REQ => Cache.Get("REQ");
public static Asset RLC => Cache.Get("RLC");
Expand Down Expand Up @@ -234,6 +236,7 @@ static Asset()
new Asset("ARN", 8),
new Asset("AST", 8),
new Asset("BAT", 8),
new Asset("BCC", 8),
new Asset("BCD", 8),
new Asset("BCHABC", 8),
new Asset("BCHSV", 8),
Expand Down Expand Up @@ -332,6 +335,7 @@ static Asset()
new Asset("QTUM", 8),
new Asset("RCN", 8),
new Asset("RDN", 8),
new Asset("REN", 8),
new Asset("REP", 8),
new Asset("REQ", 8),
new Asset("RLC", 8),
Expand Down
Loading

0 comments on commit a2070b2

Please sign in to comment.