oxinsider 0.4.0

Official Rust client for the 0xinsider Developer API: Polymarket sports and esports analytics, wallet grades, large trades and sharp-money flow.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
// Code generated by cargo codegen from the 0xinsider OpenAPI document. DO NOT EDIT.

//! The operation table, and one `Client` method per operation in the OpenAPI document.

#![allow(rustdoc::bare_urls, rustdoc::broken_intra_doc_links, rustdoc::invalid_html_tags)]
#![allow(clippy::doc_lazy_continuation, clippy::too_many_arguments)]

use crate::client::{Call, encode_path_segment};
use crate::models::*;
use crate::pagination::{CursorParams, ListPage};
use crate::{Client, Download, Operation, Result, RetryClass};

impl Operation {
    /// `GET /api/v1`
    pub const GET_API_DISCOVERY: Operation = Operation {
        id: "getApiDiscovery",
        method: "GET",
        path: "/api/v1",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: false,
    };
    /// `GET /api/v1/openapi.json`
    pub const REDIRECT_API_OPENAPI_SPEC: Operation = Operation {
        id: "redirectApiOpenapiSpec",
        method: "GET",
        path: "/api/v1/openapi.json",
        accept: "*/*",
        retry: RetryClass::Read,
        requires_credential: false,
    };
    /// `POST /api/v1/agents/register`
    pub const REGISTER_AGENT: Operation = Operation {
        id: "registerAgent",
        method: "POST",
        path: "/api/v1/agents/register",
        accept: "application/json",
        retry: RetryClass::Never,
        requires_credential: false,
    };
    /// `GET /api/v1/trader/{address}`
    pub const GET_TRADER: Operation = Operation {
        id: "getTrader",
        method: "GET",
        path: "/api/v1/trader/{address}",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/trader/{address}/context.md`
    pub const GET_TRADER_CONTEXT_MARKDOWN: Operation = Operation {
        id: "getTraderContextMarkdown",
        method: "GET",
        path: "/api/v1/trader/{address}/context.md",
        accept: "text/markdown",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/trader/{address}/grade-at`
    pub const GET_TRADER_GRADE_AT: Operation = Operation {
        id: "getTraderGradeAt",
        method: "GET",
        path: "/api/v1/trader/{address}/grade-at",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/trader/{address}/context`
    pub const GET_TRADER_CONTEXT: Operation = Operation {
        id: "getTraderContext",
        method: "GET",
        path: "/api/v1/trader/{address}/context",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `POST /api/v1/traders/batch`
    pub const BATCH_GET_TRADERS: Operation = Operation {
        id: "batchGetTraders",
        method: "POST",
        path: "/api/v1/traders/batch",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/trader/{address}/position-timeline`
    pub const GET_POSITION_TIMELINE: Operation = Operation {
        id: "getPositionTimeline",
        method: "GET",
        path: "/api/v1/trader/{address}/position-timeline",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/trader/{address}/categories`
    pub const GET_TRADER_CATEGORY_RECORDS: Operation = Operation {
        id: "getTraderCategoryRecords",
        method: "GET",
        path: "/api/v1/trader/{address}/categories",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/trader/{address}/pnl`
    pub const GET_TRADER_PNL: Operation = Operation {
        id: "getTraderPnl",
        method: "GET",
        path: "/api/v1/trader/{address}/pnl",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/traders/{trader}/position-timeline`
    pub const GET_POSITION_TIMELINE_BY_ID: Operation = Operation {
        id: "getPositionTimelineById",
        method: "GET",
        path: "/api/v1/traders/{trader}/position-timeline",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/positions`
    pub const LIST_POSITIONS: Operation = Operation {
        id: "listPositions",
        method: "GET",
        path: "/api/v1/positions",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/large-positions`
    pub const LIST_LARGE_POSITIONS: Operation = Operation {
        id: "listLargePositions",
        method: "GET",
        path: "/api/v1/large-positions",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/large-trades`
    pub const LIST_LARGE_TRADES: Operation = Operation {
        id: "listLargeTrades",
        method: "GET",
        path: "/api/v1/large-trades",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/whale-trades`
    pub const LIST_WHALE_TRADES: Operation = Operation {
        id: "listWhaleTrades",
        method: "GET",
        path: "/api/v1/whale-trades",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/large-trades/history`
    pub const LIST_LARGE_TRADE_HISTORY: Operation = Operation {
        id: "listLargeTradeHistory",
        method: "GET",
        path: "/api/v1/large-trades/history",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/whale-trades/history`
    pub const LIST_WHALE_TRADE_HISTORY: Operation = Operation {
        id: "listWhaleTradeHistory",
        method: "GET",
        path: "/api/v1/whale-trades/history",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/large-trades/{id}`
    pub const GET_LARGE_TRADE: Operation = Operation {
        id: "getLargeTrade",
        method: "GET",
        path: "/api/v1/large-trades/{id}",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/whale-trades/{id}`
    pub const GET_WHALE_TRADE: Operation = Operation {
        id: "getWhaleTrade",
        method: "GET",
        path: "/api/v1/whale-trades/{id}",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/large-trades/{id}/counterparties/executions`
    pub const LIST_LARGE_TRADE_COUNTERPARTY_EXECUTIONS: Operation = Operation {
        id: "listLargeTradeCounterpartyExecutions",
        method: "GET",
        path: "/api/v1/large-trades/{id}/counterparties/executions",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/whale-trades/{id}/counterparties/executions`
    pub const LIST_WHALE_TRADE_COUNTERPARTY_EXECUTIONS: Operation = Operation {
        id: "listWhaleTradeCounterpartyExecutions",
        method: "GET",
        path: "/api/v1/whale-trades/{id}/counterparties/executions",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/large-trades/{id}/counterparties/executions/{execution_id}/makers`
    pub const LIST_LARGE_TRADE_COUNTERPARTY_MAKERS: Operation = Operation {
        id: "listLargeTradeCounterpartyMakers",
        method: "GET",
        path: "/api/v1/large-trades/{id}/counterparties/executions/{execution_id}/makers",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/whale-trades/{id}/counterparties/executions/{execution_id}/makers`
    pub const LIST_WHALE_TRADE_COUNTERPARTY_MAKERS: Operation = Operation {
        id: "listWhaleTradeCounterpartyMakers",
        method: "GET",
        path: "/api/v1/whale-trades/{id}/counterparties/executions/{execution_id}/makers",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/leaderboard`
    pub const LIST_LEADERBOARD: Operation = Operation {
        id: "listLeaderboard",
        method: "GET",
        path: "/api/v1/leaderboard",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/pick-of-the-day`
    pub const GET_PICK_OF_THE_DAY: Operation = Operation {
        id: "getPickOfTheDay",
        method: "GET",
        path: "/api/v1/pick-of-the-day",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/pick-of-the-day/archive`
    pub const GET_PICK_OF_THE_DAY_ARCHIVE: Operation = Operation {
        id: "getPickOfTheDayArchive",
        method: "GET",
        path: "/api/v1/pick-of-the-day/archive",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/pick-of-the-day/ledger`
    pub const GET_PICK_OF_THE_DAY_LEDGER: Operation = Operation {
        id: "getPickOfTheDayLedger",
        method: "GET",
        path: "/api/v1/pick-of-the-day/ledger",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: false,
    };
    /// `GET /api/v1/leaderboard/trending`
    pub const LIST_TRENDING_WALLETS: Operation = Operation {
        id: "listTrendingWallets",
        method: "GET",
        path: "/api/v1/leaderboard/trending",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/markets/search`
    pub const SEARCH_MARKETS: Operation = Operation {
        id: "searchMarkets",
        method: "GET",
        path: "/api/v1/markets/search",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/content/search`
    pub const SEARCH_CONTENT: Operation = Operation {
        id: "searchContent",
        method: "GET",
        path: "/api/v1/content/search",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/markets/explore`
    pub const EXPLORE_MARKETS: Operation = Operation {
        id: "exploreMarkets",
        method: "GET",
        path: "/api/v1/markets/explore",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/markets/smart-money-flows`
    pub const LIST_SMART_MONEY_FLOWS: Operation = Operation {
        id: "listSmartMoneyFlows",
        method: "GET",
        path: "/api/v1/markets/smart-money-flows",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/markets/sharp-money-flows`
    pub const LIST_SHARP_MONEY_FLOWS: Operation = Operation {
        id: "listSharpMoneyFlows",
        method: "GET",
        path: "/api/v1/markets/sharp-money-flows",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/sports/pre-game-sides`
    pub const LIST_PRE_GAME_SIDES: Operation = Operation {
        id: "listPreGameSides",
        method: "GET",
        path: "/api/v1/sports/pre-game-sides",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/sports/pre-game-side-observations`
    pub const LIST_PRE_GAME_SIDE_OBSERVATIONS: Operation = Operation {
        id: "listPreGameSideObservations",
        method: "GET",
        path: "/api/v1/sports/pre-game-side-observations",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/sports-edge-signals`
    pub const LIST_SPORTS_EDGE_SIGNALS: Operation = Operation {
        id: "listSportsEdgeSignals",
        method: "GET",
        path: "/api/v1/sports-edge-signals",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/sports-edge-observations`
    pub const LIST_SPORTS_EDGE_OBSERVATIONS: Operation = Operation {
        id: "listSportsEdgeObservations",
        method: "GET",
        path: "/api/v1/sports-edge-observations",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/coverage`
    pub const GET_COVERAGE: Operation = Operation {
        id: "getCoverage",
        method: "GET",
        path: "/api/v1/coverage",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: false,
    };
    /// `GET /api/v1/platforms`
    pub const GET_PLATFORMS: Operation = Operation {
        id: "getPlatforms",
        method: "GET",
        path: "/api/v1/platforms",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: false,
    };
    /// `GET /api/v1/market/{condition_id}/holders`
    pub const GET_MARKET_HOLDERS: Operation = Operation {
        id: "getMarketHolders",
        method: "GET",
        path: "/api/v1/market/{condition_id}/holders",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/market/{condition_id}/flow`
    pub const GET_MARKET_FLOW: Operation = Operation {
        id: "getMarketFlow",
        method: "GET",
        path: "/api/v1/market/{condition_id}/flow",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/market/{condition_id}/intel`
    pub const GET_MARKET_INTEL: Operation = Operation {
        id: "getMarketIntel",
        method: "GET",
        path: "/api/v1/market/{condition_id}/intel",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `POST /api/v1/markets/flow/batch`
    pub const BATCH_GET_MARKET_FLOW: Operation = Operation {
        id: "batchGetMarketFlow",
        method: "POST",
        path: "/api/v1/markets/flow/batch",
        accept: "application/json",
        retry: RetryClass::Never,
        requires_credential: true,
    };
    /// `POST /api/v1/markets/intel/batch`
    pub const BATCH_GET_MARKET_INTEL: Operation = Operation {
        id: "batchGetMarketIntel",
        method: "POST",
        path: "/api/v1/markets/intel/batch",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/market/{condition_id}/snapshot`
    pub const GET_MARKET_SNAPSHOT: Operation = Operation {
        id: "getMarketSnapshot",
        method: "GET",
        path: "/api/v1/market/{condition_id}/snapshot",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/market/{condition_id}/candles`
    pub const GET_MARKET_CANDLES: Operation = Operation {
        id: "getMarketCandles",
        method: "GET",
        path: "/api/v1/market/{condition_id}/candles",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/suspicious-trades`
    pub const LIST_SUSPICIOUS_TRADES: Operation = Operation {
        id: "listSuspiciousTrades",
        method: "GET",
        path: "/api/v1/suspicious-trades",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/suspicious-trades/{id}`
    pub const GET_SUSPICIOUS_TRADE: Operation = Operation {
        id: "getSuspiciousTrade",
        method: "GET",
        path: "/api/v1/suspicious-trades/{id}",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/games`
    pub const LIST_GAMES: Operation = Operation {
        id: "listGames",
        method: "GET",
        path: "/api/v1/games",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/games/{event_slug}`
    pub const GET_GAME: Operation = Operation {
        id: "getGame",
        method: "GET",
        path: "/api/v1/games/{event_slug}",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/insider-radar`
    pub const LIST_INSIDER_RADAR: Operation = Operation {
        id: "listInsiderRadar",
        method: "GET",
        path: "/api/v1/insider-radar",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/insider-radar/{id}`
    pub const GET_INSIDER_RADAR_FLAG: Operation = Operation {
        id: "getInsiderRadarFlag",
        method: "GET",
        path: "/api/v1/insider-radar/{id}",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/stream`
    pub const GET_STREAM: Operation = Operation {
        id: "getStream",
        method: "GET",
        path: "/api/v1/stream",
        accept: "text/event-stream",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/events/feed/since`
    pub const GET_EVENT_REPLAY_SINCE: Operation = Operation {
        id: "getEventReplaySince",
        method: "GET",
        path: "/api/v1/events/feed/since",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/webhooks`
    pub const LIST_WEBHOOKS: Operation = Operation {
        id: "listWebhooks",
        method: "GET",
        path: "/api/v1/webhooks",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `POST /api/v1/webhooks`
    pub const CREATE_WEBHOOK: Operation = Operation {
        id: "createWebhook",
        method: "POST",
        path: "/api/v1/webhooks",
        accept: "application/json",
        retry: RetryClass::Keyed,
        requires_credential: true,
    };
    /// `GET /api/v1/webhooks/events`
    pub const LIST_WEBHOOK_EVENTS: Operation = Operation {
        id: "listWebhookEvents",
        method: "GET",
        path: "/api/v1/webhooks/events",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/webhooks/{id}/deliveries`
    pub const LIST_WEBHOOK_DELIVERIES: Operation = Operation {
        id: "listWebhookDeliveries",
        method: "GET",
        path: "/api/v1/webhooks/{id}/deliveries",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `POST /api/v1/webhooks/{id}/deliveries/{delivery_id}/redeliver`
    pub const REDELIVER_WEBHOOK_DELIVERY: Operation = Operation {
        id: "redeliverWebhookDelivery",
        method: "POST",
        path: "/api/v1/webhooks/{id}/deliveries/{delivery_id}/redeliver",
        accept: "application/json",
        retry: RetryClass::Keyed,
        requires_credential: true,
    };
    /// `GET /api/v1/webhooks/{id}`
    pub const GET_WEBHOOK: Operation = Operation {
        id: "getWebhook",
        method: "GET",
        path: "/api/v1/webhooks/{id}",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `PATCH /api/v1/webhooks/{id}`
    pub const UPDATE_WEBHOOK: Operation = Operation {
        id: "updateWebhook",
        method: "PATCH",
        path: "/api/v1/webhooks/{id}",
        accept: "application/json",
        retry: RetryClass::Keyed,
        requires_credential: true,
    };
    /// `DELETE /api/v1/webhooks/{id}`
    pub const DELETE_WEBHOOK: Operation = Operation {
        id: "deleteWebhook",
        method: "DELETE",
        path: "/api/v1/webhooks/{id}",
        accept: "application/json",
        retry: RetryClass::Keyed,
        requires_credential: true,
    };
    /// `POST /api/v1/webhooks/{id}/verify`
    pub const VERIFY_WEBHOOK: Operation = Operation {
        id: "verifyWebhook",
        method: "POST",
        path: "/api/v1/webhooks/{id}/verify",
        accept: "application/json",
        retry: RetryClass::Never,
        requires_credential: true,
    };
    /// `POST /api/v1/webhooks/{id}/rotate-secret/prepare`
    pub const PREPARE_WEBHOOK_SECRET: Operation = Operation {
        id: "prepareWebhookSecret",
        method: "POST",
        path: "/api/v1/webhooks/{id}/rotate-secret/prepare",
        accept: "application/json",
        retry: RetryClass::Keyed,
        requires_credential: true,
    };
    /// `POST /api/v1/webhooks/{id}/rotate-secret/activate`
    pub const ACTIVATE_WEBHOOK_SECRET: Operation = Operation {
        id: "activateWebhookSecret",
        method: "POST",
        path: "/api/v1/webhooks/{id}/rotate-secret/activate",
        accept: "application/json",
        retry: RetryClass::Keyed,
        requires_credential: true,
    };
    /// `POST /api/v1/webhooks/{id}/rotate-secret/retire`
    pub const RETIRE_WEBHOOK_SECRET: Operation = Operation {
        id: "retireWebhookSecret",
        method: "POST",
        path: "/api/v1/webhooks/{id}/rotate-secret/retire",
        accept: "application/json",
        retry: RetryClass::Keyed,
        requires_credential: true,
    };
    /// `POST /api/v1/webhooks/{id}/rotate-secret`
    pub const ROTATE_WEBHOOK_SECRET: Operation = Operation {
        id: "rotateWebhookSecret",
        method: "POST",
        path: "/api/v1/webhooks/{id}/rotate-secret",
        accept: "application/json",
        retry: RetryClass::Keyed,
        requires_credential: true,
    };
    /// `GET /api/v1/health`
    pub const GET_HEALTH: Operation = Operation {
        id: "getHealth",
        method: "GET",
        path: "/api/v1/health",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: false,
    };
    /// `GET /api/v1/mcp`
    pub const OPEN_MCP_EVENT_STREAM: Operation = Operation {
        id: "openMcpEventStream",
        method: "GET",
        path: "/api/v1/mcp",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `POST /api/v1/mcp`
    pub const CREATE_MCP_JSON_RPC_RESPONSE: Operation = Operation {
        id: "createMcpJsonRpcResponse",
        method: "POST",
        path: "/api/v1/mcp",
        accept: "application/json",
        retry: RetryClass::Never,
        requires_credential: true,
    };
    /// `GET /api/v1/reports`
    pub const GET_REPORTS: Operation = Operation {
        id: "getReports",
        method: "GET",
        path: "/api/v1/reports",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/reports/daily`
    pub const GET_DAILY_REPORT_SNAPSHOT: Operation = Operation {
        id: "getDailyReportSnapshot",
        method: "GET",
        path: "/api/v1/reports/daily",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/reports/weekly`
    pub const GET_WEEKLY_REPORT_SNAPSHOT: Operation = Operation {
        id: "getWeeklyReportSnapshot",
        method: "GET",
        path: "/api/v1/reports/weekly",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/reports/monthly`
    pub const GET_MONTHLY_REPORT_SNAPSHOT: Operation = Operation {
        id: "getMonthlyReportSnapshot",
        method: "GET",
        path: "/api/v1/reports/monthly",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/trader/{address}/export`
    pub const GET_TRADER_EXPORT_SNAPSHOT: Operation = Operation {
        id: "getTraderExportSnapshot",
        method: "GET",
        path: "/api/v1/trader/{address}/export",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `POST /api/v1/trader/{address}/export`
    pub const SUBMIT_TRADER_EXPORT: Operation = Operation {
        id: "submitTraderExport",
        method: "POST",
        path: "/api/v1/trader/{address}/export",
        accept: "application/json",
        retry: RetryClass::Never,
        requires_credential: true,
    };
    /// `GET /api/v1/trader/{address}/export/status`
    pub const GET_TRADER_EXPORT_STATUS: Operation = Operation {
        id: "getTraderExportStatus",
        method: "GET",
        path: "/api/v1/trader/{address}/export/status",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `POST /api/v1/trader/{address}/export/cancel`
    pub const CANCEL_TRADER_EXPORT: Operation = Operation {
        id: "cancelTraderExport",
        method: "POST",
        path: "/api/v1/trader/{address}/export/cancel",
        accept: "application/json",
        retry: RetryClass::Never,
        requires_credential: true,
    };
    /// `GET /api/v1/trader/{address}/export/download`
    pub const DOWNLOAD_TRADER_EXPORT: Operation = Operation {
        id: "downloadTraderExport",
        method: "GET",
        path: "/api/v1/trader/{address}/export/download",
        accept: "*/*",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/usage`
    pub const GET_USAGE: Operation = Operation {
        id: "getUsage",
        method: "GET",
        path: "/api/v1/usage",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/market/{condition_id}/context.md`
    pub const GET_MARKET_CONTEXT_MARKDOWN: Operation = Operation {
        id: "getMarketContextMarkdown",
        method: "GET",
        path: "/api/v1/market/{condition_id}/context.md",
        accept: "text/markdown",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/me`
    pub const GET_ACCOUNT_IDENTITY: Operation = Operation {
        id: "getAccountIdentity",
        method: "GET",
        path: "/api/v1/me",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `POST /api/v1/datasets/whale-trades`
    pub const SUBMIT_WHALE_DATASET: Operation = Operation {
        id: "submitWhaleDataset",
        method: "POST",
        path: "/api/v1/datasets/whale-trades",
        accept: "application/json",
        retry: RetryClass::Never,
        requires_credential: true,
    };
    /// `GET /api/v1/datasets/whale-trades/{job_id}`
    pub const GET_WHALE_DATASET_STATUS: Operation = Operation {
        id: "getWhaleDatasetStatus",
        method: "GET",
        path: "/api/v1/datasets/whale-trades/{job_id}",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/datasets/whale-trades/{job_id}/download`
    pub const DOWNLOAD_WHALE_DATASET: Operation = Operation {
        id: "downloadWhaleDataset",
        method: "GET",
        path: "/api/v1/datasets/whale-trades/{job_id}/download",
        accept: "*/*",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `POST /api/v1/datasets/whale-trades/{job_id}/cancel`
    pub const CANCEL_WHALE_DATASET: Operation = Operation {
        id: "cancelWhaleDataset",
        method: "POST",
        path: "/api/v1/datasets/whale-trades/{job_id}/cancel",
        accept: "application/json",
        retry: RetryClass::Never,
        requires_credential: true,
    };
    /// `GET /api/v1/pick-of-the-day/ledger/{pick_id}`
    pub const GET_PICK_OF_THE_DAY_LEDGER_ENTRY: Operation = Operation {
        id: "getPickOfTheDayLedgerEntry",
        method: "GET",
        path: "/api/v1/pick-of-the-day/ledger/{pick_id}",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: false,
    };
    /// `POST /api/v1/webhooks/{id}/verification-attempts`
    pub const CREATE_WEBHOOK_VERIFICATION_ATTEMPT: Operation = Operation {
        id: "createWebhookVerificationAttempt",
        method: "POST",
        path: "/api/v1/webhooks/{id}/verification-attempts",
        accept: "application/json",
        retry: RetryClass::Keyed,
        requires_credential: true,
    };
    /// `GET /api/v1/webhooks/{id}/verification-attempts/{attempt_id}`
    pub const GET_WEBHOOK_VERIFICATION_ATTEMPT: Operation = Operation {
        id: "getWebhookVerificationAttempt",
        method: "GET",
        path: "/api/v1/webhooks/{id}/verification-attempts/{attempt_id}",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/combos/fills`
    pub const LIST_COMBO_FILLS: Operation = Operation {
        id: "listComboFills",
        method: "GET",
        path: "/api/v1/combos/fills",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/combos/summary`
    pub const GET_COMBOS_SUMMARY: Operation = Operation {
        id: "getCombosSummary",
        method: "GET",
        path: "/api/v1/combos/summary",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/combos/{condition_id}`
    pub const GET_COMBO: Operation = Operation {
        id: "getCombo",
        method: "GET",
        path: "/api/v1/combos/{condition_id}",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
    /// `GET /api/v1/edge-hunter`
    pub const GET_EDGE_HUNTER: Operation = Operation {
        id: "getEdgeHunter",
        method: "GET",
        path: "/api/v1/edge-hunter",
        accept: "application/json",
        retry: RetryClass::Read,
        requires_credential: true,
    };
}

/// Every operation in the OpenAPI document, in document order.
pub const OPERATIONS: &[Operation] = &[
    Operation::GET_API_DISCOVERY,
    Operation::REDIRECT_API_OPENAPI_SPEC,
    Operation::REGISTER_AGENT,
    Operation::GET_TRADER,
    Operation::GET_TRADER_CONTEXT_MARKDOWN,
    Operation::GET_TRADER_GRADE_AT,
    Operation::GET_TRADER_CONTEXT,
    Operation::BATCH_GET_TRADERS,
    Operation::GET_POSITION_TIMELINE,
    Operation::GET_TRADER_CATEGORY_RECORDS,
    Operation::GET_TRADER_PNL,
    Operation::GET_POSITION_TIMELINE_BY_ID,
    Operation::LIST_POSITIONS,
    Operation::LIST_LARGE_POSITIONS,
    Operation::LIST_LARGE_TRADES,
    Operation::LIST_WHALE_TRADES,
    Operation::LIST_LARGE_TRADE_HISTORY,
    Operation::LIST_WHALE_TRADE_HISTORY,
    Operation::GET_LARGE_TRADE,
    Operation::GET_WHALE_TRADE,
    Operation::LIST_LARGE_TRADE_COUNTERPARTY_EXECUTIONS,
    Operation::LIST_WHALE_TRADE_COUNTERPARTY_EXECUTIONS,
    Operation::LIST_LARGE_TRADE_COUNTERPARTY_MAKERS,
    Operation::LIST_WHALE_TRADE_COUNTERPARTY_MAKERS,
    Operation::LIST_LEADERBOARD,
    Operation::GET_PICK_OF_THE_DAY,
    Operation::GET_PICK_OF_THE_DAY_ARCHIVE,
    Operation::GET_PICK_OF_THE_DAY_LEDGER,
    Operation::LIST_TRENDING_WALLETS,
    Operation::SEARCH_MARKETS,
    Operation::SEARCH_CONTENT,
    Operation::EXPLORE_MARKETS,
    Operation::LIST_SMART_MONEY_FLOWS,
    Operation::LIST_SHARP_MONEY_FLOWS,
    Operation::LIST_PRE_GAME_SIDES,
    Operation::LIST_PRE_GAME_SIDE_OBSERVATIONS,
    Operation::LIST_SPORTS_EDGE_SIGNALS,
    Operation::LIST_SPORTS_EDGE_OBSERVATIONS,
    Operation::GET_COVERAGE,
    Operation::GET_PLATFORMS,
    Operation::GET_MARKET_HOLDERS,
    Operation::GET_MARKET_FLOW,
    Operation::GET_MARKET_INTEL,
    Operation::BATCH_GET_MARKET_FLOW,
    Operation::BATCH_GET_MARKET_INTEL,
    Operation::GET_MARKET_SNAPSHOT,
    Operation::GET_MARKET_CANDLES,
    Operation::LIST_SUSPICIOUS_TRADES,
    Operation::GET_SUSPICIOUS_TRADE,
    Operation::LIST_GAMES,
    Operation::GET_GAME,
    Operation::LIST_INSIDER_RADAR,
    Operation::GET_INSIDER_RADAR_FLAG,
    Operation::GET_STREAM,
    Operation::GET_EVENT_REPLAY_SINCE,
    Operation::LIST_WEBHOOKS,
    Operation::CREATE_WEBHOOK,
    Operation::LIST_WEBHOOK_EVENTS,
    Operation::LIST_WEBHOOK_DELIVERIES,
    Operation::REDELIVER_WEBHOOK_DELIVERY,
    Operation::GET_WEBHOOK,
    Operation::UPDATE_WEBHOOK,
    Operation::DELETE_WEBHOOK,
    Operation::VERIFY_WEBHOOK,
    Operation::PREPARE_WEBHOOK_SECRET,
    Operation::ACTIVATE_WEBHOOK_SECRET,
    Operation::RETIRE_WEBHOOK_SECRET,
    Operation::ROTATE_WEBHOOK_SECRET,
    Operation::GET_HEALTH,
    Operation::OPEN_MCP_EVENT_STREAM,
    Operation::CREATE_MCP_JSON_RPC_RESPONSE,
    Operation::GET_REPORTS,
    Operation::GET_DAILY_REPORT_SNAPSHOT,
    Operation::GET_WEEKLY_REPORT_SNAPSHOT,
    Operation::GET_MONTHLY_REPORT_SNAPSHOT,
    Operation::GET_TRADER_EXPORT_SNAPSHOT,
    Operation::SUBMIT_TRADER_EXPORT,
    Operation::GET_TRADER_EXPORT_STATUS,
    Operation::CANCEL_TRADER_EXPORT,
    Operation::DOWNLOAD_TRADER_EXPORT,
    Operation::GET_USAGE,
    Operation::GET_MARKET_CONTEXT_MARKDOWN,
    Operation::GET_ACCOUNT_IDENTITY,
    Operation::SUBMIT_WHALE_DATASET,
    Operation::GET_WHALE_DATASET_STATUS,
    Operation::DOWNLOAD_WHALE_DATASET,
    Operation::CANCEL_WHALE_DATASET,
    Operation::GET_PICK_OF_THE_DAY_LEDGER_ENTRY,
    Operation::CREATE_WEBHOOK_VERIFICATION_ATTEMPT,
    Operation::GET_WEBHOOK_VERIFICATION_ATTEMPT,
    Operation::LIST_COMBO_FILLS,
    Operation::GET_COMBOS_SUMMARY,
    Operation::GET_COMBO,
    Operation::GET_EDGE_HUNTER,
];

/// Optional parameters for [`Client::get_trader`] (`GET /api/v1/trader/{address}`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetTraderParams {
    /// Include heavy fields and trust metadata. Repeatable: strategy, categories, quant_metrics, trust.
    pub expand: Vec<Expand>,
    /// Opt into a whole-response freshness ceiling in seconds. The server returns 200 only when data_quality.status is fresh and data_quality.as_of is no older than this value; otherwise it returns 409 with error.reason=freshness_ceiling_unsatisfied. No refresh or alternate read is attempted.
    pub max_age_s: Option<i64>,
    /// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
    ///
    /// Sent as the `If-None-Match` header.
    pub if_none_match: Option<String>,
}

impl GetTraderParams {
    /// Sets `expand`.
    #[must_use]
    pub fn expand<I: IntoIterator<Item = Expand>>(mut self, values: I) -> Self {
        self.expand = values.into_iter().collect();
        self
    }
    /// Sets `max_age_s`.
    #[must_use]
    pub fn max_age_s(mut self, value: i64) -> Self {
        self.max_age_s = Some(value);
        self
    }
    /// Sets `If-None-Match`.
    #[must_use]
    pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
        self.if_none_match = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::get_trader_grade_at`] (`GET /api/v1/trader/{address}/grade-at`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetTraderGradeAtParams {
    /// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
    ///
    /// Sent as the `If-None-Match` header.
    pub if_none_match: Option<String>,
}

impl GetTraderGradeAtParams {
    /// Sets `If-None-Match`.
    #[must_use]
    pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
        self.if_none_match = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::get_trader_context`] (`GET /api/v1/trader/{address}/context`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetTraderContextParams {
    /// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
    ///
    /// Sent as the `If-None-Match` header.
    pub if_none_match: Option<String>,
}

impl GetTraderContextParams {
    /// Sets `If-None-Match`.
    #[must_use]
    pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
        self.if_none_match = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::get_position_timeline`] (`GET /api/v1/trader/{address}/position-timeline`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetPositionTimelineParams {
    /// Maximum number of timeline events to return. Out-of-range values are clamped to 1..100.
    pub limit: Option<i64>,
    /// Pagination cursor from previous response's next_cursor.
    pub cursor: Option<String>,
    /// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
    ///
    /// Sent as the `If-None-Match` header.
    pub if_none_match: Option<String>,
}

impl GetPositionTimelineParams {
    /// Sets `limit`.
    #[must_use]
    pub fn limit(mut self, value: i64) -> Self {
        self.limit = Some(value);
        self
    }
    /// Sets `cursor`.
    #[must_use]
    pub fn cursor(mut self, value: impl Into<String>) -> Self {
        self.cursor = Some(value.into());
        self
    }
    /// Sets `If-None-Match`.
    #[must_use]
    pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
        self.if_none_match = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::get_trader_category_records`] (`GET /api/v1/trader/{address}/categories`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetTraderCategoryRecordsParams {
    /// Filter to one canonical category, matched through the same rollup every other category surface uses: soccer, EPL and champions league all reach Soccer, every esports label folds into Esports, and football is AMERICAN football and reaches Football. A filter that reaches Esports returns the Esports record with all of its games; a game is not a filter of its own, so ask for esports and read games. A sports or esports category the wallet has no record in answers 200 with an empty records array, never 404. Sports and esports only (#27311): a category outside them, or a value that reaches no category, returns 400 bad_request with param category and names the accepted buckets.
    pub category: Option<String>,
    /// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
    ///
    /// Sent as the `If-None-Match` header.
    pub if_none_match: Option<String>,
}

impl GetTraderCategoryRecordsParams {
    /// Sets `category`.
    #[must_use]
    pub fn category(mut self, value: impl Into<String>) -> Self {
        self.category = Some(value.into());
        self
    }
    /// Sets `If-None-Match`.
    #[must_use]
    pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
        self.if_none_match = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::get_trader_pnl`] (`GET /api/v1/trader/{address}/pnl`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetTraderPnlParams {
    /// Inclusive UTC calendar-date lower bound in YYYY-MM-DD form for the daily series (entries and drawdown). Omit for the whole stored history. A value that is not a calendar date, or a from later than to, returns 400 bad_request with error.param from. Does not change stats, monthly or year_totals, which stay defined over the full history.
    pub from: Option<String>,
    /// Inclusive UTC calendar-date upper bound in YYYY-MM-DD form for the daily series (entries and drawdown). Omit for the whole stored history. A value that is not a calendar date returns 400 bad_request with error.param to. Does not change stats, monthly or year_totals.
    pub to: Option<String>,
    /// Which sections of the object to return. Repeatable and comma-separated: entries, stats, monthly, year_totals, drawdown. Omit it, or send it empty, for all five. A section left out is absent from data. An unrecognized name returns 400 bad_request with error.param sections rather than being ignored, so a typo cannot look like a successful request that silently dropped the section you came for.
    pub sections: Vec<Sections>,
}

impl GetTraderPnlParams {
    /// Sets `from`.
    #[must_use]
    pub fn from(mut self, value: impl Into<String>) -> Self {
        self.from = Some(value.into());
        self
    }
    /// Sets `to`.
    #[must_use]
    pub fn to(mut self, value: impl Into<String>) -> Self {
        self.to = Some(value.into());
        self
    }
    /// Sets `sections`.
    #[must_use]
    pub fn sections<I: IntoIterator<Item = Sections>>(mut self, values: I) -> Self {
        self.sections = values.into_iter().collect();
        self
    }
}

/// Optional parameters for [`Client::get_position_timeline_by_id`] (`GET /api/v1/traders/{trader}/position-timeline`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetPositionTimelineByIdParams {
    /// Maximum number of timeline events to return. Out-of-range values are clamped to 1..100.
    pub limit: Option<i64>,
    /// Pagination cursor from previous response's next_cursor.
    pub cursor: Option<String>,
    /// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
    ///
    /// Sent as the `If-None-Match` header.
    pub if_none_match: Option<String>,
}

impl GetPositionTimelineByIdParams {
    /// Sets `limit`.
    #[must_use]
    pub fn limit(mut self, value: i64) -> Self {
        self.limit = Some(value);
        self
    }
    /// Sets `cursor`.
    #[must_use]
    pub fn cursor(mut self, value: impl Into<String>) -> Self {
        self.cursor = Some(value.into());
        self
    }
    /// Sets `If-None-Match`.
    #[must_use]
    pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
        self.if_none_match = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::list_positions`] (`GET /api/v1/positions`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListPositionsParams {
    /// Maximum number of current positions to return. Out-of-range values are clamped to 1..100.
    pub limit: Option<i64>,
    /// Pagination cursor from previous response's next_cursor.
    pub cursor: Option<String>,
    /// live (default) reads the current value-ordered board. snapshot requires wallet and freezes up to 500 matching rows and 2 MB for up to five minutes. Keep consistency=snapshot and the same effective filters on every page; changing filters returns 400. A new first page from the same API key replaces its prior snapshot; replacement or expiry returns cursor_expired.
    pub consistency: Option<Consistency>,
    /// Minimum current position value in USD. Defaults to 100 when omitted, or to 0 when wallet is present; send 0 to include every reconciled position.
    pub min_size: Option<f64>,
    /// Exact match against provider-backed market_canonical.category. Sports and esports only (#27311): a category outside them returns 400 bad_request with param category and names the accepted buckets.
    pub category: Option<String>,
    /// Scope to one market. Accepts the raw provider condition_id or the mkt_-prefixed market id emitted by V1 responses. Combine with min_size=0 for every reconciled position in that market; an unknown id or a resolved market returns []. A market outside sports and esports returns 404 not_found with error.reason=market_out_of_scope (#27311). Without condition_id the board and wallet reads list sports and esports markets only.
    pub condition_id: Option<String>,
    /// Scope to one wallet or a book of wallets (repeatable, up to 25 per request; comma-separated values inside one occurrence also work). Each value is a wallet address, a known username, or a trd_-prefixed trader id, resolved like /api/v1/trader/{address}. The response keeps the board's order and cursor, so pages of a book interleave wallets by current_value_usd. An address this API has never tracked returns its mirror rows or an empty list; a username or trader id that resolves to nothing is a 404 naming wallet; more than 25 values is a 400. min_size defaults to 0 when wallet is present.
    pub wallet: Vec<String>,
    /// Minimum trader grade allowlist. `A` matches S and A; `B` matches S, A, B; etc.
    pub min_grade: Option<Grade>,
    /// Filter by the binary outcome side. `yes` maps to outcome_index=0, `no` to outcome_index=1.
    pub side: Option<Side>,
    /// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
    ///
    /// Sent as the `If-None-Match` header.
    pub if_none_match: Option<String>,
}

impl ListPositionsParams {
    /// Sets `limit`.
    #[must_use]
    pub fn limit(mut self, value: i64) -> Self {
        self.limit = Some(value);
        self
    }
    /// Sets `cursor`.
    #[must_use]
    pub fn cursor(mut self, value: impl Into<String>) -> Self {
        self.cursor = Some(value.into());
        self
    }
    /// Sets `consistency`.
    #[must_use]
    pub fn consistency(mut self, value: Consistency) -> Self {
        self.consistency = Some(value);
        self
    }
    /// Sets `min_size`.
    #[must_use]
    pub fn min_size(mut self, value: f64) -> Self {
        self.min_size = Some(value);
        self
    }
    /// Sets `category`.
    #[must_use]
    pub fn category(mut self, value: impl Into<String>) -> Self {
        self.category = Some(value.into());
        self
    }
    /// Sets `condition_id`.
    #[must_use]
    pub fn condition_id(mut self, value: impl Into<String>) -> Self {
        self.condition_id = Some(value.into());
        self
    }
    /// Sets `wallet`.
    #[must_use]
    pub fn wallet<I, S>(mut self, values: I) -> Self
    where
        I: IntoIterator<Item = S>,
        S: Into<String>,
    {
        self.wallet = values.into_iter().map(Into::into).collect();
        self
    }
    /// Sets `min_grade`.
    #[must_use]
    pub fn min_grade(mut self, value: Grade) -> Self {
        self.min_grade = Some(value);
        self
    }
    /// Sets `side`.
    #[must_use]
    pub fn side(mut self, value: Side) -> Self {
        self.side = Some(value);
        self
    }
    /// Sets `If-None-Match`.
    #[must_use]
    pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
        self.if_none_match = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::list_large_positions`] (`GET /api/v1/large-positions`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListLargePositionsParams {
    /// Maximum number of large positions to return. Out-of-range values are clamped to 1..100.
    pub limit: Option<i64>,
    /// Opaque pagination cursor from a previous response.
    pub cursor: Option<String>,
    /// Minimum position value in USD. Raises the feed's own floor of 50,000 USD; a smaller value does not lower it.
    pub min_size: Option<f64>,
    /// One RFC 4180 CSV record of exact current provider-backed market_canonical.category values. Legacy unquoted lists such as NBA,WNBA remain valid; values containing commas, quotes, or newlines are CSV-quoted. Matching is case-insensitive. Malformed quoted input fails closed as one unknown exact category. A value outside sports and esports returns 400 bad_request with param=category (#27305), as on GET /api/v1/markets/explore.
    pub category: Option<String>,
    /// Minimum trader grade.
    pub min_grade: Option<Grade>,
    /// Scope to one market. Accepts the raw provider condition_id or the mkt_-prefixed market id (round-trips a value from a list response). Must be 0x followed by 64 hexadecimal characters after any mkt_ prefix is stripped; any other value returns 400. Polymarket-only; an unknown but well-formed id returns []. A market outside sports and esports returns 404 not_found with error.reason=market_out_of_scope (#27305).
    pub condition_id: Option<String>,
}

impl ListLargePositionsParams {
    /// Sets `limit`.
    #[must_use]
    pub fn limit(mut self, value: i64) -> Self {
        self.limit = Some(value);
        self
    }
    /// Sets `cursor`.
    #[must_use]
    pub fn cursor(mut self, value: impl Into<String>) -> Self {
        self.cursor = Some(value.into());
        self
    }
    /// Sets `min_size`.
    #[must_use]
    pub fn min_size(mut self, value: f64) -> Self {
        self.min_size = Some(value);
        self
    }
    /// Sets `category`.
    #[must_use]
    pub fn category(mut self, value: impl Into<String>) -> Self {
        self.category = Some(value.into());
        self
    }
    /// Sets `min_grade`.
    #[must_use]
    pub fn min_grade(mut self, value: Grade) -> Self {
        self.min_grade = Some(value);
        self
    }
    /// Sets `condition_id`.
    #[must_use]
    pub fn condition_id(mut self, value: impl Into<String>) -> Self {
        self.condition_id = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::list_large_trades`] (`GET /api/v1/large-trades`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListLargeTradesParams {
    /// Maximum number of recent large trades to return. Out-of-range values are clamped to 1..100.
    pub limit: Option<i64>,
    /// Pagination cursor from previous response's next_cursor.
    pub cursor: Option<String>,
    /// Minimum trade size in USD.
    pub min_size: Option<f64>,
    /// Filter by market category (case-insensitive). A canonical bucket name (e.g. Basketball) matches every provider member that folds into it (NBA, WNBA, NCAAB); a raw provider value also resolves to its bucket. Sports and esports only (#27430): a category outside them returns 400 bad_request with param category and names the accepted buckets.
    pub category: Option<String>,
    /// Minimum trader grade.
    pub min_grade: Option<Grade>,
    /// When true, return only rows with persisted suspicion_score >= 60. The filter is applied before SQL-backed limit + 1 pagination.
    pub suspicious_only: Option<bool>,
    /// Keep only trades whose market_volume_share is known and at least this. A fraction, not a percent: 0.01 is one percent of the market's traded volume. A trade whose share is unavailable is never returned by a non-zero value, because an unavailable share cannot be said to clear a floor.
    pub min_market_volume_share: Option<f64>,
    /// Order of the returned page. recent is newest first and is the default. market_volume_share ranks by each trade's share of its market's traded volume, biggest first, with a trade whose share is unavailable last. That ranking reads the last 30 days, because the share is computed for each request and an unbounded ranking cannot be served inside the documented latency budget. A cursor is bound to the order it was minted in, so a continuation cannot cross from one order into the other.
    pub sort: Option<Sort>,
    /// Return only the trades recorded after this one. Pass the id of a large trade this API returned (wt_<n>, or the bare integer). The answer keeps the list shape and newest-first order, and next_cursor pages within it. After means commit order: a trade recorded late with an earlier traded_at is still returned, and a trade whose write has not committed yet is returned on a later poll, never skipped. To poll, send the id of the first trade on the first page of your last answer that had trades, with If-None-Match set to the ETag you last received; when nothing new was recorded the answer is 304 with an empty body. A late trade can come back once, so deduplicate on id. Only with sort=recent. An id that names no trade, or one more than 10000 trades behind the newest, answers 400 with error.param since; request the list without since and continue from its first trade.
    pub since: Option<String>,
    /// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
    ///
    /// Sent as the `If-None-Match` header.
    pub if_none_match: Option<String>,
}

impl ListLargeTradesParams {
    /// Sets `limit`.
    #[must_use]
    pub fn limit(mut self, value: i64) -> Self {
        self.limit = Some(value);
        self
    }
    /// Sets `cursor`.
    #[must_use]
    pub fn cursor(mut self, value: impl Into<String>) -> Self {
        self.cursor = Some(value.into());
        self
    }
    /// Sets `min_size`.
    #[must_use]
    pub fn min_size(mut self, value: f64) -> Self {
        self.min_size = Some(value);
        self
    }
    /// Sets `category`.
    #[must_use]
    pub fn category(mut self, value: impl Into<String>) -> Self {
        self.category = Some(value.into());
        self
    }
    /// Sets `min_grade`.
    #[must_use]
    pub fn min_grade(mut self, value: Grade) -> Self {
        self.min_grade = Some(value);
        self
    }
    /// Sets `suspicious_only`.
    #[must_use]
    pub fn suspicious_only(mut self, value: bool) -> Self {
        self.suspicious_only = Some(value);
        self
    }
    /// Sets `min_market_volume_share`.
    #[must_use]
    pub fn min_market_volume_share(mut self, value: f64) -> Self {
        self.min_market_volume_share = Some(value);
        self
    }
    /// Sets `sort`.
    #[must_use]
    pub fn sort(mut self, value: Sort) -> Self {
        self.sort = Some(value);
        self
    }
    /// Sets `since`.
    #[must_use]
    pub fn since(mut self, value: impl Into<String>) -> Self {
        self.since = Some(value.into());
        self
    }
    /// Sets `If-None-Match`.
    #[must_use]
    pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
        self.if_none_match = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::list_whale_trades`] (`GET /api/v1/whale-trades`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListWhaleTradesParams {
    /// Maximum number of recent large trades to return. Out-of-range values are clamped to 1..100.
    pub limit: Option<i64>,
    /// Pagination cursor from previous response's next_cursor.
    pub cursor: Option<String>,
    /// Minimum trade size in USD.
    pub min_size: Option<f64>,
    /// Filter by market category (case-insensitive). A canonical bucket name (e.g. Basketball) matches every provider member that folds into it (NBA, WNBA, NCAAB); a raw provider value also resolves to its bucket. Sports and esports only (#27430): a category outside them returns 400 bad_request with param category and names the accepted buckets.
    pub category: Option<String>,
    /// Minimum trader grade as of today (trader.grade). A means S or A, B means S, A or B.
    pub min_grade: Option<Grade>,
    /// When true, return only rows with persisted suspicion_score >= 60. The filter is applied before SQL-backed limit + 1 pagination.
    pub suspicious_only: Option<bool>,
    /// Keep only trades whose market_volume_share is known and at least this. A fraction, not a percent: 0.01 is one percent of the market's traded volume. A trade whose share is unavailable is never returned by a non-zero value, because an unavailable share cannot be said to clear a floor.
    pub min_market_volume_share: Option<f64>,
    /// Order of the returned page. recent is newest first and is the default. market_volume_share ranks by each trade's share of its market's traded volume, biggest first, with a trade whose share is unavailable last. That ranking reads the last 30 days, because the share is computed for each request and an unbounded ranking cannot be served inside the documented latency budget. A cursor is bound to the order it was minted in, so a continuation cannot cross from one order into the other.
    pub sort: Option<Sort>,
    /// Return only the trades recorded after this one. Pass the id of a large trade this API returned (wt_<n>, or the bare integer). The answer keeps the list shape and newest-first order, and next_cursor pages within it. After means commit order: a trade recorded late with an earlier traded_at is still returned, and a trade whose write has not committed yet is returned on a later poll, never skipped. To poll, send the id of the first trade on the first page of your last answer that had trades, with If-None-Match set to the ETag you last received; when nothing new was recorded the answer is 304 with an empty body. A late trade can come back once, so deduplicate on id. Only with sort=recent. An id that names no trade, or one more than 10000 trades behind the newest, answers 400 with error.param since; request the list without since and continue from its first trade.
    pub since: Option<String>,
    /// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
    ///
    /// Sent as the `If-None-Match` header.
    pub if_none_match: Option<String>,
}

impl ListWhaleTradesParams {
    /// Sets `limit`.
    #[must_use]
    pub fn limit(mut self, value: i64) -> Self {
        self.limit = Some(value);
        self
    }
    /// Sets `cursor`.
    #[must_use]
    pub fn cursor(mut self, value: impl Into<String>) -> Self {
        self.cursor = Some(value.into());
        self
    }
    /// Sets `min_size`.
    #[must_use]
    pub fn min_size(mut self, value: f64) -> Self {
        self.min_size = Some(value);
        self
    }
    /// Sets `category`.
    #[must_use]
    pub fn category(mut self, value: impl Into<String>) -> Self {
        self.category = Some(value.into());
        self
    }
    /// Sets `min_grade`.
    #[must_use]
    pub fn min_grade(mut self, value: Grade) -> Self {
        self.min_grade = Some(value);
        self
    }
    /// Sets `suspicious_only`.
    #[must_use]
    pub fn suspicious_only(mut self, value: bool) -> Self {
        self.suspicious_only = Some(value);
        self
    }
    /// Sets `min_market_volume_share`.
    #[must_use]
    pub fn min_market_volume_share(mut self, value: f64) -> Self {
        self.min_market_volume_share = Some(value);
        self
    }
    /// Sets `sort`.
    #[must_use]
    pub fn sort(mut self, value: Sort) -> Self {
        self.sort = Some(value);
        self
    }
    /// Sets `since`.
    #[must_use]
    pub fn since(mut self, value: impl Into<String>) -> Self {
        self.since = Some(value.into());
        self
    }
    /// Sets `If-None-Match`.
    #[must_use]
    pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
        self.if_none_match = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::list_large_trade_history`] (`GET /api/v1/large-trades/history`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListLargeTradeHistoryParams {
    /// Maximum number of historical large trades to return. Out-of-range values are clamped to 1..100.
    pub limit: Option<i64>,
    /// Pagination cursor from previous response's next_cursor. Prefix: wth_. URL-encode when replaying as a query parameter.
    pub cursor: Option<String>,
    /// Minimum trade size in USD. The capture floor was 3,000 USD before 2026-07-06 and 10,000 USD from then (1,000 USD in earnings markets), so 10000 gives one size rule across the whole archive. From 2026-09-23 a fill must also be at least 0.1% of its market's recorded traded volume (Polymarket's own share count); rows written before that date were not re-filtered.
    pub min_size: Option<f64>,
    /// Exact raw provider condition_id. Unknown markets return an empty list.
    pub condition_id: Option<String>,
    /// Trader wallet address, timestamp-suffixed wallet alias, username, or trd_-prefixed trader ID, resolved against the traders table. Unknown traders return an empty list.
    pub trader: Option<String>,
    /// Filter by market category (case-insensitive). A canonical bucket name (e.g. Basketball) matches every provider member that folds into it (NBA, WNBA, NCAAB); a raw provider value also resolves to its bucket. Sports and esports only (#27430): a category outside them returns 400 bad_request with param category and names the accepted buckets.
    pub category: Option<String>,
    /// Minimum trader grade as of today (trader.grade), not at trade time. On a historical window it selects wallets by a grade they may have earned after the trade; for a point-in-time rule filter on trader.grade_at_trade instead. A means S or A, B means S, A or B.
    pub min_grade: Option<Grade>,
    /// When true, return only rows with persisted suspicion_score >= 60. The filter is applied before SQL-backed limit + 1 pagination.
    pub suspicious_only: Option<bool>,
    /// Filter by whale_alerts.platform. all is equivalent to omitted.
    pub platform: Option<Platform>,
    /// Inclusive RFC3339 lower bound on whale_alerts.traded_at.
    pub from: Option<String>,
    /// Exclusive RFC3339 upper bound on whale_alerts.traded_at. Must be after from when both are present.
    pub to: Option<String>,
    /// Keep only trades whose market_volume_share is known and at least this. A fraction, not a percent: 0.01 is one percent of the market's traded volume. A trade whose share is unavailable is never returned by a non-zero value, because an unavailable share cannot be said to clear a floor.
    pub min_market_volume_share: Option<f64>,
    /// Order of the returned page. recent is newest first and is the default. market_volume_share ranks by each trade's share of its market's traded volume, biggest first, with a trade whose share is unavailable last. That ranking reads from, or the last 30 days when from is omitted, for the same reason. A cursor is bound to the order it was minted in, so a continuation cannot cross from one order into the other.
    pub sort: Option<Sort>,
    /// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
    ///
    /// Sent as the `If-None-Match` header.
    pub if_none_match: Option<String>,
}

impl ListLargeTradeHistoryParams {
    /// Sets `limit`.
    #[must_use]
    pub fn limit(mut self, value: i64) -> Self {
        self.limit = Some(value);
        self
    }
    /// Sets `cursor`.
    #[must_use]
    pub fn cursor(mut self, value: impl Into<String>) -> Self {
        self.cursor = Some(value.into());
        self
    }
    /// Sets `min_size`.
    #[must_use]
    pub fn min_size(mut self, value: f64) -> Self {
        self.min_size = Some(value);
        self
    }
    /// Sets `condition_id`.
    #[must_use]
    pub fn condition_id(mut self, value: impl Into<String>) -> Self {
        self.condition_id = Some(value.into());
        self
    }
    /// Sets `trader`.
    #[must_use]
    pub fn trader(mut self, value: impl Into<String>) -> Self {
        self.trader = Some(value.into());
        self
    }
    /// Sets `category`.
    #[must_use]
    pub fn category(mut self, value: impl Into<String>) -> Self {
        self.category = Some(value.into());
        self
    }
    /// Sets `min_grade`.
    #[must_use]
    pub fn min_grade(mut self, value: Grade) -> Self {
        self.min_grade = Some(value);
        self
    }
    /// Sets `suspicious_only`.
    #[must_use]
    pub fn suspicious_only(mut self, value: bool) -> Self {
        self.suspicious_only = Some(value);
        self
    }
    /// Sets `platform`.
    #[must_use]
    pub fn platform(mut self, value: Platform) -> Self {
        self.platform = Some(value);
        self
    }
    /// Sets `from`.
    #[must_use]
    pub fn from(mut self, value: impl Into<String>) -> Self {
        self.from = Some(value.into());
        self
    }
    /// Sets `to`.
    #[must_use]
    pub fn to(mut self, value: impl Into<String>) -> Self {
        self.to = Some(value.into());
        self
    }
    /// Sets `min_market_volume_share`.
    #[must_use]
    pub fn min_market_volume_share(mut self, value: f64) -> Self {
        self.min_market_volume_share = Some(value);
        self
    }
    /// Sets `sort`.
    #[must_use]
    pub fn sort(mut self, value: Sort) -> Self {
        self.sort = Some(value);
        self
    }
    /// Sets `If-None-Match`.
    #[must_use]
    pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
        self.if_none_match = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::list_whale_trade_history`] (`GET /api/v1/whale-trades/history`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListWhaleTradeHistoryParams {
    /// Maximum number of historical large trades to return. Out-of-range values are clamped to 1..100.
    pub limit: Option<i64>,
    /// Pagination cursor from previous response's next_cursor. Prefix: wth_. URL-encode when replaying as a query parameter.
    pub cursor: Option<String>,
    /// Minimum trade size in USD.
    pub min_size: Option<f64>,
    /// Exact raw provider condition_id. Unknown markets return an empty list.
    pub condition_id: Option<String>,
    /// Trader wallet address, timestamp-suffixed wallet alias, or username resolved against the traders table. Unknown traders return an empty list.
    pub trader: Option<String>,
    /// Filter by market category (case-insensitive). A canonical bucket name (e.g. Basketball) matches every provider member that folds into it (NBA, WNBA, NCAAB); a raw provider value also resolves to its bucket. Sports and esports only (#27430): a category outside them returns 400 bad_request with param category and names the accepted buckets.
    pub category: Option<String>,
    /// Minimum trader grade.
    pub min_grade: Option<Grade>,
    /// When true, return only rows with persisted suspicion_score >= 60. The filter is applied before SQL-backed limit + 1 pagination.
    pub suspicious_only: Option<bool>,
    /// Filter by whale_alerts.platform. all is equivalent to omitted.
    pub platform: Option<Platform>,
    /// Inclusive RFC3339 lower bound on whale_alerts.traded_at.
    pub from: Option<String>,
    /// Exclusive RFC3339 upper bound on whale_alerts.traded_at. Must be after from when both are present.
    pub to: Option<String>,
    /// Keep only trades whose market_volume_share is known and at least this. A fraction, not a percent: 0.01 is one percent of the market's traded volume. A trade whose share is unavailable is never returned by a non-zero value, because an unavailable share cannot be said to clear a floor.
    pub min_market_volume_share: Option<f64>,
    /// Order of the returned page. recent is newest first and is the default. market_volume_share ranks by each trade's share of its market's traded volume, biggest first, with a trade whose share is unavailable last. That ranking reads from, or the last 30 days when from is omitted, for the same reason. A cursor is bound to the order it was minted in, so a continuation cannot cross from one order into the other.
    pub sort: Option<Sort>,
    /// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
    ///
    /// Sent as the `If-None-Match` header.
    pub if_none_match: Option<String>,
}

impl ListWhaleTradeHistoryParams {
    /// Sets `limit`.
    #[must_use]
    pub fn limit(mut self, value: i64) -> Self {
        self.limit = Some(value);
        self
    }
    /// Sets `cursor`.
    #[must_use]
    pub fn cursor(mut self, value: impl Into<String>) -> Self {
        self.cursor = Some(value.into());
        self
    }
    /// Sets `min_size`.
    #[must_use]
    pub fn min_size(mut self, value: f64) -> Self {
        self.min_size = Some(value);
        self
    }
    /// Sets `condition_id`.
    #[must_use]
    pub fn condition_id(mut self, value: impl Into<String>) -> Self {
        self.condition_id = Some(value.into());
        self
    }
    /// Sets `trader`.
    #[must_use]
    pub fn trader(mut self, value: impl Into<String>) -> Self {
        self.trader = Some(value.into());
        self
    }
    /// Sets `category`.
    #[must_use]
    pub fn category(mut self, value: impl Into<String>) -> Self {
        self.category = Some(value.into());
        self
    }
    /// Sets `min_grade`.
    #[must_use]
    pub fn min_grade(mut self, value: Grade) -> Self {
        self.min_grade = Some(value);
        self
    }
    /// Sets `suspicious_only`.
    #[must_use]
    pub fn suspicious_only(mut self, value: bool) -> Self {
        self.suspicious_only = Some(value);
        self
    }
    /// Sets `platform`.
    #[must_use]
    pub fn platform(mut self, value: Platform) -> Self {
        self.platform = Some(value);
        self
    }
    /// Sets `from`.
    #[must_use]
    pub fn from(mut self, value: impl Into<String>) -> Self {
        self.from = Some(value.into());
        self
    }
    /// Sets `to`.
    #[must_use]
    pub fn to(mut self, value: impl Into<String>) -> Self {
        self.to = Some(value.into());
        self
    }
    /// Sets `min_market_volume_share`.
    #[must_use]
    pub fn min_market_volume_share(mut self, value: f64) -> Self {
        self.min_market_volume_share = Some(value);
        self
    }
    /// Sets `sort`.
    #[must_use]
    pub fn sort(mut self, value: Sort) -> Self {
        self.sort = Some(value);
        self
    }
    /// Sets `If-None-Match`.
    #[must_use]
    pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
        self.if_none_match = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::get_large_trade`] (`GET /api/v1/large-trades/{id}`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetLargeTradeParams {
    /// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
    ///
    /// Sent as the `If-None-Match` header.
    pub if_none_match: Option<String>,
}

impl GetLargeTradeParams {
    /// Sets `If-None-Match`.
    #[must_use]
    pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
        self.if_none_match = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::get_whale_trade`] (`GET /api/v1/whale-trades/{id}`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetWhaleTradeParams {
    /// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
    ///
    /// Sent as the `If-None-Match` header.
    pub if_none_match: Option<String>,
}

impl GetWhaleTradeParams {
    /// Sets `If-None-Match`.
    #[must_use]
    pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
        self.if_none_match = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::list_large_trade_counterparty_executions`] (`GET /api/v1/large-trades/{id}/counterparties/executions`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListLargeTradeCounterpartyExecutionsParams {
    /// Opaque cursor from the previous response's next_cursor.
    pub cursor: Option<String>,
    /// Maximum number of counterparty execution rows to return. Out-of-range values are clamped to 1..100.
    pub limit: Option<i64>,
}

impl ListLargeTradeCounterpartyExecutionsParams {
    /// Sets `cursor`.
    #[must_use]
    pub fn cursor(mut self, value: impl Into<String>) -> Self {
        self.cursor = Some(value.into());
        self
    }
    /// Sets `limit`.
    #[must_use]
    pub fn limit(mut self, value: i64) -> Self {
        self.limit = Some(value);
        self
    }
}

/// Optional parameters for [`Client::list_whale_trade_counterparty_executions`] (`GET /api/v1/whale-trades/{id}/counterparties/executions`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListWhaleTradeCounterpartyExecutionsParams {
    /// Opaque cursor from the previous response's next_cursor.
    pub cursor: Option<String>,
    /// Maximum number of counterparty execution rows to return. Out-of-range values are clamped to 1..100.
    pub limit: Option<i64>,
}

impl ListWhaleTradeCounterpartyExecutionsParams {
    /// Sets `cursor`.
    #[must_use]
    pub fn cursor(mut self, value: impl Into<String>) -> Self {
        self.cursor = Some(value.into());
        self
    }
    /// Sets `limit`.
    #[must_use]
    pub fn limit(mut self, value: i64) -> Self {
        self.limit = Some(value);
        self
    }
}

/// Optional parameters for [`Client::list_large_trade_counterparty_makers`] (`GET /api/v1/large-trades/{id}/counterparties/executions/{execution_id}/makers`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListLargeTradeCounterpartyMakersParams {
    /// Opaque cursor from the previous response's next_cursor.
    pub cursor: Option<String>,
    /// Maximum number of maker rows to return. Out-of-range values are clamped to 1..100.
    pub limit: Option<i64>,
}

impl ListLargeTradeCounterpartyMakersParams {
    /// Sets `cursor`.
    #[must_use]
    pub fn cursor(mut self, value: impl Into<String>) -> Self {
        self.cursor = Some(value.into());
        self
    }
    /// Sets `limit`.
    #[must_use]
    pub fn limit(mut self, value: i64) -> Self {
        self.limit = Some(value);
        self
    }
}

/// Optional parameters for [`Client::list_whale_trade_counterparty_makers`] (`GET /api/v1/whale-trades/{id}/counterparties/executions/{execution_id}/makers`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListWhaleTradeCounterpartyMakersParams {
    /// Opaque cursor from the previous response's next_cursor.
    pub cursor: Option<String>,
    /// Maximum number of maker rows to return. Out-of-range values are clamped to 1..100.
    pub limit: Option<i64>,
}

impl ListWhaleTradeCounterpartyMakersParams {
    /// Sets `cursor`.
    #[must_use]
    pub fn cursor(mut self, value: impl Into<String>) -> Self {
        self.cursor = Some(value.into());
        self
    }
    /// Sets `limit`.
    #[must_use]
    pub fn limit(mut self, value: i64) -> Self {
        self.limit = Some(value);
        self
    }
}

/// Optional parameters for [`Client::list_leaderboard`] (`GET /api/v1/leaderboard`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListLeaderboardParams {
    /// Maximum number of ranked traders to return. Out-of-range values are clamped to 1..100.
    pub limit: Option<i64>,
    /// Opaque lbv1_ pagination cursor from a prior response. It binds the finite score/address boundary to the committed leaderboard generation and the effective category/strategy filters; legacy, malformed, non-finite, and unsupported-version cursors are rejected.
    pub cursor: Option<String>,
    /// Filter by category: a sport or esports bucket. Values are matched to canonical category buckets: league values fold into their sport (NBA and NCAAB into Basketball, NFL into Football). Mapped buckets are case-insensitive; passthrough buckets (Cricket, Sports) match case-sensitively against the provider-native bucket key, so use exact casing. Sports and esports only (#27306): a category outside them returns 400 bad_request with param category and names the accepted buckets.
    pub category: Option<String>,
    /// Filter by observed trading style. Current styles: two_sided, category_focused, high_activity, diversified, mixed, unclassified. Current styles count the wallet's sports and esports markets only. The original ten archetype identifiers remain accepted for historical rows until normal reclassification. Style describes recorded behavior; grade measures performance.
    pub strategy: Option<Strategy>,
    /// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
    ///
    /// Sent as the `If-None-Match` header.
    pub if_none_match: Option<String>,
}

impl ListLeaderboardParams {
    /// Sets `limit`.
    #[must_use]
    pub fn limit(mut self, value: i64) -> Self {
        self.limit = Some(value);
        self
    }
    /// Sets `cursor`.
    #[must_use]
    pub fn cursor(mut self, value: impl Into<String>) -> Self {
        self.cursor = Some(value.into());
        self
    }
    /// Sets `category`.
    #[must_use]
    pub fn category(mut self, value: impl Into<String>) -> Self {
        self.category = Some(value.into());
        self
    }
    /// Sets `strategy`.
    #[must_use]
    pub fn strategy(mut self, value: Strategy) -> Self {
        self.strategy = Some(value);
        self
    }
    /// Sets `If-None-Match`.
    #[must_use]
    pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
        self.if_none_match = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::get_pick_of_the_day`] (`GET /api/v1/pick-of-the-day`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetPickOfTheDayParams {
    /// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
    ///
    /// Sent as the `If-None-Match` header.
    pub if_none_match: Option<String>,
}

impl GetPickOfTheDayParams {
    /// Sets `If-None-Match`.
    #[must_use]
    pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
        self.if_none_match = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::get_pick_of_the_day_archive`] (`GET /api/v1/pick-of-the-day/archive`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetPickOfTheDayArchiveParams {
    /// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
    ///
    /// Sent as the `If-None-Match` header.
    pub if_none_match: Option<String>,
}

impl GetPickOfTheDayArchiveParams {
    /// Sets `If-None-Match`.
    #[must_use]
    pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
        self.if_none_match = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::get_pick_of_the_day_ledger`] (`GET /api/v1/pick-of-the-day/ledger`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetPickOfTheDayLedgerParams {
    /// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
    ///
    /// Sent as the `If-None-Match` header.
    pub if_none_match: Option<String>,
}

impl GetPickOfTheDayLedgerParams {
    /// Sets `If-None-Match`.
    #[must_use]
    pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
        self.if_none_match = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::list_trending_wallets`] (`GET /api/v1/leaderboard/trending`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListTrendingWalletsParams {
    /// Polymarket's weekly leaderboard caps the ranked set at 50 wallets; requests above 50 still return at most 50. Out-of-range values are clamped to 1..50.
    pub limit: Option<i64>,
    /// Opaque pagination cursor from a previous response, bound to its effective limit, window and ranked-board generation. A changed board or request scope returns error.reason=cursor_expired; legacy page-only cursors must restart from page one.
    pub cursor: Option<String>,
    /// Trailing window.
    pub window: Option<ListTrendingWalletsWindow>,
}

impl ListTrendingWalletsParams {
    /// Sets `limit`.
    #[must_use]
    pub fn limit(mut self, value: i64) -> Self {
        self.limit = Some(value);
        self
    }
    /// Sets `cursor`.
    #[must_use]
    pub fn cursor(mut self, value: impl Into<String>) -> Self {
        self.cursor = Some(value.into());
        self
    }
    /// Sets `window`.
    #[must_use]
    pub fn window(mut self, value: ListTrendingWalletsWindow) -> Self {
        self.window = Some(value);
        self
    }
}

/// Optional parameters for [`Client::search_markets`] (`GET /api/v1/markets/search`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct SearchMarketsParams {
    /// Maximum number of matching markets to return. Out-of-range values are clamped to 1..100.
    pub limit: Option<i64>,
    /// Pagination cursor from previous response's next_cursor.
    pub cursor: Option<String>,
    /// Filter by market status. A market is closed once Polymarket has closed trading or it has resolved, and active otherwise; all returns both.
    pub status: Option<SearchMarketsStatus>,
    /// Filter by category. Sports and esports only (#27411): a category outside them returns 400 bad_request with param category and names the accepted buckets.
    pub category: Option<String>,
}

impl SearchMarketsParams {
    /// Sets `limit`.
    #[must_use]
    pub fn limit(mut self, value: i64) -> Self {
        self.limit = Some(value);
        self
    }
    /// Sets `cursor`.
    #[must_use]
    pub fn cursor(mut self, value: impl Into<String>) -> Self {
        self.cursor = Some(value.into());
        self
    }
    /// Sets `status`.
    #[must_use]
    pub fn status(mut self, value: SearchMarketsStatus) -> Self {
        self.status = Some(value);
        self
    }
    /// Sets `category`.
    #[must_use]
    pub fn category(mut self, value: impl Into<String>) -> Self {
        self.category = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::search_content`] (`GET /api/v1/content/search`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct SearchContentParams {
    /// Maximum content items to return. Out-of-range values are clamped to 1..50.
    pub limit: Option<i64>,
}

impl SearchContentParams {
    /// Sets `limit`.
    #[must_use]
    pub fn limit(mut self, value: i64) -> Self {
        self.limit = Some(value);
        self
    }
}

/// Optional parameters for [`Client::explore_markets`] (`GET /api/v1/markets/explore`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ExploreMarketsParams {
    /// Filter by market category (case-insensitive). A canonical bucket name (e.g. Basketball) matches every provider member that folds into it (NBA, WNBA, NCAAB); a raw provider value also resolves to its bucket. Facet values are returned as the canonical bucket. Sports and esports only (#27411): a category outside them returns 400 bad_request with param category and names the accepted buckets.
    pub category: Option<String>,
    /// Filter by market status. A market is closed once Polymarket has closed trading or it has resolved, and active otherwise; all returns both.
    pub status: Option<SearchMarketsStatus>,
    /// Filter by source platform. Explore is Polymarket-only; polymarket is the only supported value and the parameter is accepted for backward-compatibility but does not change the result set.
    pub platform: Option<String>,
    /// Sort order for the discovery feed. `large_trades` ranks by large-trade activity; `whales` is its deprecated spelling and selects the same order.
    pub sort: Option<ExploreMarketsSort>,
    /// Opaque pagination cursor from the previous response.
    pub cursor: Option<String>,
    /// Page size. Out-of-range values are clamped to 1..48.
    pub limit: Option<i64>,
    /// Keyword search against market titles. At most 64 characters before whitespace trimming.
    pub q: Option<String>,
    /// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
    ///
    /// Sent as the `If-None-Match` header.
    pub if_none_match: Option<String>,
}

impl ExploreMarketsParams {
    /// Sets `category`.
    #[must_use]
    pub fn category(mut self, value: impl Into<String>) -> Self {
        self.category = Some(value.into());
        self
    }
    /// Sets `status`.
    #[must_use]
    pub fn status(mut self, value: SearchMarketsStatus) -> Self {
        self.status = Some(value);
        self
    }
    /// Sets `platform`.
    #[must_use]
    pub fn platform(mut self, value: impl Into<String>) -> Self {
        self.platform = Some(value.into());
        self
    }
    /// Sets `sort`.
    #[must_use]
    pub fn sort(mut self, value: ExploreMarketsSort) -> Self {
        self.sort = Some(value);
        self
    }
    /// Sets `cursor`.
    #[must_use]
    pub fn cursor(mut self, value: impl Into<String>) -> Self {
        self.cursor = Some(value.into());
        self
    }
    /// Sets `limit`.
    #[must_use]
    pub fn limit(mut self, value: i64) -> Self {
        self.limit = Some(value);
        self
    }
    /// Sets `q`.
    #[must_use]
    pub fn q(mut self, value: impl Into<String>) -> Self {
        self.q = Some(value.into());
        self
    }
    /// Sets `If-None-Match`.
    #[must_use]
    pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
        self.if_none_match = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::list_smart_money_flows`] (`GET /api/v1/markets/smart-money-flows`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListSmartMoneyFlowsParams {
    /// Lookback window for grade-filtered whale flow aggregation.
    pub timeframe: Option<Timeframe>,
    /// Page size. Out-of-range values are clamped to 1..100.
    pub limit: Option<i64>,
    /// Opaque cursor from previous response's next_cursor. Encodes the first-page as_of timestamp, normalized effective filters, ranking and aggregate collection revisions, plus the last row's absolute net flow and condition_id. A changed filter or collection returns cursor_expired; request the first page again.
    pub cursor: Option<String>,
    /// Filter by market category (case-insensitive). A canonical bucket name (e.g. Basketball) matches every provider member that folds into it (NBA, WNBA, NCAAB); a raw provider value also resolves to its bucket. Sports and esports only (#27306): a category outside them returns 400 bad_request with param category and names the accepted buckets.
    pub category: Option<String>,
    /// Filter by source platform. all is a request-side no-op.
    pub platform: Option<Platform>,
    /// Minimum latest trader grade included in the flow. Default B means S/A/B only; unranked traders are excluded.
    pub min_grade: Option<Grade>,
    /// Optional post-aggregate flow direction filter.
    pub direction: Option<Direction>,
    /// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
    ///
    /// Sent as the `If-None-Match` header.
    pub if_none_match: Option<String>,
}

impl ListSmartMoneyFlowsParams {
    /// Sets `timeframe`.
    #[must_use]
    pub fn timeframe(mut self, value: Timeframe) -> Self {
        self.timeframe = Some(value);
        self
    }
    /// Sets `limit`.
    #[must_use]
    pub fn limit(mut self, value: i64) -> Self {
        self.limit = Some(value);
        self
    }
    /// Sets `cursor`.
    #[must_use]
    pub fn cursor(mut self, value: impl Into<String>) -> Self {
        self.cursor = Some(value.into());
        self
    }
    /// Sets `category`.
    #[must_use]
    pub fn category(mut self, value: impl Into<String>) -> Self {
        self.category = Some(value.into());
        self
    }
    /// Sets `platform`.
    #[must_use]
    pub fn platform(mut self, value: Platform) -> Self {
        self.platform = Some(value);
        self
    }
    /// Sets `min_grade`.
    #[must_use]
    pub fn min_grade(mut self, value: Grade) -> Self {
        self.min_grade = Some(value);
        self
    }
    /// Sets `direction`.
    #[must_use]
    pub fn direction(mut self, value: Direction) -> Self {
        self.direction = Some(value);
        self
    }
    /// Sets `If-None-Match`.
    #[must_use]
    pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
        self.if_none_match = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::list_sharp_money_flows`] (`GET /api/v1/markets/sharp-money-flows`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListSharpMoneyFlowsParams {
    /// Lookback window for grade-filtered whale flow aggregation.
    pub timeframe: Option<Timeframe>,
    /// Page size. Out-of-range values are clamped to 1..100.
    pub limit: Option<i64>,
    /// Opaque cursor from previous response's next_cursor. Encodes the first-page as_of timestamp, normalized effective filters, ranking and aggregate collection revisions, plus the last row's absolute net flow and condition_id. A changed filter or collection returns cursor_expired; request the first page again.
    pub cursor: Option<String>,
    /// Filter by market category (case-insensitive). A canonical bucket name (e.g. Basketball) matches every provider member that folds into it (NBA, WNBA, NCAAB); a raw provider value also resolves to its bucket. Sports and esports only (#27306): a category outside them returns 400 bad_request with param category and names the accepted buckets.
    pub category: Option<String>,
    /// Filter by source platform. all is a request-side no-op.
    pub platform: Option<Platform>,
    /// Minimum latest trader grade included in the flow. Default B means S/A/B only; unranked traders are excluded.
    pub min_grade: Option<Grade>,
    /// Optional post-aggregate flow direction filter.
    pub direction: Option<Direction>,
    /// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
    ///
    /// Sent as the `If-None-Match` header.
    pub if_none_match: Option<String>,
}

impl ListSharpMoneyFlowsParams {
    /// Sets `timeframe`.
    #[must_use]
    pub fn timeframe(mut self, value: Timeframe) -> Self {
        self.timeframe = Some(value);
        self
    }
    /// Sets `limit`.
    #[must_use]
    pub fn limit(mut self, value: i64) -> Self {
        self.limit = Some(value);
        self
    }
    /// Sets `cursor`.
    #[must_use]
    pub fn cursor(mut self, value: impl Into<String>) -> Self {
        self.cursor = Some(value.into());
        self
    }
    /// Sets `category`.
    #[must_use]
    pub fn category(mut self, value: impl Into<String>) -> Self {
        self.category = Some(value.into());
        self
    }
    /// Sets `platform`.
    #[must_use]
    pub fn platform(mut self, value: Platform) -> Self {
        self.platform = Some(value);
        self
    }
    /// Sets `min_grade`.
    #[must_use]
    pub fn min_grade(mut self, value: Grade) -> Self {
        self.min_grade = Some(value);
        self
    }
    /// Sets `direction`.
    #[must_use]
    pub fn direction(mut self, value: Direction) -> Self {
        self.direction = Some(value);
        self
    }
    /// Sets `If-None-Match`.
    #[must_use]
    pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
        self.if_none_match = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::get_market_holders`] (`GET /api/v1/market/{condition_id}/holders`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetMarketHoldersParams {
    /// Keep holders netting one side. `all` (default) lists both.
    pub outcome: Option<GetMarketHoldersOutcome>,
    /// Narrow within the graded cohort: `S` keeps S, `A` keeps S and A, `B` (default) keeps S, A and B. `C`, `D` and `F` are rejected with 400: the route lists the S/A/B cohort only. The cohort is the wallet's current grade (`traders.latest_grade`), so no value here reaches a C, D, F or ungraded holder; those are counted only in `scan.wallet_count`. `min_grade=D` on GET /api/v1/positions does return C and D, which is one of the three reasons the two routes' counts differ for the same market.
    pub min_grade: Option<MarketHolderGrade>,
    /// Maximum holders per page. Out-of-range values are clamped to 1..100.
    pub limit: Option<i64>,
    /// Opaque pagination cursor from the previous response's next_cursor. New cursors carry an absolute next offset bound to normalized condition_id, outcome and effective min_grade, so limit can change without skipping or repeating rows on the same roster. Different market/filter bindings return 400 bad_request with param=cursor; omitted filters match all/B and mkt_-prefixed IDs match their raw condition_id. Legacy page-only cursors remain accepted without scheduled retirement and require their original limit; their next response emits the new format. A cursor remains valid across roster refreshes, which can still repeat or skip holders as the live roster changes.
    pub cursor: Option<String>,
    /// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
    ///
    /// Sent as the `If-None-Match` header.
    pub if_none_match: Option<String>,
}

impl GetMarketHoldersParams {
    /// Sets `outcome`.
    #[must_use]
    pub fn outcome(mut self, value: GetMarketHoldersOutcome) -> Self {
        self.outcome = Some(value);
        self
    }
    /// Sets `min_grade`.
    #[must_use]
    pub fn min_grade(mut self, value: MarketHolderGrade) -> Self {
        self.min_grade = Some(value);
        self
    }
    /// Sets `limit`.
    #[must_use]
    pub fn limit(mut self, value: i64) -> Self {
        self.limit = Some(value);
        self
    }
    /// Sets `cursor`.
    #[must_use]
    pub fn cursor(mut self, value: impl Into<String>) -> Self {
        self.cursor = Some(value.into());
        self
    }
    /// Sets `If-None-Match`.
    #[must_use]
    pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
        self.if_none_match = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::get_market_flow`] (`GET /api/v1/market/{condition_id}/flow`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetMarketFlowParams {
    /// Lookback window for whale flow aggregation.
    pub timeframe: Option<Timeframe>,
    /// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
    ///
    /// Sent as the `If-None-Match` header.
    pub if_none_match: Option<String>,
}

impl GetMarketFlowParams {
    /// Sets `timeframe`.
    #[must_use]
    pub fn timeframe(mut self, value: Timeframe) -> Self {
        self.timeframe = Some(value);
        self
    }
    /// Sets `If-None-Match`.
    #[must_use]
    pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
        self.if_none_match = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::get_market_intel`] (`GET /api/v1/market/{condition_id}/intel`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetMarketIntelParams {
    /// Lookback window for whale flow aggregation.
    pub timeframe: Option<Timeframe>,
    /// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
    ///
    /// Sent as the `If-None-Match` header.
    pub if_none_match: Option<String>,
}

impl GetMarketIntelParams {
    /// Sets `timeframe`.
    #[must_use]
    pub fn timeframe(mut self, value: Timeframe) -> Self {
        self.timeframe = Some(value);
        self
    }
    /// Sets `If-None-Match`.
    #[must_use]
    pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
        self.if_none_match = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::get_market_snapshot`] (`GET /api/v1/market/{condition_id}/snapshot`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetMarketSnapshotParams {
    /// Include trust metadata for current_price and spread_bps. Repeatable: trust.
    pub expand: Vec<String>,
    /// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
    ///
    /// Sent as the `If-None-Match` header.
    pub if_none_match: Option<String>,
}

impl GetMarketSnapshotParams {
    /// Sets `expand`.
    #[must_use]
    pub fn expand<I, S>(mut self, values: I) -> Self
    where
        I: IntoIterator<Item = S>,
        S: Into<String>,
    {
        self.expand = values.into_iter().map(Into::into).collect();
        self
    }
    /// Sets `If-None-Match`.
    #[must_use]
    pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
        self.if_none_match = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::get_market_candles`] (`GET /api/v1/market/{condition_id}/candles`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetMarketCandlesParams {
    /// Bucketing granularity. 1d aggregates by UTC calendar day, 1w by ISO week (Monday 00:00 UTC start). Defaults to 1d.
    pub resolution: Option<Resolution>,
    /// Exclusive lower bound as a URL-decoded unix timestamp in seconds; points at or before this timestamp are omitted (the underlying daily snapshot read filters bucket_start > from). If to is also present, from must be less than or equal to to. Note: for resolution=1w a surviving mid-week point can yield a weekly candle whose t (Monday 00:00 UTC) precedes from.
    pub from: Option<i64>,
    /// Inclusive upper bound as a URL-decoded unix timestamp in seconds; points after this timestamp are omitted. If from is also present, from must be less than or equal to to.
    pub to: Option<i64>,
    /// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
    ///
    /// Sent as the `If-None-Match` header.
    pub if_none_match: Option<String>,
}

impl GetMarketCandlesParams {
    /// Sets `resolution`.
    #[must_use]
    pub fn resolution(mut self, value: Resolution) -> Self {
        self.resolution = Some(value);
        self
    }
    /// Sets `from`.
    #[must_use]
    pub fn from(mut self, value: i64) -> Self {
        self.from = Some(value);
        self
    }
    /// Sets `to`.
    #[must_use]
    pub fn to(mut self, value: i64) -> Self {
        self.to = Some(value);
        self
    }
    /// Sets `If-None-Match`.
    #[must_use]
    pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
        self.if_none_match = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::list_suspicious_trades`] (`GET /api/v1/suspicious-trades`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListSuspiciousTradesParams {
    /// Maximum number of suspicious trades to return. Out-of-range values are clamped to 1..100.
    pub limit: Option<i64>,
    /// Pagination cursor from previous response.
    pub cursor: Option<String>,
    /// Minimum suspicion score (0-100). The live flag floor of 60 also applies.
    pub min_suspicion: Option<f64>,
    /// Compatible filter. flag selects live threshold crossings. watch returns no rows because no live watch policy exists.
    pub severity: Option<Severity>,
    /// Pagination mode. live (default) keeps the 120-second response cache; stable pins the walk to one published scoring generation and binds the cursor to the limit and filters.
    pub mode: Option<Mode>,
    /// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
    ///
    /// Sent as the `If-None-Match` header.
    pub if_none_match: Option<String>,
}

impl ListSuspiciousTradesParams {
    /// Sets `limit`.
    #[must_use]
    pub fn limit(mut self, value: i64) -> Self {
        self.limit = Some(value);
        self
    }
    /// Sets `cursor`.
    #[must_use]
    pub fn cursor(mut self, value: impl Into<String>) -> Self {
        self.cursor = Some(value.into());
        self
    }
    /// Sets `min_suspicion`.
    #[must_use]
    pub fn min_suspicion(mut self, value: f64) -> Self {
        self.min_suspicion = Some(value);
        self
    }
    /// Sets `severity`.
    #[must_use]
    pub fn severity(mut self, value: Severity) -> Self {
        self.severity = Some(value);
        self
    }
    /// Sets `mode`.
    #[must_use]
    pub fn mode(mut self, value: Mode) -> Self {
        self.mode = Some(value);
        self
    }
    /// Sets `If-None-Match`.
    #[must_use]
    pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
        self.if_none_match = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::get_suspicious_trade`] (`GET /api/v1/suspicious-trades/{id}`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetSuspiciousTradeParams {
    /// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
    ///
    /// Sent as the `If-None-Match` header.
    pub if_none_match: Option<String>,
}

impl GetSuspiciousTradeParams {
    /// Sets `If-None-Match`.
    #[must_use]
    pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
        self.if_none_match = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::list_games`] (`GET /api/v1/games`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListGamesParams {
    /// Canonical sport bucket, case-insensitive, with - and _ read as a space: table-tennis and Table Tennis are the same bucket. Omit for every covered sport. A bucket this deployment does not serve returns an empty page.
    pub sport: Option<String>,
    /// League tag, case-insensitive, as coverage.leagues spells it: nfl, epl, cs2, euroleague. EuroLeague games use sport=Basketball and league=euroleague. Omit for every league inside the selected sports.
    pub league: Option<String>,
    /// Keep only games in this state. A value outside the enum returns an empty page.
    pub status: Option<State>,
    /// RFC 3339 instant. Keep only games whose kickoff is at or after it. Games with no published kickoff are excluded whenever either bound is set.
    pub starts_after: Option<String>,
    /// RFC 3339 instant. Keep only games whose kickoff is at or before it. Must be at or after starts_after.
    pub starts_before: Option<String>,
    /// Page size. Out-of-range values are clamped to 1..100.
    pub limit: Option<i64>,
    /// Opaque gms_v1_ cursor from next_cursor. It pins the page position (kickoff and event_slug), not a snapshot: the catalog is live, so a game added or removed between pages moves with it. A cursor this endpoint did not issue returns 400 with error.param=cursor.
    pub cursor: Option<String>,
    /// Conditional GET using a weak semantic ETag from an earlier response. A matching payload returns 304 with an empty body; request_id, cost and as_of are excluded from the validator, so a rebuilt but unchanged catalog still revalidates.
    ///
    /// Sent as the `If-None-Match` header.
    pub if_none_match: Option<String>,
}

impl ListGamesParams {
    /// Sets `sport`.
    #[must_use]
    pub fn sport(mut self, value: impl Into<String>) -> Self {
        self.sport = Some(value.into());
        self
    }
    /// Sets `league`.
    #[must_use]
    pub fn league(mut self, value: impl Into<String>) -> Self {
        self.league = Some(value.into());
        self
    }
    /// Sets `status`.
    #[must_use]
    pub fn status(mut self, value: State) -> Self {
        self.status = Some(value);
        self
    }
    /// Sets `starts_after`.
    #[must_use]
    pub fn starts_after(mut self, value: impl Into<String>) -> Self {
        self.starts_after = Some(value.into());
        self
    }
    /// Sets `starts_before`.
    #[must_use]
    pub fn starts_before(mut self, value: impl Into<String>) -> Self {
        self.starts_before = Some(value.into());
        self
    }
    /// Sets `limit`.
    #[must_use]
    pub fn limit(mut self, value: i64) -> Self {
        self.limit = Some(value);
        self
    }
    /// Sets `cursor`.
    #[must_use]
    pub fn cursor(mut self, value: impl Into<String>) -> Self {
        self.cursor = Some(value.into());
        self
    }
    /// Sets `If-None-Match`.
    #[must_use]
    pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
        self.if_none_match = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::get_game`] (`GET /api/v1/games/{event_slug}`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetGameParams {
    /// Conditional GET using a weak semantic ETag from an earlier response. A matching payload returns 304 with an empty body; request_id, cost and as_of are excluded from the validator, so a rebuilt but unchanged catalog still revalidates.
    ///
    /// Sent as the `If-None-Match` header.
    pub if_none_match: Option<String>,
}

impl GetGameParams {
    /// Sets `If-None-Match`.
    #[must_use]
    pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
        self.if_none_match = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::list_insider_radar`] (`GET /api/v1/insider-radar`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListInsiderRadarParams {
    /// Maximum number of radar flags to return. Out-of-range values are clamped to 1..100.
    pub limit: Option<i64>,
    /// Pagination cursor from previous response.
    pub cursor: Option<String>,
    /// Minimum suspicion score (0-100). The live flag floor of 60 also applies.
    pub min_suspicion: Option<f64>,
    /// Compatible filter. flag selects live threshold crossings. watch returns no rows because no live watch policy exists.
    pub severity: Option<Severity>,
    /// Pagination mode. live (default) keeps the 120-second response cache; stable pins the walk to one published scoring generation and binds the cursor to the limit and filters.
    pub mode: Option<Mode>,
    /// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
    ///
    /// Sent as the `If-None-Match` header.
    pub if_none_match: Option<String>,
}

impl ListInsiderRadarParams {
    /// Sets `limit`.
    #[must_use]
    pub fn limit(mut self, value: i64) -> Self {
        self.limit = Some(value);
        self
    }
    /// Sets `cursor`.
    #[must_use]
    pub fn cursor(mut self, value: impl Into<String>) -> Self {
        self.cursor = Some(value.into());
        self
    }
    /// Sets `min_suspicion`.
    #[must_use]
    pub fn min_suspicion(mut self, value: f64) -> Self {
        self.min_suspicion = Some(value);
        self
    }
    /// Sets `severity`.
    #[must_use]
    pub fn severity(mut self, value: Severity) -> Self {
        self.severity = Some(value);
        self
    }
    /// Sets `mode`.
    #[must_use]
    pub fn mode(mut self, value: Mode) -> Self {
        self.mode = Some(value);
        self
    }
    /// Sets `If-None-Match`.
    #[must_use]
    pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
        self.if_none_match = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::get_insider_radar_flag`] (`GET /api/v1/insider-radar/{id}`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetInsiderRadarFlagParams {
    /// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
    ///
    /// Sent as the `If-None-Match` header.
    pub if_none_match: Option<String>,
}

impl GetInsiderRadarFlagParams {
    /// Sets `If-None-Match`.
    #[must_use]
    pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
        self.if_none_match = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::get_event_replay_since`] (`GET /api/v1/events/feed/since`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetEventReplaySinceParams {
    /// Opaque event replay cursor returned as next_cursor by a prior response. The cursor maps to the global (whale_alerts.inserted_xid, whale_alerts.id) commit-order position, is valid across backend replicas, and is bound to the filter set the walk ran with (trader, condition_id, min_grade, min_size): presenting it under different filters answers 400 bad_request with error.reason cursor_expired, and the walk restarts without a cursor. Cursors issued before 2026-09-22 (id-only) stay accepted and are bound to no filters. Omit to fetch the latest durable public suffix.
    pub cursor: Option<String>,
    /// Maximum durable public whale-trade events to return. Out-of-range values are clamped to 1..100.
    pub limit: Option<i64>,
    /// Only this wallet's trades: a wallet address, trd_-prefixed trader id or username resolved against the traders table. Bound to the cursor: a cursor issued under other filters answers 400 with error.reason cursor_expired. An unknown trader matches nothing and the walk still advances.
    pub trader: Option<String>,
    /// Only trades on this market: the raw provider condition_id or its mkt_-prefixed id. Bound to the cursor.
    pub condition_id: Option<String>,
    /// Only trades by wallets at this grade or better (S best), read from the wallet's newest ranking at request time; a wallet with no grade never passes. Bound to the cursor.
    pub min_grade: Option<Grade>,
    /// Only trades of at least this USD amount. Decimal and scientific query spellings normalize exactly to cents, rounding half away from zero; maximum 1e15 USD. Pass the dataset continuation decimal string unchanged to preserve the bound. Bound to the cursor.
    pub min_size: Option<GetEventReplaySinceMinSize>,
    /// Repeatable. trade adds the public trade read to every event (the object GET /api/v1/whale-trades/{id} returns for it), from one query per page, so a page of 100 events needs no per-event detail request. Not bound to the cursor: switch it on or off mid-walk.
    pub expand: Vec<String>,
}

impl GetEventReplaySinceParams {
    /// Sets `cursor`.
    #[must_use]
    pub fn cursor(mut self, value: impl Into<String>) -> Self {
        self.cursor = Some(value.into());
        self
    }
    /// Sets `limit`.
    #[must_use]
    pub fn limit(mut self, value: i64) -> Self {
        self.limit = Some(value);
        self
    }
    /// Sets `trader`.
    #[must_use]
    pub fn trader(mut self, value: impl Into<String>) -> Self {
        self.trader = Some(value.into());
        self
    }
    /// Sets `condition_id`.
    #[must_use]
    pub fn condition_id(mut self, value: impl Into<String>) -> Self {
        self.condition_id = Some(value.into());
        self
    }
    /// Sets `min_grade`.
    #[must_use]
    pub fn min_grade(mut self, value: Grade) -> Self {
        self.min_grade = Some(value);
        self
    }
    /// Sets `min_size`.
    #[must_use]
    pub fn min_size(mut self, value: impl Into<GetEventReplaySinceMinSize>) -> Self {
        self.min_size = Some(value.into());
        self
    }
    /// Sets `expand`.
    #[must_use]
    pub fn expand<I, S>(mut self, values: I) -> Self
    where
        I: IntoIterator<Item = S>,
        S: Into<String>,
    {
        self.expand = values.into_iter().map(Into::into).collect();
        self
    }
}

/// Optional parameters for [`Client::create_webhook`] (`POST /api/v1/webhooks`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CreateWebhookParams {
    /// Optional safe-retry key. Reuse the same value only when retrying the exact same mutation request body; a different body returns 422 and an in-flight matching request returns 409.
    ///
    /// Sent as the `Idempotency-Key` header.
    pub idempotency_key: Option<String>,
}

impl CreateWebhookParams {
    /// Sets `Idempotency-Key`.
    #[must_use]
    pub fn idempotency_key(mut self, value: impl Into<String>) -> Self {
        self.idempotency_key = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::list_webhook_deliveries`] (`GET /api/v1/webhooks/{id}/deliveries`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListWebhookDeliveriesParams {
    /// Opaque pagination cursor returned as next_cursor by a prior response. Omit to fetch the newest page.
    pub cursor: Option<String>,
    /// Maximum delivery rows to return per page. Out-of-range values are clamped to 1..100.
    pub limit: Option<i64>,
}

impl ListWebhookDeliveriesParams {
    /// Sets `cursor`.
    #[must_use]
    pub fn cursor(mut self, value: impl Into<String>) -> Self {
        self.cursor = Some(value.into());
        self
    }
    /// Sets `limit`.
    #[must_use]
    pub fn limit(mut self, value: i64) -> Self {
        self.limit = Some(value);
        self
    }
}

/// Optional parameters for [`Client::redeliver_webhook_delivery`] (`POST /api/v1/webhooks/{id}/deliveries/{delivery_id}/redeliver`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct RedeliverWebhookDeliveryParams {
    /// Optional safe-retry key. Reuse the same value only when retrying the exact same mutation request body; a different body returns 422 and an in-flight matching request returns 409.
    ///
    /// Sent as the `Idempotency-Key` header.
    pub idempotency_key: Option<String>,
}

impl RedeliverWebhookDeliveryParams {
    /// Sets `Idempotency-Key`.
    #[must_use]
    pub fn idempotency_key(mut self, value: impl Into<String>) -> Self {
        self.idempotency_key = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::update_webhook`] (`PATCH /api/v1/webhooks/{id}`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct UpdateWebhookParams {
    /// Optional safe-retry key. Reuse the same value only when retrying the exact same mutation request body; a different body returns 422 and an in-flight matching request returns 409.
    ///
    /// Sent as the `Idempotency-Key` header.
    pub idempotency_key: Option<String>,
}

impl UpdateWebhookParams {
    /// Sets `Idempotency-Key`.
    #[must_use]
    pub fn idempotency_key(mut self, value: impl Into<String>) -> Self {
        self.idempotency_key = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::delete_webhook`] (`DELETE /api/v1/webhooks/{id}`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DeleteWebhookParams {
    /// Optional safe-retry key. Reuse the same value only when retrying the exact same mutation request body; a different body returns 422 and an in-flight matching request returns 409.
    ///
    /// Sent as the `Idempotency-Key` header.
    pub idempotency_key: Option<String>,
}

impl DeleteWebhookParams {
    /// Sets `Idempotency-Key`.
    #[must_use]
    pub fn idempotency_key(mut self, value: impl Into<String>) -> Self {
        self.idempotency_key = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::prepare_webhook_secret`] (`POST /api/v1/webhooks/{id}/rotate-secret/prepare`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct PrepareWebhookSecretParams {
    /// Optional safe-retry key. Reuse the same value only when retrying the exact same mutation request body; a different body returns 422 and an in-flight matching request returns 409.
    ///
    /// Sent as the `Idempotency-Key` header.
    pub idempotency_key: Option<String>,
}

impl PrepareWebhookSecretParams {
    /// Sets `Idempotency-Key`.
    #[must_use]
    pub fn idempotency_key(mut self, value: impl Into<String>) -> Self {
        self.idempotency_key = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::activate_webhook_secret`] (`POST /api/v1/webhooks/{id}/rotate-secret/activate`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ActivateWebhookSecretParams {
    /// Optional safe-retry key. Reuse the same value only when retrying the exact same mutation request body; a different body returns 422 and an in-flight matching request returns 409.
    ///
    /// Sent as the `Idempotency-Key` header.
    pub idempotency_key: Option<String>,
}

impl ActivateWebhookSecretParams {
    /// Sets `Idempotency-Key`.
    #[must_use]
    pub fn idempotency_key(mut self, value: impl Into<String>) -> Self {
        self.idempotency_key = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::retire_webhook_secret`] (`POST /api/v1/webhooks/{id}/rotate-secret/retire`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct RetireWebhookSecretParams {
    /// Optional safe-retry key. Reuse the same value only when retrying the exact same mutation request body; a different body returns 422 and an in-flight matching request returns 409.
    ///
    /// Sent as the `Idempotency-Key` header.
    pub idempotency_key: Option<String>,
}

impl RetireWebhookSecretParams {
    /// Sets `Idempotency-Key`.
    #[must_use]
    pub fn idempotency_key(mut self, value: impl Into<String>) -> Self {
        self.idempotency_key = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::rotate_webhook_secret`] (`POST /api/v1/webhooks/{id}/rotate-secret`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct RotateWebhookSecretParams {
    /// Optional safe-retry key. Reuse the same value only when retrying the exact same mutation request body; a different body returns 422 and an in-flight matching request returns 409.
    ///
    /// Sent as the `Idempotency-Key` header.
    pub idempotency_key: Option<String>,
}

impl RotateWebhookSecretParams {
    /// Sets `Idempotency-Key`.
    #[must_use]
    pub fn idempotency_key(mut self, value: impl Into<String>) -> Self {
        self.idempotency_key = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::get_health`] (`GET /api/v1/health`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetHealthParams {
    /// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
    ///
    /// Sent as the `If-None-Match` header.
    pub if_none_match: Option<String>,
}

impl GetHealthParams {
    /// Sets `If-None-Match`.
    #[must_use]
    pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
        self.if_none_match = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::create_mcp_json_rpc_response`] (`POST /api/v1/mcp`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CreateMcpJsonRpcResponseParams {
    /// Session ID minted by the server on initialize; echoed on every subsequent request.
    ///
    /// Sent as the `Mcp-Session-Id` header.
    pub mcp_session_id: Option<String>,
    /// The negotiated MCP protocol revision, sent on every request after initialize (MCP Streamable HTTP transport). Accepted values: 2025-11-25, 2025-06-18, 2025-03-26, 2024-11-05. Any other value answers HTTP 400 with JSON-RPC error -32600. Absent, the request is served as 2025-03-26.
    ///
    /// Sent as the `MCP-Protocol-Version` header.
    pub mcp_protocol_version: Option<String>,
}

impl CreateMcpJsonRpcResponseParams {
    /// Sets `Mcp-Session-Id`.
    #[must_use]
    pub fn mcp_session_id(mut self, value: impl Into<String>) -> Self {
        self.mcp_session_id = Some(value.into());
        self
    }
    /// Sets `MCP-Protocol-Version`.
    #[must_use]
    pub fn mcp_protocol_version(mut self, value: impl Into<String>) -> Self {
        self.mcp_protocol_version = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::get_weekly_report_snapshot`] (`GET /api/v1/reports/weekly`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetWeeklyReportSnapshotParams {
    /// UTC source-range start in YYYY-MM-DD format; required with to. Together with to, selects an exact ephemeral range of at most 31 inclusive UTC days. A start after tomorrow UTC returns 400 bad_request with error.param=from.
    pub from: Option<String>,
    /// UTC source-range end in YYYY-MM-DD format; required with from. Together with from, selects an exact ephemeral range of at most 31 inclusive UTC days. An end before 2024-03-01, the first day report data covers, returns 400 bad_request with error.param=to.
    pub to: Option<String>,
    /// ISO week selector in YYYY-WW format; alternative to from/to. Selects a durable canonical snapshot. A week that ends before 2024-03-01, the first day report data covers, or starts after tomorrow UTC returns 400 bad_request with error.param=week.
    pub week: Option<String>,
}

impl GetWeeklyReportSnapshotParams {
    /// Sets `from`.
    #[must_use]
    pub fn from(mut self, value: impl Into<String>) -> Self {
        self.from = Some(value.into());
        self
    }
    /// Sets `to`.
    #[must_use]
    pub fn to(mut self, value: impl Into<String>) -> Self {
        self.to = Some(value.into());
        self
    }
    /// Sets `week`.
    #[must_use]
    pub fn week(mut self, value: impl Into<String>) -> Self {
        self.week = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::submit_trader_export`] (`POST /api/v1/trader/{address}/export`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct SubmitTraderExportParams {
    /// Output serialization. json = full envelope document (default); ndjson = full envelope as line 1 then one trade object per line; csv = flat trades rows only.
    pub format: Option<Format>,
    /// true: do not reuse a finished, running or reconciling job; only a queued job is reused, so the file is a snapshot read after this submit. Consumes quota when nothing is queued. Default false.
    pub fresh: Option<bool>,
}

impl SubmitTraderExportParams {
    /// Sets `format`.
    #[must_use]
    pub fn format(mut self, value: Format) -> Self {
        self.format = Some(value);
        self
    }
    /// Sets `fresh`.
    #[must_use]
    pub fn fresh(mut self, value: bool) -> Self {
        self.fresh = Some(value);
        self
    }
}

/// Optional parameters for [`Client::get_pick_of_the_day_ledger_entry`] (`GET /api/v1/pick-of-the-day/ledger/{pick_id}`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetPickOfTheDayLedgerEntryParams {
    /// Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.
    ///
    /// Sent as the `If-None-Match` header.
    pub if_none_match: Option<String>,
}

impl GetPickOfTheDayLedgerEntryParams {
    /// Sets `If-None-Match`.
    #[must_use]
    pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
        self.if_none_match = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::create_webhook_verification_attempt`] (`POST /api/v1/webhooks/{id}/verification-attempts`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CreateWebhookVerificationAttemptParams {
    /// Optional safe-retry key. Reuse the same value only when retrying the exact same mutation request body; a different body returns 422 and an in-flight matching request returns 409.
    ///
    /// Sent as the `Idempotency-Key` header.
    pub idempotency_key: Option<String>,
}

impl CreateWebhookVerificationAttemptParams {
    /// Sets `Idempotency-Key`.
    #[must_use]
    pub fn idempotency_key(mut self, value: impl Into<String>) -> Self {
        self.idempotency_key = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::list_combo_fills`] (`GET /api/v1/combos/fills`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListComboFillsParams {
    /// CSV of pending, won, or lost; all clears the filter. Unknown results appear only in unfiltered lists.
    pub result: Option<String>,
    /// CSV of 2, 3, 4, or 5+; all clears the filter. A combo matches any named pick count.
    pub legs: Option<String>,
    /// Minimum collateral in whole USDC.
    pub min_stake: Option<i64>,
    /// 0 disables the filter; otherwise use 2..1000000. Minimum shares per dollar at execution.
    pub min_multiplier: Option<i64>,
    /// CSV of S, A, B, C, D, F; all clears the filter. Ungraded wallets do not match.
    pub grades: Option<String>,
    /// CSV of nfl, ncaaf, nba, wnba, baseball, hockey, soccer, tennis, table-tennis, esports, mma, boxing, golf, cricket, f1, pickleball; all clears the filter. Matches when any leg belongs to a selected sport.
    pub sports: Option<String>,
    /// Recent is newest first; largest ranks collateral; payout ranks buy-fill shares and excludes sells.
    pub sort: Option<ComboFillsResponseSort>,
    /// Defaults to all for recent and 24h for largest or payout.
    pub window: Option<Window>,
    /// Page size. Integer values outside the range are clamped to 1..200.
    pub limit: Option<i64>,
    /// Exclusive block_number:log_index cursor for recent only; send the returned next_cursor unchanged.
    pub cursor: Option<String>,
    /// Offset for ranked largest or payout ordering; use returned next_offset.
    pub offset: Option<i64>,
    /// ETag from a prior response; a matching representation returns 304.
    ///
    /// Sent as the `If-None-Match` header.
    pub if_none_match: Option<String>,
}

impl ListComboFillsParams {
    /// Sets `result`.
    #[must_use]
    pub fn result(mut self, value: impl Into<String>) -> Self {
        self.result = Some(value.into());
        self
    }
    /// Sets `legs`.
    #[must_use]
    pub fn legs(mut self, value: impl Into<String>) -> Self {
        self.legs = Some(value.into());
        self
    }
    /// Sets `min_stake`.
    #[must_use]
    pub fn min_stake(mut self, value: i64) -> Self {
        self.min_stake = Some(value);
        self
    }
    /// Sets `min_multiplier`.
    #[must_use]
    pub fn min_multiplier(mut self, value: i64) -> Self {
        self.min_multiplier = Some(value);
        self
    }
    /// Sets `grades`.
    #[must_use]
    pub fn grades(mut self, value: impl Into<String>) -> Self {
        self.grades = Some(value.into());
        self
    }
    /// Sets `sports`.
    #[must_use]
    pub fn sports(mut self, value: impl Into<String>) -> Self {
        self.sports = Some(value.into());
        self
    }
    /// Sets `sort`.
    #[must_use]
    pub fn sort(mut self, value: ComboFillsResponseSort) -> Self {
        self.sort = Some(value);
        self
    }
    /// Sets `window`.
    #[must_use]
    pub fn window(mut self, value: Window) -> Self {
        self.window = Some(value);
        self
    }
    /// Sets `limit`.
    #[must_use]
    pub fn limit(mut self, value: i64) -> Self {
        self.limit = Some(value);
        self
    }
    /// Sets `cursor`.
    #[must_use]
    pub fn cursor(mut self, value: impl Into<String>) -> Self {
        self.cursor = Some(value.into());
        self
    }
    /// Sets `offset`.
    #[must_use]
    pub fn offset(mut self, value: i64) -> Self {
        self.offset = Some(value);
        self
    }
    /// Sets `If-None-Match`.
    #[must_use]
    pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
        self.if_none_match = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::get_combos_summary`] (`GET /api/v1/combos/summary`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetCombosSummaryParams {
    /// ETag from a prior response; a matching representation returns 304.
    ///
    /// Sent as the `If-None-Match` header.
    pub if_none_match: Option<String>,
}

impl GetCombosSummaryParams {
    /// Sets `If-None-Match`.
    #[must_use]
    pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
        self.if_none_match = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::get_combo`] (`GET /api/v1/combos/{condition_id}`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetComboParams {
    /// ETag from a prior response; a matching representation returns 304.
    ///
    /// Sent as the `If-None-Match` header.
    pub if_none_match: Option<String>,
}

impl GetComboParams {
    /// Sets `If-None-Match`.
    #[must_use]
    pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
        self.if_none_match = Some(value.into());
        self
    }
}

/// Optional parameters for [`Client::get_edge_hunter`] (`GET /api/v1/edge-hunter`).
///
/// Start from `Default::default()` and set what you need, through the field or the
/// chainable setter of the same name.
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetEdgeHunterParams {
    /// Response mode. board preserves the full quoted board; signals exposes ranked records and category evidence; observations exposes cohort measurements and accountable funnel evidence. Defaults to board.
    pub view: Option<View>,
    /// Legacy canonical bucket alias, now accepted in every view. Provider aliases canonicalize: NFL reaches Football and EPL reaches Soccer. Use leagues for a league-specific selection. An unmappable non-sport category returns an empty result and echoes category non_sport. Combines with other selection axes using AND.
    pub category: Option<String>,
    /// Required for view=observations; wider_holder, in_play or emerging_pile. Rejected for board and signals. wider_holder covers pregame markets outside the funded slate. A market that enters the slate leaves wider_holder; view=signals lists it only while its holder pile leans to one side, its backed side has a holder at or above min_grade and its kickoff is within horizon_hours, and otherwise neither view lists it. Each refresh evaluates at most 8 markets per sport and cohort, wider_holder by soonest kickoff (most graded holders first among equal kickoffs) and in_play by most graded holders, so a market among a sport's 8 soonest stays evaluated until its game starts. wider_holder also evaluates up to 8 more markets per sport that kick off within 24 hours, most graded holders first, so the most-held markets appear up to a day before kickoff. Each of these keeps its place in later refreshes until its game starts while its holder page still shows a card or could not be read, so a more-held market waits for a free place instead of displacing it. Each row's admitted_by names its place, most_held or soonest_kickoff. The rest count in coverage.capacity_limited_markets. Emerging pile is a wider-holder projection with sharp_pct in [0.75,0.85), complete holder scans and future kickoff, not an independent population or arrival history.
    pub cohort: Option<Cohort>,
    /// Opt-in admission rule for view=observations with cohort=wider_holder; rejected for every other view and cohort. most_held_48h returns the most-held selection instead of the default one: per sport, up to 8 wider_holder markets kicking off within 48 hours, most graded holders first, then most volume, then soonest kickoff, at most 4 per event. It is recomputed every refresh and keeps no place, so a more-held market displaces a less-held one; funded-slate markets stay excluded. Every row carries admitted_by most_held_48h, including a market the default selection also evaluates, and the response echoes admission. funnel, coverage, degraded and degradation_reasons describe this selection: a wider_holder candidate it did not take counts as capacity_limited. Its markets that no default place covers are read after every default market, at most once per 10 minutes, so a row can rest on a holder page up to 15 minutes old (holder_snapshot_at). Omit for the default selection. Cursors and ETags bind it.
    pub admission: Option<String>,
    /// Board and signals: S, A or B, default B. Requires a piled-side holder at the selected grade floor or better, without removing other holders. Rejected for observations.
    pub min_grade: Option<MarketHolderGrade>,
    /// Board row cap defaults to 30 and clamps integer values to 1..30; total counts selected admitted rows before the cap. Signals and observations page size defaults to 20 and clamps to 1..100.
    pub limit: Option<i64>,
    /// Opaque canonical Edge Hunter cursor from next_cursor. Bound to view, every normalized selection axis, grade/horizon where applicable, source snapshot and ordering; observations also bind cohort, admission and emerging cutoff. Changed selections or replaced snapshots return cursor_expired. Rejected in board.
    pub cursor: Option<String>,
    /// Kickoff window for board (default 48) or signals (default 12). Integer values clamp to 1..48. Rejected for observations, whose pre-game universe is fixed at 48 hours with a 12-hour in-play kickoff lookback.
    pub horizon_hours: Option<i64>,
    /// All views: sports excludes the Esports bucket; esports selects only Esports. Omit for both. Combines with other selections using AND. Selected reads echo normalized selection and require frozen metadata readiness.
    pub kind: Option<Kind>,
    /// Canonical sport buckets, including Esports and Table Tennis, matched case-insensitively. Unknown names and league aliases such as NFL are rejected in sports; use category for legacy bucket aliases or leagues for exact league selection. Omission covers every sport admitted by the selected view. All views. Repeat this query key or put comma-separated values inside a value. Values normalize, sort and deduplicate; at most 100 supplied values before deduplication. Values within this axis match OR; different selected axes match AND. An empty selection is invalid. Filtering precedes the board cap or advanced pagination and is bound to advanced cursors and ETags.
    pub sports: Vec<String>,
    /// Normalized machine/provider league identities, such as nfl, cfb, nba, epl, cs2, lol, dota2 or valorant. Known wire/tag aliases normalize; other provider keys match exact lowercase identity. This is separate from category: category=NFL selects Football, while leagues=nfl selects NFL only. Read market_context.league for authoritative values. All views. Repeat this query key or put comma-separated values inside a value. Values normalize, sort and deduplicate; at most 100 supplied values before deduplication. Values within this axis match OR; different selected axes match AND. An empty selection is invalid. Filtering precedes the board cap or advanced pagination and is bound to advanced cursors and ETags.
    pub leagues: Vec<String>,
    /// Exact provider sports_market_type values. This is an open provider taxonomy, distinct from exact market IDs. Read market_context.market_type; missing selected metadata excludes the row. All views. Repeat this query key or put comma-separated values inside a value. Values normalize, sort and deduplicate; at most 100 supplied values before deduplication. Values within this axis match OR; different selected axes match AND. An empty selection is invalid. Filtering precedes the board cap or advanced pagination and is bound to advanced cursors and ETags.
    pub market_types: Vec<String>,
    /// Exact market selections. Raw provider condition IDs and the existing mkt_-prefixed aliases normalize to raw IDs. Unknown well-formed IDs return an empty result. All views. Repeat this query key or put comma-separated values inside a value. Values normalize, sort and deduplicate; at most 100 supplied values before deduplication. Values within this axis match OR; different selected axes match AND. An empty selection is invalid. Filtering precedes the board cap or advanced pagination and is bound to advanced cursors and ETags.
    pub condition_ids: Vec<String>,
    /// Exact provider event slugs. Use event_slug returned on the row; no title or slug-prefix guessing. All views. Repeat this query key or put comma-separated values inside a value. Values normalize, sort and deduplicate; at most 100 supplied values before deduplication. Values within this axis match OR; different selected axes match AND. An empty selection is invalid. Filtering precedes the board cap or advanced pagination and is bound to advanced cursors and ETags.
    pub event_slugs: Vec<String>,
    /// Exact provider series slugs. Read market_context.series_slug; a missing selected series excludes the row. All views. Repeat this query key or put comma-separated values inside a value. Values normalize, sort and deduplicate; at most 100 supplied values before deduplication. Values within this axis match OR; different selected axes match AND. An empty selection is invalid. Filtering precedes the board cap or advanced pagination and is bound to advanced cursors and ETags.
    pub series_slugs: Vec<String>,
    /// Conditional validator for view=signals or view=observations only. A semantic match returns 304 with no body. The default board does not emit ETag or return 304.
    ///
    /// Sent as the `If-None-Match` header.
    pub if_none_match: Option<String>,
}

impl GetEdgeHunterParams {
    /// Sets `view`.
    #[must_use]
    pub fn view(mut self, value: View) -> Self {
        self.view = Some(value);
        self
    }
    /// Sets `category`.
    #[must_use]
    pub fn category(mut self, value: impl Into<String>) -> Self {
        self.category = Some(value.into());
        self
    }
    /// Sets `cohort`.
    #[must_use]
    pub fn cohort(mut self, value: Cohort) -> Self {
        self.cohort = Some(value);
        self
    }
    /// Sets `admission`.
    #[must_use]
    pub fn admission(mut self, value: impl Into<String>) -> Self {
        self.admission = Some(value.into());
        self
    }
    /// Sets `min_grade`.
    #[must_use]
    pub fn min_grade(mut self, value: MarketHolderGrade) -> Self {
        self.min_grade = Some(value);
        self
    }
    /// Sets `limit`.
    #[must_use]
    pub fn limit(mut self, value: i64) -> Self {
        self.limit = Some(value);
        self
    }
    /// Sets `cursor`.
    #[must_use]
    pub fn cursor(mut self, value: impl Into<String>) -> Self {
        self.cursor = Some(value.into());
        self
    }
    /// Sets `horizon_hours`.
    #[must_use]
    pub fn horizon_hours(mut self, value: i64) -> Self {
        self.horizon_hours = Some(value);
        self
    }
    /// Sets `kind`.
    #[must_use]
    pub fn kind(mut self, value: Kind) -> Self {
        self.kind = Some(value);
        self
    }
    /// Sets `sports`.
    #[must_use]
    pub fn sports<I, S>(mut self, values: I) -> Self
    where
        I: IntoIterator<Item = S>,
        S: Into<String>,
    {
        self.sports = values.into_iter().map(Into::into).collect();
        self
    }
    /// Sets `leagues`.
    #[must_use]
    pub fn leagues<I, S>(mut self, values: I) -> Self
    where
        I: IntoIterator<Item = S>,
        S: Into<String>,
    {
        self.leagues = values.into_iter().map(Into::into).collect();
        self
    }
    /// Sets `market_types`.
    #[must_use]
    pub fn market_types<I, S>(mut self, values: I) -> Self
    where
        I: IntoIterator<Item = S>,
        S: Into<String>,
    {
        self.market_types = values.into_iter().map(Into::into).collect();
        self
    }
    /// Sets `condition_ids`.
    #[must_use]
    pub fn condition_ids<I, S>(mut self, values: I) -> Self
    where
        I: IntoIterator<Item = S>,
        S: Into<String>,
    {
        self.condition_ids = values.into_iter().map(Into::into).collect();
        self
    }
    /// Sets `event_slugs`.
    #[must_use]
    pub fn event_slugs<I, S>(mut self, values: I) -> Self
    where
        I: IntoIterator<Item = S>,
        S: Into<String>,
    {
        self.event_slugs = values.into_iter().map(Into::into).collect();
        self
    }
    /// Sets `series_slugs`.
    #[must_use]
    pub fn series_slugs<I, S>(mut self, values: I) -> Self
    where
        I: IntoIterator<Item = S>,
        S: Into<String>,
    {
        self.series_slugs = values.into_iter().map(Into::into).collect();
        self
    }
    /// Sets `If-None-Match`.
    #[must_use]
    pub fn if_none_match(mut self, value: impl Into<String>) -> Self {
        self.if_none_match = Some(value.into());
        self
    }
}

impl Client {
    /// API discovery
    ///
    /// `GET /api/v1`
    ///
    /// Unauthenticated API-origin discovery document pointing agents to the canonical API base URL, full docs, web-origin OpenAPI spec, health check, and the COMPLETE index of authenticated data routes. data.authenticated_routes is the whole authenticated route surface, not a sample: it carries every authenticated route this spec documents, so an agent that starts here never has to guess a path. The index is a hand-maintained const in backend/src/api_v1/discovery.rs kept in step with this spec by review; no automated check compares the two, so treat this spec as authoritative if they ever disagree.
    pub async fn get_api_discovery(&self) -> Result<GetApiDiscoveryResponse> {
        let path = String::from("/api/v1");
        let call = Call::new(&Operation::GET_API_DISCOVERY, path);
        self.send_json(call).await
    }

    /// Redirect to the canonical OpenAPI spec
    ///
    /// `GET /api/v1/openapi.json`
    ///
    /// Unauthenticated API-origin compatibility redirect to the canonical web-origin OpenAPI JSON document at https://0xinsider.com/api/v1/openapi.json.
    ///
    /// The API answers with a redirect to the file. It is followed once, by a fresh
    /// request that carries no credential, and the file comes back as a streaming
    /// [`Download`].
    pub async fn redirect_api_openapi_spec(&self) -> Result<Download> {
        let path = String::from("/api/v1/openapi.json");
        let call = Call::new(&Operation::REDIRECT_API_OPENAPI_SPEC, path);
        self.send_download(call).await
    }

    /// Register an agent for a sandbox key
    ///
    /// `POST /api/v1/agents/register`
    ///
    /// Self-serve agent onboarding: no account, no request body, no human step. Returns a sandbox API key (oxi_sk_test_...) and the path to live access. The key works only on the sandbox server (https://0xinsider.com/sandbox/api/v1), where it is optional: send it as Authorization: Bearer to exercise the credential path, and the sandbox answers a malformed key with the production 401. Nothing is stored, so the key cannot be listed or revoked and does not expire; register again for a new one. The live API answers a sandbox key with 401 invalid_api_key and error.reason sandbox_api_key. Live data needs an account with an active Pro subscription, and either an oxi_sk_live_ key from https://0xinsider.com/developers or an OAuth access token (https://0xinsider.com/auth.md). The request body is not read.
    pub async fn register_agent(&self) -> Result<RegisterAgentResponse> {
        let path = String::from("/api/v1/agents/register");
        let call = Call::new(&Operation::REGISTER_AGENT, path);
        self.send_json(call).await
    }

    /// Get trader
    ///
    /// `GET /api/v1/trader/{address}`
    ///
    /// Returns a trader's grade (S through F), P&L, win rate, and optional strategy/category data. The path accepts either an Ethereum wallet address, a known trader username, or a trd_-prefixed trader ID emitted by this API. A wallet address this API does not track yet returns 200 with sync_status "unknown" instead of 404, so it can be polled. A value that is not a wallet address and matches no username or trader ID this API knows returns 404 not_found with error.param address; it is never echoed back as a trader address. The additive `pnl.exact.realized` and `stats.exact.total_volume` fields carry decimal strings from verified source atoms with unit, scale and basis metadata; parse them with decimal-safe arithmetic and keep the existing numeric twins for display. The additive `pnl.in_scope` object (#27311) is the wallet's sports and esports record, the P&L the 0xinsider profile headlines; the other pnl fields stay Polymarket's wallet-wide figures.
    pub async fn get_trader(&self, address: &str, params: &GetTraderParams) -> Result<GetTraderResponse> {
        let path = format!("/api/v1/trader/{address}", address = encode_path_segment(address));
        let mut call = Call::new(&Operation::GET_TRADER, path);
        for value in &params.expand {
            call.query("expand", value.as_str().to_owned());
        }
        if let Some(value) = &params.max_age_s {
            call.query("max_age_s", value.to_string());
        }
        call.header("If-None-Match", params.if_none_match.as_deref());
        self.send_json(call).await
    }

    /// Get trader context (Markdown)
    ///
    /// `GET /api/v1/trader/{address}/context.md`
    ///
    /// Returns a single human- and LLM-readable Markdown briefing for one trader: identity, grade, P&L, position coverage, and freshness. The path accepts an Ethereum wallet address (0x...), a known trader username, or a trd_-prefixed trader ID emitted by this API. A wallet address this API does not track yet still returns 200 with a degraded 'not yet synced' document (no 404). A value that is not a wallet address and matches no username or trader ID this API knows returns 404 not_found with error.param address, as the JSON error envelope. The Markdown variant does not emit an ETag and does not support conditional requests; use the JSON variant (drop the .md suffix) for ETag/If-None-Match handling.
    pub async fn get_trader_context_markdown(&self, address: &str) -> Result<String> {
        let path = format!(
            "/api/v1/trader/{address}/context.md",
            address = encode_path_segment(address)
        );
        let call = Call::new(&Operation::GET_TRADER_CONTEXT_MARKDOWN, path);
        self.send_text(call).await
    }

    /// Get a trader grade proven visible at a past instant
    ///
    /// `GET /api/v1/trader/{address}/grade-at`
    ///
    /// Reads one trader's recorded grade at as_of from prospective visibility evidence. Before the first recorded observation, after deletion, or during a grade-transition gap, status is unknown and grade is null; a recorded ungraded trader instead has status ungraded. available_from is the first proven observation for this trader, not a claim that earlier grades can be reconstructed. observed_at is when the grade writer began the transition and published_by is the later confirmation that the row was committed, not an exact commit time. Older observations have null model_version, model_build_sha and source_observed_by; do not substitute a current grade or a dated ranking row. The requested event time, publication bounds and model provenance are separate. Use a grade only when status is graded. This is additive; the current-grade trader and leaderboard operations do not change.
    pub async fn get_trader_grade_at(
        &self,
        address: &str,
        as_of: &str,
        params: &GetTraderGradeAtParams,
    ) -> Result<GetTraderGradeAtResponse> {
        let path = format!(
            "/api/v1/trader/{address}/grade-at",
            address = encode_path_segment(address)
        );
        let mut call = Call::new(&Operation::GET_TRADER_GRADE_AT, path);
        call.query("as_of", as_of.to_string());
        call.header("If-None-Match", params.if_none_match.as_deref());
        self.send_json(call).await
    }

    /// Get trader context (JSON)
    ///
    /// `GET /api/v1/trader/{address}/context`
    ///
    /// Returns a single structured context object for one trader: the full trader profile (same shape as GET /api/v1/trader/{address}) plus a position_summary (sync coverage and realized/unrealized P&L rollups, with an as_of open-position freshness clock), the data_as_of freshness timestamp (the open-position data's latest /positions snapshot, else last completed sync; the snapshot advances only open positions, so resolved counts and win rate still date to the last full sync; native realized P&L follows its accounting snapshot), and a freshness_note describing the point-in-time snapshot semantics. The path accepts an Ethereum wallet address (0x...), a known trader username, or a trd_-prefixed trader ID emitted by this API. position_summary is omitted when the trader is not in the local database or native net economics is unavailable; realized fields remain numeric when present; a wallet address this API does not track yet returns 200 with sync_status 'unknown' on the nested trader (no 404), while a value that is not a wallet address and matches no username or trader ID this API knows returns 404 not_found with error.param address. Append .md to the path for the Markdown rendering.
    pub async fn get_trader_context(
        &self,
        address: &str,
        params: &GetTraderContextParams,
    ) -> Result<GetTraderContextResponse> {
        let path = format!(
            "/api/v1/trader/{address}/context",
            address = encode_path_segment(address)
        );
        let mut call = Call::new(&Operation::GET_TRADER_CONTEXT, path);
        call.header("If-None-Match", params.if_none_match.as_deref());
        self.send_json(call).await
    }

    /// Batch traders
    ///
    /// `POST /api/v1/traders/batch`
    ///
    /// Returns traders for 1-25 wallet addresses or known usernames. Results preserve request order, duplicate inputs return duplicate rows, and each item is charged one batch item unit before execution. A wallet address this API does not track yet returns data with sync_status "unknown", matching the single trader endpoint. A username, trd_ id or numeric trader id that resolves to no trader is a per-item not_found error with error.param "traders", never an ok row keyed on the input.
    pub async fn batch_get_traders(&self, body: &BatchGetTradersBody) -> Result<BatchGetTradersResponse> {
        let path = String::from("/api/v1/traders/batch");
        let mut call = Call::new(&Operation::BATCH_GET_TRADERS, path);
        call.json(body)?;
        self.send_json(call).await
    }

    /// Get a trader's position timeline for one market
    ///
    /// `GET /api/v1/trader/{address}/position-timeline`
    ///
    /// Returns stored Polymarket fills for one tracked trader in one market, newest first, with outcome-specific running_amount and running_avg_price including earlier stored fills before pagination. Stored fills start 2026-07-17; the timeline returns no fill before that date. The {address} segment accepts the same identity shapes as the plural alias: wallet, username, trd_-prefixed trader id, bare integer traders.id, or @username, resolved with precedence @username -> wallet -> trd_ -> integer -> username. A leading @ resolves the rest as a username only, which is how to reach an all-digit username that the integer rule reads as an id. Only warm-tier traders, the wallets we sync most often, are served; others return 404. The cumulative buy-weighted fill average is unchanged by sells. Split, merge, redemption and neg-risk activity are excluded; totals are not complete holdings or provider current-position avgPrice. Cursor-paginated; values stay stable across page sizes/cursors for unchanged source history.
    pub async fn get_position_timeline(
        &self,
        address: &str,
        condition_id: &str,
        params: &GetPositionTimelineParams,
    ) -> Result<GetPositionTimelineResponse> {
        let path = format!(
            "/api/v1/trader/{address}/position-timeline",
            address = encode_path_segment(address)
        );
        let mut call = Call::new(&Operation::GET_POSITION_TIMELINE, path);
        call.query("condition_id", condition_id.to_string());
        if let Some(value) = &params.limit {
            call.query("limit", value.to_string());
        }
        if let Some(value) = &params.cursor {
            call.query("cursor", value.to_string());
        }
        call.header("If-None-Match", params.if_none_match.as_deref());
        self.send_json(call).await
    }

    /// Get trader category win records
    ///
    /// `GET /api/v1/trader/{address}/categories`
    ///
    /// Returns one wallet's win record in every canonical category it has a settled market in: wins, decided (wins plus losses) and the rate, per category, busiest category first. These are the same counts the Pick of the Day holder chips carry. The Esports record also carries games: the wallet's record in each esports title it has a settled market in (LoL, CS2, Dota 2, Valorant, ...), the same per-game record the holder chips and GET /api/v1/market/{condition_id}/holders name in category_win_rate_game, with the same counts, floor and status rule; the Esports row itself stays the whole bucket, which is what a chip falls back to when a game record is thin. The basis is every settled market at any position size, which is NOT the basis of category_strengths on GET /api/v1/trader/{address}?expand=categories: that breakdown keeps the 20 USD notional floor and the entry-price rule its ranks depend on, so the two legitimately differ, in both directions. Measured on production 2026-09-22 over the 122,497 wallet-category pairs with at least 20 decided markets on both bases: the floored rate was higher in 56.5% of pairs, lower in 34.5% and equal in 9.0%, median +0.6 points, p10 -4.6, p90 +9.8, and 14.0% of pairs differ by 10 points or more. Neither rate corrects the other. The difference is not only small positions: on a 1-in-250 wallet sample the same day, admitted markets won 56.6% while markets dropped by the notional floor alone won 45.2% and markets dropped by the entry-price rule alone won 48.7%. The two tables also run on different clocks, this one rebuilt daily and that breakdown updated incrementally, so a same-day read can differ on timing alone. A category or game with fewer than min_decided_for_win_rate decided markets keeps its counts and returns win_rate null with status not_enough_data, so a caller can apply its own sample rule. A category the wallet has no settled market in is omitted entirely, and so is a game: an absent entry means no record, never a 0% record. A resolved trader with no settled market returns an empty records array (HTTP 200); an unknown address returns 404. Sports and esports only (#27311): records cover sports and esports categories only, so a wallet whose settled markets are all elsewhere returns an empty records array.
    pub async fn get_trader_category_records(
        &self,
        address: &str,
        params: &GetTraderCategoryRecordsParams,
    ) -> Result<GetTraderCategoryRecordsResponse> {
        let path = format!(
            "/api/v1/trader/{address}/categories",
            address = encode_path_segment(address)
        );
        let mut call = Call::new(&Operation::GET_TRADER_CATEGORY_RECORDS, path);
        if let Some(value) = &params.category {
            call.query("category", value.to_string());
        }
        call.header("If-None-Match", params.if_none_match.as_deref());
        self.send_json(call).await
    }

    /// Get trader P&L time series
    ///
    /// `GET /api/v1/trader/{address}/pnl`
    ///
    /// Returns a trader's daily P&L time series and pre-derived stats from the precomputed daily_pnl read model: entries (daily cumulative P&L), period stats (all/90d/30d/7d), monthly aggregation, per-year totals, and the drawdown series. Reads the refreshed read model, not a per-request equity replay. A resolved trader with no daily P&L returns an empty structured object (HTTP 200); an unknown address returns 404. Covers all Polymarket markets, not only sports and esports: daily_change is Polymarket's own wallet-wide P&L figure, which cannot be split per market. Optional from/to and sections bound what comes back: from/to clip the two daily series (entries, drawdown) to an inclusive UTC date window, and sections names which of the five sections the body carries. A request that sends none of the three receives the whole object exactly as before, down to the ETag. A body built with any of them carries data.view, which names the bounds, the sections applied, the size of the full series and the last daily point before the window; a section the request excluded is absent from data, not null or empty. stats, monthly and year_totals keep their full-period definitions whatever the window says, so an economic value never changes meaning because a chart asked for seven days.
    pub async fn get_trader_pnl(&self, address: &str, params: &GetTraderPnlParams) -> Result<GetTraderPnlResponse> {
        let path = format!("/api/v1/trader/{address}/pnl", address = encode_path_segment(address));
        let mut call = Call::new(&Operation::GET_TRADER_PNL, path);
        if let Some(value) = &params.from {
            call.query("from", value.to_string());
        }
        if let Some(value) = &params.to {
            call.query("to", value.to_string());
        }
        for value in &params.sections {
            call.query("sections", value.as_str().to_owned());
        }
        self.send_json(call).await
    }

    /// Get a trader's position timeline (unified identity resolver)
    ///
    /// `GET /api/v1/traders/{trader}/position-timeline`
    ///
    /// Unified trader-timeline route (#4975). {trader} accepts all five identity shapes - 0x... wallet, username, trd_-prefixed trader id, bare integer id, and @username (a username lookup only, for all-digit usernames) - resolved by the single shared trader-identity resolver. Returns stored Polymarket fills for one tracked trader in one market, newest first, with server-computed running_amount and running_avg_price. Stored fills start 2026-07-17; the timeline returns no fill before that date. Only warm-tier traders, the wallets we sync most often, are tracked; other traders return 404. Response payload matches the singular GET /api/v1/trader/{address}/position-timeline route for the same (trader, market), except for the per-request meta.request_id. The prior integer-id-only variant is preserved: the same path now accepts every identity shape.
    pub async fn get_position_timeline_by_id(
        &self,
        trader: &str,
        condition_id: &str,
        params: &GetPositionTimelineByIdParams,
    ) -> Result<GetPositionTimelineByIdResponse> {
        let path = format!(
            "/api/v1/traders/{trader}/position-timeline",
            trader = encode_path_segment(trader)
        );
        let mut call = Call::new(&Operation::GET_POSITION_TIMELINE_BY_ID, path);
        call.query("condition_id", condition_id.to_string());
        if let Some(value) = &params.limit {
            call.query("limit", value.to_string());
        }
        if let Some(value) = &params.cursor {
            call.query("cursor", value.to_string());
        }
        call.header("If-None-Match", params.if_none_match.as_deref());
        self.send_json(call).await
    }

    /// List current positions (positions-board feed)
    ///
    /// `GET /api/v1/positions`
    ///
    /// Returns the current positions-board feed backed by the wallet_positions mirror. Ordered by current_value_usd DESC with deterministic (wallet, condition_id, outcome_index) tiebreakers. Pre-reconcile rows (current_value_usd IS NULL) are excluded. Positions on resolved markets are excluded: a position leaves the feed when its market resolves, so a condition_id read of a resolved market returns no rows. Positions on markets outside sports and esports are excluded on every read, the board and wallet reads included. Cursor-paginated. Every filter pushes into SQL. Deep cursor pages cost the same as the first page: the value bounds and the cursor are index conditions, so a page never rescans the feed from the top. With wallet, the same feed is read for one wallet or a book of up to 25 wallets from each wallet's own ordered index range, so the pages are that wallet's complete reconciled binary open positions on sports and esports markets and the cost is the page, never the board. min_size defaults to 100 on the board read, so a request with no wallet and no min_size drops positions valued under 100 USD; with wallet it defaults to 0 instead. Send min_size=0 to include every reconciled position. What a wallet read does not return: positions with shares at 0 (closed), positions on resolved markets (redeemable or already redeemed), positions on markets outside sports and esports, rows the reconciler has not valued yet (current_value_usd IS NULL), and non-binary outcomes; per-row last_reconciled_at and freshness say how old each valuation is. Each row also carries additive `exact` source atoms as decimal strings with unit, scale and basis metadata; parse those values with decimal-safe arithmetic and do not reconstruct them from the display-safe numeric fields. The response adds a top-level `data_quality` object beside `data`, with positions, trader, and market groups owned by `wallet_positions.last_reconciled_at|updated_at`, `traders.last_synced`, and `market_canonical.last_refreshed_at`. Its stored clocks are part of the ETag; `meta` continues to hold transport cache facts.
    pub async fn list_positions(&self, params: &ListPositionsParams) -> Result<ListPositionsResponse> {
        let path = String::from("/api/v1/positions");
        let mut call = Call::new(&Operation::LIST_POSITIONS, path);
        if let Some(value) = &params.limit {
            call.query("limit", value.to_string());
        }
        if let Some(value) = &params.cursor {
            call.query("cursor", value.to_string());
        }
        if let Some(value) = &params.consistency {
            call.query("consistency", value.as_str().to_owned());
        }
        if let Some(value) = &params.min_size {
            call.query("min_size", value.to_string());
        }
        if let Some(value) = &params.category {
            call.query("category", value.to_string());
        }
        if let Some(value) = &params.condition_id {
            call.query("condition_id", value.to_string());
        }
        for value in &params.wallet {
            call.query("wallet", value.to_string());
        }
        if let Some(value) = &params.min_grade {
            call.query("min_grade", value.as_str().to_owned());
        }
        if let Some(value) = &params.side {
            call.query("side", value.as_str().to_owned());
        }
        call.header("If-None-Match", params.if_none_match.as_deref());
        self.send_json(call).await
    }

    /// List large positions
    ///
    /// `GET /api/v1/large-positions`
    ///
    /// Returns the largest current open positions from graded traders, value-descending, with opaque cursor pagination. This is a change-detection feed, not a holder list: a row needs a current value of at least 50,000 USD and a live detection in the last 24 hours, so a wallet that holds a market without moving is not listed. For every graded holder of one market use GET /api/v1/market/{condition_id}/holders. Polymarket-only by design: the large-positions scanner filters platform = 'polymarket' (backend/crates/large-positions/src/scanner.rs), so only Polymarket rows are scanned and an unknown condition_id filter returns an empty list (never fabricated rows). Sports and esports markets only (#27305): a position on a market outside product scope is not listed; a condition_id naming one returns 404 not_found with error.reason=market_out_of_scope, and a category outside sports and esports returns 400 bad_request with param=category. The teaser cap that the internal product UI applies to anonymous viewers does not apply here: the API key already proves an active Pro subscription (wire tier `insider`), so authed API callers get full access.
    pub async fn list_large_positions(&self, params: &ListLargePositionsParams) -> Result<ListLargePositionsResponse> {
        let path = String::from("/api/v1/large-positions");
        let mut call = Call::new(&Operation::LIST_LARGE_POSITIONS, path);
        if let Some(value) = &params.limit {
            call.query("limit", value.to_string());
        }
        if let Some(value) = &params.cursor {
            call.query("cursor", value.to_string());
        }
        if let Some(value) = &params.min_size {
            call.query("min_size", value.to_string());
        }
        if let Some(value) = &params.category {
            call.query("category", value.to_string());
        }
        if let Some(value) = &params.min_grade {
            call.query("min_grade", value.as_str().to_owned());
        }
        if let Some(value) = &params.condition_id {
            call.query("condition_id", value.to_string());
        }
        self.send_json(call).await
    }

    /// List large trades
    ///
    /// `GET /api/v1/large-trades`
    ///
    /// Returns recent large trades with signal scoring and persisted suspicion facts. Filter by size, category, trader grade, or persisted suspicion. Filters are applied before pagination, and every request uses SQL-backed limit + 1 pagination so has_more and next_cursor reflect the filtered result set. Cursor-paginated, newest first. Market categories come from provider-backed market_canonical identity. Returns trades on sports and esports markets only (#27430): a trade on any other market is not listed, not counted toward has_more, and not returned by since. The response adds a top-level `data_quality` object beside `data`, grouping alert, trade, trader, ranking, market, and volume fields by their database writer. `whale_alerts.inserted_xid` is reported as unknown because it is a transaction identifier rather than a timestamp. Its stored clocks are part of the ETag; `meta` continues to hold transport cache facts. Pass since to poll for new trades: the answer holds only the trades recorded after the one you name, and with If-None-Match a poll that finds none is 304 with an empty body.
    pub async fn list_large_trades(&self, params: &ListLargeTradesParams) -> Result<ListLargeTradesResponse> {
        let path = String::from("/api/v1/large-trades");
        let mut call = Call::new(&Operation::LIST_LARGE_TRADES, path);
        if let Some(value) = &params.limit {
            call.query("limit", value.to_string());
        }
        if let Some(value) = &params.cursor {
            call.query("cursor", value.to_string());
        }
        if let Some(value) = &params.min_size {
            call.query("min_size", value.to_string());
        }
        if let Some(value) = &params.category {
            call.query("category", value.to_string());
        }
        if let Some(value) = &params.min_grade {
            call.query("min_grade", value.as_str().to_owned());
        }
        if let Some(value) = &params.suspicious_only {
            call.query("suspicious_only", value.to_string());
        }
        if let Some(value) = &params.min_market_volume_share {
            call.query("min_market_volume_share", value.to_string());
        }
        if let Some(value) = &params.sort {
            call.query("sort", value.as_str().to_owned());
        }
        if let Some(value) = &params.since {
            call.query("since", value.to_string());
        }
        call.header("If-None-Match", params.if_none_match.as_deref());
        self.send_json(call).await
    }

    /// List whale trades
    ///
    /// `GET /api/v1/whale-trades`
    ///
    /// Returns recent large trades with signal scoring and persisted suspicion facts. Filter by size, category, trader grade, or persisted suspicion. Filters are applied before pagination, and every request uses SQL-backed limit + 1 pagination so has_more and next_cursor reflect the filtered result set. Cursor-paginated, newest first. Market categories come from provider-backed market_canonical identity. Returns trades on sports and esports markets only (#27430): a trade on any other market is not listed, not counted toward has_more, and not returned by since. Deprecated alias of GET /api/v1/large-trades, kept live and never removed (#16304); every response carries `Deprecation: @1790047200` (RFC 9745, 2026-09-22T03:20:00Z) and a `Link` to the successor (`rel="successor-version"`) and to the versioning policy (`rel="deprecation"`). No `Sunset` header is sent because no removal is planned. The response adds a top-level `data_quality` object beside `data`, grouping alert, trade, trader, ranking, market, and volume fields by their database writer. `whale_alerts.inserted_xid` is reported as unknown because it is a transaction identifier rather than a timestamp. Its stored clocks are part of the ETag; `meta` continues to hold transport cache facts. Pass since to poll for new trades: the answer holds only the trades recorded after the one you name, and with If-None-Match a poll that finds none is 304 with an empty body.
    pub async fn list_whale_trades(&self, params: &ListWhaleTradesParams) -> Result<ListWhaleTradesResponse> {
        let path = String::from("/api/v1/whale-trades");
        let mut call = Call::new(&Operation::LIST_WHALE_TRADES, path);
        if let Some(value) = &params.limit {
            call.query("limit", value.to_string());
        }
        if let Some(value) = &params.cursor {
            call.query("cursor", value.to_string());
        }
        if let Some(value) = &params.min_size {
            call.query("min_size", value.to_string());
        }
        if let Some(value) = &params.category {
            call.query("category", value.to_string());
        }
        if let Some(value) = &params.min_grade {
            call.query("min_grade", value.as_str().to_owned());
        }
        if let Some(value) = &params.suspicious_only {
            call.query("suspicious_only", value.to_string());
        }
        if let Some(value) = &params.min_market_volume_share {
            call.query("min_market_volume_share", value.to_string());
        }
        if let Some(value) = &params.sort {
            call.query("sort", value.as_str().to_owned());
        }
        if let Some(value) = &params.since {
            call.query("since", value.to_string());
        }
        call.header("If-None-Match", params.if_none_match.as_deref());
        self.send_json(call).await
    }

    /// Replay historical large trades
    ///
    /// `GET /api/v1/large-trades/history`
    ///
    /// Returns historical large trades from local whale_alerts rows, not request-time provider fetches. Filter by condition_id, trader, category, minimum grade, persisted suspicion, platform, and RFC3339 from/to windows. All filters are pushed into SQL before LIMIT, every request uses SQL-backed limit + 1 pagination, and results are ordered newest first by traded_at desc, id desc. Metadata exposes local_replay source and best_effort completeness. Returns trades on sports and esports markets only (#27430), across the whole archive: a stored trade on any other market is left out before LIMIT. POINT IN TIME: signal_score, trader.grade and the min_grade filter carry today's values on every row however old, so a backtest that selects by them selects wallets on what they did after the trade. The point-in-time fields are recorded_signal_score (from 2026-08-03T11:59Z; null before, and never backfilled, because the trader statistics it reads at insert were not kept for older rows) and trader.grade_at_trade with trader.grade_at_trade_status (from 2026-09-19T23:00Z; unknown before). CAPTURE RULES changed over the archive's life: rows before 2026-02-02 are sparse (at most a few hundred a month); from 2026-02-02 the floor was 3,000 USD (1.4% of rows through 2026-07-05 are smaller) and trades at any price were kept; from 2026-07-06 a trade is kept at 10,000 USD or more (1,000 USD in earnings markets) and only when priced below 0.97 (0.99 in earnings markets). Pass min_size=10000 for one size rule across the whole range; monthly row counts still follow the sports calendar. Until 2026-07-17 one match could be stored twice, once per wallet: from 2026-05-01 to 2026-07-17, 27.7% of rows at 10,000 USD or more share a transaction and market with another stored wallet, almost always a Yes buyer and a No buyer filled against each other. From 2026-07-18 a row is the taker's side only. Before 2026-05 the transaction hash is mostly absent, so the share cannot be measured there. From 2026-09-23 a fill must ALSO be at least 0.1% of its market's recorded traded volume, Polymarket's own share count, so a $10,000 print that lands in a market which has already traded tens of millions of shares is no longer kept; rows written before that date were not re-filtered. The response adds a top-level `data_quality` object beside `data`, grouping alert, trade, trader, ranking, market, and volume fields by their database writer. `whale_alerts.inserted_xid` is reported as unknown because it is a transaction identifier rather than a timestamp. Its stored clocks are part of the ETag; `meta` continues to hold transport cache facts.
    pub async fn list_large_trade_history(
        &self,
        params: &ListLargeTradeHistoryParams,
    ) -> Result<ListLargeTradeHistoryResponse> {
        let path = String::from("/api/v1/large-trades/history");
        let mut call = Call::new(&Operation::LIST_LARGE_TRADE_HISTORY, path);
        if let Some(value) = &params.limit {
            call.query("limit", value.to_string());
        }
        if let Some(value) = &params.cursor {
            call.query("cursor", value.to_string());
        }
        if let Some(value) = &params.min_size {
            call.query("min_size", value.to_string());
        }
        if let Some(value) = &params.condition_id {
            call.query("condition_id", value.to_string());
        }
        if let Some(value) = &params.trader {
            call.query("trader", value.to_string());
        }
        if let Some(value) = &params.category {
            call.query("category", value.to_string());
        }
        if let Some(value) = &params.min_grade {
            call.query("min_grade", value.as_str().to_owned());
        }
        if let Some(value) = &params.suspicious_only {
            call.query("suspicious_only", value.to_string());
        }
        if let Some(value) = &params.platform {
            call.query("platform", value.as_str().to_owned());
        }
        if let Some(value) = &params.from {
            call.query("from", value.to_string());
        }
        if let Some(value) = &params.to {
            call.query("to", value.to_string());
        }
        if let Some(value) = &params.min_market_volume_share {
            call.query("min_market_volume_share", value.to_string());
        }
        if let Some(value) = &params.sort {
            call.query("sort", value.as_str().to_owned());
        }
        call.header("If-None-Match", params.if_none_match.as_deref());
        self.send_json(call).await
    }

    /// Replay historical whale trades
    ///
    /// `GET /api/v1/whale-trades/history`
    ///
    /// Returns historical whale trades from local whale_alerts rows, not request-time provider fetches. Filter by condition_id, trader, category, minimum grade, persisted suspicion, platform, and RFC3339 from/to windows. All filters are pushed into SQL before LIMIT, every request uses SQL-backed limit + 1 pagination, and results are ordered newest first by traded_at desc, id desc. Metadata exposes local_replay source and best_effort completeness. Returns trades on sports and esports markets only (#27430), across the whole archive: a stored trade on any other market is left out before LIMIT. Deprecated alias of GET /api/v1/large-trades/history, kept live and never removed (#16304); every response carries `Deprecation: @1790047200` (RFC 9745, 2026-09-22T03:20:00Z) and a `Link` to the successor (`rel="successor-version"`) and to the versioning policy (`rel="deprecation"`). No `Sunset` header is sent because no removal is planned. The response adds a top-level `data_quality` object beside `data`, grouping alert, trade, trader, ranking, market, and volume fields by their database writer. `whale_alerts.inserted_xid` is reported as unknown because it is a transaction identifier rather than a timestamp. Its stored clocks are part of the ETag; `meta` continues to hold transport cache facts.
    pub async fn list_whale_trade_history(
        &self,
        params: &ListWhaleTradeHistoryParams,
    ) -> Result<ListWhaleTradeHistoryResponse> {
        let path = String::from("/api/v1/whale-trades/history");
        let mut call = Call::new(&Operation::LIST_WHALE_TRADE_HISTORY, path);
        if let Some(value) = &params.limit {
            call.query("limit", value.to_string());
        }
        if let Some(value) = &params.cursor {
            call.query("cursor", value.to_string());
        }
        if let Some(value) = &params.min_size {
            call.query("min_size", value.to_string());
        }
        if let Some(value) = &params.condition_id {
            call.query("condition_id", value.to_string());
        }
        if let Some(value) = &params.trader {
            call.query("trader", value.to_string());
        }
        if let Some(value) = &params.category {
            call.query("category", value.to_string());
        }
        if let Some(value) = &params.min_grade {
            call.query("min_grade", value.as_str().to_owned());
        }
        if let Some(value) = &params.suspicious_only {
            call.query("suspicious_only", value.to_string());
        }
        if let Some(value) = &params.platform {
            call.query("platform", value.as_str().to_owned());
        }
        if let Some(value) = &params.from {
            call.query("from", value.to_string());
        }
        if let Some(value) = &params.to {
            call.query("to", value.to_string());
        }
        if let Some(value) = &params.min_market_volume_share {
            call.query("min_market_volume_share", value.to_string());
        }
        if let Some(value) = &params.sort {
            call.query("sort", value.as_str().to_owned());
        }
        call.header("If-None-Match", params.if_none_match.as_deref());
        self.send_json(call).await
    }

    /// Get large trade by ID
    ///
    /// `GET /api/v1/large-trades/{id}`
    ///
    /// Returns one large trade by raw whale_alerts.id or the wt_-prefixed id emitted by list and history responses.
    pub async fn get_large_trade(&self, id: &str, params: &GetLargeTradeParams) -> Result<GetLargeTradeResponse> {
        let path = format!("/api/v1/large-trades/{id}", id = encode_path_segment(id));
        let mut call = Call::new(&Operation::GET_LARGE_TRADE, path);
        call.header("If-None-Match", params.if_none_match.as_deref());
        self.send_json(call).await
    }

    /// Get whale trade by ID
    ///
    /// `GET /api/v1/whale-trades/{id}`
    ///
    /// Returns one whale trade by raw whale_alerts.id or the wt_-prefixed id emitted by list and history responses. Deprecated alias of GET /api/v1/large-trades/{id}, kept live and never removed (#16304); every response carries `Deprecation: @1790047200` (RFC 9745, 2026-09-22T03:20:00Z) and a `Link` to the successor (`rel="successor-version"`) and to the versioning policy (`rel="deprecation"`). No `Sunset` header is sent because no removal is planned.
    pub async fn get_whale_trade(&self, id: &str, params: &GetWhaleTradeParams) -> Result<GetWhaleTradeResponse> {
        let path = format!("/api/v1/whale-trades/{id}", id = encode_path_segment(id));
        let mut call = Call::new(&Operation::GET_WHALE_TRADE, path);
        call.header("If-None-Match", params.if_none_match.as_deref());
        self.send_json(call).await
    }

    /// Page counterparty executions
    ///
    /// `GET /api/v1/large-trades/{id}/counterparties/executions`
    ///
    /// Returns a bounded execution page from the immutable snapshot emitted by large-trade detail. A stale or changed snapshot returns a cursor-expired error so clients restart from detail.
    pub async fn list_large_trade_counterparty_executions(
        &self,
        id: &str,
        snapshot_id: &str,
        params: &ListLargeTradeCounterpartyExecutionsParams,
    ) -> Result<ListLargeTradeCounterpartyExecutionsResponse> {
        let path = format!(
            "/api/v1/large-trades/{id}/counterparties/executions",
            id = encode_path_segment(id)
        );
        let mut call = Call::new(&Operation::LIST_LARGE_TRADE_COUNTERPARTY_EXECUTIONS, path);
        call.query("snapshot_id", snapshot_id.to_string());
        if let Some(value) = &params.cursor {
            call.query("cursor", value.to_string());
        }
        if let Some(value) = &params.limit {
            call.query("limit", value.to_string());
        }
        self.send_json(call).await
    }

    /// Page counterparty executions
    ///
    /// `GET /api/v1/whale-trades/{id}/counterparties/executions`
    ///
    /// Returns a bounded execution page from the immutable snapshot emitted by whale-trade detail. A stale or changed snapshot returns a cursor-expired error so clients restart from detail. Deprecated alias of GET /api/v1/large-trades/{id}/counterparties/executions, kept live and never removed (#16304); every response carries `Deprecation: @1790047200` (RFC 9745, 2026-09-22T03:20:00Z) and a `Link` to the successor (`rel="successor-version"`) and to the versioning policy (`rel="deprecation"`). No `Sunset` header is sent because no removal is planned.
    pub async fn list_whale_trade_counterparty_executions(
        &self,
        id: &str,
        snapshot_id: &str,
        params: &ListWhaleTradeCounterpartyExecutionsParams,
    ) -> Result<ListWhaleTradeCounterpartyExecutionsResponse> {
        let path = format!(
            "/api/v1/whale-trades/{id}/counterparties/executions",
            id = encode_path_segment(id)
        );
        let mut call = Call::new(&Operation::LIST_WHALE_TRADE_COUNTERPARTY_EXECUTIONS, path);
        call.query("snapshot_id", snapshot_id.to_string());
        if let Some(value) = &params.cursor {
            call.query("cursor", value.to_string());
        }
        if let Some(value) = &params.limit {
            call.query("limit", value.to_string());
        }
        self.send_json(call).await
    }

    /// Page maker counterparties
    ///
    /// `GET /api/v1/large-trades/{id}/counterparties/executions/{execution_id}/makers`
    ///
    /// Returns a bounded maker-wallet page for one exact execution. Percentages keep the complete execution denominator across pages.
    pub async fn list_large_trade_counterparty_makers(
        &self,
        id: &str,
        execution_id: &str,
        snapshot_id: &str,
        params: &ListLargeTradeCounterpartyMakersParams,
    ) -> Result<ListLargeTradeCounterpartyMakersResponse> {
        let path = format!(
            "/api/v1/large-trades/{id}/counterparties/executions/{execution_id}/makers",
            id = encode_path_segment(id),
            execution_id = encode_path_segment(execution_id)
        );
        let mut call = Call::new(&Operation::LIST_LARGE_TRADE_COUNTERPARTY_MAKERS, path);
        call.query("snapshot_id", snapshot_id.to_string());
        if let Some(value) = &params.cursor {
            call.query("cursor", value.to_string());
        }
        if let Some(value) = &params.limit {
            call.query("limit", value.to_string());
        }
        self.send_json(call).await
    }

    /// Page maker counterparties
    ///
    /// `GET /api/v1/whale-trades/{id}/counterparties/executions/{execution_id}/makers`
    ///
    /// Returns a bounded maker-wallet page for one exact execution. Percentages keep the complete execution denominator across pages. Deprecated alias of GET /api/v1/large-trades/{id}/counterparties/executions/{execution_id}/makers, kept live and never removed (#16304); every response carries `Deprecation: @1790047200` (RFC 9745, 2026-09-22T03:20:00Z) and a `Link` to the successor (`rel="successor-version"`) and to the versioning policy (`rel="deprecation"`). No `Sunset` header is sent because no removal is planned.
    pub async fn list_whale_trade_counterparty_makers(
        &self,
        id: &str,
        execution_id: &str,
        snapshot_id: &str,
        params: &ListWhaleTradeCounterpartyMakersParams,
    ) -> Result<ListWhaleTradeCounterpartyMakersResponse> {
        let path = format!(
            "/api/v1/whale-trades/{id}/counterparties/executions/{execution_id}/makers",
            id = encode_path_segment(id),
            execution_id = encode_path_segment(execution_id)
        );
        let mut call = Call::new(&Operation::LIST_WHALE_TRADE_COUNTERPARTY_MAKERS, path);
        call.query("snapshot_id", snapshot_id.to_string());
        if let Some(value) = &params.cursor {
            call.query("cursor", value.to_string());
        }
        if let Some(value) = &params.limit {
            call.query("limit", value.to_string());
        }
        self.send_json(call).await
    }

    /// Get trader leaderboard
    ///
    /// `GET /api/v1/leaderboard`
    ///
    /// Returns ranked traders (grades S/A/B) sorted by score descending. Supports cursor pagination and optional category/strategy filters.
    pub async fn list_leaderboard(&self, params: &ListLeaderboardParams) -> Result<ListLeaderboardResponse> {
        let path = String::from("/api/v1/leaderboard");
        let mut call = Call::new(&Operation::LIST_LEADERBOARD, path);
        if let Some(value) = &params.limit {
            call.query("limit", value.to_string());
        }
        if let Some(value) = &params.cursor {
            call.query("cursor", value.to_string());
        }
        if let Some(value) = &params.category {
            call.query("category", value.to_string());
        }
        if let Some(value) = &params.strategy {
            call.query("strategy", value.as_str().to_owned());
        }
        call.header("If-None-Match", params.if_none_match.as_deref());
        self.send_json(call).await
    }

    /// Get today's Pick of the Day
    ///
    /// `GET /api/v1/pick-of-the-day`
    ///
    /// Returns entitled published picks for the current product day. Pro includes five selections in total: the designated free selection and the first four non-free selections in publication order. Max opens every available selection, up to twenty. A day can include multiple selections from the same game. Same-game picks share exposure and need not be independent; retain each `pick_id` instead of deduplicating by game. Both read resolved picks. Publication prices and backing are frozen; a prior day never appears here, so use the archive.
    ///
    /// Stable `pick_id` values identify selections. `publication_order` describes presentation and `is_free_selection` describes access; neither is a quality rating. Standing selections retain their identity, slot, and release schedule. Later additions fill available slots. Historical IDs, order, and proof bytes remain unchanged.
    ///
    /// Unauthorized unresolved selections appear only as identity-free `locked_picks` containing `pick_rank` and `required_tier`. When only locked selections are published, HTTP 200 carries `state=none`, `picks=[]`, `pick_count=0`, and an Upgrade to Max message. Proof warming applies only to entitled picks.
    ///
    /// `scheduled_picks` contains only entitled slots and retains required `release_at` and `kickoff`. Unauthorized scheduled selections expose no game identity or release time.
    ///
    /// When no active pick is available, including after cancelled recommendations are withdrawn, HTTP 404 carries `error.code="not_found"` and `error.reason="pick_not_released"`. Branch on the reason and schedule one request using `Retry-After` or `error.retry_at` instead of polling. This advisory retry does not reveal an unauthorized game's release time.
    ///
    /// Final sporting scores are retained for resolved picks after the event is confirmed ended and both sides have verified scores. A result without a verified final stays unavailable; a win/loss outcome alone does not establish a sporting score. Existing sports_context fields and return calculations are unchanged.
    ///
    /// Withdrawn picks are excluded from current and dated recommendations, the archive, and its statistics, even after market settlement. The public ledger retains every published commitment under its original identity and proof bytes. Provider settlement still determines the recorded result. Request and response fields are unchanged.
    pub async fn get_pick_of_the_day(&self, params: &GetPickOfTheDayParams) -> Result<GetPickOfTheDayResponse> {
        let path = String::from("/api/v1/pick-of-the-day");
        let mut call = Call::new(&Operation::GET_PICK_OF_THE_DAY, path);
        call.header("If-None-Match", params.if_none_match.as_deref());
        self.send_json(call).await
    }

    /// Get the Pick of the Day track record
    ///
    /// `GET /api/v1/pick-of-the-day/archive`
    ///
    /// Returns published picks that have not been withdrawn, with their outcome, modeled return, unit score, closing-line value, and cumulative record. Resolved game details and results are public. For unauthorized unresolved selections, game identity, category, image, publication time, and backed facts are omitted; `required_tier` and `backed_side_locked` provide an upgrade action. Pro includes the designated free selection and the first four non-free selections in publication order, five in total. Max opens every available selection, up to twenty.
    ///
    /// Stable `pick_id` values identify selections. Historical picks retain their original IDs, order, and proof bytes. `publication_order` describes presentation and `is_free_selection` records access designation; neither is a quality rating. New selections use a neutral presentation order, while standing selections retain their identity, slot, and release schedule.
    ///
    /// Each row carries measured CLV or the reason it was not measured. Coverage is the share of resolved picks published before kickoff that have measured CLV. A post-kickoff publication is `not_applicable`.
    ///
    /// Withdrawn recommendations are excluded from archive rows, daily counts, and all track-record statistics, including CLV, financial aggregates, and the cumulative series. Later market settlement does not restore them to the archive. The public ledger retains every published commitment under its original pick_id and proof bytes. Request and response fields are unchanged.
    pub async fn get_pick_of_the_day_archive(
        &self,
        params: &GetPickOfTheDayArchiveParams,
    ) -> Result<GetPickOfTheDayArchiveResponse> {
        let path = String::from("/api/v1/pick-of-the-day/archive");
        let mut call = Call::new(&Operation::GET_PICK_OF_THE_DAY_ARCHIVE, path);
        call.header("If-None-Match", params.if_none_match.as_deref());
        self.send_json(call).await
    }

    /// Get the Pick of the Day commitment ledger
    ///
    /// `GET /api/v1/pick-of-the-day/ledger`
    ///
    /// Returns the pre-game commitment for every published pick, so the public track record can be checked by someone who was not watching when the pick dropped.
    ///
    /// One entry per (pick_date, pick_rank), ascending by pick_date then pick_rank, in one of three states. `sealed` is an unresolved pick: the hash, the algorithm, the seal instant, and nothing that states a side or a price. `opened` is a settled pick: the nonce and the exact canonical payload the hash was taken over. `uncommitted` is a pick with no commitment -- published before the scheme existed, or one that reached kickoff unsealed -- named rather than omitted.
    ///
    /// To verify an opened entry: serialize nothing. Take the bytes of the `payload` object exactly as received, append the `commitment_nonce` decoded from hex, and sha256 the result; it equals `commitment_hash`. The payload is canonical JSON -- keys sorted by UTF-8 byte value, no insignificant whitespace, decimals as strings at full stored precision, timestamps whole-second UTC with a literal Z -- and it is served byte for byte as it was hashed.
    ///
    /// This is a proof contract, not the archive's display contract: nothing here is formatted for rendering, so an entry changes only when the pick does. Unresolved ledger entries omit game identity and kickoff; sealed_at remains public commitment provenance. A commitment is never written after kickoff and never rewritten by an outcome correction; `resolved_at` moving under an unchanged `commitment_hash` is a corrected market re-mapping an already-settled pick.
    ///
    /// Withdrawal from current recommendations or the product archive does not remove a published ledger entry. The ledger retains every published commitment under its original identity and proof bytes; canonical market settlement still determines the recorded result.
    pub async fn get_pick_of_the_day_ledger(
        &self,
        params: &GetPickOfTheDayLedgerParams,
    ) -> Result<GetPickOfTheDayLedgerResponse> {
        let path = String::from("/api/v1/pick-of-the-day/ledger");
        let mut call = Call::new(&Operation::GET_PICK_OF_THE_DAY_LEDGER, path);
        call.header("If-None-Match", params.if_none_match.as_deref());
        self.send_json(call).await
    }

    /// List trending wallets
    ///
    /// `GET /api/v1/leaderboard/trending`
    ///
    /// Returns wallets ranked by Polymarket weekly/monthly P&L (Polymarket-only discovery), with opaque page-cursor pagination. trending_pnl_usd and the by-PNL row order come from Polymarket's canonical leaderboard (data-api.polymarket.com/v2/leaderboard?time_period=week|month&sort_by=PNL), not a locally summed realized-leaf total. Each row also carries window volume, distinct markets, grade, hot-streak tier, and a shape-only daily P&L sparkline derived from the Polymarket user-pnl cumulative curve (per-day deltas; not guaranteed to sum to trending_pnl_usd). The response comes from a retained Redis board: meta.cached is true, and meta.cache_age_s reports the original board age when known (omitted when unknown). A backend read of a board at least 120 seconds old attempts a detached refresh; after a quiet spell a product board may be up to a day old. HTTP freshness ends at 120 seconds; max-age plus stale-while-revalidate cannot exceed the remaining original retention. Unknown age grants no cache window. A true cold read returns 503 (warming, retry-after), never a fabricated ranking. Polymarket-only: the read model filters platform = 'polymarket'. Cursors are bound to the effective limit, window and ranked-board generation; a changed board or request scope returns 400 with error.reason=cursor_expired, and legacy page-only cursors must restart from page one.
    pub async fn list_trending_wallets(
        &self,
        params: &ListTrendingWalletsParams,
    ) -> Result<ListTrendingWalletsResponse> {
        let path = String::from("/api/v1/leaderboard/trending");
        let mut call = Call::new(&Operation::LIST_TRENDING_WALLETS, path);
        if let Some(value) = &params.limit {
            call.query("limit", value.to_string());
        }
        if let Some(value) = &params.cursor {
            call.query("cursor", value.to_string());
        }
        if let Some(value) = &params.window {
            call.query("window", value.as_str().to_owned());
        }
        self.send_json(call).await
    }

    /// Search markets
    ///
    /// `GET /api/v1/markets/search`
    ///
    /// Search prediction markets by keyword. Returns representative market matches with status, category, and platform metadata. Cursor pagination advances over grouped market results rather than raw sub-market rows. Returns sports and esports markets only (#27411).
    pub async fn search_markets(&self, q: &str, params: &SearchMarketsParams) -> Result<SearchMarketsResponse> {
        let path = String::from("/api/v1/markets/search");
        let mut call = Call::new(&Operation::SEARCH_MARKETS, path);
        call.query("q", q.to_string());
        if let Some(value) = &params.limit {
            call.query("limit", value.to_string());
        }
        if let Some(value) = &params.cursor {
            call.query("cursor", value.to_string());
        }
        if let Some(value) = &params.status {
            call.query("status", value.as_str().to_owned());
        }
        if let Some(value) = &params.category {
            call.query("category", value.to_string());
        }
        self.send_json(call).await
    }

    /// Search editorial content
    ///
    /// `GET /api/v1/content/search`
    ///
    /// Search 0xinsider editorial content by keyword. Returns backend-owned learn, glossary, comparison, research, and trading-strategy items with canonical URLs. Opaque ranking scores are not exposed.
    pub async fn search_content(&self, q: &str, params: &SearchContentParams) -> Result<SearchContentResponse> {
        let path = String::from("/api/v1/content/search");
        let mut call = Call::new(&Operation::SEARCH_CONTENT, path);
        call.query("q", q.to_string());
        if let Some(value) = &params.limit {
            call.query("limit", value.to_string());
        }
        self.send_json(call).await
    }

    /// Explore markets
    ///
    /// `GET /api/v1/markets/explore`
    ///
    /// Browse whale-active titled markets with category, platform, status, and keyword filters. Explore is Polymarket-only: the platform parameter is accepted for backward-compatibility but every request returns Polymarket markets. Paginates visible discovery entries rather than raw market rows, returns live category/platform facets alongside grouped event clusters or standalone markets, and includes total on the first page only. Each grouped event contains at most 12 markets, retaining the selected representative within that cap. Categories come straight from provider metadata (Polymarket Gamma) and facets are flat value/label/count rows. Returns sports and esports markets only (#27411).
    pub async fn explore_markets(&self, params: &ExploreMarketsParams) -> Result<ExploreMarketsResponse> {
        let path = String::from("/api/v1/markets/explore");
        let mut call = Call::new(&Operation::EXPLORE_MARKETS, path);
        if let Some(value) = &params.category {
            call.query("category", value.to_string());
        }
        if let Some(value) = &params.status {
            call.query("status", value.as_str().to_owned());
        }
        if let Some(value) = &params.platform {
            call.query("platform", value.to_string());
        }
        if let Some(value) = &params.sort {
            call.query("sort", value.as_str().to_owned());
        }
        if let Some(value) = &params.cursor {
            call.query("cursor", value.to_string());
        }
        if let Some(value) = &params.limit {
            call.query("limit", value.to_string());
        }
        if let Some(value) = &params.q {
            call.query("q", value.to_string());
        }
        call.header("If-None-Match", params.if_none_match.as_deref());
        self.send_json(call).await
    }

    /// List ranked sharp-money flows (deprecated alias)
    ///
    /// `GET /api/v1/markets/smart-money-flows`
    ///
    /// Ranks sports and esports markets (#27306) by absolute net S/A/B-grade whale flow over a requested timeframe. Use this discovery endpoint to answer where sharp money is flowing before drilling into a specific market with /api/v1/market/{condition_id}/flow. Pagination is anchored by an opaque cursor carrying the first-page as_of timestamp, normalized effective filters, ranking revision and aggregate collection revision; a changed filter or collection returns `cursor_expired` so callers request the first page again. Deprecated alias of GET /api/v1/markets/sharp-money-flows, kept live and never removed; every response carries `Deprecation: @1783276950` (RFC 9745, 2026-07-05T18:42:30Z) and a `Link` to the successor (`rel="successor-version"`) and to the versioning policy (`rel="deprecation"`). No `Sunset` header is sent because no removal is planned.
    pub async fn list_smart_money_flows(
        &self,
        params: &ListSmartMoneyFlowsParams,
    ) -> Result<ListSmartMoneyFlowsResponse> {
        let path = String::from("/api/v1/markets/smart-money-flows");
        let mut call = Call::new(&Operation::LIST_SMART_MONEY_FLOWS, path);
        if let Some(value) = &params.timeframe {
            call.query("timeframe", value.as_str().to_owned());
        }
        if let Some(value) = &params.limit {
            call.query("limit", value.to_string());
        }
        if let Some(value) = &params.cursor {
            call.query("cursor", value.to_string());
        }
        if let Some(value) = &params.category {
            call.query("category", value.to_string());
        }
        if let Some(value) = &params.platform {
            call.query("platform", value.as_str().to_owned());
        }
        if let Some(value) = &params.min_grade {
            call.query("min_grade", value.as_str().to_owned());
        }
        if let Some(value) = &params.direction {
            call.query("direction", value.as_str().to_owned());
        }
        call.header("If-None-Match", params.if_none_match.as_deref());
        self.send_json(call).await
    }

    /// List ranked sharp-money flows
    ///
    /// `GET /api/v1/markets/sharp-money-flows`
    ///
    /// Canonical path for ranked sharp-money flows; /api/v1/markets/smart-money-flows remains live as a deprecated byte-identical alias of it. Ranks sports and esports markets (#27306) by absolute net S/A/B-grade whale flow over a requested timeframe. Use this discovery endpoint to answer where sharp money is flowing before drilling into a specific market with /api/v1/market/{condition_id}/flow. Pagination is anchored by an opaque cursor carrying the first-page as_of timestamp, normalized effective filters, ranking revision and aggregate collection revision; a changed filter or collection returns `cursor_expired` so callers request the first page again.
    pub async fn list_sharp_money_flows(
        &self,
        params: &ListSharpMoneyFlowsParams,
    ) -> Result<ListSharpMoneyFlowsResponse> {
        let path = String::from("/api/v1/markets/sharp-money-flows");
        let mut call = Call::new(&Operation::LIST_SHARP_MONEY_FLOWS, path);
        if let Some(value) = &params.timeframe {
            call.query("timeframe", value.as_str().to_owned());
        }
        if let Some(value) = &params.limit {
            call.query("limit", value.to_string());
        }
        if let Some(value) = &params.cursor {
            call.query("cursor", value.to_string());
        }
        if let Some(value) = &params.category {
            call.query("category", value.to_string());
        }
        if let Some(value) = &params.platform {
            call.query("platform", value.as_str().to_owned());
        }
        if let Some(value) = &params.min_grade {
            call.query("min_grade", value.as_str().to_owned());
        }
        if let Some(value) = &params.direction {
            call.query("direction", value.as_str().to_owned());
        }
        call.header("If-None-Match", params.if_none_match.as_deref());
        self.send_json(call).await
    }

    /// Which reads the API serves for Polymarket
    ///
    /// `GET /api/v1/coverage`
    ///
    /// Unauthenticated discovery endpoint that declares which V1 data surfaces the API serves for Polymarket, the one venue it covers. Every capability reports supported. Coverage is sports and esports markets only (#27299): a market outside them answers 404 not_found with error.reason market_out_of_scope, and a category filter outside them answers 400 bad_request with param category on the reads that filter by it: large trades and their history, large positions, the leaderboard, market search and explore, and sharp-money flows. GET /api/v1/positions and GET /api/v1/trader/{address}/categories do not refuse a category value (#27581). Canonical since #16315; GET /api/v1/platforms is its deprecated alias with the same body.
    pub async fn get_coverage(&self) -> Result<GetCoverageResponse> {
        let path = String::from("/api/v1/coverage");
        let call = Call::new(&Operation::GET_COVERAGE, path);
        self.send_json(call).await
    }

    /// Get platform capability matrix
    ///
    /// `GET /api/v1/platforms`
    ///
    /// Deprecated since #16315: use GET /api/v1/coverage, which serves the same body. This path stays live and answers with Deprecation and successor Link headers. Unauthenticated discovery endpoint that declares which V1 data surfaces the API serves for Polymarket, the one venue it covers. Every capability reports supported. Coverage is sports and esports markets only (#27299): a market outside them answers 404 not_found with error.reason market_out_of_scope, and a category filter outside them answers 400 bad_request with param category on the reads that filter by it: large trades and their history, large positions, the leaderboard, market search and explore, and sharp-money flows. GET /api/v1/positions and GET /api/v1/trader/{address}/categories do not refuse a category value (#27581).
    pub async fn get_platforms(&self) -> Result<GetPlatformsResponse> {
        let path = String::from("/api/v1/platforms");
        let call = Call::new(&Operation::GET_PLATFORMS, path);
        self.send_json(call).await
    }

    /// List a market's graded holders
    ///
    /// `GET /api/v1/market/{condition_id}/holders`
    ///
    /// The graded holder roster of one market, the list a Pick of the Day shows for its market, for any Polymarket market: every S/A/B wallet with open shares on either outcome, from a complete provider holder scan, each with its shares, Polymarket's own currentValue for the leg, its grade, its win record in the market's category, and its badges. Both outcomes are listed; a wallet holding both is listed once on its net side. Ordered by current_value_usd DESC, then shares DESC, then address. The roster is computed at most once a minute per market and shared by every caller; a page is cut from that roster, so paging is cheap and `total` is exact. An answer whose scan saw no wallet at all (`scan.wallet_count` 0), on an open market before its end date, is kept for up to an hour while no trade in that market is seen after the scan; `meta.cache_age_s` gives its age. The route never widens past the graded cohort: `scan.wallet_count` reports every wallet the walk saw, graded or not. An incomplete, unstable or failed scan is a 503 with Retry-After, never a shorter list. A complete scan in which no S, A or B wallet holds either outcome is a 200 with an empty holders list and zero totals; retrying cannot change it. The cohort is S, A and B by the wallet's current grade (`traders.latest_grade`); a C, D, F or ungraded wallet is never listed here and appears only inside `scan.wallet_count`. A count here will not match GET /api/v1/positions for the same market, and the cohort is only one of three reasons: /positions reads the `wallet_positions` mirror rather than this live provider scan, and without a `wallet` its `min_size` defaults to 100 USD, so it drops the smaller legs this route keeps. Read a difference as all three, never as a grade count. This is current state and takes no as-of parameter: the roster is at most 60 s old over a provider walk at most 180 s old (an answer with no wallet at all, at most an hour), and `scan.fetched_at` is the only timestamp on it. For a point-in-time roster, snapshot this route yourself on your own schedule; the one frozen roster the API serves is `display_holders` on GET /api/v1/pick-of-the-day, for that pick's market and backed side at publication.
    pub async fn get_market_holders(
        &self,
        condition_id: &str,
        params: &GetMarketHoldersParams,
    ) -> Result<GetMarketHoldersResponse> {
        let path = format!(
            "/api/v1/market/{condition_id}/holders",
            condition_id = encode_path_segment(condition_id)
        );
        let mut call = Call::new(&Operation::GET_MARKET_HOLDERS, path);
        if let Some(value) = &params.outcome {
            call.query("outcome", value.as_str().to_owned());
        }
        if let Some(value) = &params.min_grade {
            call.query("min_grade", value.as_str().to_owned());
        }
        if let Some(value) = &params.limit {
            call.query("limit", value.to_string());
        }
        if let Some(value) = &params.cursor {
            call.query("cursor", value.to_string());
        }
        call.header("If-None-Match", params.if_none_match.as_deref());
        self.send_json(call).await
    }

    /// Get a market's flow and top positions
    ///
    /// `GET /api/v1/market/{condition_id}/flow`
    ///
    /// Canonical since #16312; GET /api/v1/market/{condition_id}/intel is its deprecated alias and serves the same body under object market_intel. One market's flow and top positions: the signed flow of every tracked large trade in the window (net_flow_usd and its YES or NO direction), the large-trade count, gross buy and sell volumes, and the top five graded trader positions.
    pub async fn get_market_flow(
        &self,
        condition_id: &str,
        params: &GetMarketFlowParams,
    ) -> Result<GetMarketFlowResponse> {
        let path = format!(
            "/api/v1/market/{condition_id}/flow",
            condition_id = encode_path_segment(condition_id)
        );
        let mut call = Call::new(&Operation::GET_MARKET_FLOW, path);
        if let Some(value) = &params.timeframe {
            call.query("timeframe", value.as_str().to_owned());
        }
        call.header("If-None-Match", params.if_none_match.as_deref());
        self.send_json(call).await
    }

    /// Get market intelligence
    ///
    /// `GET /api/v1/market/{condition_id}/intel`
    ///
    /// Deprecated since #16312: use GET /api/v1/market/{condition_id}/flow, which serves the same body under object market_flow. This path stays live, keeps object market_intel, and answers with Deprecation and successor Link headers. One market's flow and top positions: the signed flow of every tracked large trade in the window (net_flow_usd and its YES or NO direction), the large-trade count, gross buy and sell volumes, and the top five graded trader positions.
    pub async fn get_market_intel(
        &self,
        condition_id: &str,
        params: &GetMarketIntelParams,
    ) -> Result<GetMarketIntelResponse> {
        let path = format!(
            "/api/v1/market/{condition_id}/intel",
            condition_id = encode_path_segment(condition_id)
        );
        let mut call = Call::new(&Operation::GET_MARKET_INTEL, path);
        if let Some(value) = &params.timeframe {
            call.query("timeframe", value.as_str().to_owned());
        }
        call.header("If-None-Match", params.if_none_match.as_deref());
        self.send_json(call).await
    }

    /// Batch market flow
    ///
    /// `POST /api/v1/markets/flow/batch`
    ///
    /// Returns each market's flow and top positions for 1-25 raw provider condition_id values. Results preserve request order, duplicate inputs return duplicate rows, and each item is charged one batch item unit before execution. Do not pass prefixed mkt_ IDs; use market.condition_id from search or explore. A market outside sports and esports is that item's own error, 404 not_found with error.reason market_out_of_scope (stop asking for it); the rest of the batch is served.
    pub async fn batch_get_market_flow(&self, body: &BatchGetMarketFlowBody) -> Result<BatchGetMarketFlowResponse> {
        let path = String::from("/api/v1/markets/flow/batch");
        let mut call = Call::new(&Operation::BATCH_GET_MARKET_FLOW, path);
        call.json(body)?;
        self.send_json(call).await
    }

    /// Batch market intelligence
    ///
    /// `POST /api/v1/markets/intel/batch`
    ///
    /// Deprecated since #16312: use POST /api/v1/markets/flow/batch, which returns the same items under object market_flow_batch. This path stays live, keeps object market_intel_batch, and answers with Deprecation and successor Link headers. Returns each market's flow and top positions for 1-25 raw provider condition_id values. Results preserve request order, duplicate inputs return duplicate rows, and each item is charged one batch item unit before execution. Do not pass prefixed mkt_ IDs; use market.condition_id from search or explore. A market outside sports and esports is that item's own error, 404 not_found with error.reason market_out_of_scope (stop asking for it); the rest of the batch is served.
    pub async fn batch_get_market_intel(&self, body: &BatchGetMarketIntelBody) -> Result<BatchGetMarketIntelResponse> {
        let path = String::from("/api/v1/markets/intel/batch");
        let mut call = Call::new(&Operation::BATCH_GET_MARKET_INTEL, path);
        call.json(body)?;
        self.send_json(call).await
    }

    /// Get market live snapshot
    ///
    /// `GET /api/v1/market/{condition_id}/snapshot`
    ///
    /// Provider-first market card snapshot with canonical identity, outcome labels, cached top-of-book when available, liquidity, live sports context, and explicit freshness/unavailable states.
    pub async fn get_market_snapshot(
        &self,
        condition_id: &str,
        params: &GetMarketSnapshotParams,
    ) -> Result<GetMarketSnapshotResponse> {
        let path = format!(
            "/api/v1/market/{condition_id}/snapshot",
            condition_id = encode_path_segment(condition_id)
        );
        let mut call = Call::new(&Operation::GET_MARKET_SNAPSHOT, path);
        for value in &params.expand {
            call.query("expand", value.to_string());
        }
        call.header("If-None-Match", params.if_none_match.as_deref());
        self.send_json(call).await
    }

    /// Get market OHLC price candles
    ///
    /// `GET /api/v1/market/{condition_id}/candles`
    ///
    /// Provider-first bucketed OHLC price candles for a market's outcome tokens, derived from our stored copy of the Polymarket CLOB prices-history series (the same series the market-detail chart renders; covers open and resolved markets). Because the stored data is daily, a 1d bucket typically carries one point so its open/high/low/close all equal that day's close; 1w aggregates real OHLC across the observed daily closes. No intraday fidelity is fabricated. Query field names and recognized values are URL-decoded; duplicate recognized fields use the last value and unknown fields are ignored. When both bounds are present, from must be less than or equal to to; malformed or inverted bounds answer 400.
    pub async fn get_market_candles(
        &self,
        condition_id: &str,
        params: &GetMarketCandlesParams,
    ) -> Result<GetMarketCandlesResponse> {
        let path = format!(
            "/api/v1/market/{condition_id}/candles",
            condition_id = encode_path_segment(condition_id)
        );
        let mut call = Call::new(&Operation::GET_MARKET_CANDLES, path);
        if let Some(value) = &params.resolution {
            call.query("resolution", value.as_str().to_owned());
        }
        if let Some(value) = &params.from {
            call.query("from", value.to_string());
        }
        if let Some(value) = &params.to {
            call.query("to", value.to_string());
        }
        call.header("If-None-Match", params.if_none_match.as_deref());
        self.send_json(call).await
    }

    /// Get suspicious trades
    ///
    /// `GET /api/v1/suspicious-trades`
    ///
    /// Stored trades whose recorded suspicion score meets the live flag threshold. Evidence contains the scorer's stored signals. Cursor-paginated by suspicion score. mode=live (default) uses fresh cached pages; mode=stable pins pagination to one published scoring generation and returns cursor_expired when scores or filters change. Sports and esports markets only (#27305): a flag on a market outside product scope is not listed, and the detail route answers it 404 not_found with error.reason=market_out_of_scope. Canonical since 2026-09-23; GET /api/v1/insider-radar is its deprecated alias.
    pub async fn list_suspicious_trades(
        &self,
        params: &ListSuspiciousTradesParams,
    ) -> Result<ListSuspiciousTradesResponse> {
        let path = String::from("/api/v1/suspicious-trades");
        let mut call = Call::new(&Operation::LIST_SUSPICIOUS_TRADES, path);
        if let Some(value) = &params.limit {
            call.query("limit", value.to_string());
        }
        if let Some(value) = &params.cursor {
            call.query("cursor", value.to_string());
        }
        if let Some(value) = &params.min_suspicion {
            call.query("min_suspicion", value.to_string());
        }
        if let Some(value) = &params.severity {
            call.query("severity", value.as_str().to_owned());
        }
        if let Some(value) = &params.mode {
            call.query("mode", value.as_str().to_owned());
        }
        call.header("If-None-Match", params.if_none_match.as_deref());
        self.send_json(call).await
    }

    /// Get suspicious trade by ID
    ///
    /// `GET /api/v1/suspicious-trades/{id}`
    ///
    /// Returns one suspicious trade by raw whale_alerts.id or the rf_-prefixed id emitted by list responses. A flag on a market outside sports and esports returns 404 not_found with error.reason=market_out_of_scope (#27305); stop requesting it. Canonical since 2026-09-23; GET /api/v1/insider-radar/{id} is its deprecated alias and keeps answering object: radar_flag.
    pub async fn get_suspicious_trade(
        &self,
        id: &str,
        params: &GetSuspiciousTradeParams,
    ) -> Result<GetSuspiciousTradeResponse> {
        let path = format!("/api/v1/suspicious-trades/{id}", id = encode_path_segment(id));
        let mut call = Call::new(&Operation::GET_SUSPICIOUS_TRADE, path);
        call.header("If-None-Match", params.if_none_match.as_deref());
        self.send_json(call).await
    }

    /// List covered games
    ///
    /// `GET /api/v1/games`
    ///
    /// One coherent game view per row: both sides with their provider ids and live scores, the UTC kickoff, the provider's own status, the esports series format, and every linked Polymarket market with its condition id and outcome token ids. Built from the same provider-first live and upcoming projections the site's sports boards use, so a request pays no provider fan-out of its own. Ordered by kickoff, then by event_slug; games whose kickoff the provider has not published sort last. coverage names the sports and leagues this deployment serves and any scope whose source was unavailable for the read, so an empty page is never ambiguous. A sport or status outside the published vocabulary returns an empty page rather than a 400. Carries the board's existing competitor-bound provider moneyline price state by default, with an observation clock and explicit incomplete or invalid state. It does not fetch another provider endpoint. Soccer 1X2 moneylines retain independent YES legs classified as home, draw and away; draw_offered is true when a classified draw leg is included. Sharp-money splits and holder identities remain on their own gated routes.
    pub async fn list_games(&self, params: &ListGamesParams) -> Result<ListGamesResponse> {
        let path = String::from("/api/v1/games");
        let mut call = Call::new(&Operation::LIST_GAMES, path);
        if let Some(value) = &params.sport {
            call.query("sport", value.to_string());
        }
        if let Some(value) = &params.league {
            call.query("league", value.to_string());
        }
        if let Some(value) = &params.status {
            call.query("status", value.as_str().to_owned());
        }
        if let Some(value) = &params.starts_after {
            call.query("starts_after", value.to_string());
        }
        if let Some(value) = &params.starts_before {
            call.query("starts_before", value.to_string());
        }
        if let Some(value) = &params.limit {
            call.query("limit", value.to_string());
        }
        if let Some(value) = &params.cursor {
            call.query("cursor", value.to_string());
        }
        call.header("If-None-Match", params.if_none_match.as_deref());
        self.send_json(call).await
    }

    /// Get one game
    ///
    /// `GET /api/v1/games/{event_slug}`
    ///
    /// The same game object GET /api/v1/games returns, for one event_slug, including soccer 1X2 home, draw and away market sides and draw_offered. The slug is the identity the live_sports_updated webhook pulse carries, so a receiver can read the full game straight from a pulse. A slug outside the published coverage returns 404, including a real Polymarket event in a sport this deployment does not serve; GET /api/v1/games names what is covered.
    pub async fn get_game(&self, event_slug: &str, params: &GetGameParams) -> Result<GetGameResponse> {
        let path = format!(
            "/api/v1/games/{event_slug}",
            event_slug = encode_path_segment(event_slug)
        );
        let mut call = Call::new(&Operation::GET_GAME, path);
        call.header("If-None-Match", params.if_none_match.as_deref());
        self.send_json(call).await
    }

    /// Get insider radar flags
    ///
    /// `GET /api/v1/insider-radar`
    ///
    /// Deprecated alias of GET /api/v1/suspicious-trades (2026-09-23), kept live with no retirement date; responses carry Deprecation and a Link rel="successor-version" to it. Stored trades whose recorded suspicion score meets the live flag threshold. Evidence contains the scorer's stored signals. Cursor-paginated by suspicion score. mode=live (default) uses fresh cached pages; mode=stable pins pagination to one published scoring generation and returns cursor_expired when scores or filters change. Sports and esports markets only (#27305): a flag on a market outside product scope is not listed, and the detail route answers it 404 not_found with error.reason=market_out_of_scope.
    pub async fn list_insider_radar(&self, params: &ListInsiderRadarParams) -> Result<ListInsiderRadarResponse> {
        let path = String::from("/api/v1/insider-radar");
        let mut call = Call::new(&Operation::LIST_INSIDER_RADAR, path);
        if let Some(value) = &params.limit {
            call.query("limit", value.to_string());
        }
        if let Some(value) = &params.cursor {
            call.query("cursor", value.to_string());
        }
        if let Some(value) = &params.min_suspicion {
            call.query("min_suspicion", value.to_string());
        }
        if let Some(value) = &params.severity {
            call.query("severity", value.as_str().to_owned());
        }
        if let Some(value) = &params.mode {
            call.query("mode", value.as_str().to_owned());
        }
        call.header("If-None-Match", params.if_none_match.as_deref());
        self.send_json(call).await
    }

    /// Get insider radar flag by ID
    ///
    /// `GET /api/v1/insider-radar/{id}`
    ///
    /// Deprecated alias of GET /api/v1/suspicious-trades/{id} (2026-09-23), kept live with no retirement date; responses carry Deprecation and a Link rel="successor-version" to it. The envelope keeps object: radar_flag, so an integration that branches on it keeps working here. Returns one suspicious-trading radar flag by raw whale_alerts.id or the rf_-prefixed id emitted by list responses. A flag on a market outside sports and esports returns 404 not_found with error.reason=market_out_of_scope (#27305); stop requesting it.
    pub async fn get_insider_radar_flag(
        &self,
        id: &str,
        params: &GetInsiderRadarFlagParams,
    ) -> Result<GetInsiderRadarFlagResponse> {
        let path = format!("/api/v1/insider-radar/{id}", id = encode_path_segment(id));
        let mut call = Call::new(&Operation::GET_INSIDER_RADAR_FLAG, path);
        call.header("If-None-Match", params.if_none_match.as_deref());
        self.send_json(call).await
    }

    /// Replay public large-trade events
    ///
    /// `GET /api/v1/events/feed/since`
    ///
    /// Returns durable public large-trade events strictly after an opaque cursor, in commit order: events are ordered by the position at which their write became visible to every reader (whale_alerts.inserted_xid), then by whale_alerts.id, and a page never reaches past the oldest write transaction still open when it was read. A trade whose id is lower than one already delivered but whose write finished later is therefore delivered on a later request instead of being skipped (#16180). This is a separate API-key contract from the browser/session /api/events/feed stream: browser-only and private alert, following, radar, and position patch events are excluded until they have a durable public outbox. Carries large trades on sports and esports markets only (#27430).
    pub async fn get_event_replay_since(
        &self,
        params: &GetEventReplaySinceParams,
    ) -> Result<GetEventReplaySinceResponse> {
        let path = String::from("/api/v1/events/feed/since");
        let mut call = Call::new(&Operation::GET_EVENT_REPLAY_SINCE, path);
        if let Some(value) = &params.cursor {
            call.query("cursor", value.to_string());
        }
        if let Some(value) = &params.limit {
            call.query("limit", value.to_string());
        }
        if let Some(value) = &params.trader {
            call.query("trader", value.to_string());
        }
        if let Some(value) = &params.condition_id {
            call.query("condition_id", value.to_string());
        }
        if let Some(value) = &params.min_grade {
            call.query("min_grade", value.as_str().to_owned());
        }
        if let Some(value) = &params.min_size {
            call.query("min_size", value.to_string());
        }
        for value in &params.expand {
            call.query("expand", value.to_string());
        }
        self.send_json(call).await
    }

    /// List builder webhook destinations
    ///
    /// `GET /api/v1/webhooks`
    ///
    /// Returns webhook destinations owned by the authenticated API key user. Deleted endpoints are omitted; an endpoint paused with PATCH or disabled after consecutive failures is listed with status disabled. Subscribable event_types and their payload shapes are described by GET /api/v1/webhooks/events. Export lifecycle event types (export_job_ready, export_job_failed, export_job_expired, export_job_cancelled) are delivered only to the API-key account that created the export and contain no download URL; use the authorized export status and download routes. Four subscribable event types are Pro-only and only deliver to API keys on an active Pro subscription. whale_trades_inserted is one of them, gated by the same SubscriberScope::InsiderOnly mechanism as the other three (each type carries its own LiveEventContract entry; they share the scope value). The other three: wallet_grade_changed (data: wallet, trader_id, old_grade, new_grade, direction (upgrade|downgrade), skill_index, final_score, date) fires on a Pass-2 grade transition; insider_radar_flag_raised (data: trade_id, wallet, trader_id, condition_id, suspicion_score, track, side (yes|no), size, price) fires the first time a trade's suspicion score crosses the radar flag threshold; sharp_money_flow_detected (data: condition_id, net_flow_usd, abs_net_flow_usd, dominant_side (yes|no), grade_floor (S|A|B|C|D|F), whale_trade_count, window) fires when a scheduled scanner detects ranked-trader net flow crossing a threshold (up or down) on a market, and smart_money_flow_detected is its deprecated spelling of the same event. live_sports_updated (data: event_slug, game_id, league, version, changed, observed_at, published_at, status, period, clock, live, ended, scores, series_format, snapshot_url) is ungated and fires as a bounded per-game pulse when a live game's scores, status, period or live/ended state moves: at most one delivery per game per 20 seconds, with a live or ended transition exempt from that interval, and the game clock alone never firing one. version is a durable per-game ordinal, changed lists the material fields that moved since that game's previous delivered pulse, and snapshot_url is where to re-read the whole game after a gap.
    pub async fn list_webhooks(&self) -> Result<ListWebhooksResponse> {
        let path = String::from("/api/v1/webhooks");
        let call = Call::new(&Operation::LIST_WEBHOOKS, path);
        self.send_json(call).await
    }

    /// Create a builder webhook destination
    ///
    /// `POST /api/v1/webhooks`
    ///
    /// Creates a pending HTTPS webhook destination. The response includes one-time signing_secret and verification.token values. Deliveries are not sent until the endpoint is verified, and verification requires the destination to answer 2xx to a signed webhook.verification challenge (see POST /api/v1/webhooks/{id}/verify). The subscribable event_types and their data payload shapes are described by GET /api/v1/webhooks/events; the per-endpoint delivery log is GET /api/v1/webhooks/{id}/deliveries. Export lifecycle event types (export_job_ready, export_job_failed, export_job_expired, export_job_cancelled) are delivered only to the API-key account that created the export and contain no download URL; use the authorized export status and download routes. Four subscribable event types are Pro-only and only deliver to API keys on an active Pro subscription. whale_trades_inserted is one of them, gated by the same SubscriberScope::InsiderOnly mechanism as the other three (each type carries its own LiveEventContract entry; they share the scope value). The other three: wallet_grade_changed (data: wallet, trader_id, old_grade, new_grade, direction (upgrade|downgrade), skill_index, final_score, date) fires on a Pass-2 grade transition; insider_radar_flag_raised (data: trade_id, wallet, trader_id, condition_id, suspicion_score, track, side (yes|no), size, price) fires the first time a trade's suspicion score crosses the radar flag threshold; sharp_money_flow_detected (data: condition_id, net_flow_usd, abs_net_flow_usd, dominant_side (yes|no), grade_floor (S|A|B|C|D|F), whale_trade_count, window) fires when a scheduled scanner detects ranked-trader net flow crossing a threshold (up or down) on a market, and smart_money_flow_detected is its deprecated spelling of the same event. live_sports_updated (data: event_slug, game_id, league, version, changed, observed_at, published_at, status, period, clock, live, ended, scores, series_format, snapshot_url) is ungated and fires as a bounded per-game pulse when a live game's scores, status, period or live/ended state moves: at most one delivery per game per 20 seconds, with a live or ended transition exempt from that interval, and the game clock alone never firing one. version is a durable per-game ordinal, changed lists the material fields that moved since that game's previous delivered pulse, and snapshot_url is where to re-read the whole game after a gap. Delivery signing: each delivery request carries one or more HMAC-SHA256 signatures in the x-0xinsider-signature header as comma-separated v1=<hex> candidates. During staged rotation, the current and previous signing secrets are both signed for one hour; while 0xinsider rotates the key every signing secret is derived from, each also signs under the previous key, so the secret you hold keeps verifying. Up to four candidates; accept any valid candidate. Each candidate is HMAC-SHA256(signing_secret, "<timestamp>.<raw_request_body>"). The signed <timestamp> is sent separately as x-0xinsider-timestamp (unix seconds). To verify a delivery: read x-0xinsider-timestamp, reject it if it differs from the current time by more than 300 seconds, recompute each candidate over "<timestamp>.<raw_body>" with the active secrets, and compare using a constant-time comparison. Each delivery also carries x-0xinsider-event-id, x-0xinsider-event-type, x-0xinsider-delivery-id, and x-0xinsider-delivery-attempt headers. Retries and disabling: ordinary transient delivery failures use stable jitter between half and the existing 60, 120, 240, 480, 960, 1920 and 3600-second upper bounds (retry_policy.retry_horizon_seconds = 7380); on 408, 429, or 5xx, a valid Retry-After delta-seconds or HTTP-date replaces that one wait and is clamped to 60–3600 seconds, while missing, malformed, past, or non-retryable-response hints use the ordinary schedule. The delivery still has eight attempts (retry_policy.max_attempts), and an eighth failure becomes dead_letter. The delivery log exposes retry_schedule_reason and next_attempt_at so a receiver can see the active schedule. Separately, an endpoint is disabled after 8 consecutive failed attempts across all of its deliveries (retry_policy.disable_after_consecutive_failures); any successful attempt resets that count, so a busy endpoint that goes down can be disabled in minutes, well before any single delivery exhausts its retries. Disabling dead-letters every delivery still queued for the endpoint and emails the account owner, within about an hour, with each disabled endpoint and its last failed response. Re-enable it with PATCH /api/v1/webhooks/{id} {"enabled": true}; re-enabling does not resend dead-lettered deliveries. Resend each one with POST /api/v1/webhooks/{id}/deliveries/{delivery_id}/redeliver, or catch up with GET /api/v1/events/feed/since from the last event you processed. GET /api/v1/webhooks/{id}/deliveries shows next_attempt_at and retry_schedule_reason for a delivery still waiting to retry.
    pub async fn create_webhook(
        &self,
        body: &CreateWebhookRequest,
        params: &CreateWebhookParams,
    ) -> Result<CreateWebhookResponse> {
        let path = String::from("/api/v1/webhooks");
        let mut call = Call::new(&Operation::CREATE_WEBHOOK, path);
        call.header("Idempotency-Key", params.idempotency_key.as_deref());
        call.json(body)?;
        self.send_json(call).await
    }

    /// List webhook event catalog
    ///
    /// `GET /api/v1/webhooks/events`
    ///
    /// Self-describing catalog of every webhook event type: its description, data payload shape, and whether it is active (has a firing producer) or dormant (subscribable but not yet delivered; no event type is dormant today). The catalog is identical for every authenticated key and exposes no owner-scoped data. Pro-only event types (large_trades_inserted, whale_trades_inserted, wallet_grade_changed, suspicious_trade_flagged, insider_radar_flag_raised, sharp_money_flow_detected, smart_money_flow_detected) appear in the catalog but only deliver to API keys on an active Pro subscription. Export lifecycle event types (export_job_ready, export_job_failed, export_job_expired, export_job_cancelled) are owner-scoped to the API-key account that created the export and contain no download URL; use the authorized export status and download routes.
    pub async fn list_webhook_events(&self) -> Result<ListWebhookEventsResponse> {
        let path = String::from("/api/v1/webhooks/events");
        let call = Call::new(&Operation::LIST_WEBHOOK_EVENTS, path);
        self.send_json(call).await
    }

    /// List webhook delivery log
    ///
    /// `GET /api/v1/webhooks/{id}/deliveries`
    ///
    /// Recent delivery attempts for one webhook destination owned by the authenticated API key user, newest first, with opaque cursor pagination. Returns 404 (identical to an unknown id) when the endpoint is not owned by the caller, so a non-owner cannot tell an owned-but-empty log apart from someone else's endpoint. Delivery rows omit the request body and signing secret. next_attempt_at is when a pending or retry delivery is next attempted; retry_schedule_reason says whether the queue is following receiver_retry_after, transient_failure, permanent_or_auth_failure, manual_redelivery, or configuration_changed; both are null while an attempt is in flight and once the delivery is delivered or dead_letter. A delivery keeps the existing eight-attempt budget, endpoint failure budget, fairness limits, and ordinary 7380-second upper-bound schedule; see POST /api/v1/webhooks for the bounded Retry-After policy. Resend a dead_letter delivery with POST /api/v1/webhooks/{id}/deliveries/{delivery_id}/redeliver.
    pub async fn list_webhook_deliveries(
        &self,
        id: i64,
        params: &ListWebhookDeliveriesParams,
    ) -> Result<ListWebhookDeliveriesResponse> {
        let path = format!("/api/v1/webhooks/{id}/deliveries", id = id);
        let mut call = Call::new(&Operation::LIST_WEBHOOK_DELIVERIES, path);
        if let Some(value) = &params.cursor {
            call.query("cursor", value.to_string());
        }
        if let Some(value) = &params.limit {
            call.query("limit", value.to_string());
        }
        self.send_json(call).await
    }

    /// Redeliver a dead-lettered webhook delivery
    ///
    /// `POST /api/v1/webhooks/{id}/deliveries/{delivery_id}/redeliver`
    ///
    /// Returns one dead_letter delivery to the delivery queue with a fresh attempt budget: status becomes pending, attempt_count resets to 0, and next_attempt_at is now, so the delivery worker claims it like any queued delivery, under the same per-owner and per-origin concurrency limits. Use it after a failed delivery exhausts its retries, or after re-enabling an endpoint whose queued deliveries were dead-lettered when it was disabled: PATCH /api/v1/webhooks/{id} {"enabled": true} resends nothing by itself. The resend is signed with the endpoint's current signing secret and sent to its current URL, and keeps the delivery's event_id and idempotency-key header, so a receiver that already processed the event can deduplicate it; x-0xinsider-delivery-attempt starts again at 1. last_response_status and last_error keep the previous failure until the next attempt records its own. Returns 409 when the delivery is already delivered or still queued (pending, retry, or processing), or when the endpoint would not receive it (disabled, not verified, or no longer subscribed to the delivery's event_type); error.message names the step that lets the same request succeed. Returns 404 for an endpoint or delivery the caller does not own, including a delivery removed by the seven-day retention of delivered and dead_letter history.
    pub async fn redeliver_webhook_delivery(
        &self,
        id: i64,
        delivery_id: i64,
        params: &RedeliverWebhookDeliveryParams,
    ) -> Result<RedeliverWebhookDeliveryResponse> {
        let path = format!(
            "/api/v1/webhooks/{id}/deliveries/{delivery_id}/redeliver",
            id = id,
            delivery_id = delivery_id
        );
        let mut call = Call::new(&Operation::REDELIVER_WEBHOOK_DELIVERY, path);
        call.header("Idempotency-Key", params.idempotency_key.as_deref());
        self.send_json(call).await
    }

    /// Get one builder webhook destination
    ///
    /// `GET /api/v1/webhooks/{id}`
    ///
    /// Returns one webhook destination owned by the authenticated API key user.
    pub async fn get_webhook(&self, id: i64) -> Result<GetWebhookResponse> {
        let path = format!("/api/v1/webhooks/{id}", id = id);
        let call = Call::new(&Operation::GET_WEBHOOK, path);
        self.send_json(call).await
    }

    /// Update a builder webhook destination
    ///
    /// `PATCH /api/v1/webhooks/{id}`
    ///
    /// Updates name, HTTPS URL, event types, or enabled state. URL changes force pending_verification and return a new verification token; the new destination must answer 2xx to the signed webhook.verification challenge before deliveries resume. A URL change returns 409 with error.reason=webhook_delivery_in_progress while this destination has an active delivery; retry the same mutation after that request completes.
    pub async fn update_webhook(
        &self,
        id: i64,
        body: &UpdateWebhookRequest,
        params: &UpdateWebhookParams,
    ) -> Result<UpdateWebhookResponse> {
        let path = format!("/api/v1/webhooks/{id}", id = id);
        let mut call = Call::new(&Operation::UPDATE_WEBHOOK, path);
        call.header("Idempotency-Key", params.idempotency_key.as_deref());
        call.json(body)?;
        self.send_json(call).await
    }

    /// Disable a builder webhook destination
    ///
    /// `DELETE /api/v1/webhooks/{id}`
    ///
    /// Soft-deletes a webhook destination owned by the authenticated API key user. Existing delivery audit rows remain retained.
    pub async fn delete_webhook(&self, id: i64, params: &DeleteWebhookParams) -> Result<DeleteWebhookResponse> {
        let path = format!("/api/v1/webhooks/{id}", id = id);
        let mut call = Call::new(&Operation::DELETE_WEBHOOK, path);
        call.header("Idempotency-Key", params.idempotency_key.as_deref());
        self.send_json(call).await
    }

    /// Verify a builder webhook destination
    ///
    /// `POST /api/v1/webhooks/{id}/verify`
    ///
    /// Activates a pending webhook destination. Two conditions must both hold: the one-time verification token matches and has not expired, AND the destination answers 2xx to a signed challenge this operation POSTs to the endpoint's stored url. The challenge body is {"type":"webhook.verification","token":"<verification_token>","webhook_id":<id>}. It carries x-0xinsider-event-type: webhook.verification plus the same x-0xinsider-timestamp and x-0xinsider-signature headers a delivery carries, signed with that endpoint's signing_secret, so verify it exactly as you verify a delivery. Answer any 2xx within 10 seconds; the challenge response body is never read, and the challenge follows no redirects. A status outside 2xx, no answer within 10 seconds, or a url that does not resolve to a publicly routable address leaves status at pending_verification and returns 422. The token alone never activates an endpoint.
    pub async fn verify_webhook(&self, id: i64, body: &VerifyWebhookRequest) -> Result<VerifyWebhookResponse> {
        let path = format!("/api/v1/webhooks/{id}/verify", id = id);
        let mut call = Call::new(&Operation::VERIFY_WEBHOOK, path);
        call.json(body)?;
        self.send_json(call).await
    }

    /// Prepare a staged builder webhook signing secret
    ///
    /// `POST /api/v1/webhooks/{id}/rotate-secret/prepare`
    ///
    /// Creates a pending signing secret while the current secret remains active. Deploy the returned one-time signing_secret to the receiver before calling activate. The response exposes secret_rotation.status=pending; an existing pending secret is returned again so a lost response can be recovered safely.
    pub async fn prepare_webhook_secret(
        &self,
        id: i64,
        params: &PrepareWebhookSecretParams,
    ) -> Result<PrepareWebhookSecretResponse> {
        let path = format!("/api/v1/webhooks/{id}/rotate-secret/prepare", id = id);
        let mut call = Call::new(&Operation::PREPARE_WEBHOOK_SECRET, path);
        call.header("Idempotency-Key", params.idempotency_key.as_deref());
        self.send_json(call).await
    }

    /// Activate a staged builder webhook signing secret
    ///
    /// `POST /api/v1/webhooks/{id}/rotate-secret/activate`
    ///
    /// Promotes the prepared signing secret to current, returns it once, and signs every delivery with both the new and previous secrets for one hour. Call retire after the receiver has completed its rollout. The current secret remains available through the existing immediate rotate-secret route for emergency replacement.
    pub async fn activate_webhook_secret(
        &self,
        id: i64,
        params: &ActivateWebhookSecretParams,
    ) -> Result<ActivateWebhookSecretResponse> {
        let path = format!("/api/v1/webhooks/{id}/rotate-secret/activate", id = id);
        let mut call = Call::new(&Operation::ACTIVATE_WEBHOOK_SECRET, path);
        call.header("Idempotency-Key", params.idempotency_key.as_deref());
        self.send_json(call).await
    }

    /// Retire the previous builder webhook signing secret
    ///
    /// `POST /api/v1/webhooks/{id}/rotate-secret/retire`
    ///
    /// Ends the one-hour dual-signature overlap and removes the previous signing secret from future delivery authorization. Call this after the receiver accepts the activated secret. The operation is idempotent and does not return signing_secret.
    pub async fn retire_webhook_secret(
        &self,
        id: i64,
        params: &RetireWebhookSecretParams,
    ) -> Result<RetireWebhookSecretResponse> {
        let path = format!("/api/v1/webhooks/{id}/rotate-secret/retire", id = id);
        let mut call = Call::new(&Operation::RETIRE_WEBHOOK_SECRET, path);
        call.header("Idempotency-Key", params.idempotency_key.as_deref());
        self.send_json(call).await
    }

    /// Rotate a builder webhook signing secret
    ///
    /// `POST /api/v1/webhooks/{id}/rotate-secret`
    ///
    /// Rotates the endpoint signing secret and returns the new signing_secret once in the response. Returns 409 with error.reason=webhook_delivery_in_progress while a live delivery freezes the current signing nonce; retry after it completes.
    pub async fn rotate_webhook_secret(
        &self,
        id: i64,
        params: &RotateWebhookSecretParams,
    ) -> Result<RotateWebhookSecretResponse> {
        let path = format!("/api/v1/webhooks/{id}/rotate-secret", id = id);
        let mut call = Call::new(&Operation::ROTATE_WEBHOOK_SECRET, path);
        call.header("Idempotency-Key", params.idempotency_key.as_deref());
        self.send_json(call).await
    }

    /// Health check
    ///
    /// `GET /api/v1/health`
    ///
    /// Returns API health status. No authentication required. Limited to 120 requests per minute per IP.
    pub async fn get_health(&self, params: &GetHealthParams) -> Result<GetHealthResponse> {
        let path = String::from("/api/v1/health");
        let mut call = Call::new(&Operation::GET_HEALTH, path);
        call.header("If-None-Match", params.if_none_match.as_deref());
        self.send_json(call).await
    }

    /// Remote MCP endpoint (JSON-RPC)
    ///
    /// `POST /api/v1/mcp`
    ///
    /// Model Context Protocol (MCP) Streamable HTTP transport. Accepts one JSON-RPC 2.0 request or notification. ID-bearing initialize, ping, tools/list, and tools/call requests receive one same-ID JSON-RPC response. ID-less ping, notifications/initialized, and notifications/cancelled receive HTTP 202 with no body; other ID-less methods and unsolicited response messages receive HTTP 400 with no body. Unknown cancellation IDs are ignored; cancellation does not stop running tool work. Only tools/call is counted against the per-minute request budget, the monthly quota and pay-as-you-go usage; every other message, with or without a key, spends none of them and reports the per-IP budget in RateLimit-* (since 2026-10-18). Remote MCP exposes 55 read-only tools for public V1 read operations: get_leaderboard, get_trader, batch_get_traders, get_large_trades, get_large_trade, get_large_trades_history, get_whale_trades, get_whale_trade, get_whale_trades_history, get_edge_hunter, list_games, get_game, get_market_flow, batch_get_market_flow, get_market_intel, batch_get_market_intel, get_sharp_money_flows, get_smart_money_flows, get_market_snapshot, get_suspicious_trades, get_suspicious_trade, get_insider_radar, get_insider_radar_flag, get_positions, get_position_timeline, get_position_timeline_by_id, search_markets, search_content, explore_markets, get_event_replay_since, list_webhooks, get_webhook, get_daily_report_snapshot, get_weekly_report_snapshot, get_monthly_report_snapshot, get_report, get_trader_export_snapshot, get_coverage, get_platforms, get_large_positions, get_trending_wallets, get_trader_pnl, get_pick_of_the_day, get_pick_of_the_day_ledger_entry, get_pick_of_the_day_archive, get_trader_context, get_trader_categories, get_trader_grade_at, get_market_holders, get_market_candles, get_combo_fills, get_combos_summary, get_combo, get_large_trade_counterparty_executions, get_large_trade_counterparty_makers. Webhook create/update/delete/verify/rotate operations are intentionally not exposed as remote MCP tools. The remote endpoint advertises tools only; it does not implement resources/list, resources/read, prompts/list, or prompts/get. Each tool dispatches to the matching /api/v1/* handler in-process so auth, rate limits, and payload shape match. initialize, notifications/initialized, ping and tools/list answer without a credential; tools/call (and any GET) need Authorization: Bearer <token> with an OAuth 2.1 access token (see the oauth2 security scheme; a tool outside the token's scopes returns isError) or an API key, and without one answer HTTP 401 with a WWW-Authenticate challenge whose resource_metadata names the RFC 9728 document at /.well-known/oauth-protected-resource/api/v1/mcp. A key in a ?token= query parameter is rejected on every authenticated route (the public routes ignore it) with 401 invalid_api_key and error.reason api_key_in_query, because URLs land in shell history, browser history, and logs; a client that can only take a URL can run the @0xinsider/mcp stdio package. Mcp-Session-Id is minted on initialize and echoed on every response. Origin header, when present, is validated against the 0xinsider + localhost allowlist. tools/call arguments are validated against the tool's advertised inputSchema before anything runs: a non-object, an unknown key, a wrong type, an out-of-range number, a value outside an enum or an argument combination outside a oneOf answers a tool result with isError true whose text names the field, never a query built from the arguments that fit. Every tools/call result carries the REST envelope's meta verbatim (request_id, cached, cache_age_s, cost, and the route's provenance such as source and completeness on get_whale_trades_history or ranking_source and directional_source on get_edge_hunter) as structuredContent.meta beside the payload's own keys, and a tool failure carries structuredContent.error with the REST error fields verbatim (code, reason, param, doc_url, retry_at) plus retry_after_seconds, request_id and status, beside its text. The MCP-Protocol-Version request header is checked on every POST and GET: a value outside 2025-11-25, 2025-06-18, 2025-03-26 and 2024-11-05 answers HTTP 400 with JSON-RPC error -32600 before the body is read; an absent header is served as 2025-03-26, the transport specification's compatibility default. Browser preflight allows the header.
    ///
    /// Returns `None` when the API answers with an empty success body.
    pub async fn create_mcp_json_rpc_response(
        &self,
        body: &CreateMcpJsonRpcResponseBody,
        params: &CreateMcpJsonRpcResponseParams,
    ) -> Result<Option<CreateMcpJsonRpcResponseResponse>> {
        let path = String::from("/api/v1/mcp");
        let mut call = Call::new(&Operation::CREATE_MCP_JSON_RPC_RESPONSE, path);
        call.header("Mcp-Session-Id", params.mcp_session_id.as_deref());
        call.header("MCP-Protocol-Version", params.mcp_protocol_version.as_deref());
        call.json(body)?;
        self.send_json_optional(call).await
    }

    /// Unified report snapshot (granularity selector)
    ///
    /// `GET /api/v1/reports`
    ///
    /// Unified convenience route (#4975) that consolidates the three singular report routes. Dispatches to the exact per-granularity cap (daily 50, weekly 100, monthly 200) and date window the legacy /api/v1/reports/{daily,weekly,monthly} routes use, so the response body is byte-identical to the matching legacy route for the same period. An ISO weekly period is a durable canonical snapshot; an explicit weekly from,to pair is an exact ephemeral range limited to 31 inclusive UTC days and never creates a persisted snapshot identity. A wider explicit range returns 400 invalid_query. The three legacy routes stay live. Also reachable via the MCP get_report selector.
    pub async fn get_reports(&self, granularity: Granularity, period: &str) -> Result<GetReportsResponse> {
        let path = String::from("/api/v1/reports");
        let mut call = Call::new(&Operation::GET_REPORTS, path);
        call.query("granularity", granularity.as_str().to_owned());
        call.query("period", period.to_string());
        self.send_json(call).await
    }

    /// Daily report snapshot
    ///
    /// `GET /api/v1/reports/daily`
    ///
    /// Returns a dated daily whale-activity report snapshot with source_range, snapshot.status, completeness, and reconciliation metadata. Report whale volume is local whale-alert activity volume, not provider lifetime trader volume.
    pub async fn get_daily_report_snapshot(&self, date: &str) -> Result<GetDailyReportSnapshotResponse> {
        let path = String::from("/api/v1/reports/daily");
        let mut call = Call::new(&Operation::GET_DAILY_REPORT_SNAPSHOT, path);
        call.query("date", date.to_string());
        self.send_json(call).await
    }

    /// Weekly report snapshot
    ///
    /// `GET /api/v1/reports/weekly`
    ///
    /// Returns a weekly whale-activity report snapshot. Pass an ISO YYYY-WW token for a durable canonical snapshot, or an exact from/to UTC range of at most 31 inclusive days for an ephemeral response. The response identifies closed ranges as final and current ranges as rolling.
    pub async fn get_weekly_report_snapshot(
        &self,
        params: &GetWeeklyReportSnapshotParams,
    ) -> Result<GetWeeklyReportSnapshotResponse> {
        let path = String::from("/api/v1/reports/weekly");
        let mut call = Call::new(&Operation::GET_WEEKLY_REPORT_SNAPSHOT, path);
        if let Some(value) = &params.from {
            call.query("from", value.to_string());
        }
        if let Some(value) = &params.to {
            call.query("to", value.to_string());
        }
        if let Some(value) = &params.week {
            call.query("week", value.to_string());
        }
        self.send_json(call).await
    }

    /// Monthly report snapshot
    ///
    /// `GET /api/v1/reports/monthly`
    ///
    /// Returns a UTC monthly whale-activity report snapshot with source_range, completeness, and reconciliation metadata.
    pub async fn get_monthly_report_snapshot(&self, month: &str) -> Result<GetMonthlyReportSnapshotResponse> {
        let path = String::from("/api/v1/reports/monthly");
        let mut call = Call::new(&Operation::GET_MONTHLY_REPORT_SNAPSHOT, path);
        call.query("month", month.to_string());
        self.send_json(call).await
    }

    /// Trader export snapshot metadata
    ///
    /// `GET /api/v1/trader/{address}/export`
    ///
    /// Returns export source-range, completeness, volume reconciliation, row-count estimate, and large-export policy for one trader. To download the full dataset programmatically, POST to this same path to submit an async export job (json | ndjson | csv), then poll the status route and follow the download route once ready.
    pub async fn get_trader_export_snapshot(&self, address: &str) -> Result<GetTraderExportSnapshotResponse> {
        let path = format!(
            "/api/v1/trader/{address}/export",
            address = encode_path_segment(address)
        );
        let call = Call::new(&Operation::GET_TRADER_EXPORT_SNAPSHOT, path);
        self.send_json(call).await
    }

    /// Submit a trader dataset export job
    ///
    /// `POST /api/v1/trader/{address}/export`
    ///
    /// Queues an async export of the trader's full dataset in the requested format (json default, ndjson, or csv) and returns the job resource. Poll the status route at poll_after_s until terminal is true, then follow the download route while status is 'ready' (until expires_at, 24 hours from submit). Reuse: without fresh=true, a live job for the same trader and format inside its retention window (queued, running, reconcile_required or ready) is returned with 200 instead of a new one, except a job its owner asked to cancel, which is never reused; its data_as_of says what its file is a snapshot of. With fresh=true only a queued job (which has not started reading) is reused; a running, reconciling or ready job is left alone and a new job is reserved, which consumes quota like any new job. Both decisions run under one per-account lock, so two concurrent submits cannot both reserve when one would have reused the other. Quotas are the per-user daily and per-address hourly export caps, keyed on the API key owner so an API key never widens its owner's quota. New full exports select one database read generation before delivery. JSON and NDJSON add export_metadata.generation (id, selected_at, consistency=repeatable_read, source_watermarks for positions, native P&L, categories and all matching trades), position_generation, provider_observations (provider values and observation/revision metadata), category_data_as_of, pnl_date_from/to, pnl_rows, pnl_row_limit (3650), markets_rows, markets_row_limit (50000), summary_basis and trades_basis. Summary counts cover all stored markets; the markets section retains its existing latest-activity 50000-row limit and P&L its earliest-3650-days limit. These are database consistency and section coverage facts, not a claim that providers observed every section simultaneously. CSV appends export_generation, export_selected_at and export_consistency columns. Downloaded objects also expose x-amz-meta-export-generation, x-amz-meta-export-selected-at, x-amz-meta-export-consistency, x-amz-meta-export-trades and x-amz-meta-export-provenance headers, including empty CSV files. Historical artifacts remain unchanged. Select CSV columns by name; JSON/NDJSON readers may ignore the additive fields. A read exceeding 600 seconds or an uncompressed artifact exceeding 2 GiB fails without publishing a partial file.
    pub async fn submit_trader_export(
        &self,
        address: &str,
        params: &SubmitTraderExportParams,
    ) -> Result<TraderExportJob> {
        let path = format!(
            "/api/v1/trader/{address}/export",
            address = encode_path_segment(address)
        );
        let mut call = Call::new(&Operation::SUBMIT_TRADER_EXPORT, path);
        if let Some(value) = &params.format {
            call.query("format", value.as_str().to_owned());
        }
        if let Some(value) = &params.fresh {
            call.query("fresh", value.to_string());
        }
        self.send_json(call).await
    }

    /// Poll a trader export job
    ///
    /// `GET /api/v1/trader/{address}/export/status`
    ///
    /// Returns the job resource for a submitted export: status (queued | running | cancel_requested | reconcile_required | ready | failed | expired | cancelled), terminal, next_action and poll_after_s, the lifecycle timestamps, the retention window (expires_at) and, once the file is written, data_as_of and the artifact identity. A ready job past expires_at reads expired; a queued, running or reconciling job past expires_at reads failed. Work stops at retention safe points; completion and reconciliation cannot publish ready after expiry. The failure event carries failure_reason expired_before_completion and next_action resubmit; delivery never extends retention. A running job its owner cancelled reads cancel_requested until the worker stops, then cancelled. failed, cancelled and expired jobs stay readable for 48 hours, then 404.
    pub async fn get_trader_export_status(&self, address: &str, job_id: i64) -> Result<TraderExportJob> {
        let path = format!(
            "/api/v1/trader/{address}/export/status",
            address = encode_path_segment(address)
        );
        let mut call = Call::new(&Operation::GET_TRADER_EXPORT_STATUS, path);
        call.query("job_id", job_id.to_string());
        self.send_json(call).await
    }

    /// Cancel a trader export job
    ///
    /// `POST /api/v1/trader/{address}/export/cancel`
    ///
    /// Cancels a submitted export and returns the job resource, the same shape the status route returns. A queued job reads cancelled at once and no worker will start it. A running job reads cancel_requested until the worker reaches its next safe point, then cancelled: the worker checks every 5 seconds while it reads the snapshot and between upload parts, and once more at the last point before the file is published; a storage request already in flight finishes first (each is bounded at 120 seconds), and a partial upload is discarded. If the worker itself stops first, the job reads cancelled after its 30-minute lease lapses, at the next hourly cleanup. A job a cancel can no longer reach is returned unchanged with 200: once its upload is being completed it finishes as ready (or reconcile_required, then ready or failed), and ready, failed, expired and cancelled jobs are terminal. A cancel never deletes a ready file; compare status before and after. Repeating the request is safe: it converges on the same state and never repeats a transition, so a client that lost the answer can send it again or read the status route. While terminal is false, poll the status route after poll_after_s. Quota is unchanged: the submit's reservation keeps counting toward the per-user daily and per-address hourly export caps for its full window, as a failed export's does, and a job its owner asked to cancel is never reused by a later submit, which reserves a new job. Webhook endpoints subscribed to export_job_cancelled receive it when the job reaches cancelled. An unknown job id, or a job owned by another account or submitted for another trader, answers 404 exactly as the status route does.
    pub async fn cancel_trader_export(&self, address: &str, job_id: i64) -> Result<TraderExportJob> {
        let path = format!(
            "/api/v1/trader/{address}/export/cancel",
            address = encode_path_segment(address)
        );
        let mut call = Call::new(&Operation::CANCEL_TRADER_EXPORT, path);
        call.query("job_id", job_id.to_string());
        self.send_json(call).await
    }

    /// Download a finished trader export
    ///
    /// `GET /api/v1/trader/{address}/export/download`
    ///
    /// Redirects (302) to a presigned URL lasting at most one hour and no later than the job's expires_at for the finished export file while the job status is 'ready' and expires_at has not passed. The file is gzip-compressed and served with the format's Content-Type (application/json, application/x-ndjson, or text/csv). Returns 400 while the job is queued, running, cancel_requested or reconciling (poll the status route first) and for a failed or cancelled job (submit a new export); returns 410 with error.code not_found and error.reason export_expired once the retention window has passed, less than one whole second remains when signing, or the file has been retired, so the redirect never points at a file that is gone.
    ///
    /// The API answers with a redirect to the file. It is followed once, by a fresh
    /// request that carries no credential, and the file comes back as a streaming
    /// [`Download`].
    pub async fn download_trader_export(&self, address: &str, job_id: i64) -> Result<Download> {
        let path = format!(
            "/api/v1/trader/{address}/export/download",
            address = encode_path_segment(address)
        );
        let mut call = Call::new(&Operation::DOWNLOAD_TRADER_EXPORT, path);
        call.query("job_id", job_id.to_string());
        self.send_download(call).await
    }

    /// Inspect current API usage without spending primary request quota
    ///
    /// `GET /api/v1/usage`
    ///
    /// Returns the authenticated caller sliding-window request budget, UTC-day usage and monthly quota. This control-plane endpoint remains available for a valid credential after paid data access lapses and does not increment the primary Redis rate-limit counter, monthly quota or API usage table; it shares a separate 100 reads/minute per-user inspection bucket with GET /api/v1/me. UTC-day totals use finalized quarter-hour rollups plus the disjoint raw interval through request time; unavailable rollup progress returns an error. Late accounting records retain their original UTC day when closed-period usage is read or the monthly budget is rebuilt. Current periods reflect persisted records and remain provisional; quota limits, prices and response fields are unchanged.
    pub async fn get_usage(&self) -> Result<Usage> {
        let path = String::from("/api/v1/usage");
        let call = Call::new(&Operation::GET_USAGE, path);
        self.send_json(call).await
    }

    /// Get market context (Markdown)
    ///
    /// `GET /api/v1/market/{condition_id}/context.md`
    ///
    /// Authenticated, self-contained Polymarket market evidence document. Renders the same typed data as the market snapshot with trust included: identity, outcome labels and tokens, cached quotes, liquidity, live sports, and per-source freshness or unavailable reasons. Provider text is encoded as indented JSON data. Accepts raw or mkt_-prefixed condition IDs. Unknown markets return 404. No ETag or conditional requests; use the snapshot JSON route for those.
    pub async fn get_market_context_markdown(&self, condition_id: &str) -> Result<String> {
        let path = format!(
            "/api/v1/market/{condition_id}/context.md",
            condition_id = encode_path_segment(condition_id)
        );
        let call = Call::new(&Operation::GET_MARKET_CONTEXT_MARKDOWN, path);
        self.send_text(call).await
    }

    /// Identify the authenticated account and credential
    ///
    /// `GET /api/v1/me`
    ///
    /// Returns caller-owned account and credential IDs, credential validity, paid-data entitlement and approved scopes. Null scopes mean full legacy developer-key access. Valid credentials can use this control-plane diagnostic path after paid access lapses; data routes still require active paid access. OAuth grants and named integration keys need read scope. Does not return credentials, payment details or personal contact details.
    pub async fn get_account_identity(&self) -> Result<AccountIdentity> {
        let path = String::from("/api/v1/me");
        let call = Call::new(&Operation::GET_ACCOUNT_IDENTITY, path);
        self.send_json(call).await
    }

    /// Create an immutable whale dataset
    ///
    /// `POST /api/v1/datasets/whale-trades`
    ///
    /// Extract at most 1,000,000 rows and 256 MiB uncompressed; exceeding either bound fails the job and publishes no partial file. Window and filters freeze on admission; rows and source facts freeze on one worker database snapshot. NDJSON uses exact decimal strings, with no current grade or market enrichment. The manifest checkpoint includes already committed arrivals after to plus later/open writers, with intentional overlap. Paid export scope; jobs are private to the credential owner. Shares the 20/day owner export quota and fair worker admission with trader exports; datasets also have a combined 5/hour quota. Three worker attempts, 24-hour retention, no partial download; cancellation consumes its reservation. Coverage is whale alerts, not all provider fills. Sports and esports markets only (#27430): trades on any other market are left out of the file, and a condition_id naming such a market returns 404 not_found with error.reason market_out_of_scope before any job is reserved.
    pub async fn submit_whale_dataset(&self, body: &SubmitWhaleDatasetBody) -> Result<WhaleDatasetJob> {
        let path = String::from("/api/v1/datasets/whale-trades");
        let mut call = Call::new(&Operation::SUBMIT_WHALE_DATASET, path);
        call.json(body)?;
        self.send_json(call).await
    }

    /// Read a whale dataset job
    ///
    /// `GET /api/v1/datasets/whale-trades/{job_id}`
    ///
    /// Read queued, running, cancel_requested, ready, failed, reconcile_required, expired or cancelled. Poll only while next_action is poll, after poll_after_s. Ready manifests contain count, content and compressed SHA-256, schema, filters, source, horizon, expiry and replay continuation. Deltas do not retain the finite time filter and can repeat rows; deduplicate by wt_ ID (payload.whale_alert_id when not expanded). This is an insertion feed, not update/delete CDC. Paid export scope; jobs are private to the credential owner. Shares the 20/day owner export quota and fair worker admission with trader exports; datasets also have a combined 5/hour quota. Three worker attempts, 24-hour retention, no partial download; cancellation consumes its reservation. Coverage is whale alerts, not all provider fills.
    pub async fn get_whale_dataset_status(&self, job_id: i64) -> Result<WhaleDatasetJob> {
        let path = format!("/api/v1/datasets/whale-trades/{job_id}", job_id = job_id);
        let call = Call::new(&Operation::GET_WHALE_DATASET_STATUS, path);
        self.send_json(call).await
    }

    /// Download an immutable whale dataset
    ///
    /// `GET /api/v1/datasets/whale-trades/{job_id}/download`
    ///
    /// Download only a ready artifact; status handles failure and cancellation. Retired artifacts return 410 at serving time. Paid export scope; jobs are private to the credential owner. Shares the 20/day owner export quota and fair worker admission with trader exports; datasets also have a combined 5/hour quota. Three worker attempts, 24-hour retention, no partial download; cancellation consumes its reservation. Coverage is whale alerts, not all provider fills.
    ///
    /// The API answers with a redirect to the file. It is followed once, by a fresh
    /// request that carries no credential, and the file comes back as a streaming
    /// [`Download`].
    pub async fn download_whale_dataset(&self, job_id: i64) -> Result<Download> {
        let path = format!("/api/v1/datasets/whale-trades/{job_id}/download", job_id = job_id);
        let call = Call::new(&Operation::DOWNLOAD_WHALE_DATASET, path);
        self.send_download(call).await
    }

    /// Cancel a whale dataset job
    ///
    /// `POST /api/v1/datasets/whale-trades/{job_id}/cancel`
    ///
    /// Cancel queued jobs immediately and request running jobs stop at their next safe point. Repeating cancel converges on the current state; cancellation after the completion fence leaves the artifact ready. Paid export scope; jobs are private to the credential owner. Shares the 20/day owner export quota and fair worker admission with trader exports; datasets also have a combined 5/hour quota. Three worker attempts, 24-hour retention, no partial download; cancellation consumes its reservation. Coverage is whale alerts, not all provider fills.
    pub async fn cancel_whale_dataset(&self, job_id: i64) -> Result<WhaleDatasetJob> {
        let path = format!("/api/v1/datasets/whale-trades/{job_id}/cancel", job_id = job_id);
        let call = Call::new(&Operation::CANCEL_WHALE_DATASET, path);
        self.send_json(call).await
    }

    /// Read a pick proof by stable id
    ///
    /// `GET /api/v1/pick-of-the-day/ledger/{pick_id}`
    ///
    /// Public read of one published pick by its stable decimal-string pick_id. Same proof gating, canonical bytes, ETag and integrity failures as the ledger. Invalid ids return 400; absent or unpublished picks return 404. Withdrawal from recommendations or the archive does not remove a published ledger entry.
    pub async fn get_pick_of_the_day_ledger_entry(
        &self,
        pick_id: &str,
        params: &GetPickOfTheDayLedgerEntryParams,
    ) -> Result<GetPickOfTheDayLedgerEntryResponse> {
        let path = format!(
            "/api/v1/pick-of-the-day/ledger/{pick_id}",
            pick_id = encode_path_segment(pick_id)
        );
        let mut call = Call::new(&Operation::GET_PICK_OF_THE_DAY_LEDGER_ENTRY, path);
        call.header("If-None-Match", params.if_none_match.as_deref());
        self.send_json(call).await
    }

    /// Admit asynchronous webhook verification
    ///
    /// `POST /api/v1/webhooks/{id}/verification-attempts`
    ///
    /// Additive asynchronous consent flow; the legacy POST /verify keeps its synchronous 200/422 behavior and retry policy. Commits one durable attempt and returns 202 without awaiting DNS or the receiver. Send the original verification_token. Optional Idempotency-Key replays the original admission response for the same endpoint/token identity; a changed request returns 422 and an in-flight matching key returns 409. Different keys for the same token revision recover the same attempt, including terminal attempts, without new receiver work. Poll status_url for current state; 202 is admission, not activation. A supervised worker sends the existing signed webhook.verification body with an additional verification_attempt_id and x-0xinsider-verification-attempt header, stable across at-least-once retries. Verify the timestamp/raw-body HMAC and answer 2xx. DNS is public-address-pinned; redirects and proxies are refused and response bodies are not read. Timeout/transport/429/5xx failures retry at most 4 attempts, with 5/15/45-second waits, until the earlier token deadline or 15-minute horizon. Other receiver statuses and URL/security refusals are terminal. Activation requires current owner eligibility, endpoint/token/URL/signing identity, unexpired attempt/token and valid lease. Configuration changes or disable/delete cancel obsolete work. Terminal ciphertext is erased; status exposes no token, signing secret, address or receiver body. History is available for 7 days.
    pub async fn create_webhook_verification_attempt(
        &self,
        id: i64,
        body: &CreateWebhookVerificationAttemptRequest,
        params: &CreateWebhookVerificationAttemptParams,
    ) -> Result<CreateWebhookVerificationAttemptResponse> {
        let path = format!("/api/v1/webhooks/{id}/verification-attempts", id = id);
        let mut call = Call::new(&Operation::CREATE_WEBHOOK_VERIFICATION_ATTEMPT, path);
        call.header("Idempotency-Key", params.idempotency_key.as_deref());
        call.json(body)?;
        self.send_json(call).await
    }

    /// Read webhook verification attempt status
    ///
    /// `GET /api/v1/webhooks/{id}/verification-attempts/{attempt_id}`
    ///
    /// Fresh primary-database status for one attempt owned by the authenticated account and webhook. queued/running means consent is pending; only verified activates the unchanged endpoint after receiver 2xx. failed/cancelled/expired are terminal. Polling never issues a challenge or restarts work. At expiry the read reports expired immediately, even before the worker persists expiry. A missing, deleted or cross-owner endpoint/attempt returns 404. Outcomes and actual HTTP status are sanitized; no token, ciphertext, signing secret, destination address or receiver response body is returned. Terminal history is retained for 7 days.
    pub async fn get_webhook_verification_attempt(
        &self,
        id: i64,
        attempt_id: &str,
    ) -> Result<GetWebhookVerificationAttemptResponse> {
        let path = format!(
            "/api/v1/webhooks/{id}/verification-attempts/{attempt_id}",
            id = id,
            attempt_id = encode_path_segment(attempt_id)
        );
        let call = Call::new(&Operation::GET_WEBHOOK_VERIFICATION_ATTEMPT, path);
        self.send_json(call).await
    }

    /// List combo fills
    ///
    /// `GET /api/v1/combos/fills`
    ///
    /// Returns live Polymarket combo taker fills with exact decimal-string economics, wallet identities, grades, legs, conjunction results, and ingest coverage. Requires an active Pro or Max API key. Listing includes executions with price at most 0.95; use combo detail for complete history. Sports and esports only (#27449): a fill is listed only when every leg of its combo is a sports or esports market; a combo with a leg on any other market never appears, and filters, page sizes and continuations apply after that exclusion. Recent ordering uses an exclusive cursor; largest and payout use offsets. Continuations are based on page fullness and may lead to an empty final page.
    pub async fn list_combo_fills(&self, params: &ListComboFillsParams) -> Result<ComboFillsResponse> {
        let path = String::from("/api/v1/combos/fills");
        let mut call = Call::new(&Operation::LIST_COMBO_FILLS, path);
        if let Some(value) = &params.result {
            call.query("result", value.to_string());
        }
        if let Some(value) = &params.legs {
            call.query("legs", value.to_string());
        }
        if let Some(value) = &params.min_stake {
            call.query("min_stake", value.to_string());
        }
        if let Some(value) = &params.min_multiplier {
            call.query("min_multiplier", value.to_string());
        }
        if let Some(value) = &params.grades {
            call.query("grades", value.to_string());
        }
        if let Some(value) = &params.sports {
            call.query("sports", value.to_string());
        }
        if let Some(value) = &params.sort {
            call.query("sort", value.as_str().to_owned());
        }
        if let Some(value) = &params.window {
            call.query("window", value.as_str().to_owned());
        }
        if let Some(value) = &params.limit {
            call.query("limit", value.to_string());
        }
        if let Some(value) = &params.cursor {
            call.query("cursor", value.to_string());
        }
        if let Some(value) = &params.offset {
            call.query("offset", value.to_string());
        }
        call.header("If-None-Match", params.if_none_match.as_deref());
        self.send_json(call).await
    }

    /// Get live combo count
    ///
    /// `GET /api/v1/combos/summary`
    ///
    /// Returns the stored count of traded combos whose YES conjunction remains pending, with its computation timestamp. Sports and esports only (#27449): a combo with a leg outside them is not counted. Requires an active Pro or Max API key. The count is refreshed by the ingest owner at most every five minutes and cached for 60 seconds. A null live value is unknown, never zero.
    pub async fn get_combos_summary(&self, params: &GetCombosSummaryParams) -> Result<CombosSummaryResponse> {
        let path = String::from("/api/v1/combos/summary");
        let mut call = Call::new(&Operation::GET_COMBOS_SUMMARY, path);
        call.header("If-None-Match", params.if_none_match.as_deref());
        self.send_json(call).await
    }

    /// Get combo detail
    ///
    /// `GET /api/v1/combos/{condition_id}`
    ///
    /// Returns one Polymarket combo with its legs, conjunction result, all-time trade totals, newest 100 taker fills, lifecycle totals, and ingest coverage. Requires an active Pro or Max API key. Detail retains execution history above the listing price cap. A malformed combo ID returns 400; an unknown well-formed ID returns 404. A combo with a leg outside sports and esports returns 404 not_found with error.reason=market_out_of_scope (#27449). Null lifecycle or missing leg facts remain unknown.
    pub async fn get_combo(&self, condition_id: &str, params: &GetComboParams) -> Result<ComboResponse> {
        let path = format!(
            "/api/v1/combos/{condition_id}",
            condition_id = encode_path_segment(condition_id)
        );
        let mut call = Call::new(&Operation::GET_COMBO, path);
        call.header("If-None-Match", params.if_none_match.as_deref());
        self.send_json(call).await
    }

    /// Get Edge Hunter
    ///
    /// `GET /api/v1/edge-hunter`
    ///
    /// Max-only canonical Edge Hunter API with board, signals and observations views. An active Pro credential receives 403 forbidden with reason max_plan_required. Default board admission and ordering remain compatible: B grade floor, 30-row cap, 48-hour kickoff horizon, full Max projection and both current outcome quotes. Board outcomes include nullable token_id; the full signal includes nullable backed token_id, ranked_at copied from the frozen signal_created_at, and the existing aggregate category_skill evidence. Quote ts/validated_at and metadata_updated_at retain their separate meanings; none is wallet entry cost. Board quotes read verified display-price and websocket caches only, with no inline provider request or request-triggered REST refresh. Uncached outcomes remain null; retained quotes keep their original observation clock and existing retention bound. Board category, min_grade and limit are configurable; horizon clamps 1..48 and cap clamps 1..30. total counts selected admitted rows before the cap.
    ///
    /// Signals exposes full ranked records and category-skill/source evidence with default B grade floor, 12-hour horizon (clamp 1..48), page limit 20 (clamp 1..100) and cursor. Observations requires wider_holder, in_play or emerging_pile and retains full records, verified token IDs, midpoint price marks, holder/provider/directional clocks, snapshot_as_of, degraded, degradation_reasons, coverage and source-generation/category funnel evidence. Required degradation_reasons records each operational cause with canonical sport or null for generation-wide evidence, and is empty only for a healthy generation. For sports and esports reads, the first four coverage counts stay global across cohort/category/selectors; selected_observations counts matching rows before pagination and returned_observations equals data.length. An unmappable legacy category retains its zero-work empty generation with all coverage counts zero and no degradation reasons, without reading the all-sports cache. Intentional capacity_limited input, the one-page holder bound (holder_scan_complete=false, counted in coverage.incomplete_holder_markets) and board_upcoming_status=not_configured do not by themselves degrade a generation. Reconciled terminals prove accounting, not complete holder coverage. Observation horizon stays 48 hours with 12-hour in-play kickoff lookback and 30-second live snapshot ceiling. In-play additionally requires a coherent nonfuture original live-source clock no older than 30 seconds at publication and every served reuse; compute and missed-pass grace never renew that clock. Provider-confirmed live membership is observed independently of rendered scores, quotes and holder enrichment. UI refresh-marker expiry or score invalidation alone does not invalidate a separately observed provider membership. Explicit provider-source invalidation or an invalid, incomplete, future, expired or missing source remains unavailable. When one scheduled observation refresh misses its deadline, other cohorts may keep serving the last snapshot for up to 45 more seconds, with its age in meta.cache_age_s and its completion time in snapshot_as_of; a second missed refresh in a row returns 503 read_model_warming. An expired in-play source returns 503 read_model_warming even within generation grace. Funnel diagnostics describe the warmed generation/category accounting rather than the selected league/type/ID input census. admission=most_held_48h with cohort=wider_holder opts in to the most-held selection instead of the default one: per sport, up to 8 markets kicking off within 48 hours, most graded holders first, then volume, then soonest kickoff, at most 4 per event, recomputed every refresh; every row carries admitted_by most_held_48h, the response echoes admission, and funnel, coverage and degradation describe that selection. Both wider_holder selections add departures: the markets whose card left that selection before kickoff, each with departed_at, the departed card's last_observed_at and a reason from the funnel's terminal vocabulary, so a reader can tell a move to the funded slate (primary_slate_candidate) from a split holder pile.
    ///
    /// Every view accepts kind, sports, leagues, market_types, condition_ids, event_slugs, series_slugs and legacy category. Repeat array query keys or supply comma-separated values inside a key; at most 100 supplied values per axis before deduplication. Values normalize, sort and deduplicate. Lists match OR and axes match AND. Sports and machine leagues normalize case-insensitively; market_types/event_slugs/series_slugs remain trimmed exact case-sensitive provider strings. category=NFL reaches Football, while leagues=nfl selects NFL only. Selection runs before cap/pagination, binds advanced cursors/ETags, and is echoed in optional top-level selection whenever a selector or nonblank category is requested. Missing selected metadata excludes a row. Unknown well-formed market IDs or provider identities return empty results.
    ///
    /// Each row adds required nullable market_context for authoritative discovery. A frozen observed sidecar gives required nullable league, series_slug, market_type and metadata_updated_at; a pre-selector cached generation can yield context:null on an unselected read. metadata_updated_at is exactly local market_canonical.updated_at, never a provider observation clock or current-time fallback. A selected read without sidecar readiness returns 503 read_model_warming with Retry-After: 5, never silently wider results. SDK selected reads enforce strict query validation and require the echo.
    ///
    /// All public views read warmed generations only; missing or stale readiness returns 503 read_model_warming with Retry-After: 5. Advanced views use private,no-cache with ETag/If-None-Match/304; no request holder/provider computation. Default board has no ETag/pagination and private,no-store. Invalid view-specific parameters return 400. Replaced snapshots or changed cursor-bound filters return cursor_expired. Price marks are market midpoints, not wallet entry cost; volume is provider taker shares. Nullable/omitted evidence and db_only/degraded provenance remain explicit. Analytics is not an execution instruction.
    pub async fn get_edge_hunter(&self, params: &GetEdgeHunterParams) -> Result<serde_json::Value> {
        let path = String::from("/api/v1/edge-hunter");
        let mut call = Call::new(&Operation::GET_EDGE_HUNTER, path);
        if let Some(value) = &params.view {
            call.query("view", value.as_str().to_owned());
        }
        if let Some(value) = &params.category {
            call.query("category", value.to_string());
        }
        if let Some(value) = &params.cohort {
            call.query("cohort", value.as_str().to_owned());
        }
        if let Some(value) = &params.admission {
            call.query("admission", value.to_string());
        }
        if let Some(value) = &params.min_grade {
            call.query("min_grade", value.as_str().to_owned());
        }
        if let Some(value) = &params.limit {
            call.query("limit", value.to_string());
        }
        if let Some(value) = &params.cursor {
            call.query("cursor", value.to_string());
        }
        if let Some(value) = &params.horizon_hours {
            call.query("horizon_hours", value.to_string());
        }
        if let Some(value) = &params.kind {
            call.query("kind", value.as_str().to_owned());
        }
        for value in &params.sports {
            call.query("sports", value.to_string());
        }
        for value in &params.leagues {
            call.query("leagues", value.to_string());
        }
        for value in &params.market_types {
            call.query("market_types", value.to_string());
        }
        for value in &params.condition_ids {
            call.query("condition_ids", value.to_string());
        }
        for value in &params.event_slugs {
            call.query("event_slugs", value.to_string());
        }
        for value in &params.series_slugs {
            call.query("series_slugs", value.to_string());
        }
        call.header("If-None-Match", params.if_none_match.as_deref());
        self.send_json(call).await
    }
}

impl ListPage for ComboFillsResponse {
    type Item = ComboFill;

    fn items(&self) -> &[ComboFill] {
        &self.data
    }

    fn into_items(self) -> Vec<ComboFill> {
        self.data
    }

    fn has_more(&self) -> bool {
        self.has_more
    }

    fn next_cursor(&self) -> Option<&str> {
        self.next_cursor.as_deref()
    }
}

impl ListPage for ExploreMarketsResponse {
    type Item = ExploreEntry;

    fn items(&self) -> &[ExploreEntry] {
        &self.data
    }

    fn into_items(self) -> Vec<ExploreEntry> {
        self.data
    }

    fn has_more(&self) -> bool {
        self.has_more
    }

    fn next_cursor(&self) -> Option<&str> {
        self.next_cursor.as_deref()
    }
}

impl ListPage for GetEventReplaySinceResponse {
    type Item = EventReplayEvent;

    fn items(&self) -> &[EventReplayEvent] {
        &self.data
    }

    fn into_items(self) -> Vec<EventReplayEvent> {
        self.data
    }

    fn has_more(&self) -> bool {
        self.has_more
    }

    fn next_cursor(&self) -> Option<&str> {
        Some(&self.next_cursor)
    }
}

impl ListPage for GetMarketHoldersResponse {
    type Item = MarketHolder;

    fn items(&self) -> &[MarketHolder] {
        &self.data
    }

    fn into_items(self) -> Vec<MarketHolder> {
        self.data
    }

    fn has_more(&self) -> bool {
        self.has_more
    }

    fn next_cursor(&self) -> Option<&str> {
        self.next_cursor.as_deref()
    }
}

impl ListPage for GetPositionTimelineByIdResponse {
    type Item = PositionTimelineEvent;

    fn items(&self) -> &[PositionTimelineEvent] {
        &self.data
    }

    fn into_items(self) -> Vec<PositionTimelineEvent> {
        self.data
    }

    fn has_more(&self) -> bool {
        self.has_more
    }

    fn next_cursor(&self) -> Option<&str> {
        self.next_cursor.as_deref()
    }
}

impl ListPage for GetPositionTimelineResponse {
    type Item = PositionTimelineEvent;

    fn items(&self) -> &[PositionTimelineEvent] {
        &self.data
    }

    fn into_items(self) -> Vec<PositionTimelineEvent> {
        self.data
    }

    fn has_more(&self) -> bool {
        self.has_more
    }

    fn next_cursor(&self) -> Option<&str> {
        self.next_cursor.as_deref()
    }
}

impl ListPage for ListGamesResponse {
    type Item = Game;

    fn items(&self) -> &[Game] {
        &self.data
    }

    fn into_items(self) -> Vec<Game> {
        self.data
    }

    fn has_more(&self) -> bool {
        self.has_more
    }

    fn next_cursor(&self) -> Option<&str> {
        self.next_cursor.as_deref()
    }
}

impl ListPage for ListInsiderRadarResponse {
    type Item = SuspiciousTrade;

    fn items(&self) -> &[SuspiciousTrade] {
        &self.data
    }

    fn into_items(self) -> Vec<SuspiciousTrade> {
        self.data
    }

    fn has_more(&self) -> bool {
        self.has_more
    }

    fn next_cursor(&self) -> Option<&str> {
        self.next_cursor.as_deref()
    }
}

impl ListPage for ListLargePositionsResponse {
    type Item = LargePosition;

    fn items(&self) -> &[LargePosition] {
        &self.data
    }

    fn into_items(self) -> Vec<LargePosition> {
        self.data
    }

    fn has_more(&self) -> bool {
        self.has_more
    }

    fn next_cursor(&self) -> Option<&str> {
        self.next_cursor.as_deref()
    }
}

impl ListPage for ListLargeTradeHistoryResponse {
    type Item = LargeTrade;

    fn items(&self) -> &[LargeTrade] {
        &self.data
    }

    fn into_items(self) -> Vec<LargeTrade> {
        self.data
    }

    fn has_more(&self) -> bool {
        self.has_more
    }

    fn next_cursor(&self) -> Option<&str> {
        self.next_cursor.as_deref()
    }
}

impl ListPage for ListLargeTradesResponse {
    type Item = LargeTrade;

    fn items(&self) -> &[LargeTrade] {
        &self.data
    }

    fn into_items(self) -> Vec<LargeTrade> {
        self.data
    }

    fn has_more(&self) -> bool {
        self.has_more
    }

    fn next_cursor(&self) -> Option<&str> {
        self.next_cursor.as_deref()
    }
}

impl ListPage for ListLeaderboardResponse {
    type Item = LeaderboardEntry;

    fn items(&self) -> &[LeaderboardEntry] {
        &self.data
    }

    fn into_items(self) -> Vec<LeaderboardEntry> {
        self.data
    }

    fn has_more(&self) -> bool {
        self.has_more
    }

    fn next_cursor(&self) -> Option<&str> {
        self.next_cursor.as_deref()
    }
}

impl ListPage for ListPositionsResponse {
    type Item = Position;

    fn items(&self) -> &[Position] {
        &self.data
    }

    fn into_items(self) -> Vec<Position> {
        self.data
    }

    fn has_more(&self) -> bool {
        self.has_more
    }

    fn next_cursor(&self) -> Option<&str> {
        self.next_cursor.as_deref()
    }
}

impl ListPage for ListSharpMoneyFlowsResponse {
    type Item = SmartMoneyFlowMarket;

    fn items(&self) -> &[SmartMoneyFlowMarket] {
        &self.data
    }

    fn into_items(self) -> Vec<SmartMoneyFlowMarket> {
        self.data
    }

    fn has_more(&self) -> bool {
        self.has_more
    }

    fn next_cursor(&self) -> Option<&str> {
        self.next_cursor.as_deref()
    }
}

impl ListPage for ListSmartMoneyFlowsResponse {
    type Item = SmartMoneyFlowMarket;

    fn items(&self) -> &[SmartMoneyFlowMarket] {
        &self.data
    }

    fn into_items(self) -> Vec<SmartMoneyFlowMarket> {
        self.data
    }

    fn has_more(&self) -> bool {
        self.has_more
    }

    fn next_cursor(&self) -> Option<&str> {
        self.next_cursor.as_deref()
    }
}

impl ListPage for ListSuspiciousTradesResponse {
    type Item = SuspiciousTrade;

    fn items(&self) -> &[SuspiciousTrade] {
        &self.data
    }

    fn into_items(self) -> Vec<SuspiciousTrade> {
        self.data
    }

    fn has_more(&self) -> bool {
        self.has_more
    }

    fn next_cursor(&self) -> Option<&str> {
        self.next_cursor.as_deref()
    }
}

impl ListPage for ListTrendingWalletsResponse {
    type Item = TrendingWallet;

    fn items(&self) -> &[TrendingWallet] {
        &self.data
    }

    fn into_items(self) -> Vec<TrendingWallet> {
        self.data
    }

    fn has_more(&self) -> bool {
        self.has_more
    }

    fn next_cursor(&self) -> Option<&str> {
        self.next_cursor.as_deref()
    }
}

impl ListPage for ListWebhookDeliveriesResponse {
    type Item = WebhookDelivery;

    fn items(&self) -> &[WebhookDelivery] {
        &self.data
    }

    fn into_items(self) -> Vec<WebhookDelivery> {
        self.data
    }

    fn has_more(&self) -> bool {
        self.has_more
    }

    fn next_cursor(&self) -> Option<&str> {
        self.next_cursor.as_deref()
    }
}

impl ListPage for ListWebhookEventsResponse {
    type Item = WebhookEventDescriptor;

    fn items(&self) -> &[WebhookEventDescriptor] {
        &self.data
    }

    fn into_items(self) -> Vec<WebhookEventDescriptor> {
        self.data
    }

    fn has_more(&self) -> bool {
        self.has_more
    }

    fn next_cursor(&self) -> Option<&str> {
        self.next_cursor.as_deref()
    }
}

impl ListPage for ListWebhooksResponse {
    type Item = WebhookEndpoint;

    fn items(&self) -> &[WebhookEndpoint] {
        &self.data
    }

    fn into_items(self) -> Vec<WebhookEndpoint> {
        self.data
    }

    fn has_more(&self) -> bool {
        self.has_more
    }

    fn next_cursor(&self) -> Option<&str> {
        self.next_cursor.as_deref()
    }
}

impl ListPage for ListWhaleTradeHistoryResponse {
    type Item = LargeTrade;

    fn items(&self) -> &[LargeTrade] {
        &self.data
    }

    fn into_items(self) -> Vec<LargeTrade> {
        self.data
    }

    fn has_more(&self) -> bool {
        self.has_more
    }

    fn next_cursor(&self) -> Option<&str> {
        self.next_cursor.as_deref()
    }
}

impl ListPage for ListWhaleTradesResponse {
    type Item = LargeTrade;

    fn items(&self) -> &[LargeTrade] {
        &self.data
    }

    fn into_items(self) -> Vec<LargeTrade> {
        self.data
    }

    fn has_more(&self) -> bool {
        self.has_more
    }

    fn next_cursor(&self) -> Option<&str> {
        self.next_cursor.as_deref()
    }
}

impl ListPage for SearchContentResponse {
    type Item = ContentSearchResult;

    fn items(&self) -> &[ContentSearchResult] {
        &self.data
    }

    fn into_items(self) -> Vec<ContentSearchResult> {
        self.data
    }

    fn has_more(&self) -> bool {
        self.has_more
    }

    fn next_cursor(&self) -> Option<&str> {
        self.next_cursor.as_deref()
    }
}

impl ListPage for SearchMarketsResponse {
    type Item = MarketSearchResult;

    fn items(&self) -> &[MarketSearchResult] {
        &self.data
    }

    fn into_items(self) -> Vec<MarketSearchResult> {
        self.data
    }

    fn has_more(&self) -> bool {
        self.has_more
    }

    fn next_cursor(&self) -> Option<&str> {
        self.next_cursor.as_deref()
    }
}

impl CursorParams for ExploreMarketsParams {
    fn set_cursor(&mut self, cursor: Option<String>) {
        self.cursor = cursor;
    }
}

impl CursorParams for GetEdgeHunterParams {
    fn set_cursor(&mut self, cursor: Option<String>) {
        self.cursor = cursor;
    }
}

impl CursorParams for GetEventReplaySinceParams {
    fn set_cursor(&mut self, cursor: Option<String>) {
        self.cursor = cursor;
    }
}

impl CursorParams for GetMarketHoldersParams {
    fn set_cursor(&mut self, cursor: Option<String>) {
        self.cursor = cursor;
    }
}

impl CursorParams for GetPositionTimelineByIdParams {
    fn set_cursor(&mut self, cursor: Option<String>) {
        self.cursor = cursor;
    }
}

impl CursorParams for GetPositionTimelineParams {
    fn set_cursor(&mut self, cursor: Option<String>) {
        self.cursor = cursor;
    }
}

impl CursorParams for ListComboFillsParams {
    fn set_cursor(&mut self, cursor: Option<String>) {
        self.cursor = cursor;
    }
}

impl CursorParams for ListGamesParams {
    fn set_cursor(&mut self, cursor: Option<String>) {
        self.cursor = cursor;
    }
}

impl CursorParams for ListInsiderRadarParams {
    fn set_cursor(&mut self, cursor: Option<String>) {
        self.cursor = cursor;
    }
}

impl CursorParams for ListLargePositionsParams {
    fn set_cursor(&mut self, cursor: Option<String>) {
        self.cursor = cursor;
    }
}

impl CursorParams for ListLargeTradeCounterpartyExecutionsParams {
    fn set_cursor(&mut self, cursor: Option<String>) {
        self.cursor = cursor;
    }
}

impl CursorParams for ListLargeTradeCounterpartyMakersParams {
    fn set_cursor(&mut self, cursor: Option<String>) {
        self.cursor = cursor;
    }
}

impl CursorParams for ListLargeTradeHistoryParams {
    fn set_cursor(&mut self, cursor: Option<String>) {
        self.cursor = cursor;
    }
}

impl CursorParams for ListLargeTradesParams {
    fn set_cursor(&mut self, cursor: Option<String>) {
        self.cursor = cursor;
    }
}

impl CursorParams for ListLeaderboardParams {
    fn set_cursor(&mut self, cursor: Option<String>) {
        self.cursor = cursor;
    }
}

impl CursorParams for ListPositionsParams {
    fn set_cursor(&mut self, cursor: Option<String>) {
        self.cursor = cursor;
    }
}

impl CursorParams for ListSharpMoneyFlowsParams {
    fn set_cursor(&mut self, cursor: Option<String>) {
        self.cursor = cursor;
    }
}

impl CursorParams for ListSmartMoneyFlowsParams {
    fn set_cursor(&mut self, cursor: Option<String>) {
        self.cursor = cursor;
    }
}

impl CursorParams for ListSuspiciousTradesParams {
    fn set_cursor(&mut self, cursor: Option<String>) {
        self.cursor = cursor;
    }
}

impl CursorParams for ListTrendingWalletsParams {
    fn set_cursor(&mut self, cursor: Option<String>) {
        self.cursor = cursor;
    }
}

impl CursorParams for ListWebhookDeliveriesParams {
    fn set_cursor(&mut self, cursor: Option<String>) {
        self.cursor = cursor;
    }
}

impl CursorParams for ListWhaleTradeCounterpartyExecutionsParams {
    fn set_cursor(&mut self, cursor: Option<String>) {
        self.cursor = cursor;
    }
}

impl CursorParams for ListWhaleTradeCounterpartyMakersParams {
    fn set_cursor(&mut self, cursor: Option<String>) {
        self.cursor = cursor;
    }
}

impl CursorParams for ListWhaleTradeHistoryParams {
    fn set_cursor(&mut self, cursor: Option<String>) {
        self.cursor = cursor;
    }
}

impl CursorParams for ListWhaleTradesParams {
    fn set_cursor(&mut self, cursor: Option<String>) {
        self.cursor = cursor;
    }
}

impl CursorParams for SearchMarketsParams {
    fn set_cursor(&mut self, cursor: Option<String>) {
        self.cursor = cursor;
    }
}