@@ -13,17 +13,17 @@ public class APIWrapper
1313 /// <summary>
1414 /// API Version compatible with.
1515 /// </summary>
16- public readonly static string API_VERSION_COMPATIBLE = "1.0.10 " ;
16+ public readonly static string API_VERSION_COMPATIBLE = "1.2.0 " ;
1717
1818 /// <summary>
1919 /// URLs for NiceHash services.
2020 /// </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" ;
2222
2323 /// <summary>
2424 /// Names for NiceHash services.
2525 /// </summary>
26- public readonly static string [ ] SERVICE_NAME = { "NiceHash" , "WestHash" } ;
26+ public readonly static string [ ] SERVICE_NAME = { "Europe ( NiceHash) " , " USA ( WestHash) " } ;
2727
2828 /// <summary>
2929 /// Names for algorithms.
@@ -161,6 +161,20 @@ public static List<Order> GetAllOrders(int ServiceLocation, int Algorithm, bool
161161 {
162162 CachedOList [ ServiceLocation , Algorithm ] = new CachedOrderList ( ) ;
163163 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+
164178 CachedOList [ ServiceLocation , Algorithm ] . ObtainTime = DateTime . Now ;
165179 }
166180
@@ -381,7 +395,7 @@ private static double GetTotalSpeedForAlgorithm(int ServiceLocation, int Algorit
381395
382396 private static T Request < T > ( int ServiceLocation , string Method , bool AppendCredentials , Dictionary < string , string > Parameters )
383397 {
384- string URL = SERVICE_LOCATION [ ServiceLocation ] + "/api" ;
398+ string URL = SERVICE_LOCATION + "/api" ;
385399
386400 if ( Method != null )
387401 {
@@ -392,6 +406,9 @@ private static T Request<T>(int ServiceLocation, string Method, bool AppendCrede
392406 URL += "&key=" + APIKey ;
393407 }
394408
409+ // Append location
410+ URL += "&location=" + ServiceLocation . ToString ( ) ;
411+
395412 if ( Parameters != null )
396413 {
397414 // Append all parameters
0 commit comments