@@ -13,17 +13,17 @@ public class APIWrapper
13
13
/// <summary>
14
14
/// API Version compatible with.
15
15
/// </summary>
16
- public readonly static string API_VERSION_COMPATIBLE = "1.0.10 " ;
16
+ public readonly static string API_VERSION_COMPATIBLE = "1.2.0 " ;
17
17
18
18
/// <summary>
19
19
/// URLs for NiceHash services.
20
20
/// </summary>
21
- public readonly static string [ ] SERVICE_LOCATION = { "https://www.nicehash.com" , "https://www.westhash.com" } ;
21
+ public readonly static string SERVICE_LOCATION = "https://www.nicehash.com" ;
22
22
23
23
/// <summary>
24
24
/// Names for NiceHash services.
25
25
/// </summary>
26
- public readonly static string [ ] SERVICE_NAME = { "NiceHash" , "WestHash" } ;
26
+ public readonly static string [ ] SERVICE_NAME = { "Europe ( NiceHash) " , " USA ( WestHash) " } ;
27
27
28
28
/// <summary>
29
29
/// Names for algorithms.
@@ -161,6 +161,20 @@ public static List<Order> GetAllOrders(int ServiceLocation, int Algorithm, bool
161
161
{
162
162
CachedOList [ ServiceLocation , Algorithm ] = new CachedOrderList ( ) ;
163
163
CachedOList [ ServiceLocation , Algorithm ] . OrderList = GetOrders ( ServiceLocation , Algorithm , "orders.get" , false ) ;
164
+
165
+ // Get missing data for my orders
166
+ List < Order > MyOrders = GetMyOrders ( ServiceLocation , Algorithm ) ;
167
+
168
+ // Fill missing data
169
+ foreach ( Order O1 in MyOrders )
170
+ {
171
+ foreach ( Order O2 in CachedOList [ ServiceLocation , Algorithm ] . OrderList )
172
+ {
173
+ if ( O2 . ID == O1 . ID )
174
+ O2 . BTCAvailable = O1 . BTCAvailable ;
175
+ }
176
+ }
177
+
164
178
CachedOList [ ServiceLocation , Algorithm ] . ObtainTime = DateTime . Now ;
165
179
}
166
180
@@ -381,7 +395,7 @@ private static double GetTotalSpeedForAlgorithm(int ServiceLocation, int Algorit
381
395
382
396
private static T Request < T > ( int ServiceLocation , string Method , bool AppendCredentials , Dictionary < string , string > Parameters )
383
397
{
384
- string URL = SERVICE_LOCATION [ ServiceLocation ] + "/api" ;
398
+ string URL = SERVICE_LOCATION + "/api" ;
385
399
386
400
if ( Method != null )
387
401
{
@@ -392,6 +406,9 @@ private static T Request<T>(int ServiceLocation, string Method, bool AppendCrede
392
406
URL += "&key=" + APIKey ;
393
407
}
394
408
409
+ // Append location
410
+ URL += "&location=" + ServiceLocation . ToString ( ) ;
411
+
395
412
if ( Parameters != null )
396
413
{
397
414
// Append all parameters
0 commit comments