Skip to content

Commit 4a428ca

Browse files
author
nicehashdev
committed
New API compatibility
Compatibility with NiceHash API 1.0.10
1 parent a27c8c2 commit 4a428ca

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

src/NiceHashBot/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.0.1.2")]
36-
[assembly: AssemblyFileVersion("1.0.1.2")]
35+
[assembly: AssemblyVersion("1.0.1.3")]
36+
[assembly: AssemblyFileVersion("1.0.1.3")]

src/NiceHashBotLib/APIWrapper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public class APIWrapper
1313
/// <summary>
1414
/// API Version compatible with.
1515
/// </summary>
16-
public readonly static string API_VERSION_COMPATIBLE = "1.0.9";
16+
public readonly static string API_VERSION_COMPATIBLE = "1.0.10";
1717

1818
/// <summary>
1919
/// URLs for NiceHash services.

src/NiceHashBotLib/Order.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ public class Order
6262
[JsonProperty(PropertyName = "end")]
6363
public ulong EndTime;
6464

65+
/// <summary>
66+
/// Type of the order (0 = standard, 1 = fixed)
67+
/// </summary>
68+
[JsonProperty(PropertyName = "type")]
69+
public int OrderType;
70+
6571
/// <summary>
6672
/// Service location (0 for NiceHash, 1 for WestHash).
6773
/// </summary>

src/NiceHashBotLib/OrderInstance.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,11 @@ private double GetMinimalNeededPrice(Order[] AllOrders, double TotalSpeed)
236236
private bool IncreasePrice(Order MyOrder, Order[] AllOrders, double MinimalPrice)
237237
{
238238
// Do not make price higher if we are already on top of the list (first alive).
239+
// Consider fixed orders.
239240
foreach (Order O in AllOrders)
240241
{
241242
if (!O.Alive) continue;
243+
if (O.OrderType == 1) continue;
242244
if (O == MyOrder) return false;
243245
else break;
244246
}

0 commit comments

Comments
 (0)