Skip to content

XMRigAPI

A class to interact with the XMRig miner API.

Attributes:

Name Type Description
_miner_name str

Unique name for the miner.

_ip str

IP address of the XMRig API.

_port int

Port of the XMRig API.

_access_token str

Access token for authorization.

_base_url str

Base URL for the XMRig API.

_json_rpc_url str

URL for the JSON RPC.

_summary_url str

URL for the summary endpoint.

_backends_url str

URL for the backends endpoint.

_config_url str

URL for the config endpoint.

_headers dict

Headers for all API/RPC requests.

_json_rpc_payload dict

Default payload to send with RPC request.

_summary_cache dict

Cached summary endpoint data.

_backends_cache list

Cached backends endpoint data.

_config_cache dict

Cached config endpoint data.

_summary_table_name str

Table name for summary data.

_backends_table_name str

Table name for backends data.

_config_table_name str

Table name for config data.

Source code in xmrig/api.py
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
class XMRigAPI:
    """
    A class to interact with the XMRig miner API.

    Attributes:
        _miner_name (str): Unique name for the miner.
        _ip (str): IP address of the XMRig API.
        _port (int): Port of the XMRig API.
        _access_token (str): Access token for authorization.
        _base_url (str): Base URL for the XMRig API.
        _json_rpc_url (str): URL for the JSON RPC.
        _summary_url (str): URL for the summary endpoint.
        _backends_url (str): URL for the backends endpoint.
        _config_url (str): URL for the config endpoint.
        _headers (dict): Headers for all API/RPC requests.
        _json_rpc_payload (dict): Default payload to send with RPC request.
        _summary_cache (dict): Cached summary endpoint data.
        _backends_cache (list): Cached backends endpoint data.
        _config_cache (dict): Cached config endpoint data.
        _summary_table_name (str): Table name for summary data.
        _backends_table_name (str): Table name for backends data.
        _config_table_name (str): Table name for config data.
    """

    def __init__(self, miner_name, ip, port, access_token = None, tls_enabled = False, db_url = None):
        """
        Initializes the XMRig instance with the provided IP, port, and access token.

        The `ip` can be either an IP address or domain name with its TLD (e.g. `example.com`). The schema is not 
        required and the appropriate one will be chosen based on the `tls_enabled` value.

        Args:
            miner_name (str): A unique name for the miner.
            ip (str): IP address or domain of the XMRig API.
            port (int): Port of the XMRig API.
            access_token (str, optional): Access token for authorization. Defaults to None.
            tls_enabled (bool, optional): TLS status of the miner/API. Defaults to False.
            db_url (str, optional): Database URL for storing miner data. Defaults to None.
        """
        self._miner_name = miner_name
        self._ip = ip
        self._port = port
        self._access_token = access_token
        self._tls_enabled = tls_enabled
        self._base_url = f"https://{ip}:{port}" if self._tls_enabled else f"http://{ip}:{port}"
        self._db_url = db_url
        self._json_rpc_url = f"{self._base_url}/json_rpc"
        self._summary_url = f"{self._base_url}/2/summary"
        self._backends_url = f"{self._base_url}/2/backends"
        self._config_url = f"{self._base_url}/2/config"
        self._summary_cache = None
        self._backends_cache = None
        self._config_cache = None
        self._summary_table_name = "summary"
        self._backends_table_name = "backends"
        self._config_table_name = "config"
        self._headers = {
            "Content-Type": "application/json",
            "Accept": "application/json",
            "Host": f"{self._base_url}",
            "Connection": "keep-alive",
            "Authorization": f"Bearer {self._access_token}"
        }
        self._json_rpc_payload = {
            "method": None,
            "jsonrpc": "2.0",
            "id": 1,
        }
        self.get_all_responses()
        log.info(f"XMRigAPI initialized for {self._base_url}")

    def _update_cache(self, response, endpoint):
        """
        Updates the cached data for an endpoint with the supplied response data.

        Args:
            response (dict | list): The response data.
            endpoint (str): The endpoint from which the data is retrieved.
        """
        if endpoint == "summary":
            self._summary_cache = response
        if endpoint == "backends":
            self._backends_cache = response
        if endpoint == "config":
            self._config_cache = response

    def _get_data_from_cache(self, response, keys, table_name, selection):
        """
        Retrieves the data from the response using the provided keys. Falls back to the database if the data is not available.

        Args:
            response (dict | list): The response data.
            keys (list): The keys to use to retrieve the data.
            table_name (str | list): The table name or list of table names to use for fallback database retrieval.
            selection (str): Column to select from the table.

        Returns:
            Any: The retrieved data, or a default string value of "N/A" if not available.

        Raises:
            JSONDecodeError: If there is an error decoding the JSON response.
            KeyError: If a key is not found in the response data.
            XMRigDatabaseError: If there is an error retrieving data from the database.
        """
        data = "N/A"
        try:
            if response == None:
                # TODO: Use this exception or requests.exceptions.JSONDecodeError ?
                raise JSONDecodeError("No response data available, trying database.", "", 0)
            else:
                data = response
                if len(keys) > 0:
                    for key in keys:
                        data = data[key]
        except JSONDecodeError as e:
            if self._db_url is not None:
                try:
                    return self._fallback_to_db(table_name, selection)
                except XMRigDatabaseError as db_e:
                    log.error(f"An error occurred fetching the backends data from the database: {db_e}")
                    data = "N/A"
        except KeyError as e:
            log.error(f"Key not found in the response data: {e}")
            data = "N/A"
        return data

    def _fallback_to_db(self, table_name, selection):
        """
        Fallback to the database if the data is not available in the cache.

        Args:
            db_url (str): Database URL for creating the engine.
            table_name (str): Name of the table to retrieve data from.
            selection (str): Column to select from the table.

        Returns:
            Any: The retrieved data, or a default string value of "N/A" if not available.
        """
        result = XMRigDatabase.retrieve_data_from_db(self._db_url, table_name, self._miner_name, selection)
        return result[0].get(selection, "N/A") if len(result) > 0 else "N/A"

    def get_from_db(self, table_name, selection):
        """
        Retrieve data from the database.

        Args:
            table_name (str): Name of the table to retrieve data from.
            selection (str): Column to select from the table.

        Returns:
            list: List of dictionaries containing the retrieved data.
        """
        return XMRigDatabase.retrieve_data_from_db(self._db_url, table_name, self._miner_name, selection)

    def set_auth_header(self):
        """
        Update the Authorization header for the HTTP requests.

        Returns:
            bool: True if the Authorization header was changed, or False if an error occurred.

        Raises:
            XMRigAuthorizationError: An error occurred setting the Authorization Header.
        """
        try:
            self._headers["Authorization"] = f"Bearer {self._access_token}"
            log.debug(f"Authorization header successfully changed.")
            return True
        except XMRigAuthorizationError as e:
            raise XMRigAuthorizationError(e, traceback.format_exc(), f"An error occurred setting the Authorization Header: {e}") from e

    def get_endpoint(self, endpoint):
        """
        Updates the cached data from the specified XMRig API endpoint.

        Args:
            endpoint (str): The endpoint to fetch data from. Should be one of 'summary', 'backends', or 'config'.

        Returns:
            bool: True if the cached data is successfully updated or False if an error occurred.

        Raises:
            XMRigAuthorizationError: If an authorization error occurs.
            XMRigConnectionError: If a connection error occurs.
            XMRigAPIError: If a general API error occurs.
        """
        url_map = {
            "summary": self._summary_url,
            "backends": self._backends_url,
            "config": self._config_url
        }
        try:
            response = requests.get(url_map[endpoint], headers=self._headers)
            if response.status_code == 401:
                raise XMRigAuthorizationError(message = "401 UNAUTHORIZED")
            response.raise_for_status()
            try:
                json_response = response.json()
            except requests.exceptions.JSONDecodeError as e:
                json_response = None
                raise requests.exceptions.JSONDecodeError("JSON decode error", response.text, response.status_code)
            else:
                self._update_cache(json_response, endpoint)
                log.debug(f"{endpoint.capitalize()} endpoint successfully fetched.")
                if self._db_url is not None:
                    XMRigDatabase._insert_data_to_db(json_response, self._miner_name, endpoint, self._db_url)
                return True
        except requests.exceptions.JSONDecodeError as e:
            # INFO: Due to a bug in XMRig, the first 15 minutes a miner is running/restarted its backends 
            # INFO: endpoint will return a malformed JSON response, allow the program to continue running 
            # INFO: to bypass this bug for now until a fix is provided by the XMRig developers.
            log.error("Due to a bug in XMRig, the first 15 minutes a miner is running/restarted its backends endpoint will return a malformed JSON response. If that is the case then this error/warning can be safely ignored.")
            log.error(f"An error occurred decoding the {endpoint} response: {e}")
            return False
        except requests.exceptions.RequestException as e:
            raise XMRigConnectionError(e, traceback.format_exc(), f"An error occurred while connecting to {url_map[endpoint]}:") from e
        except XMRigAuthorizationError as e:
            raise XMRigAuthorizationError(e, traceback.format_exc(), f"An authorization error occurred updating the {endpoint} endpoint, please provide a valid access token:") from e
        except Exception as e:
            raise XMRigAPIError(e, traceback.format_exc(), f"An error occurred updating the {endpoint} endpoint:") from e

    def post_config(self, config):
        """
        Updates the miners config data via the XMRig API.

        Args:
            config (dict): Configuration data to update.

        Returns:
            bool: True if the config was changed successfully, or False if an error occurred.

        Raises:
            XMRigAuthorizationError: If an authorization error occurs.
            XMRigConnectionError: If a connection error occurs.
            XMRigAPIError: If a general API error occurs.
        """
        try:
            response = requests.post(self._config_url, json = config, headers = self._headers)
            if response.status_code == 401:
                raise XMRigAuthorizationError()
            # Raise an HTTPError for bad responses (4xx and 5xx)
            response.raise_for_status()
            # Get the updated config data from the endpoint and update the cached data
            self.get_endpoint("config")
            log.debug(f"Config endpoint successfully updated.")
            return True
        except requests.exceptions.JSONDecodeError as e:
            raise requests.exceptions.JSONDecodeError("JSON decode error", response.text, response.status_code)
        except requests.exceptions.RequestException as e:
            raise XMRigConnectionError(e, traceback.format_exc(), f"An error occurred while connecting to {self._config_url}:") from e
        except XMRigAuthorizationError as e:
            raise XMRigAuthorizationError(e, traceback.format_exc(), f"An authorization error occurred posting the config, please provide a valid access token:") from e
        except Exception as e:
            raise XMRigAPIError(e, traceback.format_exc(), f"An error occurred posting the config:") from e

    def get_all_responses(self):
        """
        Retrieves all responses from the API.

        Returns:
            bool: True if successful, or False if an error occurred.

        Raises:
            XMRigAuthorizationError: If an authorization error occurs.
            XMRigConnectionError: If a connection error occurs.
            XMRigAPIError: If a general API error occurs.
        """
        summary_success = self.get_endpoint("summary")
        backends_success = self.get_endpoint("backends")
        config_success = self.get_endpoint("config")
        return summary_success and backends_success and config_success

    def perform_action(self, action):
        """
        Controls the miner by performing the specified action.

        Args:
            action (str): The action to perform. Valid actions are 'pause', 'resume', 'stop', 'start'.

        Returns:
            bool: True if the action was successfully performed, or False if an error occurred.

        Raises:
            XMRigConnectionError: If a connection error occurs.
            XMRigAPIError: If a general API error occurs.
        """
        try:
            # TODO: The `start` json RPC method is not implemented by XMRig yet, use alternative implementation 
            # TODO: until PR 3030 is merged, see the following issues and PRs for more information: 
            # TODO: https://github.com/xmrig/xmrig/issues/2826#issuecomment-1146465641
            # TODO: https://github.com/xmrig/xmrig/issues/3220#issuecomment-1450691309
            # TODO: https://github.com/xmrig/xmrig/pull/3030
            if action == "start":
                self.get_endpoint("config")
                self.post_config(self._config_cache)
                log.debug(f"Miner successfully started.")
            else:
                url = f"{self._json_rpc_url}"
                payload = self._json_rpc_payload
                payload["method"] = action
                response = requests.post(url, json=payload, headers=self._headers)
                response.raise_for_status()
                log.debug(f"Miner successfully {action}ed.")
            return True
        except requests.exceptions.RequestException as e:
            raise XMRigConnectionError(e, traceback.format_exc(), f"A connection error occurred {action}ing the miner:") from e
        except Exception as e:
            raise XMRigAPIError(e, traceback.format_exc(), f"An error occurred {action}ing the miner:") from e

    ############################
    # Full data from endpoints #
    ############################

    @property
    def summary(self):
        """
        Retrieves the entire cached summary endpoint data.

        Returns:
            dict: Current summary response, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, [], self._summary_table_name, "full_json")

    @property
    def backends(self):
        """
        Retrieves the entire cached backends endpoint data.

        Returns:
            list: Current backends response, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._backends_cache, [], self._backends_table_name, "full_json")

    @property
    def config(self):
        """
        Retrieves the entire cached config endpoint data.

        Returns:
            dict: Current config response, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, [], self._config_table_name, "full_json")

    ##############################
    # Data from summary endpoint #
    ##############################

    @property
    def sum_id(self):
        """
        Retrieves the cached ID information from the summary data.

        Returns:
            str: ID information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["id"], self._summary_table_name, "id")

    @property
    def sum_worker_id(self):
        """
        Retrieves the cached worker ID information from the summary data.

        Returns:
            str: Worker ID information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["worker_id"], self._summary_table_name, "worker_id")

    @property
    def sum_uptime(self):
        """
        Retrieves the cached current uptime from the summary data.

        Returns:
            int: Current uptime in seconds, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["uptime"], self._summary_table_name, "uptime")

    @property
    def sum_uptime_readable(self):
        """
        Retrieves the cached uptime in a human-readable format from the summary data.

        Returns:
            str: Uptime in the format "days, hours:minutes:seconds", or "N/A" if not available.
        """
        result = self._get_data_from_cache(self._summary_cache, ["uptime"], self._summary_table_name, "uptime")
        return str(timedelta(seconds=result)) if result != "N/A" else result

    @property
    def sum_restricted(self):
        """
        Retrieves the cached current restricted status from the summary data.

        Returns:
            bool: Current restricted status, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["restricted"], self._summary_table_name, "restricted")

    @property
    def sum_resources(self):
        """
        Retrieves the cached resources information from the summary data.

        Returns:
            dict: Resources information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["resources"], self._summary_table_name, "full_json")

    @property
    def sum_memory_usage(self):
        """
        Retrieves the cached memory usage from the summary data.

        Returns:
            dict: Memory usage information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["resources", "memory"], self._summary_table_name, "resources_memory")

    @property
    def sum_free_memory(self):
        """
        Retrieves the cached free memory from the summary data.

        Returns:
            int: Free memory information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["resources", "memory", "free"], self._summary_table_name, "resources_memory_free")

    @property
    def sum_total_memory(self):
        """
        Retrieves the cached total memory from the summary data.

        Returns:
            int: Total memory information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["resources", "memory", "total"], self._summary_table_name, "resources_memory_total")

    @property
    def sum_resident_set_memory(self):
        """
        Retrieves the cached resident set memory from the summary data.

        Returns:
            int: Resident set memory information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["resources", "memory", "resident_set_memory"], self._summary_table_name, "resources_memory_rsm")

    @property
    def sum_load_average(self):
        """
        Retrieves the cached load average from the summary data.

        Returns:
            list: Load average information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["resources", "load_average"], self._summary_table_name, "resources_load_average")

    @property
    def sum_hardware_concurrency(self):
        """
        Retrieves the cached hardware concurrency from the summary data.

        Returns:
            int: Hardware concurrency information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["resources", "hardware_concurrency"], self._summary_table_name, "resources_hardware_concurrency")

    @property
    def sum_features(self):
        """
        Retrieves the cached supported features information from the summary data.

        Returns:
            list: Supported features information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["features"], self._summary_table_name, "features")

    @property
    def sum_results(self):
        """
        Retrieves the cached results information from the summary data.

        Returns:
            dict: Results information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["results"], self._summary_table_name, "results")

    @property
    def sum_current_difficulty(self):
        """
        Retrieves the cached current difficulty from the summary data.

        Returns:
            int: Current difficulty, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["results", "diff_current"], self._summary_table_name, "results_diff_current")

    @property
    def sum_good_shares(self):
        """
        Retrieves the cached good shares from the summary data.

        Returns:
            int: Good shares, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["results", "shares_good"], self._summary_table_name, "results_shares_good")

    @property
    def sum_total_shares(self):
        """
        Retrieves the cached total shares from the summary data.

        Returns:
            int: Total shares, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["results", "shares_total"], self._summary_table_name, "results_shares_total")

    @property
    def sum_avg_time(self):
        """
        Retrieves the cached average time information from the summary data.

        Returns:
            int: Average time information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["results", "avg_time"], self._summary_table_name, "results_avg_time")

    @property
    def sum_avg_time_ms(self):
        """
        Retrieves the cached average time in `ms` information from the summary data.

        Returns:
            int: Average time in `ms` information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["results", "avg_time_ms"], self._summary_table_name, "results_avg_time_ms")

    @property
    def sum_total_hashes(self):
        """
        Retrieves the cached total number of hashes from the summary data.

        Returns:
            int: Total number of hashes, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["results", "hashes_total"], self._summary_table_name, "results_hashes_total")

    @property
    def sum_best_results(self):
        """
        Retrieves the cached best results from the summary data.

        Returns:
            list: Best results, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["results", "best"], self._summary_table_name, "results_best")

    @property
    def sum_algorithm(self):
        """
        Retrieves the cached current mining algorithm from the summary data.

        Returns:
            str: Current mining algorithm, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["algo"], self._summary_table_name, "algo")

    @property
    def sum_connection(self):
        """
        Retrieves the cached connection information from the summary data.

        Returns:
            dict: Connection information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["connection"], self._summary_table_name, "connection")

    @property
    def sum_pool_info(self):
        """
        Retrieves the cached pool information from the summary data.

        Returns:
            str: Pool information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["connection", "pool"], self._summary_table_name, "connection_pool")

    @property
    def sum_pool_ip_address(self):
        """
        Retrieves the cached IP address from the summary data.

        Returns:
            str: IP address, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["connection", "ip"], self._summary_table_name, "connection_ip")

    @property
    def sum_pool_uptime(self):
        """
        Retrieves the cached pool uptime information from the summary data.

        Returns:
            int: Pool uptime information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["connection", "uptime"], self._summary_table_name, "connection_uptime")

    @property
    def sum_pool_uptime_ms(self):
        """
        Retrieves the cached pool uptime in ms from the summary data.

        Returns:
            int: Pool uptime in ms, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["connection", "uptime_ms"], self._summary_table_name, "connection_uptime_ms")

    @property
    def sum_pool_ping(self):
        """
        Retrieves the cached pool ping information from the summary data.

        Returns:
            int: Pool ping information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["connection", "ping"], self._summary_table_name, "connection_ping")

    @property
    def sum_pool_failures(self):
        """
        Retrieves the cached pool failures information from the summary data.

        Returns:
            int: Pool failures information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["connection", "failures"], self._summary_table_name, "connection_failures")

    @property
    def sum_pool_tls(self):
        """
        Retrieves the cached pool tls status from the summary data.

        Returns:
            bool: Pool tls status, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["connection", "tls"], self._summary_table_name, "connection_tls")

    @property
    def sum_pool_tls_fingerprint(self):
        """
        Retrieves the cached pool tls fingerprint information from the summary data.

        Returns:
            str: Pool tls fingerprint information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["connection", "tls-fingerprint"], self._summary_table_name, "connection_tls_fingerprint")

    @property
    def sum_pool_algo(self):
        """
        Retrieves the cached pool algorithm information from the summary data.

        Returns:
            str: Pool algorithm information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["connection", "algo"], self._summary_table_name, "connection_algo")

    @property
    def sum_pool_diff(self):
        """
        Retrieves the cached pool difficulty information from the summary data.

        Returns:
            int: Pool difficulty information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["connection", "diff"], self._summary_table_name, "connection_diff")

    @property
    def sum_pool_accepted_jobs(self):
        """
        Retrieves the cached number of accepted jobs from the summary data.

        Returns:
            int: Number of accepted jobs, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["connection", "accepted"], self._summary_table_name, "connection_accepted")

    @property
    def sum_pool_rejected_jobs(self):
        """
        Retrieves the cached number of rejected jobs from the summary data.

        Returns:
            int: Number of rejected jobs, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache,  ["connection", "rejected"], self._summary_table_name, "connection_rejected")

    @property
    def sum_pool_average_time(self):
        """
        Retrieves the cached pool average time information from the summary data.

        Returns:
            int: Pool average time information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["connection", "avg_time"], self._summary_table_name, "connection_avg_time")

    @property
    def sum_pool_average_time_ms(self):
        """
        Retrieves the cached pool average time in ms from the summary data.

        Returns:
            int: Pool average time in ms, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["connection", "avg_time_ms"], self._summary_table_name, "connection_avg_time_ms")

    @property
    def sum_pool_total_hashes(self):
        """
        Retrieves the cached pool total hashes information from the summary data.

        Returns:
            int: Pool total hashes information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["connection", "hashes_total"], self._summary_table_name, "connection_hashes_total")

    @property
    def sum_version(self):
        """
        Retrieves the cached version information from the summary data.

        Returns:
            str: Version information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["version"], self._summary_table_name, "version")

    @property
    def sum_kind(self):
        """
        Retrieves the cached kind information from the summary data.

        Returns:
            str: Kind information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["kind"], self._summary_table_name, "kind")

    @property
    def sum_ua(self):
        """
        Retrieves the cached user agent information from the summary data.

        Returns:
            str: User agent information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["ua"], self._summary_table_name, "ua")

    @property
    def sum_cpu_info(self):
        """
        Retrieves the cached CPU information from the summary data.

        Returns:
            dict: CPU information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["cpu"], self._summary_table_name, "cpu")

    @property
    def sum_cpu_brand(self):
        """
        Retrieves the cached CPU brand information from the summary data.

        Returns:
            str: CPU brand information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["cpu", "brand"], self._summary_table_name, "cpu_brand")

    @property
    def sum_cpu_family(self):
        """
        Retrieves the cached CPU family information from the summary data.

        Returns:
            int: CPU family information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["cpu", "family"], self._summary_table_name, "cpu_family")

    @property
    def sum_cpu_model(self):
        """
        Retrieves the cached CPU model information from the summary data.

        Returns:
            int: CPU model information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["cpu", "model"], self._summary_table_name, "cpu_model")

    @property
    def sum_cpu_stepping(self):
        """
        Retrieves the cached CPU stepping information from the summary data.

        Returns:
            int: CPU stepping information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache,  ["cpu", "stepping"], self._summary_table_name, "cpu_stepping")

    @property
    def sum_cpu_proc_info(self):
        """
        Retrieves the cached CPU frequency information from the summary data.

        Returns:
            int: CPU frequency information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["cpu", "proc_info"], self._summary_table_name, "cpu_proc_info")

    @property
    def sum_cpu_aes(self):
        """
        Retrieves the cached CPU AES support status from the summary data.

        Returns:
            bool: CPU AES support status, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["cpu", "aes"], self._summary_table_name, "cpu_aes")

    @property
    def sum_cpu_avx2(self):
        """
        Retrieves the cached CPU AVX2 support status from the summary data.

        Returns:
            bool: CPU AVX2 support status, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["cpu", "avx2"], self._summary_table_name, "cpu_avx2")

    @property
    def sum_cpu_x64(self):
        """
        Retrieves the cached CPU x64 support status from the summary data.

        Returns:
            bool: CPU x64 support status, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["cpu", "x64"], self._summary_table_name, "cpu_x64")

    @property
    def sum_cpu_64_bit(self):
        """
        Retrieves the cached CPU 64-bit support status from the summary data.

        Returns:
            bool: CPU 64-bit support status, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["cpu", "64_bit"], self._summary_table_name, "cpu_64_bit")

    @property
    def sum_cpu_l2(self):
        """
        Retrieves the cached CPU L2 cache size from the summary data.

        Returns:
            int: CPU L2 cache size, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["cpu", "l2"], self._summary_table_name, "cpu_l2")

    @property
    def sum_cpu_l3(self):
        """
        Retrieves the cached CPU L3 cache size from the summary data.

        Returns:
            int: CPU L3 cache size, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["cpu", "l3"], self._summary_table_name, "cpu_l3")

    @property
    def sum_cpu_cores(self):
        """
        Retrieves the cached CPU cores count from the summary data.

        Returns:
            int: CPU cores count, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["cpu", "cores"], self._summary_table_name, "cpu_cores")

    @property
    def sum_cpu_threads(self):
        """
        Retrieves the cached CPU threads count from the summary data.

        Returns:
            int: CPU threads count, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["cpu", "threads"], self._summary_table_name, "cpu_threads")

    @property
    def sum_cpu_packages(self):
        """
        Retrieves the cached CPU packages count from the summary data.

        Returns:
            int: CPU packages count, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["cpu", "packages"], self._summary_table_name, "cpu_packages")

    @property
    def sum_cpu_nodes(self):
        """
        Retrieves the cached CPU nodes count from the summary data.

        Returns:
            int: CPU nodes count, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["cpu", "nodes"], self._summary_table_name, "cpu_nodes")

    @property
    def sum_cpu_backend(self):
        """
        Retrieves the cached CPU backend information from the summary data.

        Returns:
            str: CPU backend information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache,  ["cpu", "backend"], self._summary_table_name, "cpu_backend")

    @property
    def sum_cpu_msr(self):
        """
        Retrieves the cached CPU MSR information from the summary data.

        Returns:
            str: CPU MSR information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["cpu", "msr"], self._summary_table_name, "cpu_msr")

    @property
    def sum_cpu_assembly(self):
        """
        Retrieves the cached CPU assembly information from the summary data.

        Returns:
            str: CPU assembly information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache,  ["cpu", "assembly"], self._summary_table_name, "cpu_assembly")

    @property
    def sum_cpu_arch(self):
        """
        Retrieves the cached CPU architecture information from the summary data.

        Returns:
            str: CPU architecture information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["cpu", "arch"], self._summary_table_name, "cpu_arch")

    @property
    def sum_cpu_flags(self):
        """
        Retrieves the cached CPU flags information from the summary data.

        Returns:
            list: CPU flags information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["cpu", "flags"], self._summary_table_name, "cpu_flags")

    @property
    def sum_donate_level(self):
        """
        Retrieves the cached donate level information from the summary data.

        Returns:
            int: Donate level information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["donate_level"], self._summary_table_name, "donate_level")

    @property
    def sum_paused(self):
        """
        Retrieves the cached paused status from the summary data.

        Returns:
            bool: Paused status, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["paused"], self._summary_table_name, "paused")

    @property
    def sum_algorithms(self):
        """
        Retrieves the cached algorithms information from the summary data.

        Returns:
            list: Algorithms information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["algorithms"], self._summary_table_name, "algorithms")

    @property
    def sum_hashrate(self):
        """
        Retrieves the cached hashrate information from the summary data.

        Returns:
            dict: Hashrate information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["hashrate"], self._summary_table_name, "hashrate")

    @property
    def sum_hashrate_total(self):
        """
        Retrieves the cached hashrate toal information from the summary data.

        Returns:
            list: Hashrate total information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["hashrate", "total"], self._summary_table_name, "hashrate_total")

    @property
    def sum_hashrate_10s(self):
        """
        Retrieves the cached hashrate for the last 10 seconds from the summary data.

        Returns:
            float: Hashrate for the last 10 seconds, or "N/A" if not available.
        """
        result = self._get_data_from_cache(self._summary_cache, ["hashrate", "total"], self._summary_table_name, "hashrate_total")
        return result[0] if result != "N/A" else result

    @property
    def sum_hashrate_1m(self):
        """
        Retrieves the cached hashrate for the last 1 minute from the summary data.

        Returns:
            float: Hashrate for the last 1 minute, or "N/A" if not available.
        """
        result = self._get_data_from_cache(self._summary_cache, ["hashrate", "total"], self._summary_table_name, "hashrate_total")
        return result[1] if result != "N/A" else result

    @property
    def sum_hashrate_15m(self):
        """
        Retrieves the cached hashrate for the last 15 minutes from the summary data.

        Returns:
            float: Hashrate for the last 15 minutes, or "N/A" if not available.
        """
        result = self._get_data_from_cache(self._summary_cache, ["hashrate", "total"], self._summary_table_name, "hashrate_total")
        return result[2] if result != "N/A" else result

    @property
    def sum_hashrate_highest(self):
        """
        Retrieves the cached highest hashrate from the summary data.

        Returns:
            float: Highest hashrate, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["hashrate", "highest"], self._summary_table_name, "hashrate_highest")

    @property
    def sum_hugepages(self):
        """
        Retrieves the cached hugepages information from the summary data.

        Returns:
            list: Hugepages information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._summary_cache, ["hugepages"], self._summary_table_name, "hugepages")

    ###############################
    # Data from backends endpoint #
    ###############################

    @property
    def enabled_backends(self):
        """
        Retrieves the enabled backends from the backends data.

        Returns:
            list: Enabled backends, or "N/A" if not available.
        """
        enabled_backends = []
        if self._backends_cache and len(self._backends_cache) >= 1:
            if self._get_data_from_cache(self._backends_cache, [0, "enabled"], self._backends_table_name, "cpu_enabled"):
                enabled_backends.append(self._get_data_from_cache(self._backends_cache, [0, "type"], self._backends_table_name, "cpu_type"))
        if self._backends_cache and len(self._backends_cache) >= 2:
            if self._get_data_from_cache(self._backends_cache, [1, "enabled"], self._backends_table_name, "opencl_enabled"):
                enabled_backends.append(self._get_data_from_cache(self._backends_cache, [1, "type"], self._backends_table_name, "opencl_type"))
            if self._get_data_from_cache(self._backends_cache, [2, "enabled"], self._backends_table_name, "cuda_enabled"):
                enabled_backends.append(self._get_data_from_cache(self._backends_cache, [2, "type"], self._backends_table_name, "cuda_type"))
        return enabled_backends

    @property
    def be_cpu_type(self):
        """
        Retrieves the CPU backend type from the backends data.

        Returns:
            str: CPU backend type, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._backends_cache, [0, "type"], self._backends_table_name, "cpu_type")

    @property
    def be_cpu_enabled(self):
        """
        Retrieves the CPU backend enabled status from the backends data.

        Returns:
            bool: CPU backend enabled status, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._backends_cache, [0, "enabled"], self._backends_table_name, "cpu_enabled")

    @property
    def be_cpu_algo(self):
        """
        Retrieves the CPU backend algorithm from the backends data.

        Returns:
            str: CPU backend algorithm, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._backends_cache, [0, "algo"], self._backends_table_name, "cpu_algo")

    @property
    def be_cpu_profile(self):
        """
        Retrieves the CPU backend profile from the backends data.

        Returns:
            str: CPU backend profile, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._backends_cache, [0, "profile"], self._backends_table_name, "cpu_profile")

    @property
    def be_cpu_hw_aes(self):
        """
        Retrieves the CPU backend hardware AES support status from the backends data.

        Returns:
            bool: CPU backend hardware AES support status, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._backends_cache, [0, "hw-aes"], self._backends_table_name, "cpu_hw_aes")

    @property
    def be_cpu_priority(self):
        """
        Retrieves the CPU backend priority from the backends data.

        Returns:
            int: CPU backend priority, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._backends_cache, [0, "priority"], self._backends_table_name, "cpu_priority")

    @property
    def be_cpu_msr(self):
        """
        Retrieves the CPU backend MSR support status from the backends data.

        Returns:
            bool: CPU backend MSR support status, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._backends_cache, [0, "msr"], self._backends_table_name, "cpu_msr")

    @property
    def be_cpu_asm(self):
        """
        Retrieves the CPU backend assembly information from the backends data.

        Returns:
            str: CPU backend assembly information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._backends_cache, [0, "asm"], self._backends_table_name, "cpu_asm")

    @property
    def be_cpu_argon2_impl(self):
        """
        Retrieves the CPU backend Argon2 implementation from the backends data.

        Returns:
            str: CPU backend Argon2 implementation, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._backends_cache, [0, "argon2-impl"], self._backends_table_name, "cpu_argon2_impl")

    @property
    def be_cpu_hugepages(self):
        """
        Retrieves the CPU backend hugepages information from the backends data.

        Returns:
            list: CPU backend hugepages information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._backends_cache, [0, "hugepages"], self._backends_table_name, "cpu_hugepages")

    @property
    def be_cpu_memory(self):
        """
        Retrieves the CPU backend memory information from the backends data.

        Returns:
            int: CPU backend memory information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._backends_cache, [0, "memory"], self._backends_table_name, "cpu_memory")

    @property
    def be_cpu_hashrates(self):
        """
        Retrieves the CPU backend hashrates from the backends data.

        Returns:
            list: CPU backend hashrates, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._backends_cache, [0, "hashrate"], self._backends_table_name, "cpu_hashrate")

    @property
    def be_cpu_hashrate_10s(self):
        """
        Retrieves the CPU backend hashrate for the last 10 seconds from the backends data.

        Returns:
            float: CPU backend hashrate for the last 10 seconds, or "N/A" if not available.
        """
        result = self._get_data_from_cache(self._backends_cache, [0, "hashrate"], self._backends_table_name, "cpu_hashrate")
        return result[0] if result != "N/A" else result

    @property
    def be_cpu_hashrate_1m(self):
        """
        Retrieves the CPU backend hashrate for the last 1 minute from the backends data.

        Returns:
            float: CPU backend hashrate for the last 1 minute, or "N/A" if not available.
        """
        result = self._get_data_from_cache(self._backends_cache, [0, "hashrate"], self._backends_table_name, "cpu_hashrate")
        return result[1] if result != "N/A" else result

    @property
    def be_cpu_hashrate_15m(self):
        """
        Retrieves the CPU backend hashrate for the last 15 minutes from the backends data.

        Returns:
            float: CPU backend hashrate for the last 15 minutes, or "N/A" if not available.
        """
        result = self._get_data_from_cache(self._backends_cache, [0, "hashrate"], self._backends_table_name, "cpu_hashrate")
        return result[2] if result != "N/A" else result

    @property
    def be_cpu_threads(self):
        """
        Retrieves the CPU backend threads information from the backends data.

        Returns:
            list: CPU backend threads information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._backends_cache, [0, "threads"], self._backends_table_name, "cpu_threads")

    @property
    def be_cpu_threads_intensity(self):
        """
        Retrieves the CPU backend threads intensity information from the backends data.

        Returns:
            list: CPU backend threads intensity information, or "N/A" if not available.
        """
        intensities = []
        try:
            threads = self._get_data_from_cache(self._backends_cache, [0, "threads"], self._backends_table_name, "cpu_threads")
            for i in threads:
                intensities.append(i["intensity"])
        except TypeError as e:
            return "N/A"
        return intensities

    @property
    def be_cpu_threads_affinity(self):
        """
        Retrieves the CPU backend threads affinity information from the backends data.

        Returns:
            list: CPU backend threads affinity information, or "N/A" if not available.
        """
        affinities = []
        try:
            for i in self._get_data_from_cache(self._backends_cache, [0, "threads"], self._backends_table_name, "cpu_threads"):
                    affinities.append(i["affinity"])
        except TypeError as e:
            return "N/A"
        return affinities

    @property
    def be_cpu_threads_av(self):
        """
        Retrieves the CPU backend threads AV information from the backends data.

        Returns:
            list: CPU backend threads AV information, or "N/A" if not available.
        """
        avs = []
        try:
            for i in self._get_data_from_cache(self._backends_cache, [0, "threads"], self._backends_table_name, "cpu_threads"):
                    avs.append(i["av"])
        except TypeError as e:
            return "N/A"
        return avs

    @property
    def be_cpu_threads_hashrates(self):
        """
        Retrieves the CPU backend threads hashrates information from the backends data.

        Returns:
            list: CPU backend threads hashrates information, or "N/A" if not available.
        """
        hashrates = []
        try:
            for i in self._get_data_from_cache(self._backends_cache, [0, "threads"], self._backends_table_name, "cpu_threads"):
                    hashrates.append(i["hashrate"])
        except TypeError as e:
            return "N/A"
        return hashrates

    @property
    def be_cpu_threads_hashrates_10s(self):
        """
        Retrieves the CPU backend threads hashrates for the last 10 seconds from the backends data.

        Returns:
            list: CPU backend threads hashrates for the last 10 seconds, or "N/A" if not available.
        """
        hashrates_10s = []
        try:
            for i in self._get_data_from_cache(self._backends_cache, [0, "threads"], self._backends_table_name, "cpu_threads"):
                    hashrates_10s.append(i["hashrate"][0])
        except TypeError as e:
            return "N/A"
        return hashrates_10s

    @property
    def be_cpu_threads_hashrates_1m(self):
        """
        Retrieves the CPU backend threads hashrates for the last 1 minute from the backends data.

        Returns:
            list: CPU backend threads hashrates for the last 1 minute, or "N/A" if not available.
        """
        hashrates_1m = []
        try:
           for i in self._get_data_from_cache(self._backends_cache, [0, "threads"], self._backends_table_name, "cpu_threads"):
                    hashrates_1m.append(i["hashrate"][1])
        except TypeError as e:
            return "N/A"
        return hashrates_1m

    @property
    def be_cpu_threads_hashrates_15m(self):
        """
        Retrieves the CPU backend threads hashrates for the last 15 minutes from the backends data.

        Returns:
            list: CPU backend threads hashrates for the last 15 minutes, or "N/A" if not available.
        """
        hashrates_15m = []
        try:
            for i in self._get_data_from_cache(self._backends_cache, [0, "threads"], self._backends_table_name, "cpu_threads"):
                    hashrates_15m.append(i["hashrate"][2])
        except TypeError as e:
            return "N/A"
        return hashrates_15m

    @property
    def be_opencl_type(self):
        """
        Retrieves the OpenCL backend type from the backends data.

        Returns:
            str: OpenCL backend type, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._backends_cache, [1, "type"], self._backends_table_name, "opencl_type")

    @property
    def be_opencl_enabled(self):
        """
        Retrieves the OpenCL backend enabled status from the backends data.

        Returns:
            bool: OpenCL backend enabled status, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._backends_cache, [1, "enabled"], self._backends_table_name, "opencl_enabled")

    @property
    def be_opencl_algo(self):
        """
        Retrieves the OpenCL backend algorithm from the backends data.

        Returns:
            str: OpenCL backend algorithm, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._backends_cache, [1, "algo"], self._backends_table_name, "opencl_algo")

    @property
    def be_opencl_profile(self):
        """
        Retrieves the OpenCL backend profile from the backends data.

        Returns:
            str: OpenCL backend profile, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._backends_cache, [1, "profile"], self._backends_table_name, "opencl_profile")

    @property
    def be_opencl_platform(self):
        """
        Retrieves the OpenCL backend platform information from the backends data.

        Returns:
            dict: OpenCL backend platform information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._backends_cache, [1, "platform"], self._backends_table_name, "opencl_platform")

    @property
    def be_opencl_platform_index(self):
        """
        Retrieves the OpenCL backend platform index from the backends data.

        Returns:
            int: OpenCL backend platform index, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._backends_cache, [1, "platform", "index"], self._backends_table_name, "opencl_platform_index")

    @property
    def be_opencl_platform_profile(self):
        """
        Retrieves the OpenCL backend platform profile from the backends data.

        Returns:
            str: OpenCL backend platform profile, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._backends_cache, [1, "platform", "profile"], self._backends_table_name, "opencl_platform_profile")

    @property
    def be_opencl_platform_version(self):
        """
        Retrieves the OpenCL backend platform version from the backends data.

        Returns:
            str: OpenCL backend platform version, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._backends_cache, [1, "platform", "version"], self._backends_table_name, "opencl_platform_version")

    @property
    def be_opencl_platform_name(self):
        """
        Retrieves the OpenCL backend platform name from the backends data.

        Returns:
            str: OpenCL backend platform name, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._backends_cache, [1, "platform", "name"], self._backends_table_name, "opencl_platform_name")

    @property
    def be_opencl_platform_vendor(self):
        """
        Retrieves the OpenCL backend platform vendor from the backends data.

        Returns:
            str: OpenCL backend platform vendor, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._backends_cache, [1, "platform", "vendor"], self._backends_table_name, "opencl_platform_vendor")

    @property
    def be_opencl_platform_extensions(self):
        """
        Retrieves the OpenCL backend platform extensions from the backends data.

        Returns:
            str: OpenCL backend platform extensions, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._backends_cache, [1, "platform", "extensions"], self._backends_table_name, "opencl_platform_extensions")

    @property
    def be_opencl_hashrates(self):
        """
        Retrieves the OpenCL backend hashrates from the backends data.

        Returns:
            list: OpenCL backend hashrates, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._backends_cache, [1, "hashrate"], self._backends_table_name, "opencl_hashrate")

    @property
    def be_opencl_hashrate_10s(self):
        """
        Retrieves the OpenCL backend hashrate for the last 10 seconds from the backends data.

        Returns:
            float: OpenCL backend hashrate for the last 10 seconds, or "N/A" if not available.
        """
        result = self._get_data_from_cache(self._backends_cache, [1, "hashrate"], self._backends_table_name, "opencl_hashrate")
        return result[0] if result != "N/A" else result

    @property
    def be_opencl_hashrate_1m(self):
        """
        Retrieves the OpenCL backend hashrate for the last 1 minute from the backends data.

        Returns:
            float: OpenCL backend hashrate for the last 1 minute, or "N/A" if not available.
        """
        result = self._get_data_from_cache(self._backends_cache, [1, "hashrate"], self._backends_table_name, "opencl_hashrate")
        return result[1] if result != "N/A" else result

    @property
    def be_opencl_hashrate_15m(self):
        """
        Retrieves the OpenCL backend hashrate for the last 15 minutes from the backends data.

        Returns:
            float: OpenCL backend hashrate for the last 15 minutes, or "N/A" if not available.
        """
        result = self._get_data_from_cache(self._backends_cache, [1, "hashrate"], self._backends_table_name, "opencl_hashrate")
        return result[2] if result != "N/A" else result

    @property
    def be_opencl_threads(self):
        """
        Retrieves the OpenCL backend threads information from the backends data.

        Returns:
            list: OpenCL backend threads information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._backends_cache, [1, "threads"], self._backends_table_name, "opencl_threads")

    @property
    def be_opencl_threads_index(self):
        """
        Retrieves the OpenCL backend threads index from the backends data.

        Returns:
            list: OpenCL backend threads index, or "N/A" if not available.
        """
        indexes = []
        try:
            for i in self._get_data_from_cache(self._backends_cache, [1, "threads"], self._backends_table_name, "opencl_threads"):
                    indexes.append(i["index"])
        except TypeError as e:
            return "N/A"
        return indexes

    @property
    def be_opencl_threads_intensity(self):
        """
        Retrieves the OpenCL backend threads intensity from the backends data.

        Returns:
            list: OpenCL backend threads intensity, or "N/A" if not available.
        """
        intensities = []
        try:
            for i in self._get_data_from_cache(self._backends_cache, [1, "threads"], self._backends_table_name, "opencl_threads"):
                intensities.append(i["intensity"])
        except TypeError as e:
            return "N/A"
        return intensities

    @property
    def be_opencl_threads_worksize(self):
        """
        Retrieves the OpenCL backend threads worksize from the backends data.

        Returns:
            list: OpenCL backend threads worksize, or "N/A" if not available.
        """
        worksizes = []
        try:
            for i in self._get_data_from_cache(self._backends_cache, [1, "threads"], self._backends_table_name, "opencl_threads"):
                worksizes.append(i["worksize"])
        except TypeError as e:
            return "N/A"
        return worksizes

    @property
    def be_opencl_threads_unroll(self):
        """
        Retrieves the OpenCL backend threads unroll from the backends data.

        Returns:
            list: OpenCL backend threads unroll, or "N/A" if not available.
        """
        unrolls = []
        try:
            for i in self._get_data_from_cache(self._backends_cache, [1, "threads"], self._backends_table_name, "opencl_threads"):
                unrolls.append(i["unroll"])
        except TypeError as e:
            return "N/A"
        return unrolls

    @property
    def be_opencl_threads_affinity(self):
        """
        Retrieves the OpenCL backend threads affinity from the backends data.

        Returns:
            list: OpenCL backend threads affinity, or "N/A" if not available.
        """
        affinities = []
        try:
            for i in self._get_data_from_cache(self._backends_cache, [1, "threads"], self._backends_table_name, "opencl_threads"):
                affinities.append(i["affinity"])
        except TypeError as e:
            return "N/A"
        return affinities

    @property
    def be_opencl_threads_hashrates(self):
        """
        Retrieves the OpenCL backend threads hashrates from the backends data.

        Returns:
            list: OpenCL backend threads hashrates, or "N/A" if not available.
        """
        hashrates = []
        try:
            for i in self._get_data_from_cache(self._backends_cache, [1, "threads"], self._backends_table_name, "opencl_threads"):
                hashrates.append(i["hashrate"])
        except TypeError as e:
            return "N/A"
        return hashrates

    @property
    def be_opencl_threads_hashrate_10s(self):
        """
        Retrieves the OpenCL backend threads hashrate for the last 10 seconds from the backends data.

        Returns:
            list: OpenCL backend threads hashrate for the last 10 seconds, or "N/A" if not available.
        """
        hashrates_10s = []
        try:
            for i in self._get_data_from_cache(self._backends_cache, [1, "threads"], self._backends_table_name, "opencl_threads"):
                hashrates_10s.append(i["hashrate"][0])
        except KeyError:
            return "N/A"
        return hashrates_10s

    @property
    def be_opencl_threads_hashrate_1m(self):
        """
        Retrieves the OpenCL backend threads hashrate for the last 1 minute from the backends data.

        Returns:
            list: OpenCL backend threads hashrate for the last 1 minute, or "N/A" if not available.
        """
        hashrates_1m = []
        try:
            for i in self._get_data_from_cache(self._backends_cache, [1, "threads"], self._backends_table_name, "opencl_threads"):
                hashrates_1m.append(i["hashrate"][1])
        except KeyError:
            return "N/A"
        return hashrates_1m

    @property
    def be_opencl_threads_hashrate_15m(self):
        """
        Retrieves the OpenCL backend threads hashrate for the last 15 minutes from the backends data.

        Returns:
            list: OpenCL backend threads hashrate for the last 15 minutes, or "N/A" if not available.
        """
        hashrates_15m = []
        try:
            for i in self._get_data_from_cache(self._backends_cache, [1, "threads"], self._backends_table_name, "opencl_threads"):
                hashrates_15m.append(i["hashrate"][2])
        except KeyError:
            return "N/A"
        return hashrates_15m

    @property
    def be_opencl_threads_board(self):
        """
        Retrieves the OpenCL backend threads board information from the backends data.

        Returns:
            list: OpenCL backend threads board information, or "N/A" if not available.
        """
        boards = []
        try:
            for i in self._get_data_from_cache(self._backends_cache, [1, "threads"], self._backends_table_name, "opencl_threads"):
                boards.append(i["board"])
        except KeyError:
            return "N/A"
        return boards

    @property
    def be_opencl_threads_name(self):
        """
        Retrieves the OpenCL backend threads name from the backends data.

        Returns:
            list: OpenCL backend threads name, or "N/A" if not available.
        """
        names = []
        try:
            for i in self._get_data_from_cache(self._backends_cache, [1, "threads"], self._backends_table_name, "opencl_threads"):
                names.append(i["name"])
        except KeyError:
            return "N/A"
        return names

    @property
    def be_opencl_threads_bus_id(self):
        """
        Retrieves the OpenCL backend threads bus ID from the backends data.

        Returns:
            list: OpenCL backend threads bus ID, or "N/A" if not available.
        """
        bus_ids = []
        try:
            for i in self._get_data_from_cache(self._backends_cache, [1, "threads"], self._backends_table_name, "opencl_threads"):
                bus_ids.append(i["bus_id"])
        except KeyError:
            return "N/A"
        return bus_ids

    @property
    def be_opencl_threads_cu(self):
        """
        Retrieves the OpenCL backend threads compute units from the backends data.

        Returns:
            list: OpenCL backend threads compute units, or "N/A" if not available.
        """
        cus = []
        try:
            for i in self._get_data_from_cache(self._backends_cache, [1, "threads"], self._backends_table_name, "opencl_threads"):
                cus.append(i["cu"])
        except KeyError:
            return "N/A"
        return cus

    @property
    def be_opencl_threads_global_mem(self):
        """
        Retrieves the OpenCL backend threads global memory from the backends data.

        Returns:
            list: OpenCL backend threads global memory, or "N/A" if not available.
        """
        global_mems = []
        try:
            for i in self._get_data_from_cache(self._backends_cache, [1, "threads"], self._backends_table_name, "opencl_threads"):
                global_mems.append(i["global_mem"])
        except KeyError:
            return "N/A"
        return global_mems

    @property
    def be_opencl_threads_health(self):
        """
        Retrieves the OpenCL backend threads health information from the backends data.

        Returns:
            list: OpenCL backend threads health information, or "N/A" if not available.
        """
        healths = []
        try:
            for i in self._get_data_from_cache(self._backends_cache, [1, "threads"], self._backends_table_name, "opencl_threads"):
                healths.append(i["health"])
        except KeyError:
            return "N/A"
        return healths

    @property
    def be_opencl_threads_health_temp(self):
        """
        Retrieves the OpenCL backend threads health temperature from the backends data.

        Returns:
            list: OpenCL backend threads health temperature, or "N/A" if not available.
        """
        temps = []
        try:
            for i in self._get_data_from_cache(self._backends_cache, [1, "threads"], self._backends_table_name, "opencl_threads"):
                temps.append(i["health"]["temperature"])
        except KeyError:
            return "N/A"
        return temps

    @property
    def be_opencl_threads_health_power(self):
        """
        Retrieves the OpenCL backend threads health power from the backends data.

        Returns:
            list: OpenCL backend threads health power, or "N/A" if not available.
        """
        powers = []
        try:
            for i in self._get_data_from_cache(self._backends_cache, [1, "threads"], self._backends_table_name, "opencl_threads"):
                powers.append(i["health"]["power"])
        except KeyError:
            return "N/A"
        return powers

    @property
    def be_opencl_threads_health_clock(self):
        """
        Retrieves the OpenCL backend threads health clock from the backends data.

        Returns:
            list: OpenCL backend threads health clock, or "N/A" if not available.
        """
        clocks = []
        try:
            for i in self._get_data_from_cache(self._backends_cache, [1, "threads"], self._backends_table_name, "opencl_threads"):
                clocks.append(i["health"]["clock"])
        except KeyError:
            return "N/A"
        return clocks

    @property
    def be_opencl_threads_health_mem_clock(self):
        """
        Retrieves the OpenCL backend threads health memory clock from the backends data.

        Returns:
            list: OpenCL backend threads health memory clock, or "N/A" if not available.
        """
        mem_clocks = []
        try:
            for i in self._get_data_from_cache(self._backends_cache, [1, "threads"], self._backends_table_name, "opencl_threads"):
                mem_clocks.append(i["health"]["mem_clock"])
        except KeyError:
            return "N/A"
        return mem_clocks

    @property
    def be_opencl_threads_health_rpm(self):
        """
        Retrieves the OpenCL backend threads health RPM from the backends data.

        Returns:
            list: OpenCL backend threads health RPM, or "N/A" if not available.
        """
        rpms = []
        try:
            for i in self._get_data_from_cache(self._backends_cache, [1, "threads"], self._backends_table_name, "opencl_threads"):
                rpms.append(i["health"]["rpm"])
        except KeyError:
            return "N/A"
        return rpms

    @property
    def be_cuda_type(self):
        """
        Retrieves the CUDA backend type from the backends data.

        Returns:
            str: CUDA backend type, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._backends_cache, [2, "type"], self._backends_table_name, "cuda_type")

    @property
    def be_cuda_enabled(self):
        """
        Retrieves the CUDA backend enabled status from the backends data.

        Returns:
            bool: CUDA backend enabled status, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._backends_cache, [2, "enabled"], self._backends_table_name, "cuda_enabled")

    @property
    def be_cuda_algo(self):
        """
        Retrieves the CUDA backend algorithm from the backends data.

        Returns:
            str: CUDA backend algorithm, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._backends_cache, [2, "algo"], self._backends_table_name, "cuda_algo")

    @property
    def be_cuda_profile(self):
        """
        Retrieves the CUDA backend profile from the backends data.

        Returns:
            str: CUDA backend profile, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._backends_cache, [2, "profile"], self._backends_table_name, "cuda_profile")

    @property
    def be_cuda_versions(self):
        """
        Retrieves the CUDA backend versions information from the backends data.

        Returns:
            dict: CUDA backend versions information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._backends_cache, [2, "versions"], self._backends_table_name, "cuda_versions")

    @property
    def be_cuda_runtime(self):
        """
        Retrieves the CUDA backend runtime version from the backends data.

        Returns:
            str: CUDA backend runtime version, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._backends_cache, [2, "versions", "cuda-runtime"], self._backends_table_name, "cuda_versions_cuda_runtime")

    @property
    def be_cuda_driver(self):
        """
        Retrieves the CUDA backend driver version from the backends data.

        Returns:
            str: CUDA backend driver version, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._backends_cache, [2, "versions", "cuda-driver"], self._backends_table_name, "cuda_versions_cuda_driver")

    @property
    def be_cuda_plugin(self):
        """
        Retrieves the CUDA backend plugin version from the backends data.

        Returns:
            str: CUDA backend plugin version, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._backends_cache, [2, "versions", "plugin"], self._backends_table_name, "cuda_versions_plugin")

    @property
    def be_cuda_hashrates(self):
        """
        Retrieves the CUDA backend hashrates from the backends data.

        Returns:
            list: CUDA backend hashrates, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._backends_cache, [2, "hashrate"], self._backends_table_name, "cuda_hashrate")

    @property
    def be_cuda_hashrate_10s(self):
        """
        Retrieves the CUDA backend hashrate for the last 10 seconds from the backends data.

        Returns:
            float: CUDA backend hashrate for the last 10 seconds, or "N/A" if not available.
        """
        result = self._get_data_from_cache(self._backends_cache, [2, "hashrate"], self._backends_table_name, "cuda_hashrate")
        return result[0] if result != "N/A" else result

    @property
    def be_cuda_hashrate_1m(self):
        """
        Retrieves the CUDA backend hashrate for the last 1 minute from the backends data.

        Returns:
            float: CUDA backend hashrate for the last 1 minute, or "N/A" if not available.
        """
        result = self._get_data_from_cache(self._backends_cache, [2, "hashrate"], self._backends_table_name, "cuda_hashrate")
        return result[1] if result != "N/A" else result

    @property
    def be_cuda_hashrate_15m(self):
        """
        Retrieves the CUDA backend hashrate for the last 15 minutes from the backends data.

        Returns:
            float: CUDA backend hashrate for the last 15 minutes, or "N/A" if not available.
        """
        result = self._get_data_from_cache(self._backends_cache, [2, "hashrate"], self._backends_table_name, "cuda_hashrate")
        return result[2] if result != "N/A" else result

    @property
    def be_cuda_threads(self):
        """
        Retrieves the CUDA backend threads information from the backends data.

        Returns:
            list: CUDA backend threads information, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._backends_cache, [2, "threads"], self._backends_table_name, "cuda_threads")

    @property
    def be_cuda_threads_index(self):
        """
        Retrieves the CUDA backend threads index from the backends data.

        Returns:
            list: CUDA backend threads index, or "N/A" if not available.
        """
        indexes = []
        try:
            for i in self._get_data_from_cache(self._backends_cache, [2, "threads"], self._backends_table_name, "cuda_threads"):
                indexes.append(i["index"])
        except KeyError:
            return "N/A"
        return indexes

    @property
    def be_cuda_threads_blocks(self):
        """
        Retrieves the CUDA backend threads blocks from the backends data.

        Returns:
            list: CUDA backend threads blocks, or "N/A" if not available.
        """
        blocks = []
        try:
            for i in self._get_data_from_cache(self._backends_cache, [2, "threads"], self._backends_table_name, "cuda_threads"):
                blocks.append(i["blocks"])
        except KeyError:
            return "N/A"
        return blocks

    @property
    def be_cuda_threads_bfactor(self):
        """
        Retrieves the CUDA backend threads bfactor from the backends data.

        Returns:
            list: CUDA backend threads bfactor, or "N/A" if not available.
        """
        bfactors = []
        try:
            for i in self._get_data_from_cache(self._backends_cache, [2, "threads"], self._backends_table_name, "cuda_threads"):
                bfactors.append(i["bfactor"])
        except KeyError:
            return "N/A"
        return bfactors

    @property
    def be_cuda_threads_bsleep(self):
        """
        Retrieves the CUDA backend threads bsleep from the backends data.

        Returns:
            list: CUDA backend threads bsleep, or "N/A" if not available.
        """
        bsleeps = []
        try:
            for i in self._get_data_from_cache(self._backends_cache, [2, "threads"], self._backends_table_name, "cuda_threads"):
                bsleeps.append(i["bsleep"])
        except KeyError:
            return "N/A"
        return bsleeps

    @property
    def be_cuda_threads_affinity(self):
        """
        Retrieves the CUDA backend threads affinity from the backends data.

        Returns:
            list: CUDA backend threads affinity, or "N/A" if not available.
        """
        affinities = []
        try:
            for i in self._get_data_from_cache(self._backends_cache, [2, "threads"], self._backends_table_name, "cuda_threads"):
                affinities.append(i["affinity"])
        except KeyError:
            return "N/A"
        return affinities

    @property
    def be_cuda_threads_dataset_host(self):
        """
        Retrieves the CUDA backend threads dataset host status from the backends data.

        Returns:
            list: CUDA backend threads dataset host status, or "N/A" if not available.
        """
        dataset_hosts = []
        try:
            for i in self._get_data_from_cache(self._backends_cache, [2, "threads"], self._backends_table_name, "cuda_threads"):
                dataset_hosts.append(i["dataset_host"])
        except KeyError:
            return "N/A"
        return dataset_hosts

    @property
    def be_cuda_threads_hashrates(self):
        """
        Retrieves the CUDA backend threads hashrates from the backends data.

        Returns:
            list: CUDA backend threads hashrates, or "N/A" if not available.
        """
        hashrates = []
        try:
            for i in self._get_data_from_cache(self._backends_cache, [2, "threads"], self._backends_table_name, "cuda_threads"):
                hashrates.append(i["hashrate"])
        except KeyError:
            return "N/A"
        return hashrates

    @property
    def be_cuda_threads_hashrate_10s(self):
        """
        Retrieves the CUDA backend threads hashrate for the last 10 seconds from the backends data.

        Returns:
            list: CUDA backend threads hashrate for the last 10 seconds, or "N/A" if not available.
        """
        hashrates_10s = []
        try:
            for i in self._get_data_from_cache(self._backends_cache, [2, "threads"], self._backends_table_name, "cuda_threads"):
                hashrates_10s.append(i["hashrate"][0])
        except KeyError:
            return "N/A"
        return hashrates_10s

    @property
    def be_cuda_threads_hashrate_1m(self):
        """
        Retrieves the CUDA backend threads hashrate for the last 1 minute from the backends data.

        Returns:
            list: CUDA backend threads hashrate for the last 1 minute, or "N/A" if not available.
        """
        hashrates_1m = []
        try:
            for i in self._get_data_from_cache(self._backends_cache, [2, "threads"], self._backends_table_name, "cuda_threads"):
                hashrates_1m.append(i["hashrate"][1])
        except KeyError:
            return "N/A"
        return hashrates_1m

    @property
    def be_cuda_threads_hashrate_15m(self):
        """
        Retrieves the CUDA backend threads hashrate for the last 15 minutes from the backends data.

        Returns:
            list: CUDA backend threads hashrate for the last 15 minutes, or "N/A" if not available.
        """
        hashrates_15m = []
        try:
            for i in self._get_data_from_cache(self._backends_cache, [2, "threads"], self._backends_table_name, "cuda_threads"):
                hashrates_15m.append(i["hashrate"][2])
        except KeyError:
            return "N/A"
        return hashrates_15m

    @property
    def be_cuda_threads_name(self):
        """
        Retrieves the CUDA backend threads name from the backends data.

        Returns:
            list: CUDA backend threads name, or "N/A" if not available.
        """
        names = []
        try:
            for i in self._get_data_from_cache(self._backends_cache, [2, "threads"], self._backends_table_name, "cuda_threads"):
                names.append(i["name"])
        except KeyError:
            return "N/A"
        return names

    @property
    def be_cuda_threads_bus_id(self):
        """
        Retrieves the CUDA backend threads bus ID from the backends data.

        Returns:
            list: CUDA backend threads bus ID, or "N/A" if not available.
        """
        bus_ids = []
        try:
            for i in self._get_data_from_cache(self._backends_cache, [2, "threads"], self._backends_table_name, "cuda_threads"):
                bus_ids.append(i["bus_id"])
        except KeyError:
            return "N/A"
        return bus_ids

    @property
    def be_cuda_threads_smx(self):
        """
        Retrieves the CUDA backend threads SMX count from the backends data.

        Returns:
            list: CUDA backend threads SMX count, or "N/A" if not available.
        """
        smxs = []
        try:
            for i in self._get_data_from_cache(self._backends_cache, [2, "threads"], self._backends_table_name, "cuda_threads"):
                smxs.append(i["smx"])
        except KeyError:
            return "N/A"
        return smxs

    @property
    def be_cuda_threads_arch(self):
        """
        Retrieves the CUDA backend threads architecture from the backends data.

        Returns:
            list: CUDA backend threads architecture, or "N/A" if not available.
        """
        archs = []
        try:
            for i in self._get_data_from_cache(self._backends_cache, [2, "threads"], self._backends_table_name, "cuda_threads"):
                archs.append(i["arch"])
        except KeyError:
            return "N/A"
        return archs

    @property
    def be_cuda_threads_global_mem(self):
        """
        Retrieves the CUDA backend threads global memory from the backends data.

        Returns:
            list: CUDA backend threads global memory, or "N/A" if not available.
        """
        global_mems = []
        try:
            for i in self._get_data_from_cache(self._backends_cache, [2, "threads"], self._backends_table_name, "cuda_threads"):
                global_mems.append(i["global_mem"])
        except KeyError:
            return "N/A"
        return global_mems

    @property
    def be_cuda_threads_clock(self):
        """
        Retrieves the CUDA backend threads clock from the backends data.

        Returns:
            list: CUDA backend threads clock, or "N/A" if not available.
        """
        clocks = []
        try:
            for i in self._get_data_from_cache(self._backends_cache, [2, "threads"], self._backends_table_name, "cuda_threads"):
                clocks.append(i["clock"])
        except KeyError:
            return "N/A"
        return clocks

    @property
    def be_cuda_threads_memory_clock(self):
        """
        Retrieves the CUDA backend threads memory clock from the backends data.

        Returns:
            list: CUDA backend threads memory clock, or "N/A" if not available.
        """
        memory_clocks = []
        try:
            for i in self._get_data_from_cache(self._backends_cache, [2, "threads"], self._backends_table_name, "cuda_threads"):
                memory_clocks.append(i["memory_clock"])
        except KeyError:
            return "N/A"
        return memory_clocks

    #############################
    # Data from config endpoint #
    #############################

    @property
    def conf_api_property(self):
        """
        Retrieves the API property from the config data.

        Returns:
            dict: API property, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["api"], self._config_table_name, "api")

    @property
    def conf_api_id_property(self):
        """
        Retrieves the API ID property from the config data.

        Returns:
            str: API ID property, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["api", "id"], self._config_table_name, "api_id")

    @property
    def conf_api_worker_id_property(self):
        """
        Retrieves the API worker ID property from the config data.

        Returns:
            str: API worker ID property, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["api", "worker-id"], self._config_table_name, "api_worker_id")

    @property
    def conf_http_property(self):
        """
        Retrieves the HTTP property from the config data.

        Returns:
            dict: HTTP property, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["http"], self._config_table_name, "http")

    @property
    def conf_http_enabled_property(self):
        """
        Retrieves the HTTP enabled property from the config data.

        Returns:
            bool: HTTP enabled property, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["http", "enabled"], self._config_table_name, "http_enabled")

    @property
    def conf_http_host_property(self):
        """
        Retrieves the HTTP host property from the config data.

        Returns:
            str: HTTP host property, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["http", "host"], self._config_table_name, "http_host")

    @property
    def conf_http_port_property(self):
        """
        Retrieves the HTTP port property from the config data.

        Returns:
            int: HTTP port property, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["http", "port"], self._config_table_name, "http_port")

    @property
    def conf_http_access_token_property(self):
        """
        Retrieves the HTTP access token property from the config data.

        Returns:
            str: HTTP access token property, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["http", "access-token"], self._config_table_name, "http_access_token")

    @property
    def conf_http_restricted_property(self):
        """
        Retrieves the HTTP restricted property from the config data.

        Returns:
            bool: HTTP restricted property, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["http", "restricted"], self._config_table_name, "http_restricted")

    @property
    def conf_autosave_property(self):
        """
        Retrieves the autosave property from the config data.

        Returns:
            bool: Autosave property, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["autosave"], self._config_table_name, "autosave")

    @property
    def conf_background_property(self):
        """
        Retrieves the background property from the config data.

        Returns:
            bool: Background property, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["background"], self._config_table_name, "background")

    @property
    def conf_colors_property(self):
        """
        Retrieves the colors property from the config data.

        Returns:
            bool: Colors property, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["colors"], self._config_table_name, "colors")

    @property
    def conf_title_property(self):
        """
        Retrieves the title property from the config data.

        Returns:
            bool: Title property, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["title"], self._config_table_name, "title")

    @property
    def conf_randomx_property(self):
        """
        Retrieves the RandomX property from the config data.

        Returns:
            dict: RandomX property, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["randomx"], self._config_table_name, "randomx")

    @property
    def conf_randomx_init_property(self):
        """
        Retrieves the RandomX init property from the config data.

        Returns:
            int: RandomX init property, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["randomx", "init"], self._config_table_name, "randomx_init")

    @property
    def conf_randomx_init_avx2_property(self):
        """
        Retrieves the RandomX init AVX2 property from the config data.

        Returns:
            int: RandomX init AVX2 property, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["randomx", "init-avx2"], self._config_table_name, "randomx_init_avx2")

    @property
    def conf_randomx_mode_property(self):
        """
        Retrieves the RandomX mode property from the config data.

        Returns:
            str: RandomX mode property, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["randomx", "mode"], self._config_table_name, "randomx_mode")

    @property
    def conf_randomx_1gb_pages_property(self):
        """
        Retrieves the RandomX 1GB pages property from the config data.

        Returns:
            bool: RandomX 1GB pages property, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["randomx", "1gb-pages"], self._config_table_name, "randomx_1gb_pages")

    @property
    def conf_randomx_rdmsr_property(self):
        """
        Retrieves the RandomX RDMSR property from the config data.

        Returns:
            bool: RandomX RDMSR property, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["randomx", "rdmsr"], self._config_table_name, "randomx_rdmsr")

    @property
    def conf_randomx_wrmsr_property(self):
        """
        Retrieves the RandomX WRMSR property from the config data.

        Returns:
            bool: RandomX WRMSR property, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["randomx", "wrmsr"], self._config_table_name, "randomx_wrmsr")

    @property
    def conf_randomx_cache_qos_property(self):
        """
        Retrieves the RandomX cache QoS property from the config data.

        Returns:
            bool: RandomX cache QoS property, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["randomx", "cache_qos"], self._config_table_name, "randomx_cache_qos")

    @property
    def conf_randomx_numa_property(self):
        """
        Retrieves the RandomX NUMA property from the config data.

        Returns:
            bool: RandomX NUMA property, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["randomx", "numa"], self._config_table_name, "randomx_numa")

    @property
    def conf_randomx_scratchpad_prefetch_mode_property(self):
        """
        Retrieves the RandomX scratchpad prefetch mode property from the config data.

        Returns:
            int: RandomX scratchpad prefetch mode property, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["randomx", "scratchpad_prefetch_mode"], self._config_table_name, "randomx_scratchpad_prefetch_mode")

    @property
    def conf_cpu_property(self):
        """
        Retrieves the CPU property from the config data.

        Returns:
            dict: CPU property, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["cpu"], self._config_table_name, "cpu")

    @property
    def conf_cpu_enabled_property(self):
        """
        Retrieves the CPU enabled property from the config data.

        Returns:
            bool: CPU enabled property, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["cpu", "enabled"], self._config_table_name, "cpu_enabled")

    @property
    def conf_cpu_huge_pages_property(self):
        """
        Retrieves the CPU huge pages property from the config data.

        Returns:
            bool: CPU huge pages property, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["cpu", "huge-pages"], self._config_table_name, "cpu_huge_pages")

    @property
    def conf_cpu_huge_pages_jit_property(self):
        """
        Retrieves the CPU huge pages JIT property from the config data.

        Returns:
            bool: CPU huge pages JIT property, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["cpu", "huge-pages-jit"], self._config_table_name, "cpu_huge_pages_jit")

    @property
    def conf_cpu_hw_aes_property(self):
        """
        Retrieves the CPU hardware AES property from the config data.

        Returns:
            bool: CPU hardware AES property, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["cpu", "hw-aes"], self._config_table_name, "cpu_hw_aes")

    @property
    def conf_cpu_priority_property(self):
        """
        Retrieves the CPU priority property from the config data.

        Returns:
            int: CPU priority property, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["cpu", "priority"], self._config_table_name, "cpu_priority")

    @property
    def conf_cpu_memory_pool_property(self):
        """
        Retrieves the CPU memory pool property from the config data.

        Returns:
            bool: CPU memory pool property, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["cpu", "memory-pool"], self._config_table_name, "cpu_memory_pool")

    @property
    def conf_cpu_yield_property(self):
        """
        Retrieves the CPU yield property from the config data.

        Returns:
            bool: CPU yield property, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["cpu", "yield"], self._config_table_name, "cpu_yield")

    @property
    def conf_cpu_max_threads_hint_property(self):
        """
        Retrieves the CPU max threads hint property from the config data.

        Returns:
            int: CPU max threads hint property, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["cpu", "max-threads-hint"], self._config_table_name, "cpu_max_threads_hint")

    @property
    def conf_cpu_asm_property(self):
        """
        Retrieves the CPU ASM property from the config data.

        Returns:
            bool: CPU ASM property, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["cpu", "asm"], self._config_table_name, "cpu_asm")

    @property
    def conf_cpu_argon2_impl_property(self):
        """
        Retrieves the CPU Argon2 implementation property from the config data.

        Returns:
            str: CPU Argon2 implementation property, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["cpu", "argon2-impl"], self._config_table_name, "cpu_argon2_impl")

    @property
    def conf_opencl_property(self):
        """
        Retrieves the OpenCL property from the config data.

        Returns:
            dict: OpenCL property, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["opencl"], self._config_table_name, "opencl")

    @property
    def conf_opencl_enabled_property(self):
        """
        Retrieves the OpenCL enabled property from the config data.

        Returns:
            bool: OpenCL enabled property, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["opencl", "enabled"], self._config_table_name, "opencl_enabled")

    @property
    def conf_opencl_cache_property(self):
        """
        Retrieves the OpenCL cache property from the config data.

        Returns:
            bool: OpenCL cache property, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["opencl", "cache"], self._config_table_name, "opencl_cache")

    @property
    def conf_opencl_loader_property(self):
        """
        Retrieves the OpenCL loader property from the config data.

        Returns:
            str: OpenCL loader property, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["opencl", "loader"], self._config_table_name, "opencl_loader")

    @property
    def conf_opencl_platform_property(self):
        """
        Retrieves the OpenCL platform property from the config data.

        Returns:
            str: OpenCL platform property, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["opencl", "platform"], self._config_table_name, "opencl_platform")

    @property
    def conf_opencl_adl_property(self):
        """
        Retrieves the OpenCL ADL property from the config data.

        Returns:
            bool: OpenCL ADL property, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["opencl", "adl"], self._config_table_name, "opencl_adl")

    @property
    def conf_cuda_property(self):
        """
        Retrieves the CUDA from the config data.

        Returns:
            dict: CUDA, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["cuda"], self._config_table_name, "cuda")

    @property
    def conf_cuda_enabled_property(self):
        """
        Retrieves the CUDA enabled status from the config data.

        Returns:
            bool: CUDA enabled status, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["cuda", "enabled"], self._config_table_name, "cuda_enabled")

    @property
    def conf_cuda_loader_property(self):
        """
        Retrieves the CUDA loader from the config data.

        Returns:
            str: CUDA loader, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["cuda", "loader"], self._config_table_name, "cuda_loader")

    @property
    def conf_cuda_nvml_property(self):
        """
        Retrieves the CUDA NVML from the config data.

        Returns:
            bool: CUDA NVML, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["cuda", "nvml"], self._config_table_name, "cuda_nvml")

    @property
    def conf_log_file_property(self):
        """
        Retrieves the log file from the config data.

        Returns:
            str: Log file, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["log-file"], self._config_table_name, "log_file")

    @property
    def conf_donate_level_property(self):
        """
        Retrieves the donate level from the config data.

        Returns:
            int: Donate level, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["donate-level"], self._config_table_name, "donate_level")

    @property
    def conf_donate_over_proxy_property(self):
        """
        Retrieves the donate over proxy from the config data.

        Returns:
            int: Donate over proxy, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["donate-over-proxy"], self._config_table_name, "donate_over_proxy")

    @property
    def conf_pools_property(self):
        """
        Retrieves the pools from the config data.

        Returns:
            list: Pools, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["pools"], self._config_table_name, "pools")

    @property
    def conf_pools_algo_property(self):
        """
        Retrieves the pools algorithm from the config data.

        Returns:
            list: Pools algorithm, or "N/A" if not available.
        """
        algos = []
        try:
            for i in self._get_data_from_cache(self._config_cache, ["pools"], self._config_table_name, "pools"):
                algos.append(i["algo"])
        except KeyError:
            return "N/A"
        return algos

    @property
    def conf_pools_coin_property(self):
        """
        Retrieves the pools coin from the config data.

        Returns:
            list: Pools coin, or "N/A" if not available.
        """
        coins = []
        try:
            for i in self._get_data_from_cache(self._config_cache, ["pools"], self._config_table_name, "pools"):
                coins.append(i["coin"])
        except KeyError:
            return "N/A"
        return coins

    @property
    def conf_pools_url_property(self):
        """
        Retrieves the pools URL from the config data.

        Returns:
            list: Pools URL, or "N/A" if not available.
        """
        urls = []
        try:
            for i in self._get_data_from_cache(self._config_cache, ["pools"], self._config_table_name, "pools"):
                urls.append(i["url"])
        except KeyError:
            return "N/A"
        return urls

    @property
    def conf_pools_user_property(self):
        """
        Retrieves the pools user from the config data.

        Returns:
            list: Pools user, or "N/A" if not available.
        """
        users = []
        try:
            for i in self._get_data_from_cache(self._config_cache, ["pools"], self._config_table_name, "pools"):
                users.append(i["user"])
        except KeyError:
            return "N/A"
        return users

    @property
    def conf_pools_pass_property(self):
        """
        Retrieves the pools password from the config data.

        Returns:
            list: Pools password, or "N/A" if not available.
        """
        passwords = []
        try:
            for i in self._get_data_from_cache(self._config_cache, ["pools"], self._config_table_name, "pools"):
                passwords.append(i["pass"])
        except KeyError:
            return "N/A"
        return passwords

    @property
    def conf_pools_rig_id_property(self):
        """
        Retrieves the pools rig ID from the config data.

        Returns:
            list: Pools rig ID, or "N/A" if not available.
        """
        rig_ids = []
        try:
            for i in self._get_data_from_cache(self._config_cache, ["pools"], self._config_table_name, "pools"):
                rig_ids.append(i["rig-id"])
        except KeyError:
            return "N/A"
        return rig_ids

    @property
    def conf_pools_nicehash_property(self):
        """
        Retrieves the pools NiceHash status from the config data.

        Returns:
            list: Pools NiceHash status, or "N/A" if not available.
        """
        nicehash_statuses = []
        try:
            for i in self._get_data_from_cache(self._config_cache, ["pools"], self._config_table_name, "pools"):
                nicehash_statuses.append(i["nicehash"])
        except KeyError:
            return "N/A"
        return nicehash_statuses

    @property
    def conf_pools_keepalive_property(self):
        """
        Retrieves the pools keepalive status from the config data.

        Returns:
            list: Pools keepalive status, or "N/A" if not available.
        """
        keepalive_statuses = []
        try:
            for i in self._get_data_from_cache(self._config_cache, ["pools"], self._config_table_name, "pools"):
                keepalive_statuses.append(i["keepalive"])
        except KeyError:
            return "N/A"
        return keepalive_statuses

    @property
    def conf_pools_enabled_property(self):
        """
        Retrieves the pools enabled status from the config data.

        Returns:
            list: Pools enabled status, or "N/A" if not available.
        """
        enabled_statuses = []
        try:
            for i in self._get_data_from_cache(self._config_cache, ["pools"], self._config_table_name, "pools"):
                enabled_statuses.append(i["enabled"])
        except KeyError:
            return "N/A"
        return enabled_statuses

    @property
    def conf_pools_tls_property(self):
        """
        Retrieves the pools TLS status from the config data.

        Returns:
            list: Pools TLS status, or "N/A" if not available.
        """
        tls_statuses = []
        try:
            for i in self._get_data_from_cache(self._config_cache, ["pools"], self._config_table_name, "pools"):
                tls_statuses.append(i["tls"])
        except KeyError:
            return "N/A"
        return tls_statuses

    @property
    def conf_pools_sni_property(self):
        """
        Retrieves the pools SNI status from the config data.

        Returns:
            list: Pools SNI status, or "N/A" if not available.
        """
        sni_statuses = []
        try:
            for i in self._get_data_from_cache(self._config_cache, ["pools"], self._config_table_name, "pools"):
                sni_statuses.append(i["sni"])
        except KeyError:
            return "N/A"
        return sni_statuses

    @property
    def conf_pools_spend_secret_key_property(self):
        """
        Retrieves the pools spend secret key status from the config data.

        Returns:
            list: Pools spend secret key status, or "N/A" if not available.
        """
        spend_secret_key_statuses = []
        try:
            for i in self._get_data_from_cache(self._config_cache, ["pools"], self._config_table_name, "pools"):
                spend_secret_key_statuses.append(i["spend-secret-key"])
        except KeyError:
            return "N/A"
        return spend_secret_key_statuses

    @property
    def conf_pools_tls_fingerprint_property(self):
        """
        Retrieves the pools TLS fingerprint from the config data.

        Returns:
            list: Pools TLS fingerprint, or "N/A" if not available.
        """
        tls_fingerprints = []
        try:
            for i in self._get_data_from_cache(self._config_cache, ["pools"], self._config_table_name, "pools"):
                tls_fingerprints.append(i["tls-fingerprint"])
        except KeyError:
            return "N/A"
        return tls_fingerprints

    @property
    def conf_pools_daemon_property(self):
        """
        Retrieves the pools daemon status from the config data.

        Returns:
            list: Pools daemon status, or "N/A" if not available.
        """
        daemon_statuses = []
        try:
            for i in self._get_data_from_cache(self._config_cache, ["pools"], self._config_table_name, "pools"):
                daemon_statuses.append(i["daemon"])
        except KeyError:
            return "N/A"
        return daemon_statuses

    @property
    def conf_pools_daemon_poll_interval_property(self):
        """
        Retrieves the pools daemon poll interval from the config data.

        Returns:
            list: Pools daemon poll interval, or "N/A" if not available.
        """
        daemon_poll_intervals = []
        try:
            for i in self._get_data_from_cache(self._config_cache, ["pools"], self._config_table_name, "pools"):
                daemon_poll_intervals.append(i["daemon-poll-interval"])
        except KeyError:
            return "N/A"
        return daemon_poll_intervals

    @property
    def conf_pools_daemon_job_timeout_property(self):
        """
        Retrieves the pools daemon job timeout from the config data.

        Returns:
            list: Pools daemon job timeout, or "N/A" if not available.
        """
        daemon_job_timeouts = []
        try:
            for i in self._get_data_from_cache(self._config_cache, ["pools"], self._config_table_name, "pools"):
                daemon_job_timeouts.append(i["daemon-job-timeout"])
        except KeyError:
            return "N/A"
        return daemon_job_timeouts

    @property
    def conf_pools_daemon_zmq_port_property(self):
        """
        Retrieves the pools daemon ZMQ port from the config data.

        Returns:
            list: Pools daemon ZMQ port, or "N/A" if not available.
        """
        daemon_zmq_ports = []
        try:
            for i in self._get_data_from_cache(self._config_cache, ["pools"], self._config_table_name, "pools"):
                daemon_zmq_ports.append(i["daemon-zmq-port"])
        except KeyError:
            return "N/A"
        return daemon_zmq_ports

    @property
    def conf_pools_socks5_property(self):
        """
        Retrieves the pools SOCKS5 from the config data.

        Returns:
            list: Pools SOCKS5, or "N/A" if not available.
        """
        socks5_values = []
        try:
            for i in self._get_data_from_cache(self._config_cache, ["pools"], self._config_table_name, "pools"):
                socks5_values.append(i["socks5"])
        except KeyError:
            return "N/A"
        return socks5_values

    @property
    def conf_pools_self_select_property(self):
        """
        Retrieves the pools self-select from the config data.

        Returns:
            list: Pools self-select, or "N/A" if not available.
        """
        self_selects = []
        try:
            for i in self._get_data_from_cache(self._config_cache, ["pools"], self._config_table_name, "pools"):
                self_selects.append(i["self-select"])
        except KeyError:
            return "N/A"
        return self_selects

    @property
    def conf_pools_submit_to_origin_property(self):
        """
        Retrieves the pools submit to origin status from the config data.

        Returns:
            list: Pools submit to origin status, or "N/A" if not available.
        """
        submit_to_origins = []
        try:
            for i in self._get_data_from_cache(self._config_cache, ["pools"], self._config_table_name, "pools"):
                submit_to_origins.append(i["submit-to-origin"])
        except KeyError:
            return "N/A"
        return submit_to_origins

    @property
    def conf_retries_property(self):
        """
        Retrieves the retries from the config data.

        Returns:
            int: Retries, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["retries"], self._config_table_name, "retries")

    @property
    def conf_retry_pause_property(self):
        """
        Retrieves the retry pause from the config data.

        Returns:
            int: Retry pause, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["retry-pause"], self._config_table_name, "retry_pause")

    @property
    def conf_print_time_property(self):
        """
        Retrieves the print time from the config data.

        Returns:
            int: Print time, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["print-time"], self._config_table_name, "print_time")

    @property
    def conf_health_print_time_property(self):
        """
        Retrieves the health print time from the config data.

        Returns:
            int: Health print time, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["health-print-time"], self._config_table_name, "health_print_time")

    @property
    def conf_dmi_property(self):
        """
        Retrieves the DMI status from the config data.

        Returns:
            bool: DMI status, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["dmi"], self._config_table_name, "dmi")

    @property
    def conf_syslog_property(self):
        """
        Retrieves the syslog status from the config data.

        Returns:
            bool: Syslog status, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["syslog"], self._config_table_name, "syslog")

    @property
    def conf_tls_property(self):
        """
        Retrieves the TLS property from the config data.

        Returns:
            dict: TLS property, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["tls"], self._config_table_name, "tls")

    @property
    def conf_tls_enabled_property(self):
        """
        Retrieves the TLS enabled status from the config data.

        Returns:
            bool: TLS enabled status, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["tls", "enabled"], self._config_table_name, "tls_enabled")

    @property
    def conf_tls_protocols_property(self):
        """
        Retrieves the TLS protocols from the config data.

        Returns:
            str: TLS protocols, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["tls", "protocols"], self._config_table_name, "tls_protocols")

    @property
    def conf_tls_cert_property(self):
        """
        Retrieves the TLS certificate from the config data.

        Returns:
            str: TLS certificate, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["tls", "cert"], self._config_table_name, "tls_cert")

    @property
    def conf_tls_cert_key_property(self):
        """
        Retrieves the TLS certificate key from the config data.

        Returns:
            str: TLS certificate key, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["tls", "cert_key"], self._config_table_name, "tls_cert_key")

    @property
    def conf_tls_ciphers_property(self):
        """
        Retrieves the TLS ciphers from the config data.

        Returns:
            str: TLS ciphers, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["tls", "ciphers"], self._config_table_name, "tls_ciphers")

    @property
    def conf_tls_ciphersuites_property(self):
        """
        Retrieves the TLS ciphersuites from the config data.

        Returns:
            str: TLS ciphersuites, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["tls", "ciphersuites"], self._config_table_name, "tls_ciphersuites")

    @property
    def conf_tls_dhparam_property(self):
        """
        Retrieves the TLS DH parameter from the config data.

        Returns:
            str: TLS DH parameter, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["tls", "dhparam"], self._config_table_name, "tls_dhparam")

    @property
    def conf_dns_property(self):
        """
        Retrieves the DNS property from the config data.

        Returns:
            dict: DNS property, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["dns"], self._config_table_name, "dns")

    @property
    def conf_dns_ipv6_property(self):
        """
        Retrieves the DNS IPv6 status from the config data.

        Returns:
            bool: DNS IPv6 status, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["dns", "ipv6"], self._config_table_name, "dns_ipv6")

    @property
    def conf_dns_ttl_property(self):
        """
        Retrieves the DNS TTL from the config data.

        Returns:
            int: DNS TTL, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["dns", "ttl"], self._config_table_name, "dns_ttl")

    @property
    def conf_user_agent_property(self):
        """
        Retrieves the user agent from the config data.

        Returns:
            str: User agent, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["user-agent"], self._config_table_name, "user_agent")

    @property
    def conf_verbose_property(self):
        """
        Retrieves the verbose level from the config data.

        Returns:
            int: Verbose level, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["verbose"], self._config_table_name, "verbose")

    @property
    def conf_watch_property(self):
        """
        Retrieves the watch status from the config data.

        Returns:
            bool: Watch status, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["watch"], self._config_table_name, "watch")

    @property
    def conf_rebench_algo_property(self):
        """
        Retrieves the rebench algorithm status from the config data.

        Returns:
            bool: Rebench algorithm status, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["rebench-algo"], self._config_table_name, "rebench_algo")

    @property
    def conf_bench_algo_time_property(self):
        """
        Retrieves the bench algorithm time from the config data.

        Returns:
            int: Bench algorithm time, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["bench-algo-time"], self._config_table_name, "bench_algo_time")

    @property
    def conf_pause_on_battery_property(self):
        """
        Retrieves the pause on battery status from the config data.

        Returns:
            bool: Pause on battery status, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["pause-on-battery"], self._config_table_name, "pause_on_battery")

    @property
    def conf_pause_on_active_property(self):
        """
        Retrieves the pause on active status from the config data.

        Returns:
            bool: Pause on active status, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["pause-on-active"], self._config_table_name, "pause_on_active")

    @property
    def conf_benchmark_property(self):
        """
        Retrieves the benchmark property from the config data.

        Returns:
            dict: Benchmark property, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["benchmark"], self._config_table_name, "benchmark")

    @property
    def conf_benchmark_size_property(self):
        """
        Retrieves the benchmark size from the config data.

        Returns:
            str: Benchmark size, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["benchmark", "size"], self._config_table_name, "benchmark_size")

    @property
    def conf_benchmark_algo_property(self):
        """
        Retrieves the benchmark algorithm from the config data.

        Returns:
            str: Benchmark algorithm, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["benchmark", "algo"], self._config_table_name, "benchmark_algo")

    @property
    def conf_benchmark_submit_property(self):
        """
        Retrieves the benchmark submit status from the config data.

        Returns:
            bool: Benchmark submit status, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["benchmark", "submit"], self._config_table_name, "benchmark_submit")

    @property
    def conf_benchmark_verify_property(self):
        """
        Retrieves the benchmark verify status from the config data.

        Returns:
            str: Benchmark verify status, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["benchmark", "verify"], self._config_table_name, "benchmark_verify")

    @property
    def conf_benchmark_seed_property(self):
        """
        Retrieves the benchmark seed from the config data.

        Returns:
            str: Benchmark seed, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["benchmark", "seed"], self._config_table_name, "benchmark_seed")

    @property
    def conf_benchmark_hash_property(self):
        """
        Retrieves the benchmark hash from the config data.

        Returns:
            str: Benchmark hash, or "N/A" if not available.
        """
        return self._get_data_from_cache(self._config_cache, ["benchmark", "hash"], self._config_table_name, "benchmark_hash")

backends property

Retrieves the entire cached backends endpoint data.

Returns:

Name Type Description
list

Current backends response, or "N/A" if not available.

be_cpu_algo property

Retrieves the CPU backend algorithm from the backends data.

Returns:

Name Type Description
str

CPU backend algorithm, or "N/A" if not available.

be_cpu_argon2_impl property

Retrieves the CPU backend Argon2 implementation from the backends data.

Returns:

Name Type Description
str

CPU backend Argon2 implementation, or "N/A" if not available.

be_cpu_asm property

Retrieves the CPU backend assembly information from the backends data.

Returns:

Name Type Description
str

CPU backend assembly information, or "N/A" if not available.

be_cpu_enabled property

Retrieves the CPU backend enabled status from the backends data.

Returns:

Name Type Description
bool

CPU backend enabled status, or "N/A" if not available.

be_cpu_hashrate_10s property

Retrieves the CPU backend hashrate for the last 10 seconds from the backends data.

Returns:

Name Type Description
float

CPU backend hashrate for the last 10 seconds, or "N/A" if not available.

be_cpu_hashrate_15m property

Retrieves the CPU backend hashrate for the last 15 minutes from the backends data.

Returns:

Name Type Description
float

CPU backend hashrate for the last 15 minutes, or "N/A" if not available.

be_cpu_hashrate_1m property

Retrieves the CPU backend hashrate for the last 1 minute from the backends data.

Returns:

Name Type Description
float

CPU backend hashrate for the last 1 minute, or "N/A" if not available.

be_cpu_hashrates property

Retrieves the CPU backend hashrates from the backends data.

Returns:

Name Type Description
list

CPU backend hashrates, or "N/A" if not available.

be_cpu_hugepages property

Retrieves the CPU backend hugepages information from the backends data.

Returns:

Name Type Description
list

CPU backend hugepages information, or "N/A" if not available.

be_cpu_hw_aes property

Retrieves the CPU backend hardware AES support status from the backends data.

Returns:

Name Type Description
bool

CPU backend hardware AES support status, or "N/A" if not available.

be_cpu_memory property

Retrieves the CPU backend memory information from the backends data.

Returns:

Name Type Description
int

CPU backend memory information, or "N/A" if not available.

be_cpu_msr property

Retrieves the CPU backend MSR support status from the backends data.

Returns:

Name Type Description
bool

CPU backend MSR support status, or "N/A" if not available.

be_cpu_priority property

Retrieves the CPU backend priority from the backends data.

Returns:

Name Type Description
int

CPU backend priority, or "N/A" if not available.

be_cpu_profile property

Retrieves the CPU backend profile from the backends data.

Returns:

Name Type Description
str

CPU backend profile, or "N/A" if not available.

be_cpu_threads property

Retrieves the CPU backend threads information from the backends data.

Returns:

Name Type Description
list

CPU backend threads information, or "N/A" if not available.

be_cpu_threads_affinity property

Retrieves the CPU backend threads affinity information from the backends data.

Returns:

Name Type Description
list

CPU backend threads affinity information, or "N/A" if not available.

be_cpu_threads_av property

Retrieves the CPU backend threads AV information from the backends data.

Returns:

Name Type Description
list

CPU backend threads AV information, or "N/A" if not available.

be_cpu_threads_hashrates property

Retrieves the CPU backend threads hashrates information from the backends data.

Returns:

Name Type Description
list

CPU backend threads hashrates information, or "N/A" if not available.

be_cpu_threads_hashrates_10s property

Retrieves the CPU backend threads hashrates for the last 10 seconds from the backends data.

Returns:

Name Type Description
list

CPU backend threads hashrates for the last 10 seconds, or "N/A" if not available.

be_cpu_threads_hashrates_15m property

Retrieves the CPU backend threads hashrates for the last 15 minutes from the backends data.

Returns:

Name Type Description
list

CPU backend threads hashrates for the last 15 minutes, or "N/A" if not available.

be_cpu_threads_hashrates_1m property

Retrieves the CPU backend threads hashrates for the last 1 minute from the backends data.

Returns:

Name Type Description
list

CPU backend threads hashrates for the last 1 minute, or "N/A" if not available.

be_cpu_threads_intensity property

Retrieves the CPU backend threads intensity information from the backends data.

Returns:

Name Type Description
list

CPU backend threads intensity information, or "N/A" if not available.

be_cpu_type property

Retrieves the CPU backend type from the backends data.

Returns:

Name Type Description
str

CPU backend type, or "N/A" if not available.

be_cuda_algo property

Retrieves the CUDA backend algorithm from the backends data.

Returns:

Name Type Description
str

CUDA backend algorithm, or "N/A" if not available.

be_cuda_driver property

Retrieves the CUDA backend driver version from the backends data.

Returns:

Name Type Description
str

CUDA backend driver version, or "N/A" if not available.

be_cuda_enabled property

Retrieves the CUDA backend enabled status from the backends data.

Returns:

Name Type Description
bool

CUDA backend enabled status, or "N/A" if not available.

be_cuda_hashrate_10s property

Retrieves the CUDA backend hashrate for the last 10 seconds from the backends data.

Returns:

Name Type Description
float

CUDA backend hashrate for the last 10 seconds, or "N/A" if not available.

be_cuda_hashrate_15m property

Retrieves the CUDA backend hashrate for the last 15 minutes from the backends data.

Returns:

Name Type Description
float

CUDA backend hashrate for the last 15 minutes, or "N/A" if not available.

be_cuda_hashrate_1m property

Retrieves the CUDA backend hashrate for the last 1 minute from the backends data.

Returns:

Name Type Description
float

CUDA backend hashrate for the last 1 minute, or "N/A" if not available.

be_cuda_hashrates property

Retrieves the CUDA backend hashrates from the backends data.

Returns:

Name Type Description
list

CUDA backend hashrates, or "N/A" if not available.

be_cuda_plugin property

Retrieves the CUDA backend plugin version from the backends data.

Returns:

Name Type Description
str

CUDA backend plugin version, or "N/A" if not available.

be_cuda_profile property

Retrieves the CUDA backend profile from the backends data.

Returns:

Name Type Description
str

CUDA backend profile, or "N/A" if not available.

be_cuda_runtime property

Retrieves the CUDA backend runtime version from the backends data.

Returns:

Name Type Description
str

CUDA backend runtime version, or "N/A" if not available.

be_cuda_threads property

Retrieves the CUDA backend threads information from the backends data.

Returns:

Name Type Description
list

CUDA backend threads information, or "N/A" if not available.

be_cuda_threads_affinity property

Retrieves the CUDA backend threads affinity from the backends data.

Returns:

Name Type Description
list

CUDA backend threads affinity, or "N/A" if not available.

be_cuda_threads_arch property

Retrieves the CUDA backend threads architecture from the backends data.

Returns:

Name Type Description
list

CUDA backend threads architecture, or "N/A" if not available.

be_cuda_threads_bfactor property

Retrieves the CUDA backend threads bfactor from the backends data.

Returns:

Name Type Description
list

CUDA backend threads bfactor, or "N/A" if not available.

be_cuda_threads_blocks property

Retrieves the CUDA backend threads blocks from the backends data.

Returns:

Name Type Description
list

CUDA backend threads blocks, or "N/A" if not available.

be_cuda_threads_bsleep property

Retrieves the CUDA backend threads bsleep from the backends data.

Returns:

Name Type Description
list

CUDA backend threads bsleep, or "N/A" if not available.

be_cuda_threads_bus_id property

Retrieves the CUDA backend threads bus ID from the backends data.

Returns:

Name Type Description
list

CUDA backend threads bus ID, or "N/A" if not available.

be_cuda_threads_clock property

Retrieves the CUDA backend threads clock from the backends data.

Returns:

Name Type Description
list

CUDA backend threads clock, or "N/A" if not available.

be_cuda_threads_dataset_host property

Retrieves the CUDA backend threads dataset host status from the backends data.

Returns:

Name Type Description
list

CUDA backend threads dataset host status, or "N/A" if not available.

be_cuda_threads_global_mem property

Retrieves the CUDA backend threads global memory from the backends data.

Returns:

Name Type Description
list

CUDA backend threads global memory, or "N/A" if not available.

be_cuda_threads_hashrate_10s property

Retrieves the CUDA backend threads hashrate for the last 10 seconds from the backends data.

Returns:

Name Type Description
list

CUDA backend threads hashrate for the last 10 seconds, or "N/A" if not available.

be_cuda_threads_hashrate_15m property

Retrieves the CUDA backend threads hashrate for the last 15 minutes from the backends data.

Returns:

Name Type Description
list

CUDA backend threads hashrate for the last 15 minutes, or "N/A" if not available.

be_cuda_threads_hashrate_1m property

Retrieves the CUDA backend threads hashrate for the last 1 minute from the backends data.

Returns:

Name Type Description
list

CUDA backend threads hashrate for the last 1 minute, or "N/A" if not available.

be_cuda_threads_hashrates property

Retrieves the CUDA backend threads hashrates from the backends data.

Returns:

Name Type Description
list

CUDA backend threads hashrates, or "N/A" if not available.

be_cuda_threads_index property

Retrieves the CUDA backend threads index from the backends data.

Returns:

Name Type Description
list

CUDA backend threads index, or "N/A" if not available.

be_cuda_threads_memory_clock property

Retrieves the CUDA backend threads memory clock from the backends data.

Returns:

Name Type Description
list

CUDA backend threads memory clock, or "N/A" if not available.

be_cuda_threads_name property

Retrieves the CUDA backend threads name from the backends data.

Returns:

Name Type Description
list

CUDA backend threads name, or "N/A" if not available.

be_cuda_threads_smx property

Retrieves the CUDA backend threads SMX count from the backends data.

Returns:

Name Type Description
list

CUDA backend threads SMX count, or "N/A" if not available.

be_cuda_type property

Retrieves the CUDA backend type from the backends data.

Returns:

Name Type Description
str

CUDA backend type, or "N/A" if not available.

be_cuda_versions property

Retrieves the CUDA backend versions information from the backends data.

Returns:

Name Type Description
dict

CUDA backend versions information, or "N/A" if not available.

be_opencl_algo property

Retrieves the OpenCL backend algorithm from the backends data.

Returns:

Name Type Description
str

OpenCL backend algorithm, or "N/A" if not available.

be_opencl_enabled property

Retrieves the OpenCL backend enabled status from the backends data.

Returns:

Name Type Description
bool

OpenCL backend enabled status, or "N/A" if not available.

be_opencl_hashrate_10s property

Retrieves the OpenCL backend hashrate for the last 10 seconds from the backends data.

Returns:

Name Type Description
float

OpenCL backend hashrate for the last 10 seconds, or "N/A" if not available.

be_opencl_hashrate_15m property

Retrieves the OpenCL backend hashrate for the last 15 minutes from the backends data.

Returns:

Name Type Description
float

OpenCL backend hashrate for the last 15 minutes, or "N/A" if not available.

be_opencl_hashrate_1m property

Retrieves the OpenCL backend hashrate for the last 1 minute from the backends data.

Returns:

Name Type Description
float

OpenCL backend hashrate for the last 1 minute, or "N/A" if not available.

be_opencl_hashrates property

Retrieves the OpenCL backend hashrates from the backends data.

Returns:

Name Type Description
list

OpenCL backend hashrates, or "N/A" if not available.

be_opencl_platform property

Retrieves the OpenCL backend platform information from the backends data.

Returns:

Name Type Description
dict

OpenCL backend platform information, or "N/A" if not available.

be_opencl_platform_extensions property

Retrieves the OpenCL backend platform extensions from the backends data.

Returns:

Name Type Description
str

OpenCL backend platform extensions, or "N/A" if not available.

be_opencl_platform_index property

Retrieves the OpenCL backend platform index from the backends data.

Returns:

Name Type Description
int

OpenCL backend platform index, or "N/A" if not available.

be_opencl_platform_name property

Retrieves the OpenCL backend platform name from the backends data.

Returns:

Name Type Description
str

OpenCL backend platform name, or "N/A" if not available.

be_opencl_platform_profile property

Retrieves the OpenCL backend platform profile from the backends data.

Returns:

Name Type Description
str

OpenCL backend platform profile, or "N/A" if not available.

be_opencl_platform_vendor property

Retrieves the OpenCL backend platform vendor from the backends data.

Returns:

Name Type Description
str

OpenCL backend platform vendor, or "N/A" if not available.

be_opencl_platform_version property

Retrieves the OpenCL backend platform version from the backends data.

Returns:

Name Type Description
str

OpenCL backend platform version, or "N/A" if not available.

be_opencl_profile property

Retrieves the OpenCL backend profile from the backends data.

Returns:

Name Type Description
str

OpenCL backend profile, or "N/A" if not available.

be_opencl_threads property

Retrieves the OpenCL backend threads information from the backends data.

Returns:

Name Type Description
list

OpenCL backend threads information, or "N/A" if not available.

be_opencl_threads_affinity property

Retrieves the OpenCL backend threads affinity from the backends data.

Returns:

Name Type Description
list

OpenCL backend threads affinity, or "N/A" if not available.

be_opencl_threads_board property

Retrieves the OpenCL backend threads board information from the backends data.

Returns:

Name Type Description
list

OpenCL backend threads board information, or "N/A" if not available.

be_opencl_threads_bus_id property

Retrieves the OpenCL backend threads bus ID from the backends data.

Returns:

Name Type Description
list

OpenCL backend threads bus ID, or "N/A" if not available.

be_opencl_threads_cu property

Retrieves the OpenCL backend threads compute units from the backends data.

Returns:

Name Type Description
list

OpenCL backend threads compute units, or "N/A" if not available.

be_opencl_threads_global_mem property

Retrieves the OpenCL backend threads global memory from the backends data.

Returns:

Name Type Description
list

OpenCL backend threads global memory, or "N/A" if not available.

be_opencl_threads_hashrate_10s property

Retrieves the OpenCL backend threads hashrate for the last 10 seconds from the backends data.

Returns:

Name Type Description
list

OpenCL backend threads hashrate for the last 10 seconds, or "N/A" if not available.

be_opencl_threads_hashrate_15m property

Retrieves the OpenCL backend threads hashrate for the last 15 minutes from the backends data.

Returns:

Name Type Description
list

OpenCL backend threads hashrate for the last 15 minutes, or "N/A" if not available.

be_opencl_threads_hashrate_1m property

Retrieves the OpenCL backend threads hashrate for the last 1 minute from the backends data.

Returns:

Name Type Description
list

OpenCL backend threads hashrate for the last 1 minute, or "N/A" if not available.

be_opencl_threads_hashrates property

Retrieves the OpenCL backend threads hashrates from the backends data.

Returns:

Name Type Description
list

OpenCL backend threads hashrates, or "N/A" if not available.

be_opencl_threads_health property

Retrieves the OpenCL backend threads health information from the backends data.

Returns:

Name Type Description
list

OpenCL backend threads health information, or "N/A" if not available.

be_opencl_threads_health_clock property

Retrieves the OpenCL backend threads health clock from the backends data.

Returns:

Name Type Description
list

OpenCL backend threads health clock, or "N/A" if not available.

be_opencl_threads_health_mem_clock property

Retrieves the OpenCL backend threads health memory clock from the backends data.

Returns:

Name Type Description
list

OpenCL backend threads health memory clock, or "N/A" if not available.

be_opencl_threads_health_power property

Retrieves the OpenCL backend threads health power from the backends data.

Returns:

Name Type Description
list

OpenCL backend threads health power, or "N/A" if not available.

be_opencl_threads_health_rpm property

Retrieves the OpenCL backend threads health RPM from the backends data.

Returns:

Name Type Description
list

OpenCL backend threads health RPM, or "N/A" if not available.

be_opencl_threads_health_temp property

Retrieves the OpenCL backend threads health temperature from the backends data.

Returns:

Name Type Description
list

OpenCL backend threads health temperature, or "N/A" if not available.

be_opencl_threads_index property

Retrieves the OpenCL backend threads index from the backends data.

Returns:

Name Type Description
list

OpenCL backend threads index, or "N/A" if not available.

be_opencl_threads_intensity property

Retrieves the OpenCL backend threads intensity from the backends data.

Returns:

Name Type Description
list

OpenCL backend threads intensity, or "N/A" if not available.

be_opencl_threads_name property

Retrieves the OpenCL backend threads name from the backends data.

Returns:

Name Type Description
list

OpenCL backend threads name, or "N/A" if not available.

be_opencl_threads_unroll property

Retrieves the OpenCL backend threads unroll from the backends data.

Returns:

Name Type Description
list

OpenCL backend threads unroll, or "N/A" if not available.

be_opencl_threads_worksize property

Retrieves the OpenCL backend threads worksize from the backends data.

Returns:

Name Type Description
list

OpenCL backend threads worksize, or "N/A" if not available.

be_opencl_type property

Retrieves the OpenCL backend type from the backends data.

Returns:

Name Type Description
str

OpenCL backend type, or "N/A" if not available.

conf_api_id_property property

Retrieves the API ID property from the config data.

Returns:

Name Type Description
str

API ID property, or "N/A" if not available.

conf_api_property property

Retrieves the API property from the config data.

Returns:

Name Type Description
dict

API property, or "N/A" if not available.

conf_api_worker_id_property property

Retrieves the API worker ID property from the config data.

Returns:

Name Type Description
str

API worker ID property, or "N/A" if not available.

conf_autosave_property property

Retrieves the autosave property from the config data.

Returns:

Name Type Description
bool

Autosave property, or "N/A" if not available.

conf_background_property property

Retrieves the background property from the config data.

Returns:

Name Type Description
bool

Background property, or "N/A" if not available.

conf_bench_algo_time_property property

Retrieves the bench algorithm time from the config data.

Returns:

Name Type Description
int

Bench algorithm time, or "N/A" if not available.

conf_benchmark_algo_property property

Retrieves the benchmark algorithm from the config data.

Returns:

Name Type Description
str

Benchmark algorithm, or "N/A" if not available.

conf_benchmark_hash_property property

Retrieves the benchmark hash from the config data.

Returns:

Name Type Description
str

Benchmark hash, or "N/A" if not available.

conf_benchmark_property property

Retrieves the benchmark property from the config data.

Returns:

Name Type Description
dict

Benchmark property, or "N/A" if not available.

conf_benchmark_seed_property property

Retrieves the benchmark seed from the config data.

Returns:

Name Type Description
str

Benchmark seed, or "N/A" if not available.

conf_benchmark_size_property property

Retrieves the benchmark size from the config data.

Returns:

Name Type Description
str

Benchmark size, or "N/A" if not available.

conf_benchmark_submit_property property

Retrieves the benchmark submit status from the config data.

Returns:

Name Type Description
bool

Benchmark submit status, or "N/A" if not available.

conf_benchmark_verify_property property

Retrieves the benchmark verify status from the config data.

Returns:

Name Type Description
str

Benchmark verify status, or "N/A" if not available.

conf_colors_property property

Retrieves the colors property from the config data.

Returns:

Name Type Description
bool

Colors property, or "N/A" if not available.

conf_cpu_argon2_impl_property property

Retrieves the CPU Argon2 implementation property from the config data.

Returns:

Name Type Description
str

CPU Argon2 implementation property, or "N/A" if not available.

conf_cpu_asm_property property

Retrieves the CPU ASM property from the config data.

Returns:

Name Type Description
bool

CPU ASM property, or "N/A" if not available.

conf_cpu_enabled_property property

Retrieves the CPU enabled property from the config data.

Returns:

Name Type Description
bool

CPU enabled property, or "N/A" if not available.

conf_cpu_huge_pages_jit_property property

Retrieves the CPU huge pages JIT property from the config data.

Returns:

Name Type Description
bool

CPU huge pages JIT property, or "N/A" if not available.

conf_cpu_huge_pages_property property

Retrieves the CPU huge pages property from the config data.

Returns:

Name Type Description
bool

CPU huge pages property, or "N/A" if not available.

conf_cpu_hw_aes_property property

Retrieves the CPU hardware AES property from the config data.

Returns:

Name Type Description
bool

CPU hardware AES property, or "N/A" if not available.

conf_cpu_max_threads_hint_property property

Retrieves the CPU max threads hint property from the config data.

Returns:

Name Type Description
int

CPU max threads hint property, or "N/A" if not available.

conf_cpu_memory_pool_property property

Retrieves the CPU memory pool property from the config data.

Returns:

Name Type Description
bool

CPU memory pool property, or "N/A" if not available.

conf_cpu_priority_property property

Retrieves the CPU priority property from the config data.

Returns:

Name Type Description
int

CPU priority property, or "N/A" if not available.

conf_cpu_property property

Retrieves the CPU property from the config data.

Returns:

Name Type Description
dict

CPU property, or "N/A" if not available.

conf_cpu_yield_property property

Retrieves the CPU yield property from the config data.

Returns:

Name Type Description
bool

CPU yield property, or "N/A" if not available.

conf_cuda_enabled_property property

Retrieves the CUDA enabled status from the config data.

Returns:

Name Type Description
bool

CUDA enabled status, or "N/A" if not available.

conf_cuda_loader_property property

Retrieves the CUDA loader from the config data.

Returns:

Name Type Description
str

CUDA loader, or "N/A" if not available.

conf_cuda_nvml_property property

Retrieves the CUDA NVML from the config data.

Returns:

Name Type Description
bool

CUDA NVML, or "N/A" if not available.

conf_cuda_property property

Retrieves the CUDA from the config data.

Returns:

Name Type Description
dict

CUDA, or "N/A" if not available.

conf_dmi_property property

Retrieves the DMI status from the config data.

Returns:

Name Type Description
bool

DMI status, or "N/A" if not available.

conf_dns_ipv6_property property

Retrieves the DNS IPv6 status from the config data.

Returns:

Name Type Description
bool

DNS IPv6 status, or "N/A" if not available.

conf_dns_property property

Retrieves the DNS property from the config data.

Returns:

Name Type Description
dict

DNS property, or "N/A" if not available.

conf_dns_ttl_property property

Retrieves the DNS TTL from the config data.

Returns:

Name Type Description
int

DNS TTL, or "N/A" if not available.

conf_donate_level_property property

Retrieves the donate level from the config data.

Returns:

Name Type Description
int

Donate level, or "N/A" if not available.

conf_donate_over_proxy_property property

Retrieves the donate over proxy from the config data.

Returns:

Name Type Description
int

Donate over proxy, or "N/A" if not available.

conf_health_print_time_property property

Retrieves the health print time from the config data.

Returns:

Name Type Description
int

Health print time, or "N/A" if not available.

conf_http_access_token_property property

Retrieves the HTTP access token property from the config data.

Returns:

Name Type Description
str

HTTP access token property, or "N/A" if not available.

conf_http_enabled_property property

Retrieves the HTTP enabled property from the config data.

Returns:

Name Type Description
bool

HTTP enabled property, or "N/A" if not available.

conf_http_host_property property

Retrieves the HTTP host property from the config data.

Returns:

Name Type Description
str

HTTP host property, or "N/A" if not available.

conf_http_port_property property

Retrieves the HTTP port property from the config data.

Returns:

Name Type Description
int

HTTP port property, or "N/A" if not available.

conf_http_property property

Retrieves the HTTP property from the config data.

Returns:

Name Type Description
dict

HTTP property, or "N/A" if not available.

conf_http_restricted_property property

Retrieves the HTTP restricted property from the config data.

Returns:

Name Type Description
bool

HTTP restricted property, or "N/A" if not available.

conf_log_file_property property

Retrieves the log file from the config data.

Returns:

Name Type Description
str

Log file, or "N/A" if not available.

conf_opencl_adl_property property

Retrieves the OpenCL ADL property from the config data.

Returns:

Name Type Description
bool

OpenCL ADL property, or "N/A" if not available.

conf_opencl_cache_property property

Retrieves the OpenCL cache property from the config data.

Returns:

Name Type Description
bool

OpenCL cache property, or "N/A" if not available.

conf_opencl_enabled_property property

Retrieves the OpenCL enabled property from the config data.

Returns:

Name Type Description
bool

OpenCL enabled property, or "N/A" if not available.

conf_opencl_loader_property property

Retrieves the OpenCL loader property from the config data.

Returns:

Name Type Description
str

OpenCL loader property, or "N/A" if not available.

conf_opencl_platform_property property

Retrieves the OpenCL platform property from the config data.

Returns:

Name Type Description
str

OpenCL platform property, or "N/A" if not available.

conf_opencl_property property

Retrieves the OpenCL property from the config data.

Returns:

Name Type Description
dict

OpenCL property, or "N/A" if not available.

conf_pause_on_active_property property

Retrieves the pause on active status from the config data.

Returns:

Name Type Description
bool

Pause on active status, or "N/A" if not available.

conf_pause_on_battery_property property

Retrieves the pause on battery status from the config data.

Returns:

Name Type Description
bool

Pause on battery status, or "N/A" if not available.

conf_pools_algo_property property

Retrieves the pools algorithm from the config data.

Returns:

Name Type Description
list

Pools algorithm, or "N/A" if not available.

conf_pools_coin_property property

Retrieves the pools coin from the config data.

Returns:

Name Type Description
list

Pools coin, or "N/A" if not available.

conf_pools_daemon_job_timeout_property property

Retrieves the pools daemon job timeout from the config data.

Returns:

Name Type Description
list

Pools daemon job timeout, or "N/A" if not available.

conf_pools_daemon_poll_interval_property property

Retrieves the pools daemon poll interval from the config data.

Returns:

Name Type Description
list

Pools daemon poll interval, or "N/A" if not available.

conf_pools_daemon_property property

Retrieves the pools daemon status from the config data.

Returns:

Name Type Description
list

Pools daemon status, or "N/A" if not available.

conf_pools_daemon_zmq_port_property property

Retrieves the pools daemon ZMQ port from the config data.

Returns:

Name Type Description
list

Pools daemon ZMQ port, or "N/A" if not available.

conf_pools_enabled_property property

Retrieves the pools enabled status from the config data.

Returns:

Name Type Description
list

Pools enabled status, or "N/A" if not available.

conf_pools_keepalive_property property

Retrieves the pools keepalive status from the config data.

Returns:

Name Type Description
list

Pools keepalive status, or "N/A" if not available.

conf_pools_nicehash_property property

Retrieves the pools NiceHash status from the config data.

Returns:

Name Type Description
list

Pools NiceHash status, or "N/A" if not available.

conf_pools_pass_property property

Retrieves the pools password from the config data.

Returns:

Name Type Description
list

Pools password, or "N/A" if not available.

conf_pools_property property

Retrieves the pools from the config data.

Returns:

Name Type Description
list

Pools, or "N/A" if not available.

conf_pools_rig_id_property property

Retrieves the pools rig ID from the config data.

Returns:

Name Type Description
list

Pools rig ID, or "N/A" if not available.

conf_pools_self_select_property property

Retrieves the pools self-select from the config data.

Returns:

Name Type Description
list

Pools self-select, or "N/A" if not available.

conf_pools_sni_property property

Retrieves the pools SNI status from the config data.

Returns:

Name Type Description
list

Pools SNI status, or "N/A" if not available.

conf_pools_socks5_property property

Retrieves the pools SOCKS5 from the config data.

Returns:

Name Type Description
list

Pools SOCKS5, or "N/A" if not available.

conf_pools_spend_secret_key_property property

Retrieves the pools spend secret key status from the config data.

Returns:

Name Type Description
list

Pools spend secret key status, or "N/A" if not available.

conf_pools_submit_to_origin_property property

Retrieves the pools submit to origin status from the config data.

Returns:

Name Type Description
list

Pools submit to origin status, or "N/A" if not available.

conf_pools_tls_fingerprint_property property

Retrieves the pools TLS fingerprint from the config data.

Returns:

Name Type Description
list

Pools TLS fingerprint, or "N/A" if not available.

conf_pools_tls_property property

Retrieves the pools TLS status from the config data.

Returns:

Name Type Description
list

Pools TLS status, or "N/A" if not available.

conf_pools_url_property property

Retrieves the pools URL from the config data.

Returns:

Name Type Description
list

Pools URL, or "N/A" if not available.

conf_pools_user_property property

Retrieves the pools user from the config data.

Returns:

Name Type Description
list

Pools user, or "N/A" if not available.

conf_print_time_property property

Retrieves the print time from the config data.

Returns:

Name Type Description
int

Print time, or "N/A" if not available.

conf_randomx_1gb_pages_property property

Retrieves the RandomX 1GB pages property from the config data.

Returns:

Name Type Description
bool

RandomX 1GB pages property, or "N/A" if not available.

conf_randomx_cache_qos_property property

Retrieves the RandomX cache QoS property from the config data.

Returns:

Name Type Description
bool

RandomX cache QoS property, or "N/A" if not available.

conf_randomx_init_avx2_property property

Retrieves the RandomX init AVX2 property from the config data.

Returns:

Name Type Description
int

RandomX init AVX2 property, or "N/A" if not available.

conf_randomx_init_property property

Retrieves the RandomX init property from the config data.

Returns:

Name Type Description
int

RandomX init property, or "N/A" if not available.

conf_randomx_mode_property property

Retrieves the RandomX mode property from the config data.

Returns:

Name Type Description
str

RandomX mode property, or "N/A" if not available.

conf_randomx_numa_property property

Retrieves the RandomX NUMA property from the config data.

Returns:

Name Type Description
bool

RandomX NUMA property, or "N/A" if not available.

conf_randomx_property property

Retrieves the RandomX property from the config data.

Returns:

Name Type Description
dict

RandomX property, or "N/A" if not available.

conf_randomx_rdmsr_property property

Retrieves the RandomX RDMSR property from the config data.

Returns:

Name Type Description
bool

RandomX RDMSR property, or "N/A" if not available.

conf_randomx_scratchpad_prefetch_mode_property property

Retrieves the RandomX scratchpad prefetch mode property from the config data.

Returns:

Name Type Description
int

RandomX scratchpad prefetch mode property, or "N/A" if not available.

conf_randomx_wrmsr_property property

Retrieves the RandomX WRMSR property from the config data.

Returns:

Name Type Description
bool

RandomX WRMSR property, or "N/A" if not available.

conf_rebench_algo_property property

Retrieves the rebench algorithm status from the config data.

Returns:

Name Type Description
bool

Rebench algorithm status, or "N/A" if not available.

conf_retries_property property

Retrieves the retries from the config data.

Returns:

Name Type Description
int

Retries, or "N/A" if not available.

conf_retry_pause_property property

Retrieves the retry pause from the config data.

Returns:

Name Type Description
int

Retry pause, or "N/A" if not available.

conf_syslog_property property

Retrieves the syslog status from the config data.

Returns:

Name Type Description
bool

Syslog status, or "N/A" if not available.

conf_title_property property

Retrieves the title property from the config data.

Returns:

Name Type Description
bool

Title property, or "N/A" if not available.

conf_tls_cert_key_property property

Retrieves the TLS certificate key from the config data.

Returns:

Name Type Description
str

TLS certificate key, or "N/A" if not available.

conf_tls_cert_property property

Retrieves the TLS certificate from the config data.

Returns:

Name Type Description
str

TLS certificate, or "N/A" if not available.

conf_tls_ciphers_property property

Retrieves the TLS ciphers from the config data.

Returns:

Name Type Description
str

TLS ciphers, or "N/A" if not available.

conf_tls_ciphersuites_property property

Retrieves the TLS ciphersuites from the config data.

Returns:

Name Type Description
str

TLS ciphersuites, or "N/A" if not available.

conf_tls_dhparam_property property

Retrieves the TLS DH parameter from the config data.

Returns:

Name Type Description
str

TLS DH parameter, or "N/A" if not available.

conf_tls_enabled_property property

Retrieves the TLS enabled status from the config data.

Returns:

Name Type Description
bool

TLS enabled status, or "N/A" if not available.

conf_tls_property property

Retrieves the TLS property from the config data.

Returns:

Name Type Description
dict

TLS property, or "N/A" if not available.

conf_tls_protocols_property property

Retrieves the TLS protocols from the config data.

Returns:

Name Type Description
str

TLS protocols, or "N/A" if not available.

conf_user_agent_property property

Retrieves the user agent from the config data.

Returns:

Name Type Description
str

User agent, or "N/A" if not available.

conf_verbose_property property

Retrieves the verbose level from the config data.

Returns:

Name Type Description
int

Verbose level, or "N/A" if not available.

conf_watch_property property

Retrieves the watch status from the config data.

Returns:

Name Type Description
bool

Watch status, or "N/A" if not available.

config property

Retrieves the entire cached config endpoint data.

Returns:

Name Type Description
dict

Current config response, or "N/A" if not available.

enabled_backends property

Retrieves the enabled backends from the backends data.

Returns:

Name Type Description
list

Enabled backends, or "N/A" if not available.

sum_algorithm property

Retrieves the cached current mining algorithm from the summary data.

Returns:

Name Type Description
str

Current mining algorithm, or "N/A" if not available.

sum_algorithms property

Retrieves the cached algorithms information from the summary data.

Returns:

Name Type Description
list

Algorithms information, or "N/A" if not available.

sum_avg_time property

Retrieves the cached average time information from the summary data.

Returns:

Name Type Description
int

Average time information, or "N/A" if not available.

sum_avg_time_ms property

Retrieves the cached average time in ms information from the summary data.

Returns:

Name Type Description
int

Average time in ms information, or "N/A" if not available.

sum_best_results property

Retrieves the cached best results from the summary data.

Returns:

Name Type Description
list

Best results, or "N/A" if not available.

sum_connection property

Retrieves the cached connection information from the summary data.

Returns:

Name Type Description
dict

Connection information, or "N/A" if not available.

sum_cpu_64_bit property

Retrieves the cached CPU 64-bit support status from the summary data.

Returns:

Name Type Description
bool

CPU 64-bit support status, or "N/A" if not available.

sum_cpu_aes property

Retrieves the cached CPU AES support status from the summary data.

Returns:

Name Type Description
bool

CPU AES support status, or "N/A" if not available.

sum_cpu_arch property

Retrieves the cached CPU architecture information from the summary data.

Returns:

Name Type Description
str

CPU architecture information, or "N/A" if not available.

sum_cpu_assembly property

Retrieves the cached CPU assembly information from the summary data.

Returns:

Name Type Description
str

CPU assembly information, or "N/A" if not available.

sum_cpu_avx2 property

Retrieves the cached CPU AVX2 support status from the summary data.

Returns:

Name Type Description
bool

CPU AVX2 support status, or "N/A" if not available.

sum_cpu_backend property

Retrieves the cached CPU backend information from the summary data.

Returns:

Name Type Description
str

CPU backend information, or "N/A" if not available.

sum_cpu_brand property

Retrieves the cached CPU brand information from the summary data.

Returns:

Name Type Description
str

CPU brand information, or "N/A" if not available.

sum_cpu_cores property

Retrieves the cached CPU cores count from the summary data.

Returns:

Name Type Description
int

CPU cores count, or "N/A" if not available.

sum_cpu_family property

Retrieves the cached CPU family information from the summary data.

Returns:

Name Type Description
int

CPU family information, or "N/A" if not available.

sum_cpu_flags property

Retrieves the cached CPU flags information from the summary data.

Returns:

Name Type Description
list

CPU flags information, or "N/A" if not available.

sum_cpu_info property

Retrieves the cached CPU information from the summary data.

Returns:

Name Type Description
dict

CPU information, or "N/A" if not available.

sum_cpu_l2 property

Retrieves the cached CPU L2 cache size from the summary data.

Returns:

Name Type Description
int

CPU L2 cache size, or "N/A" if not available.

sum_cpu_l3 property

Retrieves the cached CPU L3 cache size from the summary data.

Returns:

Name Type Description
int

CPU L3 cache size, or "N/A" if not available.

sum_cpu_model property

Retrieves the cached CPU model information from the summary data.

Returns:

Name Type Description
int

CPU model information, or "N/A" if not available.

sum_cpu_msr property

Retrieves the cached CPU MSR information from the summary data.

Returns:

Name Type Description
str

CPU MSR information, or "N/A" if not available.

sum_cpu_nodes property

Retrieves the cached CPU nodes count from the summary data.

Returns:

Name Type Description
int

CPU nodes count, or "N/A" if not available.

sum_cpu_packages property

Retrieves the cached CPU packages count from the summary data.

Returns:

Name Type Description
int

CPU packages count, or "N/A" if not available.

sum_cpu_proc_info property

Retrieves the cached CPU frequency information from the summary data.

Returns:

Name Type Description
int

CPU frequency information, or "N/A" if not available.

sum_cpu_stepping property

Retrieves the cached CPU stepping information from the summary data.

Returns:

Name Type Description
int

CPU stepping information, or "N/A" if not available.

sum_cpu_threads property

Retrieves the cached CPU threads count from the summary data.

Returns:

Name Type Description
int

CPU threads count, or "N/A" if not available.

sum_cpu_x64 property

Retrieves the cached CPU x64 support status from the summary data.

Returns:

Name Type Description
bool

CPU x64 support status, or "N/A" if not available.

sum_current_difficulty property

Retrieves the cached current difficulty from the summary data.

Returns:

Name Type Description
int

Current difficulty, or "N/A" if not available.

sum_donate_level property

Retrieves the cached donate level information from the summary data.

Returns:

Name Type Description
int

Donate level information, or "N/A" if not available.

sum_features property

Retrieves the cached supported features information from the summary data.

Returns:

Name Type Description
list

Supported features information, or "N/A" if not available.

sum_free_memory property

Retrieves the cached free memory from the summary data.

Returns:

Name Type Description
int

Free memory information, or "N/A" if not available.

sum_good_shares property

Retrieves the cached good shares from the summary data.

Returns:

Name Type Description
int

Good shares, or "N/A" if not available.

sum_hardware_concurrency property

Retrieves the cached hardware concurrency from the summary data.

Returns:

Name Type Description
int

Hardware concurrency information, or "N/A" if not available.

sum_hashrate property

Retrieves the cached hashrate information from the summary data.

Returns:

Name Type Description
dict

Hashrate information, or "N/A" if not available.

sum_hashrate_10s property

Retrieves the cached hashrate for the last 10 seconds from the summary data.

Returns:

Name Type Description
float

Hashrate for the last 10 seconds, or "N/A" if not available.

sum_hashrate_15m property

Retrieves the cached hashrate for the last 15 minutes from the summary data.

Returns:

Name Type Description
float

Hashrate for the last 15 minutes, or "N/A" if not available.

sum_hashrate_1m property

Retrieves the cached hashrate for the last 1 minute from the summary data.

Returns:

Name Type Description
float

Hashrate for the last 1 minute, or "N/A" if not available.

sum_hashrate_highest property

Retrieves the cached highest hashrate from the summary data.

Returns:

Name Type Description
float

Highest hashrate, or "N/A" if not available.

sum_hashrate_total property

Retrieves the cached hashrate toal information from the summary data.

Returns:

Name Type Description
list

Hashrate total information, or "N/A" if not available.

sum_hugepages property

Retrieves the cached hugepages information from the summary data.

Returns:

Name Type Description
list

Hugepages information, or "N/A" if not available.

sum_id property

Retrieves the cached ID information from the summary data.

Returns:

Name Type Description
str

ID information, or "N/A" if not available.

sum_kind property

Retrieves the cached kind information from the summary data.

Returns:

Name Type Description
str

Kind information, or "N/A" if not available.

sum_load_average property

Retrieves the cached load average from the summary data.

Returns:

Name Type Description
list

Load average information, or "N/A" if not available.

sum_memory_usage property

Retrieves the cached memory usage from the summary data.

Returns:

Name Type Description
dict

Memory usage information, or "N/A" if not available.

sum_paused property

Retrieves the cached paused status from the summary data.

Returns:

Name Type Description
bool

Paused status, or "N/A" if not available.

sum_pool_accepted_jobs property

Retrieves the cached number of accepted jobs from the summary data.

Returns:

Name Type Description
int

Number of accepted jobs, or "N/A" if not available.

sum_pool_algo property

Retrieves the cached pool algorithm information from the summary data.

Returns:

Name Type Description
str

Pool algorithm information, or "N/A" if not available.

sum_pool_average_time property

Retrieves the cached pool average time information from the summary data.

Returns:

Name Type Description
int

Pool average time information, or "N/A" if not available.

sum_pool_average_time_ms property

Retrieves the cached pool average time in ms from the summary data.

Returns:

Name Type Description
int

Pool average time in ms, or "N/A" if not available.

sum_pool_diff property

Retrieves the cached pool difficulty information from the summary data.

Returns:

Name Type Description
int

Pool difficulty information, or "N/A" if not available.

sum_pool_failures property

Retrieves the cached pool failures information from the summary data.

Returns:

Name Type Description
int

Pool failures information, or "N/A" if not available.

sum_pool_info property

Retrieves the cached pool information from the summary data.

Returns:

Name Type Description
str

Pool information, or "N/A" if not available.

sum_pool_ip_address property

Retrieves the cached IP address from the summary data.

Returns:

Name Type Description
str

IP address, or "N/A" if not available.

sum_pool_ping property

Retrieves the cached pool ping information from the summary data.

Returns:

Name Type Description
int

Pool ping information, or "N/A" if not available.

sum_pool_rejected_jobs property

Retrieves the cached number of rejected jobs from the summary data.

Returns:

Name Type Description
int

Number of rejected jobs, or "N/A" if not available.

sum_pool_tls property

Retrieves the cached pool tls status from the summary data.

Returns:

Name Type Description
bool

Pool tls status, or "N/A" if not available.

sum_pool_tls_fingerprint property

Retrieves the cached pool tls fingerprint information from the summary data.

Returns:

Name Type Description
str

Pool tls fingerprint information, or "N/A" if not available.

sum_pool_total_hashes property

Retrieves the cached pool total hashes information from the summary data.

Returns:

Name Type Description
int

Pool total hashes information, or "N/A" if not available.

sum_pool_uptime property

Retrieves the cached pool uptime information from the summary data.

Returns:

Name Type Description
int

Pool uptime information, or "N/A" if not available.

sum_pool_uptime_ms property

Retrieves the cached pool uptime in ms from the summary data.

Returns:

Name Type Description
int

Pool uptime in ms, or "N/A" if not available.

sum_resident_set_memory property

Retrieves the cached resident set memory from the summary data.

Returns:

Name Type Description
int

Resident set memory information, or "N/A" if not available.

sum_resources property

Retrieves the cached resources information from the summary data.

Returns:

Name Type Description
dict

Resources information, or "N/A" if not available.

sum_restricted property

Retrieves the cached current restricted status from the summary data.

Returns:

Name Type Description
bool

Current restricted status, or "N/A" if not available.

sum_results property

Retrieves the cached results information from the summary data.

Returns:

Name Type Description
dict

Results information, or "N/A" if not available.

sum_total_hashes property

Retrieves the cached total number of hashes from the summary data.

Returns:

Name Type Description
int

Total number of hashes, or "N/A" if not available.

sum_total_memory property

Retrieves the cached total memory from the summary data.

Returns:

Name Type Description
int

Total memory information, or "N/A" if not available.

sum_total_shares property

Retrieves the cached total shares from the summary data.

Returns:

Name Type Description
int

Total shares, or "N/A" if not available.

sum_ua property

Retrieves the cached user agent information from the summary data.

Returns:

Name Type Description
str

User agent information, or "N/A" if not available.

sum_uptime property

Retrieves the cached current uptime from the summary data.

Returns:

Name Type Description
int

Current uptime in seconds, or "N/A" if not available.

sum_uptime_readable property

Retrieves the cached uptime in a human-readable format from the summary data.

Returns:

Name Type Description
str

Uptime in the format "days, hours:minutes:seconds", or "N/A" if not available.

sum_version property

Retrieves the cached version information from the summary data.

Returns:

Name Type Description
str

Version information, or "N/A" if not available.

sum_worker_id property

Retrieves the cached worker ID information from the summary data.

Returns:

Name Type Description
str

Worker ID information, or "N/A" if not available.

summary property

Retrieves the entire cached summary endpoint data.

Returns:

Name Type Description
dict

Current summary response, or "N/A" if not available.

__init__(miner_name, ip, port, access_token=None, tls_enabled=False, db_url=None)

Initializes the XMRig instance with the provided IP, port, and access token.

The ip can be either an IP address or domain name with its TLD (e.g. example.com). The schema is not required and the appropriate one will be chosen based on the tls_enabled value.

Parameters:

Name Type Description Default
miner_name str

A unique name for the miner.

required
ip str

IP address or domain of the XMRig API.

required
port int

Port of the XMRig API.

required
access_token str

Access token for authorization. Defaults to None.

None
tls_enabled bool

TLS status of the miner/API. Defaults to False.

False
db_url str

Database URL for storing miner data. Defaults to None.

None
Source code in xmrig/api.py
def __init__(self, miner_name, ip, port, access_token = None, tls_enabled = False, db_url = None):
    """
    Initializes the XMRig instance with the provided IP, port, and access token.

    The `ip` can be either an IP address or domain name with its TLD (e.g. `example.com`). The schema is not 
    required and the appropriate one will be chosen based on the `tls_enabled` value.

    Args:
        miner_name (str): A unique name for the miner.
        ip (str): IP address or domain of the XMRig API.
        port (int): Port of the XMRig API.
        access_token (str, optional): Access token for authorization. Defaults to None.
        tls_enabled (bool, optional): TLS status of the miner/API. Defaults to False.
        db_url (str, optional): Database URL for storing miner data. Defaults to None.
    """
    self._miner_name = miner_name
    self._ip = ip
    self._port = port
    self._access_token = access_token
    self._tls_enabled = tls_enabled
    self._base_url = f"https://{ip}:{port}" if self._tls_enabled else f"http://{ip}:{port}"
    self._db_url = db_url
    self._json_rpc_url = f"{self._base_url}/json_rpc"
    self._summary_url = f"{self._base_url}/2/summary"
    self._backends_url = f"{self._base_url}/2/backends"
    self._config_url = f"{self._base_url}/2/config"
    self._summary_cache = None
    self._backends_cache = None
    self._config_cache = None
    self._summary_table_name = "summary"
    self._backends_table_name = "backends"
    self._config_table_name = "config"
    self._headers = {
        "Content-Type": "application/json",
        "Accept": "application/json",
        "Host": f"{self._base_url}",
        "Connection": "keep-alive",
        "Authorization": f"Bearer {self._access_token}"
    }
    self._json_rpc_payload = {
        "method": None,
        "jsonrpc": "2.0",
        "id": 1,
    }
    self.get_all_responses()
    log.info(f"XMRigAPI initialized for {self._base_url}")

_fallback_to_db(table_name, selection)

Fallback to the database if the data is not available in the cache.

Parameters:

Name Type Description Default
db_url str

Database URL for creating the engine.

required
table_name str

Name of the table to retrieve data from.

required
selection str

Column to select from the table.

required

Returns:

Name Type Description
Any

The retrieved data, or a default string value of "N/A" if not available.

Source code in xmrig/api.py
def _fallback_to_db(self, table_name, selection):
    """
    Fallback to the database if the data is not available in the cache.

    Args:
        db_url (str): Database URL for creating the engine.
        table_name (str): Name of the table to retrieve data from.
        selection (str): Column to select from the table.

    Returns:
        Any: The retrieved data, or a default string value of "N/A" if not available.
    """
    result = XMRigDatabase.retrieve_data_from_db(self._db_url, table_name, self._miner_name, selection)
    return result[0].get(selection, "N/A") if len(result) > 0 else "N/A"

_get_data_from_cache(response, keys, table_name, selection)

Retrieves the data from the response using the provided keys. Falls back to the database if the data is not available.

Parameters:

Name Type Description Default
response dict | list

The response data.

required
keys list

The keys to use to retrieve the data.

required
table_name str | list

The table name or list of table names to use for fallback database retrieval.

required
selection str

Column to select from the table.

required

Returns:

Name Type Description
Any

The retrieved data, or a default string value of "N/A" if not available.

Raises:

Type Description
JSONDecodeError

If there is an error decoding the JSON response.

KeyError

If a key is not found in the response data.

XMRigDatabaseError

If there is an error retrieving data from the database.

Source code in xmrig/api.py
def _get_data_from_cache(self, response, keys, table_name, selection):
    """
    Retrieves the data from the response using the provided keys. Falls back to the database if the data is not available.

    Args:
        response (dict | list): The response data.
        keys (list): The keys to use to retrieve the data.
        table_name (str | list): The table name or list of table names to use for fallback database retrieval.
        selection (str): Column to select from the table.

    Returns:
        Any: The retrieved data, or a default string value of "N/A" if not available.

    Raises:
        JSONDecodeError: If there is an error decoding the JSON response.
        KeyError: If a key is not found in the response data.
        XMRigDatabaseError: If there is an error retrieving data from the database.
    """
    data = "N/A"
    try:
        if response == None:
            # TODO: Use this exception or requests.exceptions.JSONDecodeError ?
            raise JSONDecodeError("No response data available, trying database.", "", 0)
        else:
            data = response
            if len(keys) > 0:
                for key in keys:
                    data = data[key]
    except JSONDecodeError as e:
        if self._db_url is not None:
            try:
                return self._fallback_to_db(table_name, selection)
            except XMRigDatabaseError as db_e:
                log.error(f"An error occurred fetching the backends data from the database: {db_e}")
                data = "N/A"
    except KeyError as e:
        log.error(f"Key not found in the response data: {e}")
        data = "N/A"
    return data

_update_cache(response, endpoint)

Updates the cached data for an endpoint with the supplied response data.

Parameters:

Name Type Description Default
response dict | list

The response data.

required
endpoint str

The endpoint from which the data is retrieved.

required
Source code in xmrig/api.py
def _update_cache(self, response, endpoint):
    """
    Updates the cached data for an endpoint with the supplied response data.

    Args:
        response (dict | list): The response data.
        endpoint (str): The endpoint from which the data is retrieved.
    """
    if endpoint == "summary":
        self._summary_cache = response
    if endpoint == "backends":
        self._backends_cache = response
    if endpoint == "config":
        self._config_cache = response

get_all_responses()

Retrieves all responses from the API.

Returns:

Name Type Description
bool

True if successful, or False if an error occurred.

Raises:

Type Description
XMRigAuthorizationError

If an authorization error occurs.

XMRigConnectionError

If a connection error occurs.

XMRigAPIError

If a general API error occurs.

Source code in xmrig/api.py
def get_all_responses(self):
    """
    Retrieves all responses from the API.

    Returns:
        bool: True if successful, or False if an error occurred.

    Raises:
        XMRigAuthorizationError: If an authorization error occurs.
        XMRigConnectionError: If a connection error occurs.
        XMRigAPIError: If a general API error occurs.
    """
    summary_success = self.get_endpoint("summary")
    backends_success = self.get_endpoint("backends")
    config_success = self.get_endpoint("config")
    return summary_success and backends_success and config_success

get_endpoint(endpoint)

Updates the cached data from the specified XMRig API endpoint.

Parameters:

Name Type Description Default
endpoint str

The endpoint to fetch data from. Should be one of 'summary', 'backends', or 'config'.

required

Returns:

Name Type Description
bool

True if the cached data is successfully updated or False if an error occurred.

Raises:

Type Description
XMRigAuthorizationError

If an authorization error occurs.

XMRigConnectionError

If a connection error occurs.

XMRigAPIError

If a general API error occurs.

Source code in xmrig/api.py
def get_endpoint(self, endpoint):
    """
    Updates the cached data from the specified XMRig API endpoint.

    Args:
        endpoint (str): The endpoint to fetch data from. Should be one of 'summary', 'backends', or 'config'.

    Returns:
        bool: True if the cached data is successfully updated or False if an error occurred.

    Raises:
        XMRigAuthorizationError: If an authorization error occurs.
        XMRigConnectionError: If a connection error occurs.
        XMRigAPIError: If a general API error occurs.
    """
    url_map = {
        "summary": self._summary_url,
        "backends": self._backends_url,
        "config": self._config_url
    }
    try:
        response = requests.get(url_map[endpoint], headers=self._headers)
        if response.status_code == 401:
            raise XMRigAuthorizationError(message = "401 UNAUTHORIZED")
        response.raise_for_status()
        try:
            json_response = response.json()
        except requests.exceptions.JSONDecodeError as e:
            json_response = None
            raise requests.exceptions.JSONDecodeError("JSON decode error", response.text, response.status_code)
        else:
            self._update_cache(json_response, endpoint)
            log.debug(f"{endpoint.capitalize()} endpoint successfully fetched.")
            if self._db_url is not None:
                XMRigDatabase._insert_data_to_db(json_response, self._miner_name, endpoint, self._db_url)
            return True
    except requests.exceptions.JSONDecodeError as e:
        # INFO: Due to a bug in XMRig, the first 15 minutes a miner is running/restarted its backends 
        # INFO: endpoint will return a malformed JSON response, allow the program to continue running 
        # INFO: to bypass this bug for now until a fix is provided by the XMRig developers.
        log.error("Due to a bug in XMRig, the first 15 minutes a miner is running/restarted its backends endpoint will return a malformed JSON response. If that is the case then this error/warning can be safely ignored.")
        log.error(f"An error occurred decoding the {endpoint} response: {e}")
        return False
    except requests.exceptions.RequestException as e:
        raise XMRigConnectionError(e, traceback.format_exc(), f"An error occurred while connecting to {url_map[endpoint]}:") from e
    except XMRigAuthorizationError as e:
        raise XMRigAuthorizationError(e, traceback.format_exc(), f"An authorization error occurred updating the {endpoint} endpoint, please provide a valid access token:") from e
    except Exception as e:
        raise XMRigAPIError(e, traceback.format_exc(), f"An error occurred updating the {endpoint} endpoint:") from e

get_from_db(table_name, selection)

Retrieve data from the database.

Parameters:

Name Type Description Default
table_name str

Name of the table to retrieve data from.

required
selection str

Column to select from the table.

required

Returns:

Name Type Description
list

List of dictionaries containing the retrieved data.

Source code in xmrig/api.py
def get_from_db(self, table_name, selection):
    """
    Retrieve data from the database.

    Args:
        table_name (str): Name of the table to retrieve data from.
        selection (str): Column to select from the table.

    Returns:
        list: List of dictionaries containing the retrieved data.
    """
    return XMRigDatabase.retrieve_data_from_db(self._db_url, table_name, self._miner_name, selection)

perform_action(action)

Controls the miner by performing the specified action.

Parameters:

Name Type Description Default
action str

The action to perform. Valid actions are 'pause', 'resume', 'stop', 'start'.

required

Returns:

Name Type Description
bool

True if the action was successfully performed, or False if an error occurred.

Raises:

Type Description
XMRigConnectionError

If a connection error occurs.

XMRigAPIError

If a general API error occurs.

Source code in xmrig/api.py
def perform_action(self, action):
    """
    Controls the miner by performing the specified action.

    Args:
        action (str): The action to perform. Valid actions are 'pause', 'resume', 'stop', 'start'.

    Returns:
        bool: True if the action was successfully performed, or False if an error occurred.

    Raises:
        XMRigConnectionError: If a connection error occurs.
        XMRigAPIError: If a general API error occurs.
    """
    try:
        # TODO: The `start` json RPC method is not implemented by XMRig yet, use alternative implementation 
        # TODO: until PR 3030 is merged, see the following issues and PRs for more information: 
        # TODO: https://github.com/xmrig/xmrig/issues/2826#issuecomment-1146465641
        # TODO: https://github.com/xmrig/xmrig/issues/3220#issuecomment-1450691309
        # TODO: https://github.com/xmrig/xmrig/pull/3030
        if action == "start":
            self.get_endpoint("config")
            self.post_config(self._config_cache)
            log.debug(f"Miner successfully started.")
        else:
            url = f"{self._json_rpc_url}"
            payload = self._json_rpc_payload
            payload["method"] = action
            response = requests.post(url, json=payload, headers=self._headers)
            response.raise_for_status()
            log.debug(f"Miner successfully {action}ed.")
        return True
    except requests.exceptions.RequestException as e:
        raise XMRigConnectionError(e, traceback.format_exc(), f"A connection error occurred {action}ing the miner:") from e
    except Exception as e:
        raise XMRigAPIError(e, traceback.format_exc(), f"An error occurred {action}ing the miner:") from e

post_config(config)

Updates the miners config data via the XMRig API.

Parameters:

Name Type Description Default
config dict

Configuration data to update.

required

Returns:

Name Type Description
bool

True if the config was changed successfully, or False if an error occurred.

Raises:

Type Description
XMRigAuthorizationError

If an authorization error occurs.

XMRigConnectionError

If a connection error occurs.

XMRigAPIError

If a general API error occurs.

Source code in xmrig/api.py
def post_config(self, config):
    """
    Updates the miners config data via the XMRig API.

    Args:
        config (dict): Configuration data to update.

    Returns:
        bool: True if the config was changed successfully, or False if an error occurred.

    Raises:
        XMRigAuthorizationError: If an authorization error occurs.
        XMRigConnectionError: If a connection error occurs.
        XMRigAPIError: If a general API error occurs.
    """
    try:
        response = requests.post(self._config_url, json = config, headers = self._headers)
        if response.status_code == 401:
            raise XMRigAuthorizationError()
        # Raise an HTTPError for bad responses (4xx and 5xx)
        response.raise_for_status()
        # Get the updated config data from the endpoint and update the cached data
        self.get_endpoint("config")
        log.debug(f"Config endpoint successfully updated.")
        return True
    except requests.exceptions.JSONDecodeError as e:
        raise requests.exceptions.JSONDecodeError("JSON decode error", response.text, response.status_code)
    except requests.exceptions.RequestException as e:
        raise XMRigConnectionError(e, traceback.format_exc(), f"An error occurred while connecting to {self._config_url}:") from e
    except XMRigAuthorizationError as e:
        raise XMRigAuthorizationError(e, traceback.format_exc(), f"An authorization error occurred posting the config, please provide a valid access token:") from e
    except Exception as e:
        raise XMRigAPIError(e, traceback.format_exc(), f"An error occurred posting the config:") from e

set_auth_header()

Update the Authorization header for the HTTP requests.

Returns:

Name Type Description
bool

True if the Authorization header was changed, or False if an error occurred.

Raises:

Type Description
XMRigAuthorizationError

An error occurred setting the Authorization Header.

Source code in xmrig/api.py
def set_auth_header(self):
    """
    Update the Authorization header for the HTTP requests.

    Returns:
        bool: True if the Authorization header was changed, or False if an error occurred.

    Raises:
        XMRigAuthorizationError: An error occurred setting the Authorization Header.
    """
    try:
        self._headers["Authorization"] = f"Bearer {self._access_token}"
        log.debug(f"Authorization header successfully changed.")
        return True
    except XMRigAuthorizationError as e:
        raise XMRigAuthorizationError(e, traceback.format_exc(), f"An error occurred setting the Authorization Header: {e}") from e