Skip to content

Commit

Permalink
Updated MexcSymbol model
Browse files Browse the repository at this point in the history
  • Loading branch information
JKorf committed Aug 19, 2024
1 parent 5d33049 commit 15abe64
Show file tree
Hide file tree
Showing 4 changed files with 120 additions and 3 deletions.
29 changes: 29 additions & 0 deletions Mexc.Net/Enums/SymbolStatus.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using CryptoExchange.Net.Attributes;
using System;
using System.Collections.Generic;
using System.Text;

namespace Mexc.Net.Enums
{
/// <summary>
/// Symbol status
/// </summary>
public enum SymbolStatus
{
/// <summary>
/// Trading is enabled
/// </summary>
[Map("1")]
Enabled,
/// <summary>
/// Trading is paused
/// </summary>
[Map("2")]
Paused,
/// <summary>
/// Symbol is offline
/// </summary>
[Map("3")]
Offline
}
}
34 changes: 34 additions & 0 deletions Mexc.Net/Enums/TradeSidesStatus.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using CryptoExchange.Net.Attributes;
using System;
using System.Collections.Generic;
using System.Text;

namespace Mexc.Net.Enums
{
/// <summary>
/// Trade side enabled status
/// </summary>
public enum TradeSidesStatus
{
/// <summary>
/// Both buying and selling are enabled
/// </summary>
[Map("1")]
AllEnabled,
/// <summary>
/// Only buying is enabled
/// </summary>
[Map("2")]
BuyEnabled,
/// <summary>
/// Only selling is enabled
/// </summary>
[Map("3")]
SellEnabled,
/// <summary>
/// Not enabled
/// </summary>
[Map("4")]
NoneEnabled
}
}
50 changes: 50 additions & 0 deletions Mexc.Net/Mexc.Net.xml

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

10 changes: 7 additions & 3 deletions Mexc.Net/Objects/Models/Spot/MexcSymbol.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ public record MexcSymbol
/// <summary>
/// The status of the symbol
/// </summary>
[JsonProperty("status")]
public string Status { get; set; } = string.Empty;
[JsonProperty("status"), JsonConverter(typeof(EnumConverter))]
public SymbolStatus Status { get; set; }
/// <summary>
/// The base asset
/// </summary>
Expand Down Expand Up @@ -115,6 +115,10 @@ public record MexcSymbol
/// </summary>
[JsonProperty("maxQuoteAmountMarket")]
public decimal MaxQuoteQuantityMarket { get; set; }

/// <summary>
/// The trade sides that are enabled
/// </summary>
[JsonProperty("tradeSideType"), JsonConverter(typeof(EnumConverter))]
public TradeSidesStatus TradeSidesEnabled { get; set; }
}
}

0 comments on commit 15abe64

Please sign in to comment.