@structbuild/sdk 0.5.11 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/polymarket.d.ts +2338 -1174
- package/dist/generated/webhooks.d.ts +719 -75
- package/dist/generated/ws-alerts.d.ts +774 -99
- package/dist/generated/ws.d.ts +931 -154
- package/dist/index.cjs +30 -11
- package/dist/index.cjs.map +11 -11
- package/dist/index.js +30 -11
- package/dist/index.js.map +11 -11
- package/dist/namespaces/analytics.d.ts +17 -17
- package/dist/namespaces/assets.d.ts +1 -1
- package/dist/namespaces/builders.d.ts +2 -2
- package/dist/namespaces/events.d.ts +1 -2
- package/dist/namespaces/holders.d.ts +4 -3
- package/dist/namespaces/markets.d.ts +3 -3
- package/dist/namespaces/tags.d.ts +2 -1
- package/dist/namespaces/trader.d.ts +12 -8
- package/dist/types/index.d.ts +81 -50
- package/dist/types/ws.d.ts +55 -10
- package/package.json +2 -1
|
@@ -634,26 +634,6 @@ export interface paths {
|
|
|
634
634
|
patch?: never;
|
|
635
635
|
trace?: never;
|
|
636
636
|
};
|
|
637
|
-
"/polymarket/events/top-traders": {
|
|
638
|
-
parameters: {
|
|
639
|
-
query?: never;
|
|
640
|
-
header?: never;
|
|
641
|
-
path?: never;
|
|
642
|
-
cookie?: never;
|
|
643
|
-
};
|
|
644
|
-
/**
|
|
645
|
-
* Get top traders for an event
|
|
646
|
-
* @description Top traders ranked by realized PnL for a given event.
|
|
647
|
-
*/
|
|
648
|
-
get: operations["get_event_top_traders"];
|
|
649
|
-
put?: never;
|
|
650
|
-
post?: never;
|
|
651
|
-
delete?: never;
|
|
652
|
-
options?: never;
|
|
653
|
-
head?: never;
|
|
654
|
-
patch?: never;
|
|
655
|
-
trace?: never;
|
|
656
|
-
};
|
|
657
637
|
"/polymarket/events/{event_slug}/analytics/changes": {
|
|
658
638
|
parameters: {
|
|
659
639
|
query?: never;
|
|
@@ -734,6 +714,26 @@ export interface paths {
|
|
|
734
714
|
patch?: never;
|
|
735
715
|
trace?: never;
|
|
736
716
|
};
|
|
717
|
+
"/polymarket/holders/events/{event_slug}/history": {
|
|
718
|
+
parameters: {
|
|
719
|
+
query?: never;
|
|
720
|
+
header?: never;
|
|
721
|
+
path?: never;
|
|
722
|
+
cookie?: never;
|
|
723
|
+
};
|
|
724
|
+
/**
|
|
725
|
+
* Get event holders history
|
|
726
|
+
* @description Retrieve historical unique holder counts for an event over a time range.
|
|
727
|
+
*/
|
|
728
|
+
get: operations["get_event_holders_history"];
|
|
729
|
+
put?: never;
|
|
730
|
+
post?: never;
|
|
731
|
+
delete?: never;
|
|
732
|
+
options?: never;
|
|
733
|
+
head?: never;
|
|
734
|
+
patch?: never;
|
|
735
|
+
trace?: never;
|
|
736
|
+
};
|
|
737
737
|
"/polymarket/holders/markets": {
|
|
738
738
|
parameters: {
|
|
739
739
|
query?: never;
|
|
@@ -743,7 +743,7 @@ export interface paths {
|
|
|
743
743
|
};
|
|
744
744
|
/**
|
|
745
745
|
* Get market holders
|
|
746
|
-
* @description Retrieve holders of a market grouped by outcome, sorted by shares held. Identify the market with either `condition_id` or `market_slug` — exactly one must be provided. Set `include_pnl=true` to include a
|
|
746
|
+
* @description Retrieve holders of a market grouped by outcome, sorted by shares held. Identify the market with either `condition_id` or `market_slug` — exactly one must be provided. Set `include_pnl=true` to include a per-holder `pnl` object. Uses cursor-based pagination.
|
|
747
747
|
*/
|
|
748
748
|
get: operations["get_market_holders"];
|
|
749
749
|
put?: never;
|
|
@@ -763,7 +763,7 @@ export interface paths {
|
|
|
763
763
|
};
|
|
764
764
|
/**
|
|
765
765
|
* Get market holders history
|
|
766
|
-
* @description Retrieve historical holder
|
|
766
|
+
* @description Retrieve historical unique holder counts for a market over a time range. Identify the market with either `condition_id` or `market_slug`.
|
|
767
767
|
*/
|
|
768
768
|
get: operations["get_market_holders_history"];
|
|
769
769
|
put?: never;
|
|
@@ -783,7 +783,7 @@ export interface paths {
|
|
|
783
783
|
};
|
|
784
784
|
/**
|
|
785
785
|
* Get position holders
|
|
786
|
-
* @description Retrieve holders of a specific position (ERC1155 token), sorted by shares held. Set `include_pnl=true` to include
|
|
786
|
+
* @description Retrieve holders of a specific position (ERC1155 token), sorted by shares held. Set `include_pnl=true` to include a per-holder `pnl` object. Uses cursor-based pagination.
|
|
787
787
|
*/
|
|
788
788
|
get: operations["get_position_holders"];
|
|
789
789
|
put?: never;
|
|
@@ -803,7 +803,7 @@ export interface paths {
|
|
|
803
803
|
};
|
|
804
804
|
/**
|
|
805
805
|
* Get position holders history
|
|
806
|
-
* @description Retrieve historical holder snapshots for a position over a time range.
|
|
806
|
+
* @description Retrieve historical holder snapshots for a position over a time range.
|
|
807
807
|
*/
|
|
808
808
|
get: operations["get_position_holders_history"];
|
|
809
809
|
put?: never;
|
|
@@ -982,8 +982,8 @@ export interface paths {
|
|
|
982
982
|
cookie?: never;
|
|
983
983
|
};
|
|
984
984
|
/**
|
|
985
|
-
* Get top traders for a position
|
|
986
|
-
* @description Top traders
|
|
985
|
+
* Get top traders for a position
|
|
986
|
+
* @description Top traders for a position.
|
|
987
987
|
*/
|
|
988
988
|
get: operations["get_position_top_traders"];
|
|
989
989
|
put?: never;
|
|
@@ -1063,7 +1063,7 @@ export interface paths {
|
|
|
1063
1063
|
};
|
|
1064
1064
|
/**
|
|
1065
1065
|
* Get top traders for a market
|
|
1066
|
-
* @description Top traders ranked by realized PnL
|
|
1066
|
+
* @description Top traders for a market, ranked by realized PnL desc.
|
|
1067
1067
|
*/
|
|
1068
1068
|
get: operations["get_market_top_traders"];
|
|
1069
1069
|
put?: never;
|
|
@@ -1374,6 +1374,26 @@ export interface paths {
|
|
|
1374
1374
|
patch?: never;
|
|
1375
1375
|
trace?: never;
|
|
1376
1376
|
};
|
|
1377
|
+
"/polymarket/tags/top-traders": {
|
|
1378
|
+
parameters: {
|
|
1379
|
+
query?: never;
|
|
1380
|
+
header?: never;
|
|
1381
|
+
path?: never;
|
|
1382
|
+
cookie?: never;
|
|
1383
|
+
};
|
|
1384
|
+
/**
|
|
1385
|
+
* Get top traders for a category
|
|
1386
|
+
* @description Top traders for a category.
|
|
1387
|
+
*/
|
|
1388
|
+
get: operations["get_category_top_traders"];
|
|
1389
|
+
put?: never;
|
|
1390
|
+
post?: never;
|
|
1391
|
+
delete?: never;
|
|
1392
|
+
options?: never;
|
|
1393
|
+
head?: never;
|
|
1394
|
+
patch?: never;
|
|
1395
|
+
trace?: never;
|
|
1396
|
+
};
|
|
1377
1397
|
"/polymarket/tags/{identifier}": {
|
|
1378
1398
|
parameters: {
|
|
1379
1399
|
query?: never;
|
|
@@ -1462,8 +1482,8 @@ export interface paths {
|
|
|
1462
1482
|
cookie?: never;
|
|
1463
1483
|
};
|
|
1464
1484
|
/**
|
|
1465
|
-
* Get global leaderboard
|
|
1466
|
-
* @description
|
|
1485
|
+
* Get global PnL leaderboard
|
|
1486
|
+
* @description Trader leaderboard.
|
|
1467
1487
|
*/
|
|
1468
1488
|
get: operations["get_global_pnl"];
|
|
1469
1489
|
put?: never;
|
|
@@ -1474,7 +1494,7 @@ export interface paths {
|
|
|
1474
1494
|
patch?: never;
|
|
1475
1495
|
trace?: never;
|
|
1476
1496
|
};
|
|
1477
|
-
"/polymarket/trader/
|
|
1497
|
+
"/polymarket/trader/pnl/{address}": {
|
|
1478
1498
|
parameters: {
|
|
1479
1499
|
query?: never;
|
|
1480
1500
|
header?: never;
|
|
@@ -1482,10 +1502,10 @@ export interface paths {
|
|
|
1482
1502
|
cookie?: never;
|
|
1483
1503
|
};
|
|
1484
1504
|
/**
|
|
1485
|
-
* Get trader
|
|
1486
|
-
* @description
|
|
1505
|
+
* Get trader PnL summary
|
|
1506
|
+
* @description Trader PnL summary.
|
|
1487
1507
|
*/
|
|
1488
|
-
get: operations["
|
|
1508
|
+
get: operations["get_trader_pnl"];
|
|
1489
1509
|
put?: never;
|
|
1490
1510
|
post?: never;
|
|
1491
1511
|
delete?: never;
|
|
@@ -1494,7 +1514,7 @@ export interface paths {
|
|
|
1494
1514
|
patch?: never;
|
|
1495
1515
|
trace?: never;
|
|
1496
1516
|
};
|
|
1497
|
-
"/polymarket/trader/pnl/{address}": {
|
|
1517
|
+
"/polymarket/trader/pnl/{address}/calendar": {
|
|
1498
1518
|
parameters: {
|
|
1499
1519
|
query?: never;
|
|
1500
1520
|
header?: never;
|
|
@@ -1502,10 +1522,10 @@ export interface paths {
|
|
|
1502
1522
|
cookie?: never;
|
|
1503
1523
|
};
|
|
1504
1524
|
/**
|
|
1505
|
-
* Get trader PnL
|
|
1506
|
-
* @description Retrieve
|
|
1525
|
+
* Get trader PnL calendar
|
|
1526
|
+
* @description Retrieve daily PnL candles for a trader.
|
|
1507
1527
|
*/
|
|
1508
|
-
get: operations["
|
|
1528
|
+
get: operations["get_trader_pnl_calendar"];
|
|
1509
1529
|
put?: never;
|
|
1510
1530
|
post?: never;
|
|
1511
1531
|
delete?: never;
|
|
@@ -1514,7 +1534,7 @@ export interface paths {
|
|
|
1514
1534
|
patch?: never;
|
|
1515
1535
|
trace?: never;
|
|
1516
1536
|
};
|
|
1517
|
-
"/polymarket/trader/pnl/{address}/
|
|
1537
|
+
"/polymarket/trader/pnl/{address}/candles": {
|
|
1518
1538
|
parameters: {
|
|
1519
1539
|
query?: never;
|
|
1520
1540
|
header?: never;
|
|
@@ -1522,10 +1542,10 @@ export interface paths {
|
|
|
1522
1542
|
cookie?: never;
|
|
1523
1543
|
};
|
|
1524
1544
|
/**
|
|
1525
|
-
* Get trader PnL
|
|
1526
|
-
* @description
|
|
1545
|
+
* Get trader PnL candles
|
|
1546
|
+
* @description PnL candles for a trader.
|
|
1527
1547
|
*/
|
|
1528
|
-
get: operations["
|
|
1548
|
+
get: operations["get_trader_pnl_candles"];
|
|
1529
1549
|
put?: never;
|
|
1530
1550
|
post?: never;
|
|
1531
1551
|
delete?: never;
|
|
@@ -1534,7 +1554,7 @@ export interface paths {
|
|
|
1534
1554
|
patch?: never;
|
|
1535
1555
|
trace?: never;
|
|
1536
1556
|
};
|
|
1537
|
-
"/polymarket/trader/pnl/{address}/
|
|
1557
|
+
"/polymarket/trader/pnl/{address}/categories": {
|
|
1538
1558
|
parameters: {
|
|
1539
1559
|
query?: never;
|
|
1540
1560
|
header?: never;
|
|
@@ -1542,10 +1562,30 @@ export interface paths {
|
|
|
1542
1562
|
cookie?: never;
|
|
1543
1563
|
};
|
|
1544
1564
|
/**
|
|
1545
|
-
* Get trader PnL
|
|
1546
|
-
* @description
|
|
1565
|
+
* Get trader category PnL
|
|
1566
|
+
* @description Per-category PnL for a trader.
|
|
1547
1567
|
*/
|
|
1548
|
-
get: operations["
|
|
1568
|
+
get: operations["get_trader_category_pnl"];
|
|
1569
|
+
put?: never;
|
|
1570
|
+
post?: never;
|
|
1571
|
+
delete?: never;
|
|
1572
|
+
options?: never;
|
|
1573
|
+
head?: never;
|
|
1574
|
+
patch?: never;
|
|
1575
|
+
trace?: never;
|
|
1576
|
+
};
|
|
1577
|
+
"/polymarket/trader/pnl/{address}/changes": {
|
|
1578
|
+
parameters: {
|
|
1579
|
+
query?: never;
|
|
1580
|
+
header?: never;
|
|
1581
|
+
path?: never;
|
|
1582
|
+
cookie?: never;
|
|
1583
|
+
};
|
|
1584
|
+
/**
|
|
1585
|
+
* Get trader PnL changes
|
|
1586
|
+
* @description PnL, portfolio, balance, and open-position changes per timeframe.
|
|
1587
|
+
*/
|
|
1588
|
+
get: operations["get_trader_pnl_changes"];
|
|
1549
1589
|
put?: never;
|
|
1550
1590
|
post?: never;
|
|
1551
1591
|
delete?: never;
|
|
@@ -1554,7 +1594,7 @@ export interface paths {
|
|
|
1554
1594
|
patch?: never;
|
|
1555
1595
|
trace?: never;
|
|
1556
1596
|
};
|
|
1557
|
-
"/polymarket/trader/pnl/{address}/
|
|
1597
|
+
"/polymarket/trader/pnl/{address}/exits": {
|
|
1558
1598
|
parameters: {
|
|
1559
1599
|
query?: never;
|
|
1560
1600
|
header?: never;
|
|
@@ -1562,10 +1602,10 @@ export interface paths {
|
|
|
1562
1602
|
cookie?: never;
|
|
1563
1603
|
};
|
|
1564
1604
|
/**
|
|
1565
|
-
* Get trader
|
|
1566
|
-
* @description
|
|
1605
|
+
* Get trader position exits
|
|
1606
|
+
* @description Position exits for a trader, to overlay on the PnL chart.
|
|
1567
1607
|
*/
|
|
1568
|
-
get: operations["
|
|
1608
|
+
get: operations["get_trader_pnl_exits"];
|
|
1569
1609
|
put?: never;
|
|
1570
1610
|
post?: never;
|
|
1571
1611
|
delete?: never;
|
|
@@ -1583,7 +1623,7 @@ export interface paths {
|
|
|
1583
1623
|
};
|
|
1584
1624
|
/**
|
|
1585
1625
|
* Get trader market PnL
|
|
1586
|
-
* @description
|
|
1626
|
+
* @description Per-market PnL for a trader.
|
|
1587
1627
|
*/
|
|
1588
1628
|
get: operations["get_trader_market_pnl"];
|
|
1589
1629
|
put?: never;
|
|
@@ -1594,6 +1634,26 @@ export interface paths {
|
|
|
1594
1634
|
patch?: never;
|
|
1595
1635
|
trace?: never;
|
|
1596
1636
|
};
|
|
1637
|
+
"/polymarket/trader/pnl/{address}/periods": {
|
|
1638
|
+
parameters: {
|
|
1639
|
+
query?: never;
|
|
1640
|
+
header?: never;
|
|
1641
|
+
path?: never;
|
|
1642
|
+
cookie?: never;
|
|
1643
|
+
};
|
|
1644
|
+
/**
|
|
1645
|
+
* Get trader best and worst PnL periods
|
|
1646
|
+
* @description Best and worst daily, weekly and monthly PnL and portfolio periods.
|
|
1647
|
+
*/
|
|
1648
|
+
get: operations["get_trader_pnl_periods"];
|
|
1649
|
+
put?: never;
|
|
1650
|
+
post?: never;
|
|
1651
|
+
delete?: never;
|
|
1652
|
+
options?: never;
|
|
1653
|
+
head?: never;
|
|
1654
|
+
patch?: never;
|
|
1655
|
+
trace?: never;
|
|
1656
|
+
};
|
|
1597
1657
|
"/polymarket/trader/pnl/{address}/positions": {
|
|
1598
1658
|
parameters: {
|
|
1599
1659
|
query?: never;
|
|
@@ -1603,7 +1663,7 @@ export interface paths {
|
|
|
1603
1663
|
};
|
|
1604
1664
|
/**
|
|
1605
1665
|
* Get trader position PnL
|
|
1606
|
-
* @description
|
|
1666
|
+
* @description Per-position PnL for a trader. `status` is required — every position lookup is scoped to either currently-open positions or closed/resolved ones. `sort_by` and `search` can only be combined with a status; the per-status sort-by whitelists are exposed as `PositionOpenPnlSortBy` and `PositionClosedPnlSortBy`.
|
|
1607
1667
|
*/
|
|
1608
1668
|
get: operations["get_trader_position_pnl"];
|
|
1609
1669
|
put?: never;
|
|
@@ -1614,6 +1674,26 @@ export interface paths {
|
|
|
1614
1674
|
patch?: never;
|
|
1615
1675
|
trace?: never;
|
|
1616
1676
|
};
|
|
1677
|
+
"/polymarket/trader/pnl/{address}/risk": {
|
|
1678
|
+
parameters: {
|
|
1679
|
+
query?: never;
|
|
1680
|
+
header?: never;
|
|
1681
|
+
path?: never;
|
|
1682
|
+
cookie?: never;
|
|
1683
|
+
};
|
|
1684
|
+
/**
|
|
1685
|
+
* Get trader PnL risk
|
|
1686
|
+
* @description Max drawdown, current drawdown, max runup, high, low and latest values.
|
|
1687
|
+
*/
|
|
1688
|
+
get: operations["get_trader_pnl_risk"];
|
|
1689
|
+
put?: never;
|
|
1690
|
+
post?: never;
|
|
1691
|
+
delete?: never;
|
|
1692
|
+
options?: never;
|
|
1693
|
+
head?: never;
|
|
1694
|
+
patch?: never;
|
|
1695
|
+
trace?: never;
|
|
1696
|
+
};
|
|
1617
1697
|
"/polymarket/trader/profile/{address}": {
|
|
1618
1698
|
parameters: {
|
|
1619
1699
|
query?: never;
|
|
@@ -1654,6 +1734,26 @@ export interface paths {
|
|
|
1654
1734
|
patch?: never;
|
|
1655
1735
|
trace?: never;
|
|
1656
1736
|
};
|
|
1737
|
+
"/polymarket/trader/top_trades_markets": {
|
|
1738
|
+
parameters: {
|
|
1739
|
+
query?: never;
|
|
1740
|
+
header?: never;
|
|
1741
|
+
path?: never;
|
|
1742
|
+
cookie?: never;
|
|
1743
|
+
};
|
|
1744
|
+
/**
|
|
1745
|
+
* Get top markets across all traders
|
|
1746
|
+
* @description Top markets across all traders, ranked by total PnL desc.
|
|
1747
|
+
*/
|
|
1748
|
+
get: operations["get_top_trades_markets"];
|
|
1749
|
+
put?: never;
|
|
1750
|
+
post?: never;
|
|
1751
|
+
delete?: never;
|
|
1752
|
+
options?: never;
|
|
1753
|
+
head?: never;
|
|
1754
|
+
patch?: never;
|
|
1755
|
+
trace?: never;
|
|
1756
|
+
};
|
|
1657
1757
|
"/polymarket/trader/trades/{address}": {
|
|
1658
1758
|
parameters: {
|
|
1659
1759
|
query?: never;
|
|
@@ -1759,31 +1859,45 @@ export type webhooks = Record<string, never>;
|
|
|
1759
1859
|
export interface components {
|
|
1760
1860
|
schemas: {
|
|
1761
1861
|
/**
|
|
1762
|
-
* @description
|
|
1763
|
-
* Each value picks the time interval that one row in the output covers:
|
|
1764
|
-
* `60` = 1 hour, `240` = 4 hours, `D`/`1D` = 1 day, `W`/`1W` = 7 days,
|
|
1765
|
-
* `M`/`1M` = calendar month.
|
|
1862
|
+
* @description Lookback window for `/analytics/changes` endpoints.
|
|
1766
1863
|
* @enum {string}
|
|
1767
1864
|
*/
|
|
1768
|
-
|
|
1769
|
-
/**
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
/**
|
|
1865
|
+
AnalyticsChangeTimeframe: "1h" | "24h" | "7d" | "30d" | "1mo" | "1y";
|
|
1866
|
+
/**
|
|
1867
|
+
* @description Response body for `GET /polymarket/analytics/counts`.
|
|
1868
|
+
* Cumulative analytics metrics plus entity-count enrichment.
|
|
1869
|
+
*/
|
|
1870
|
+
AnalyticsGlobalCountsResponse: {
|
|
1871
|
+
/**
|
|
1872
|
+
* Format: int32
|
|
1873
|
+
* @description Unix-second timestamp of the latest block reflected in the metrics.
|
|
1874
|
+
*/
|
|
1775
1875
|
ts: number;
|
|
1876
|
+
/**
|
|
1877
|
+
* Format: int64
|
|
1878
|
+
* @description Latest block number processed.
|
|
1879
|
+
*/
|
|
1880
|
+
block: number;
|
|
1776
1881
|
/** Format: double */
|
|
1777
1882
|
volume_usd: number;
|
|
1778
1883
|
/** Format: double */
|
|
1779
1884
|
buy_volume_usd: number;
|
|
1780
1885
|
/** Format: double */
|
|
1781
1886
|
sell_volume_usd: number;
|
|
1782
|
-
/**
|
|
1887
|
+
/**
|
|
1888
|
+
* Format: int64
|
|
1889
|
+
* @description Distinct addresses that have ever traded on Polymarket (lifetime).
|
|
1890
|
+
*/
|
|
1783
1891
|
unique_traders: number;
|
|
1784
|
-
/**
|
|
1892
|
+
/**
|
|
1893
|
+
* Format: int64
|
|
1894
|
+
* @description Distinct makers ever active (lifetime distinct).
|
|
1895
|
+
*/
|
|
1785
1896
|
unique_makers: number;
|
|
1786
|
-
/**
|
|
1897
|
+
/**
|
|
1898
|
+
* Format: int64
|
|
1899
|
+
* @description Distinct takers ever active (lifetime distinct).
|
|
1900
|
+
*/
|
|
1787
1901
|
unique_takers: number;
|
|
1788
1902
|
/** Format: int64 */
|
|
1789
1903
|
txn_count: number;
|
|
@@ -1791,13 +1905,51 @@ export interface components {
|
|
|
1791
1905
|
buy_count: number;
|
|
1792
1906
|
/** Format: int64 */
|
|
1793
1907
|
sell_count: number;
|
|
1908
|
+
/** Format: int64 */
|
|
1909
|
+
redemption_count: number;
|
|
1794
1910
|
/** Format: double */
|
|
1795
|
-
|
|
1911
|
+
redemption_volume_usd: number;
|
|
1912
|
+
/** Format: int64 */
|
|
1913
|
+
merge_count: number;
|
|
1796
1914
|
/** Format: double */
|
|
1797
|
-
|
|
1915
|
+
merge_volume_usd: number;
|
|
1916
|
+
/** Format: int64 */
|
|
1917
|
+
split_count: number;
|
|
1918
|
+
/** Format: double */
|
|
1919
|
+
split_volume_usd: number;
|
|
1920
|
+
/** Format: int64 */
|
|
1921
|
+
converted_count: number;
|
|
1922
|
+
/** Format: double */
|
|
1923
|
+
converted_collateral_usd: number;
|
|
1924
|
+
/** Format: double */
|
|
1925
|
+
converted_shares_gained: number;
|
|
1926
|
+
/** Format: double */
|
|
1927
|
+
converted_shares_lost: number;
|
|
1928
|
+
/** Format: int64 */
|
|
1929
|
+
maker_rebate_count: number;
|
|
1930
|
+
/** Format: double */
|
|
1931
|
+
maker_rebate_volume_usd: number;
|
|
1932
|
+
/** Format: int64 */
|
|
1933
|
+
reward_count: number;
|
|
1934
|
+
/** Format: double */
|
|
1935
|
+
reward_volume_usd: number;
|
|
1936
|
+
/** Format: int64 */
|
|
1937
|
+
yield_count: number;
|
|
1938
|
+
/** Format: double */
|
|
1939
|
+
yield_volume_usd: number;
|
|
1940
|
+
/** Format: double */
|
|
1941
|
+
fees_usd: number;
|
|
1798
1942
|
/** Format: double */
|
|
1799
1943
|
shares_volume: number;
|
|
1800
1944
|
/** Format: double */
|
|
1945
|
+
buy_shares_volume: number;
|
|
1946
|
+
/** Format: double */
|
|
1947
|
+
sell_shares_volume: number;
|
|
1948
|
+
/** Format: double */
|
|
1949
|
+
yes_shares_volume: number;
|
|
1950
|
+
/** Format: double */
|
|
1951
|
+
no_shares_volume: number;
|
|
1952
|
+
/** Format: double */
|
|
1801
1953
|
yes_volume_usd: number;
|
|
1802
1954
|
/** Format: double */
|
|
1803
1955
|
no_volume_usd: number;
|
|
@@ -1817,48 +1969,236 @@ export interface components {
|
|
|
1817
1969
|
buy_dist_10k_50k: number;
|
|
1818
1970
|
/** Format: int64 */
|
|
1819
1971
|
buy_dist_50k_plus: number;
|
|
1820
|
-
/**
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1972
|
+
/**
|
|
1973
|
+
* Format: int64
|
|
1974
|
+
* @description Total number of tags.
|
|
1975
|
+
*/
|
|
1976
|
+
tags: number;
|
|
1977
|
+
/**
|
|
1978
|
+
* Format: int64
|
|
1979
|
+
* @description Total number of events.
|
|
1980
|
+
*/
|
|
1981
|
+
events: number;
|
|
1982
|
+
/**
|
|
1983
|
+
* Format: int64
|
|
1984
|
+
* @description Total number of markets.
|
|
1985
|
+
*/
|
|
1986
|
+
markets: number;
|
|
1987
|
+
/**
|
|
1988
|
+
* Format: int64
|
|
1989
|
+
* @description Total number of unique positions / traders.
|
|
1990
|
+
*/
|
|
1991
|
+
positions: number;
|
|
1826
1992
|
};
|
|
1827
1993
|
/**
|
|
1828
|
-
* @description
|
|
1829
|
-
*
|
|
1830
|
-
* available from the snapshot endpoint.
|
|
1994
|
+
* @description Per-metric % change. `None` when the window predates the entity's data
|
|
1995
|
+
* or the previous value was zero (division undefined).
|
|
1831
1996
|
*/
|
|
1832
|
-
|
|
1833
|
-
/** Format: int64 */
|
|
1834
|
-
ts: number;
|
|
1835
|
-
position_id: string;
|
|
1836
|
-
condition_id: string;
|
|
1997
|
+
AnalyticsMetricPctChange: {
|
|
1837
1998
|
/** Format: double */
|
|
1838
|
-
|
|
1999
|
+
volume_usd?: number | null;
|
|
1839
2000
|
/** Format: double */
|
|
1840
|
-
|
|
2001
|
+
buy_volume_usd?: number | null;
|
|
1841
2002
|
/** Format: double */
|
|
1842
|
-
|
|
2003
|
+
sell_volume_usd?: number | null;
|
|
1843
2004
|
/** Format: double */
|
|
1844
|
-
|
|
2005
|
+
merge_volume_usd?: number | null;
|
|
1845
2006
|
/** Format: double */
|
|
1846
|
-
|
|
2007
|
+
split_volume_usd?: number | null;
|
|
1847
2008
|
/** Format: double */
|
|
1848
|
-
|
|
1849
|
-
/** Format:
|
|
1850
|
-
|
|
1851
|
-
/** Format:
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
2009
|
+
converted_count?: number | null;
|
|
2010
|
+
/** Format: double */
|
|
2011
|
+
converted_collateral_usd?: number | null;
|
|
2012
|
+
/** Format: double */
|
|
2013
|
+
converted_shares_gained?: number | null;
|
|
2014
|
+
/** Format: double */
|
|
2015
|
+
converted_shares_lost?: number | null;
|
|
2016
|
+
/** Format: double */
|
|
2017
|
+
maker_rebate_count?: number | null;
|
|
2018
|
+
/** Format: double */
|
|
2019
|
+
maker_rebate_volume_usd?: number | null;
|
|
2020
|
+
/** Format: double */
|
|
2021
|
+
reward_count?: number | null;
|
|
2022
|
+
/** Format: double */
|
|
2023
|
+
reward_volume_usd?: number | null;
|
|
2024
|
+
/** Format: double */
|
|
2025
|
+
yield_count?: number | null;
|
|
2026
|
+
/** Format: double */
|
|
2027
|
+
yield_volume_usd?: number | null;
|
|
2028
|
+
/** Format: double */
|
|
2029
|
+
unique_traders?: number | null;
|
|
2030
|
+
/** Format: double */
|
|
2031
|
+
unique_makers?: number | null;
|
|
2032
|
+
/** Format: double */
|
|
2033
|
+
unique_takers?: number | null;
|
|
2034
|
+
/** Format: double */
|
|
2035
|
+
txn_count?: number | null;
|
|
2036
|
+
/** Format: double */
|
|
2037
|
+
fees_usd?: number | null;
|
|
2038
|
+
/** Format: double */
|
|
2039
|
+
shares_volume?: number | null;
|
|
2040
|
+
/** Format: double */
|
|
2041
|
+
buy_shares_volume?: number | null;
|
|
2042
|
+
/** Format: double */
|
|
2043
|
+
sell_shares_volume?: number | null;
|
|
2044
|
+
/** Format: double */
|
|
2045
|
+
yes_shares_volume?: number | null;
|
|
2046
|
+
/** Format: double */
|
|
2047
|
+
no_shares_volume?: number | null;
|
|
2048
|
+
/** Format: double */
|
|
2049
|
+
yes_volume_usd?: number | null;
|
|
2050
|
+
/** Format: double */
|
|
2051
|
+
no_volume_usd?: number | null;
|
|
2052
|
+
};
|
|
2053
|
+
/**
|
|
2054
|
+
* @description Bucket size for `/analytics/timeseries` and `/analytics/deltas` responses.
|
|
2055
|
+
* Each value picks the time interval that one row in the output covers:
|
|
2056
|
+
* `60` = 1 hour, `240` = 4 hours, `D`/`1D` = 1 day, `W`/`1W` = 7 days,
|
|
2057
|
+
* `M`/`1M` = calendar month.
|
|
2058
|
+
* @enum {string}
|
|
2059
|
+
*/
|
|
2060
|
+
AnalyticsResolution: "60" | "240" | "D" | "1D" | "W" | "1W" | "M" | "1M";
|
|
2061
|
+
/**
|
|
2062
|
+
* @description Bucket row returned by both `/analytics/timeseries` (cumulative values
|
|
2063
|
+
* at end of bucket) and `/analytics/deltas` (per-bucket deltas). All metrics
|
|
2064
|
+
* the snapshot `/counts` returns are included.
|
|
2065
|
+
*
|
|
2066
|
+
* Short field names for compact JSON responses:
|
|
2067
|
+
* t=bucket (unix seconds), v=volume_usd, bv=buy_volume_usd, sv=sell_volume_usd,
|
|
2068
|
+
* ut=unique_traders, um=unique_makers, uk=unique_takers,
|
|
2069
|
+
* tc=txn_count, bc=buy_count, sc=sell_count,
|
|
2070
|
+
* rc=redemption_count, rv=redemption_volume_usd, mc=merge_count, mv=merge_volume_usd,
|
|
2071
|
+
* sp=split_count, spv=split_volume_usd, f=fees_usd, sh=shares_volume,
|
|
2072
|
+
* yv=yes_volume_usd, nv=no_volume_usd, yc=yes_count, nc=no_count,
|
|
2073
|
+
* bd_*=buy distribution by USD bucket
|
|
2074
|
+
*/
|
|
2075
|
+
AnalyticsTimeBucketRow: {
|
|
2076
|
+
/** Format: int32 */
|
|
2077
|
+
t: number;
|
|
2078
|
+
/** Format: double */
|
|
2079
|
+
v: number;
|
|
2080
|
+
/** Format: double */
|
|
2081
|
+
bv: number;
|
|
2082
|
+
/** Format: double */
|
|
2083
|
+
sv: number;
|
|
2084
|
+
/** Format: int64 */
|
|
2085
|
+
tc: number;
|
|
2086
|
+
/** Format: int64 */
|
|
2087
|
+
bc: number;
|
|
2088
|
+
/** Format: int64 */
|
|
2089
|
+
sc: number;
|
|
2090
|
+
/** Format: int64 */
|
|
2091
|
+
rc: number;
|
|
2092
|
+
/** Format: double */
|
|
2093
|
+
rv: number;
|
|
2094
|
+
/** Format: int64 */
|
|
2095
|
+
mc: number;
|
|
2096
|
+
/** Format: double */
|
|
2097
|
+
mv: number;
|
|
2098
|
+
/** Format: int64 */
|
|
2099
|
+
sp: number;
|
|
2100
|
+
/** Format: double */
|
|
2101
|
+
spv: number;
|
|
2102
|
+
/** Format: int64 */
|
|
2103
|
+
cc: number;
|
|
2104
|
+
/** Format: double */
|
|
2105
|
+
ccu: number;
|
|
2106
|
+
/** Format: double */
|
|
2107
|
+
csg: number;
|
|
2108
|
+
/** Format: double */
|
|
2109
|
+
csl: number;
|
|
2110
|
+
/** Format: int64 */
|
|
2111
|
+
mrc: number;
|
|
2112
|
+
/** Format: double */
|
|
2113
|
+
mrv: number;
|
|
2114
|
+
/** Format: int64 */
|
|
2115
|
+
rwc: number;
|
|
2116
|
+
/** Format: double */
|
|
2117
|
+
rwv: number;
|
|
2118
|
+
/** Format: int64 */
|
|
2119
|
+
ydc: number;
|
|
2120
|
+
/** Format: double */
|
|
2121
|
+
ydv: number;
|
|
2122
|
+
/** Format: double */
|
|
2123
|
+
f: number;
|
|
2124
|
+
/** Format: double */
|
|
2125
|
+
sh: number;
|
|
2126
|
+
/** Format: double */
|
|
2127
|
+
bsh: number;
|
|
2128
|
+
/** Format: double */
|
|
2129
|
+
ssh: number;
|
|
2130
|
+
/** Format: double */
|
|
2131
|
+
ysh: number;
|
|
2132
|
+
/** Format: double */
|
|
2133
|
+
nsh: number;
|
|
2134
|
+
/** Format: double */
|
|
2135
|
+
yv: number;
|
|
2136
|
+
/** Format: double */
|
|
2137
|
+
nv: number;
|
|
2138
|
+
/** Format: int64 */
|
|
2139
|
+
yc: number;
|
|
2140
|
+
/** Format: int64 */
|
|
2141
|
+
nc: number;
|
|
2142
|
+
/**
|
|
2143
|
+
* Format: int64
|
|
2144
|
+
* @description Buy distribution — count of buy trades falling in each USD bucket.
|
|
2145
|
+
*/
|
|
2146
|
+
bd_u10: number;
|
|
2147
|
+
/** Format: int64 */
|
|
2148
|
+
bd_100: number;
|
|
2149
|
+
/** Format: int64 */
|
|
2150
|
+
bd_1k: number;
|
|
2151
|
+
/** Format: int64 */
|
|
2152
|
+
bd_10k: number;
|
|
2153
|
+
/** Format: int64 */
|
|
2154
|
+
bd_50k: number;
|
|
2155
|
+
/** Format: int64 */
|
|
2156
|
+
bd_50p: number;
|
|
2157
|
+
/**
|
|
2158
|
+
* Format: int64
|
|
2159
|
+
* @description Distinct traders ACTIVE in this bucket (window-unique, not first-time).
|
|
2160
|
+
*/
|
|
2161
|
+
ut: number;
|
|
2162
|
+
/**
|
|
2163
|
+
* Format: int64
|
|
2164
|
+
* @description Distinct makers active in this bucket.
|
|
2165
|
+
*/
|
|
2166
|
+
um: number;
|
|
2167
|
+
/**
|
|
2168
|
+
* Format: int64
|
|
2169
|
+
* @description Distinct takers active in this bucket.
|
|
2170
|
+
*/
|
|
2171
|
+
uk: number;
|
|
2172
|
+
};
|
|
2173
|
+
/**
|
|
2174
|
+
* @description Timeframe for `?sort=...` — defines the window the metric is summed over
|
|
2175
|
+
* (or `lifetime` for all-time cumulative).
|
|
2176
|
+
* @enum {string}
|
|
2177
|
+
*/
|
|
2178
|
+
TagSortTimeframe: "lifetime" | "1h" | "24h" | "7d" | "30d" | "1mo";
|
|
2179
|
+
/**
|
|
2180
|
+
* @description Metric to order by when `sort=<value>` is provided.
|
|
2181
|
+
*
|
|
2182
|
+
* `unique_*` variants rank by the number of distinct wallet addresses
|
|
2183
|
+
* active in the selected timeframe.
|
|
2184
|
+
* @enum {string}
|
|
2185
|
+
*/
|
|
2186
|
+
TagSortBy: "volume" | "builder_volume" | "shares_volume" | "builder_shares_volume" | "txns" | "builder_txns" | "unique_traders" | "unique_builder_traders" | "unique_makers" | "unique_takers" | "fees" | "builder_fees";
|
|
2187
|
+
TopTraderRow: {
|
|
2188
|
+
trader: string;
|
|
2189
|
+
/** Format: double */
|
|
2190
|
+
volume_usd: number;
|
|
2191
|
+
/** Format: int64 */
|
|
2192
|
+
txn_count: number;
|
|
2193
|
+
/** Format: double */
|
|
2194
|
+
fees_usd: number;
|
|
2195
|
+
/** Format: double */
|
|
2196
|
+
builder_fees: number;
|
|
2197
|
+
};
|
|
2198
|
+
/** @description Token outcome (position) */
|
|
2199
|
+
TokenOutcome: {
|
|
2200
|
+
token_id: string;
|
|
2201
|
+
outcome: string;
|
|
1862
2202
|
};
|
|
1863
2203
|
/** @description V3 UMA OOv3: an assertion was disputed. */
|
|
1864
2204
|
AssertionDisputedEvent: {
|
|
@@ -1973,7 +2313,7 @@ export interface components {
|
|
|
1973
2313
|
asset_close_price: number;
|
|
1974
2314
|
/** Format: double */
|
|
1975
2315
|
price_change_percentage?: number | null;
|
|
1976
|
-
/** @description
|
|
2316
|
+
/** @description Candle direction: "up" if close > open, "down" if close ≤ open, null if no close yet */
|
|
1977
2317
|
outcome?: string | null;
|
|
1978
2318
|
/** @description Time window: "5m", "15m", "1h", "1d" */
|
|
1979
2319
|
variant: string;
|
|
@@ -1993,13 +2333,10 @@ export interface components {
|
|
|
1993
2333
|
/** @enum {string} */
|
|
1994
2334
|
AssetVariant: "5m" | "15m" | "1h" | "4h" | "1d";
|
|
1995
2335
|
/**
|
|
1996
|
-
* @description
|
|
1997
|
-
*
|
|
1998
|
-
* `unique_*` variants rank by the number of distinct wallet addresses
|
|
1999
|
-
* active in the selected timeframe.
|
|
2336
|
+
* @description Sort key for the top-traders ranking.
|
|
2000
2337
|
* @enum {string}
|
|
2001
2338
|
*/
|
|
2002
|
-
|
|
2339
|
+
TopTradersSortBy: "volume" | "txns" | "fees" | "builder_fees";
|
|
2003
2340
|
BondMarket: {
|
|
2004
2341
|
condition_id: string;
|
|
2005
2342
|
title?: string | null;
|
|
@@ -2031,8 +2368,33 @@ export interface components {
|
|
|
2031
2368
|
};
|
|
2032
2369
|
/** @enum {string} */
|
|
2033
2370
|
BondsSortBy: "end_date" | "apy" | "liquidity" | "volume";
|
|
2034
|
-
/**
|
|
2035
|
-
|
|
2371
|
+
/**
|
|
2372
|
+
* @description One bucket of derived order-book metrics for a position at a point in time.
|
|
2373
|
+
* Only summary metrics are returned — the underlying bid/ask ladders are
|
|
2374
|
+
* available from the snapshot endpoint.
|
|
2375
|
+
*/
|
|
2376
|
+
SpreadRow: {
|
|
2377
|
+
/** Format: int64 */
|
|
2378
|
+
ts: number;
|
|
2379
|
+
position_id: string;
|
|
2380
|
+
condition_id: string;
|
|
2381
|
+
/** Format: double */
|
|
2382
|
+
best_bid?: number | null;
|
|
2383
|
+
/** Format: double */
|
|
2384
|
+
best_ask?: number | null;
|
|
2385
|
+
/** Format: double */
|
|
2386
|
+
mid_price?: number | null;
|
|
2387
|
+
/** Format: double */
|
|
2388
|
+
spread?: number | null;
|
|
2389
|
+
/** Format: double */
|
|
2390
|
+
bid_liquidity_usd?: number | null;
|
|
2391
|
+
/** Format: double */
|
|
2392
|
+
ask_liquidity_usd?: number | null;
|
|
2393
|
+
/** Format: int32 */
|
|
2394
|
+
bid_levels?: number | null;
|
|
2395
|
+
/** Format: int32 */
|
|
2396
|
+
ask_levels?: number | null;
|
|
2397
|
+
};
|
|
2036
2398
|
BuilderFeeRate: {
|
|
2037
2399
|
code: string;
|
|
2038
2400
|
/** Format: int32 */
|
|
@@ -2296,60 +2658,110 @@ export interface components {
|
|
|
2296
2658
|
avg_vol_per_user: number;
|
|
2297
2659
|
};
|
|
2298
2660
|
/**
|
|
2299
|
-
* @description
|
|
2300
|
-
*
|
|
2301
|
-
* numerics on trader / event / category PnL summaries.
|
|
2302
|
-
*/
|
|
2303
|
-
TradeMarketRef: {
|
|
2304
|
-
condition_id?: string | null;
|
|
2305
|
-
market_slug?: string | null;
|
|
2306
|
-
title?: string | null;
|
|
2307
|
-
question?: string | null;
|
|
2308
|
-
image_url?: string | null;
|
|
2309
|
-
event_slug?: string | null;
|
|
2310
|
-
};
|
|
2311
|
-
/**
|
|
2312
|
-
* @description Trader profile info embedded in API responses.
|
|
2313
|
-
*
|
|
2314
|
-
* Used in:
|
|
2315
|
-
* - holders endpoints (market/event holders)
|
|
2316
|
-
* - trades endpoints
|
|
2317
|
-
* - leaderboard endpoints
|
|
2318
|
-
*/
|
|
2319
|
-
Trader: {
|
|
2320
|
-
address: string;
|
|
2321
|
-
name?: string | null;
|
|
2322
|
-
pseudonym?: string | null;
|
|
2323
|
-
profile_image?: string | null;
|
|
2324
|
-
x_username?: string | null;
|
|
2325
|
-
verified_badge?: boolean;
|
|
2326
|
-
};
|
|
2327
|
-
/**
|
|
2328
|
-
* @description Sort metric for the builders list endpoint.
|
|
2329
|
-
* @enum {string}
|
|
2661
|
+
* @description Tagged enum for all trade types — serializes with `"trade_type": "..."` discriminator
|
|
2662
|
+
* and only includes fields relevant to each type.
|
|
2330
2663
|
*/
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
/**
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
/**
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
/**
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2664
|
+
TradeEvent: (components["schemas"]["OrderFilledTrade"] & {
|
|
2665
|
+
/** @enum {string} */
|
|
2666
|
+
trade_type: "OrderFilled";
|
|
2667
|
+
}) | (components["schemas"]["OrderFilledTrade"] & {
|
|
2668
|
+
/** @enum {string} */
|
|
2669
|
+
trade_type: "OrdersMatched";
|
|
2670
|
+
}) | (components["schemas"]["OrderFilledTrade"] & {
|
|
2671
|
+
/** @enum {string} */
|
|
2672
|
+
trade_type: "MakerRebate";
|
|
2673
|
+
}) | (components["schemas"]["OrderFilledTrade"] & {
|
|
2674
|
+
/** @enum {string} */
|
|
2675
|
+
trade_type: "Reward";
|
|
2676
|
+
}) | (components["schemas"]["OrderFilledTrade"] & {
|
|
2677
|
+
/** @enum {string} */
|
|
2678
|
+
trade_type: "Yield";
|
|
2679
|
+
}) | (components["schemas"]["RedemptionTrade"] & {
|
|
2680
|
+
/** @enum {string} */
|
|
2681
|
+
trade_type: "Redemption";
|
|
2682
|
+
}) | (components["schemas"]["MergeTrade"] & {
|
|
2683
|
+
/** @enum {string} */
|
|
2684
|
+
trade_type: "Merge";
|
|
2685
|
+
}) | (components["schemas"]["SplitTrade"] & {
|
|
2686
|
+
/** @enum {string} */
|
|
2687
|
+
trade_type: "Split";
|
|
2688
|
+
}) | (components["schemas"]["PositionsConvertedTrade"] & {
|
|
2689
|
+
/** @enum {string} */
|
|
2690
|
+
trade_type: "PositionsConverted";
|
|
2691
|
+
}) | (components["schemas"]["CancelledTrade"] & {
|
|
2692
|
+
/** @enum {string} */
|
|
2693
|
+
trade_type: "Cancelled";
|
|
2694
|
+
}) | (components["schemas"]["QuestionInitializedEvent"] & {
|
|
2695
|
+
/** @enum {string} */
|
|
2696
|
+
trade_type: "Initialization";
|
|
2697
|
+
}) | (components["schemas"]["AssertionMadeEvent"] & {
|
|
2698
|
+
/** @enum {string} */
|
|
2699
|
+
trade_type: "Proposal";
|
|
2700
|
+
}) | (components["schemas"]["AssertionDisputedEvent"] & {
|
|
2701
|
+
/** @enum {string} */
|
|
2702
|
+
trade_type: "Dispute";
|
|
2703
|
+
}) | (components["schemas"]["AssertionSettledEvent"] & {
|
|
2704
|
+
/** @enum {string} */
|
|
2705
|
+
trade_type: "Settled";
|
|
2706
|
+
}) | (components["schemas"]["QuestionResolvedEvent"] & {
|
|
2707
|
+
/** @enum {string} */
|
|
2708
|
+
trade_type: "Resolution";
|
|
2709
|
+
}) | (components["schemas"]["ConditionResolutionEvent"] & {
|
|
2710
|
+
/** @enum {string} */
|
|
2711
|
+
trade_type: "ConditionResolution";
|
|
2712
|
+
}) | (components["schemas"]["QuestionResetEvent"] & {
|
|
2713
|
+
/** @enum {string} */
|
|
2714
|
+
trade_type: "Reset";
|
|
2715
|
+
}) | (components["schemas"]["QuestionFlaggedEvent"] & {
|
|
2716
|
+
/** @enum {string} */
|
|
2717
|
+
trade_type: "Flag";
|
|
2718
|
+
}) | (components["schemas"]["QuestionUnflaggedEvent"] & {
|
|
2719
|
+
/** @enum {string} */
|
|
2720
|
+
trade_type: "Unflag";
|
|
2721
|
+
}) | (components["schemas"]["QuestionPausedEvent"] & {
|
|
2722
|
+
/** @enum {string} */
|
|
2723
|
+
trade_type: "Pause";
|
|
2724
|
+
}) | (components["schemas"]["QuestionUnpausedEvent"] & {
|
|
2725
|
+
/** @enum {string} */
|
|
2726
|
+
trade_type: "Unpause";
|
|
2727
|
+
}) | (components["schemas"]["QuestionEmergencyResolvedEvent"] & {
|
|
2728
|
+
/** @enum {string} */
|
|
2729
|
+
trade_type: "ManualResolution";
|
|
2730
|
+
}) | (components["schemas"]["NegRiskOutcomeReportedEvent"] & {
|
|
2731
|
+
/** @enum {string} */
|
|
2732
|
+
trade_type: "NegRiskOutcomeReported";
|
|
2733
|
+
}) | (components["schemas"]["RegisterTokenTrade"] & {
|
|
2734
|
+
/** @enum {string} */
|
|
2735
|
+
trade_type: "RegisterToken";
|
|
2736
|
+
});
|
|
2737
|
+
/** @enum {string} */
|
|
2738
|
+
TradeSide: "0" | "1";
|
|
2739
|
+
/**
|
|
2740
|
+
* @description Sort metric for the builders list endpoint.
|
|
2741
|
+
* @enum {string}
|
|
2742
|
+
*/
|
|
2743
|
+
BuilderSortBy: "volume" | "txns" | "traders" | "fees" | "builder_fees" | "new_users" | "avg_rev_per_user" | "avg_vol_per_user" | "builder_maker_fee_rate_bps" | "builder_taker_fee_rate_bps";
|
|
2744
|
+
/** @description One tag's stats under a single builder. */
|
|
2745
|
+
BuilderTagRow: {
|
|
2746
|
+
tag: string;
|
|
2747
|
+
/** Format: int64 */
|
|
2748
|
+
block: number;
|
|
2749
|
+
/** Format: int32 */
|
|
2750
|
+
ts: number;
|
|
2751
|
+
/** Format: double */
|
|
2752
|
+
volume_usd: number;
|
|
2753
|
+
/** Format: double */
|
|
2754
|
+
buy_volume_usd: number;
|
|
2755
|
+
/** Format: double */
|
|
2756
|
+
sell_volume_usd: number;
|
|
2757
|
+
/** Format: int64 */
|
|
2758
|
+
unique_traders: number;
|
|
2759
|
+
/** Format: int64 */
|
|
2760
|
+
unique_makers: number;
|
|
2761
|
+
/** Format: int64 */
|
|
2762
|
+
unique_takers: number;
|
|
2763
|
+
/** Format: int64 */
|
|
2764
|
+
txn_count: number;
|
|
2353
2765
|
/** Format: int64 */
|
|
2354
2766
|
buy_count: number;
|
|
2355
2767
|
/** Format: int64 */
|
|
@@ -2477,49 +2889,91 @@ export interface components {
|
|
|
2477
2889
|
* @enum {string}
|
|
2478
2890
|
*/
|
|
2479
2891
|
BuilderTimeframe: "lifetime" | "1d" | "7d" | "30d";
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
event_slug?: string | null;
|
|
2490
|
-
question?: string | null;
|
|
2491
|
-
image_url?: string | null;
|
|
2892
|
+
TraderAnalyticsTimeBucketRow: {
|
|
2893
|
+
/** Format: int32 */
|
|
2894
|
+
t: number;
|
|
2895
|
+
/** Format: double */
|
|
2896
|
+
v: number;
|
|
2897
|
+
/** Format: double */
|
|
2898
|
+
bv: number;
|
|
2899
|
+
/** Format: double */
|
|
2900
|
+
sv: number;
|
|
2492
2901
|
/** Format: int64 */
|
|
2493
|
-
|
|
2902
|
+
tc: number;
|
|
2494
2903
|
/** Format: int64 */
|
|
2495
|
-
|
|
2904
|
+
bc: number;
|
|
2496
2905
|
/** Format: int64 */
|
|
2497
|
-
|
|
2906
|
+
sc: number;
|
|
2498
2907
|
/** Format: int64 */
|
|
2499
|
-
|
|
2908
|
+
rc: number;
|
|
2909
|
+
/** Format: double */
|
|
2910
|
+
rv: number;
|
|
2500
2911
|
/** Format: int64 */
|
|
2501
|
-
|
|
2912
|
+
mc: number;
|
|
2502
2913
|
/** Format: double */
|
|
2503
|
-
|
|
2914
|
+
mv: number;
|
|
2915
|
+
/** Format: int64 */
|
|
2916
|
+
sp: number;
|
|
2504
2917
|
/** Format: double */
|
|
2505
|
-
|
|
2918
|
+
spv: number;
|
|
2919
|
+
/** Format: int64 */
|
|
2920
|
+
cc: number;
|
|
2506
2921
|
/** Format: double */
|
|
2507
|
-
|
|
2922
|
+
ccu: number;
|
|
2508
2923
|
/** Format: double */
|
|
2509
|
-
|
|
2924
|
+
csg: number;
|
|
2510
2925
|
/** Format: double */
|
|
2511
|
-
|
|
2926
|
+
csl: number;
|
|
2512
2927
|
/** Format: int64 */
|
|
2513
|
-
|
|
2928
|
+
mrc: number;
|
|
2514
2929
|
/** Format: double */
|
|
2515
|
-
|
|
2930
|
+
mrv: number;
|
|
2516
2931
|
/** Format: int64 */
|
|
2517
|
-
|
|
2932
|
+
rwc: number;
|
|
2933
|
+
/** Format: double */
|
|
2934
|
+
rwv: number;
|
|
2518
2935
|
/** Format: int64 */
|
|
2519
|
-
|
|
2936
|
+
ydc: number;
|
|
2520
2937
|
/** Format: double */
|
|
2521
|
-
|
|
2938
|
+
ydv: number;
|
|
2939
|
+
/** Format: double */
|
|
2940
|
+
f: number;
|
|
2941
|
+
/** Format: double */
|
|
2942
|
+
sh: number;
|
|
2943
|
+
/** Format: double */
|
|
2944
|
+
bsh: number;
|
|
2945
|
+
/** Format: double */
|
|
2946
|
+
ssh: number;
|
|
2947
|
+
/** Format: double */
|
|
2948
|
+
ysh: number;
|
|
2949
|
+
/** Format: double */
|
|
2950
|
+
nsh: number;
|
|
2951
|
+
/** Format: double */
|
|
2952
|
+
yv: number;
|
|
2953
|
+
/** Format: double */
|
|
2954
|
+
nv: number;
|
|
2955
|
+
/** Format: int64 */
|
|
2956
|
+
yc: number;
|
|
2957
|
+
/** Format: int64 */
|
|
2958
|
+
nc: number;
|
|
2959
|
+
/** Format: int64 */
|
|
2960
|
+
bd_u10: number;
|
|
2961
|
+
/** Format: int64 */
|
|
2962
|
+
bd_100: number;
|
|
2963
|
+
/** Format: int64 */
|
|
2964
|
+
bd_1k: number;
|
|
2965
|
+
/** Format: int64 */
|
|
2966
|
+
bd_10k: number;
|
|
2967
|
+
/** Format: int64 */
|
|
2968
|
+
bd_50k: number;
|
|
2969
|
+
/** Format: int64 */
|
|
2970
|
+
bd_50p: number;
|
|
2522
2971
|
};
|
|
2972
|
+
/**
|
|
2973
|
+
* @description Sort metric for the trader → builders list.
|
|
2974
|
+
* @enum {string}
|
|
2975
|
+
*/
|
|
2976
|
+
TraderBuilderSortBy: "volume" | "txns" | "fees";
|
|
2523
2977
|
/** @description Output payload for Cancelled orders. */
|
|
2524
2978
|
CancelledTrade: {
|
|
2525
2979
|
id: string;
|
|
@@ -2543,104 +2997,154 @@ export interface components {
|
|
|
2543
2997
|
};
|
|
2544
2998
|
/** @enum {string} */
|
|
2545
2999
|
CandlestickResolution: "1S" | "5S" | "10S" | "30S" | "1" | "5" | "15" | "30" | "60" | "240" | "D" | "1D";
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
*/
|
|
2550
|
-
ChangeTimeframe: "1h" | "24h" | "7d" | "30d" | "1mo" | "1y";
|
|
2551
|
-
/** @enum {string} */
|
|
2552
|
-
ChartResolution: "1H" | "6H" | "1D" | "1W" | "1M" | "ALL";
|
|
2553
|
-
TopTraderRow: {
|
|
2554
|
-
trader: string;
|
|
3000
|
+
CategoryEntry: {
|
|
3001
|
+
category?: string | null;
|
|
3002
|
+
trader?: null | components["schemas"]["TraderProfile"];
|
|
2555
3003
|
/** Format: double */
|
|
2556
|
-
|
|
2557
|
-
/** Format: int64 */
|
|
2558
|
-
txn_count: number;
|
|
3004
|
+
realized_pnl_usd: number;
|
|
2559
3005
|
/** Format: double */
|
|
2560
|
-
|
|
3006
|
+
total_pnl_usd?: number;
|
|
2561
3007
|
/** Format: double */
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
name?: string | null;
|
|
2568
|
-
pseudonym?: string | null;
|
|
2569
|
-
profile_image?: string | null;
|
|
2570
|
-
x_username?: string | null;
|
|
2571
|
-
verified_badge?: boolean;
|
|
2572
|
-
};
|
|
2573
|
-
/** @description Outcome-level PnL entry (per outcome token / position_id) */
|
|
2574
|
-
TraderOutcomePnlEntry: {
|
|
2575
|
-
position_id?: string | null;
|
|
2576
|
-
condition_id?: string | null;
|
|
2577
|
-
market_slug?: string | null;
|
|
2578
|
-
event_slug?: string | null;
|
|
2579
|
-
title?: string | null;
|
|
2580
|
-
image_url?: string | null;
|
|
2581
|
-
outcome?: string | null;
|
|
2582
|
-
/** Format: int32 */
|
|
2583
|
-
outcome_index?: number | null;
|
|
2584
|
-
/** @description TRUE = won, FALSE = lost, NULL = open or sold before resolution */
|
|
2585
|
-
won?: boolean | null;
|
|
3008
|
+
unrealized_pnl_usd?: number;
|
|
3009
|
+
/** Format: double */
|
|
3010
|
+
realized_pnl_pct?: number | null;
|
|
3011
|
+
/** Format: double */
|
|
3012
|
+
total_pnl_pct?: number | null;
|
|
2586
3013
|
/** Format: int64 */
|
|
2587
|
-
|
|
3014
|
+
markets_traded: number;
|
|
2588
3015
|
/** Format: int64 */
|
|
2589
|
-
|
|
3016
|
+
markets_resolved: number;
|
|
3017
|
+
/** Format: int64 */
|
|
3018
|
+
markets_won: number;
|
|
3019
|
+
/** Format: int64 */
|
|
3020
|
+
markets_lost: number;
|
|
2590
3021
|
/** Format: double */
|
|
2591
|
-
|
|
3022
|
+
market_win_rate_pct: number;
|
|
2592
3023
|
/** Format: double */
|
|
2593
|
-
|
|
3024
|
+
avg_win_usd: number;
|
|
2594
3025
|
/** Format: double */
|
|
2595
|
-
|
|
3026
|
+
avg_loss_usd: number;
|
|
2596
3027
|
/** Format: double */
|
|
2597
|
-
|
|
2598
|
-
/**
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
3028
|
+
profit_factor: number;
|
|
3029
|
+
/** Format: int64 */
|
|
3030
|
+
total_buys: number;
|
|
3031
|
+
/** Format: int64 */
|
|
3032
|
+
total_sells: number;
|
|
3033
|
+
/** Format: int64 */
|
|
3034
|
+
total_redemptions: number;
|
|
3035
|
+
/** Format: int64 */
|
|
3036
|
+
total_merges: number;
|
|
2603
3037
|
/**
|
|
2604
|
-
* Format:
|
|
2605
|
-
* @description
|
|
3038
|
+
* Format: int64
|
|
3039
|
+
* @description Number of split transactions in the selected timeframe.
|
|
2606
3040
|
*/
|
|
2607
|
-
|
|
3041
|
+
total_splits?: number;
|
|
3042
|
+
/** Format: double */
|
|
3043
|
+
total_volume_usd: number;
|
|
3044
|
+
/** Format: double */
|
|
3045
|
+
buy_volume_usd: number;
|
|
3046
|
+
/** Format: double */
|
|
3047
|
+
sell_volume_usd: number;
|
|
3048
|
+
/** Format: double */
|
|
3049
|
+
redemption_volume_usd: number;
|
|
3050
|
+
/** Format: double */
|
|
3051
|
+
merge_volume_usd: number;
|
|
3052
|
+
/** Format: double */
|
|
3053
|
+
convert_collateral_usd?: number;
|
|
2608
3054
|
/**
|
|
2609
3055
|
* Format: double
|
|
2610
|
-
* @description
|
|
3056
|
+
* @description USD collateral split into outcome tokens in the selected timeframe.
|
|
2611
3057
|
*/
|
|
2612
|
-
|
|
3058
|
+
split_volume_usd?: number;
|
|
2613
3059
|
/** Format: double */
|
|
2614
|
-
|
|
3060
|
+
total_fees: number;
|
|
2615
3061
|
/** Format: double */
|
|
2616
|
-
|
|
3062
|
+
total_wins_usd: number;
|
|
3063
|
+
/** Format: double */
|
|
3064
|
+
total_losses_usd: number;
|
|
3065
|
+
/** Format: double */
|
|
3066
|
+
best_trade_pnl_usd?: number | null;
|
|
3067
|
+
best_trade_condition_id?: string | null;
|
|
3068
|
+
/** Format: double */
|
|
3069
|
+
worst_trade_pnl_usd?: number | null;
|
|
3070
|
+
worst_trade_condition_id?: string | null;
|
|
3071
|
+
best_trade_metadata?: null | components["schemas"]["TradeMarketRef"];
|
|
3072
|
+
worst_trade_metadata?: null | components["schemas"]["TradeMarketRef"];
|
|
3073
|
+
/** Format: double */
|
|
3074
|
+
avg_hold_time_seconds: number;
|
|
3075
|
+
/** Format: double */
|
|
3076
|
+
total_shares_bought: number;
|
|
3077
|
+
/** Format: int64 */
|
|
3078
|
+
buy_count: number;
|
|
3079
|
+
/** Format: int64 */
|
|
3080
|
+
sell_count: number;
|
|
3081
|
+
/** Format: int64 */
|
|
3082
|
+
redeem_count: number;
|
|
3083
|
+
/** Format: int64 */
|
|
3084
|
+
merge_count: number;
|
|
3085
|
+
/** Format: int64 */
|
|
3086
|
+
split_count: number;
|
|
3087
|
+
/** Format: int64 */
|
|
3088
|
+
converted_count: number;
|
|
3089
|
+
/** Format: double */
|
|
3090
|
+
converted_shares_gained: number;
|
|
3091
|
+
/** Format: double */
|
|
3092
|
+
converted_shares_lost: number;
|
|
3093
|
+
/** Format: int64 */
|
|
3094
|
+
outcomes_traded: number;
|
|
2617
3095
|
/** Format: int64 */
|
|
2618
3096
|
first_trade_at?: number | null;
|
|
2619
3097
|
/** Format: int64 */
|
|
2620
3098
|
last_trade_at?: number | null;
|
|
2621
|
-
/**
|
|
2622
|
-
|
|
2623
|
-
* @description Last traded price for this outcome (0–1). NULL if market_outcomes has no price yet.
|
|
2624
|
-
*/
|
|
2625
|
-
current_price?: number | null;
|
|
2626
|
-
/**
|
|
2627
|
-
* Format: double
|
|
2628
|
-
* @description Current shares held: balance / 1e6.
|
|
2629
|
-
*/
|
|
2630
|
-
current_shares_balance?: number | null;
|
|
2631
|
-
/**
|
|
2632
|
-
* Format: double
|
|
2633
|
-
* @description Estimated current USD value of held shares: (balance / 1e6) * current_price.
|
|
2634
|
-
* Only meaningful for open positions (balance above dust threshold).
|
|
2635
|
-
*/
|
|
2636
|
-
current_value?: number | null;
|
|
2637
|
-
/**
|
|
2638
|
-
* Format: double
|
|
2639
|
-
* @description Realized PnL as a percentage of total spend: (realized_pnl_usd / total_buy_usd) * 100.
|
|
2640
|
-
* NULL when total_buy_usd = 0.
|
|
2641
|
-
*/
|
|
2642
|
-
realized_pnl_pct?: number | null;
|
|
3099
|
+
/** Format: int64 */
|
|
3100
|
+
last_block: number;
|
|
2643
3101
|
};
|
|
3102
|
+
/**
|
|
3103
|
+
* @description Sort field for category PnL results. Supported values cover realized
|
|
3104
|
+
* PnL, volume, trade counts, fees, rewards, positions, and trade timing.
|
|
3105
|
+
* @enum {string}
|
|
3106
|
+
*/
|
|
3107
|
+
CategoryPnlSortBy: "realized_pnl_usd" | "total_pnl_usd" | "unrealized_pnl_usd" | "total_volume_usd" | "buy_volume_usd" | "sell_volume_usd" | "redemption_volume_usd" | "merge_volume_usd" | "split_volume_usd" | "total_converts" | "total_fees" | "total_buys" | "total_sells" | "total_splits" | "total_shares_bought" | "markets_traded" | "markets_resolved" | "markets_won" | "markets_lost" | "market_win_rate_pct" | "avg_win_usd" | "avg_loss_usd" | "profit_factor" | "total_wins_usd" | "total_losses_usd" | "best_trade_pnl_usd" | "worst_trade_pnl_usd" | "avg_hold_time_seconds" | "buy_count" | "sell_count" | "redeem_count" | "merge_count" | "split_count" | "outcomes_traded" | "first_trade_at" | "last_trade_at";
|
|
3108
|
+
/**
|
|
3109
|
+
* @description Lookback window for percentage-change endpoints.
|
|
3110
|
+
* @enum {string}
|
|
3111
|
+
*/
|
|
3112
|
+
ChangeTimeframe: "1h" | "24h" | "7d" | "30d" | "1mo" | "1y";
|
|
3113
|
+
/** @enum {string} */
|
|
3114
|
+
ChartResolution: "1H" | "6H" | "1D" | "1W" | "1M" | "ALL";
|
|
3115
|
+
/**
|
|
3116
|
+
* @description Direction filter for spike webhooks.
|
|
3117
|
+
* @enum {string}
|
|
3118
|
+
*/
|
|
3119
|
+
SpikeDirection: "up" | "down" | "both";
|
|
3120
|
+
/** @description Output payload for Split trades (deposit collateral → receive outcome tokens). */
|
|
3121
|
+
SplitTrade: {
|
|
3122
|
+
id: string;
|
|
3123
|
+
hash: string;
|
|
3124
|
+
/** Format: int64 */
|
|
3125
|
+
block?: number | null;
|
|
3126
|
+
/** Format: int64 */
|
|
3127
|
+
confirmed_at?: number | null;
|
|
3128
|
+
/** Format: int64 */
|
|
3129
|
+
received_at?: number | null;
|
|
3130
|
+
/** Format: int64 */
|
|
3131
|
+
log_index?: number | null;
|
|
3132
|
+
/** Format: int64 */
|
|
3133
|
+
block_index?: number | null;
|
|
3134
|
+
trader: components["schemas"]["TraderInfo"];
|
|
3135
|
+
condition_id?: string | null;
|
|
3136
|
+
question?: string | null;
|
|
3137
|
+
image_url?: string | null;
|
|
3138
|
+
slug?: string | null;
|
|
3139
|
+
event_slug?: string | null;
|
|
3140
|
+
/** Format: double */
|
|
3141
|
+
usd_amount: number;
|
|
3142
|
+
/** @description Per-position mint amounts */
|
|
3143
|
+
position_details?: components["schemas"]["PositionDetail"][];
|
|
3144
|
+
exchange: components["schemas"]["PolymarketExchange"];
|
|
3145
|
+
};
|
|
3146
|
+
/** @enum {string} */
|
|
3147
|
+
SortDirection: "asc" | "desc";
|
|
2644
3148
|
/** @description CLOB reward (public API format) */
|
|
2645
3149
|
ClobReward: {
|
|
2646
3150
|
id: string;
|
|
@@ -2951,6 +3455,110 @@ export interface components {
|
|
|
2951
3455
|
slug?: string | null;
|
|
2952
3456
|
event_slug?: string | null;
|
|
2953
3457
|
};
|
|
3458
|
+
EventEntry: {
|
|
3459
|
+
event_slug?: string | null;
|
|
3460
|
+
title?: string | null;
|
|
3461
|
+
image_url?: string | null;
|
|
3462
|
+
trader?: null | components["schemas"]["TraderProfile"];
|
|
3463
|
+
/** Format: double */
|
|
3464
|
+
realized_pnl_usd: number;
|
|
3465
|
+
/** Format: double */
|
|
3466
|
+
total_pnl_usd?: number;
|
|
3467
|
+
/** Format: double */
|
|
3468
|
+
unrealized_pnl_usd?: number;
|
|
3469
|
+
/** Format: double */
|
|
3470
|
+
realized_pnl_pct?: number | null;
|
|
3471
|
+
/** Format: double */
|
|
3472
|
+
total_pnl_pct?: number | null;
|
|
3473
|
+
/** Format: double */
|
|
3474
|
+
total_volume_usd: number;
|
|
3475
|
+
/** Format: double */
|
|
3476
|
+
buy_usd: number;
|
|
3477
|
+
/** Format: double */
|
|
3478
|
+
sell_usd: number;
|
|
3479
|
+
/** Format: double */
|
|
3480
|
+
redemption_usd: number;
|
|
3481
|
+
/** Format: double */
|
|
3482
|
+
merge_usd: number;
|
|
3483
|
+
/** Format: double */
|
|
3484
|
+
convert_collateral_usd?: number;
|
|
3485
|
+
/**
|
|
3486
|
+
* Format: double
|
|
3487
|
+
* @description USD collateral split into outcome tokens in the selected timeframe.
|
|
3488
|
+
*/
|
|
3489
|
+
split_volume_usd?: number;
|
|
3490
|
+
/** Format: double */
|
|
3491
|
+
total_fees: number;
|
|
3492
|
+
/** Format: int64 */
|
|
3493
|
+
total_buys: number;
|
|
3494
|
+
/** Format: int64 */
|
|
3495
|
+
total_sells: number;
|
|
3496
|
+
/** Format: int64 */
|
|
3497
|
+
total_redemptions: number;
|
|
3498
|
+
/** Format: int64 */
|
|
3499
|
+
total_merges: number;
|
|
3500
|
+
/**
|
|
3501
|
+
* Format: int64
|
|
3502
|
+
* @description Number of split transactions in the selected timeframe.
|
|
3503
|
+
*/
|
|
3504
|
+
total_splits?: number;
|
|
3505
|
+
/** Format: double */
|
|
3506
|
+
total_shares_bought: number;
|
|
3507
|
+
/** Format: int64 */
|
|
3508
|
+
markets_traded: number;
|
|
3509
|
+
/** Format: int64 */
|
|
3510
|
+
markets_resolved: number;
|
|
3511
|
+
/** Format: int64 */
|
|
3512
|
+
winning_markets: number;
|
|
3513
|
+
/** Format: int64 */
|
|
3514
|
+
losing_markets: number;
|
|
3515
|
+
/** Format: double */
|
|
3516
|
+
market_win_rate_pct: number;
|
|
3517
|
+
/** Format: double */
|
|
3518
|
+
avg_win_usd: number;
|
|
3519
|
+
/** Format: double */
|
|
3520
|
+
avg_loss_usd: number;
|
|
3521
|
+
/** Format: double */
|
|
3522
|
+
profit_factor: number;
|
|
3523
|
+
/** Format: double */
|
|
3524
|
+
total_wins_usd: number;
|
|
3525
|
+
/** Format: double */
|
|
3526
|
+
total_losses_usd: number;
|
|
3527
|
+
/** Format: double */
|
|
3528
|
+
best_trade_pnl_usd?: number | null;
|
|
3529
|
+
best_trade_condition_id?: string | null;
|
|
3530
|
+
/** Format: double */
|
|
3531
|
+
worst_trade_pnl_usd?: number | null;
|
|
3532
|
+
worst_trade_condition_id?: string | null;
|
|
3533
|
+
best_trade_metadata?: null | components["schemas"]["TradeMarketRef"];
|
|
3534
|
+
worst_trade_metadata?: null | components["schemas"]["TradeMarketRef"];
|
|
3535
|
+
/** Format: double */
|
|
3536
|
+
avg_hold_time_seconds: number;
|
|
3537
|
+
/** Format: int64 */
|
|
3538
|
+
buy_count: number;
|
|
3539
|
+
/** Format: int64 */
|
|
3540
|
+
sell_count: number;
|
|
3541
|
+
/** Format: int64 */
|
|
3542
|
+
redeem_count: number;
|
|
3543
|
+
/** Format: int64 */
|
|
3544
|
+
merge_count: number;
|
|
3545
|
+
/** Format: int64 */
|
|
3546
|
+
split_count: number;
|
|
3547
|
+
/** Format: int64 */
|
|
3548
|
+
converted_count: number;
|
|
3549
|
+
/** Format: double */
|
|
3550
|
+
converted_shares_gained: number;
|
|
3551
|
+
/** Format: double */
|
|
3552
|
+
converted_shares_lost: number;
|
|
3553
|
+
/** Format: int64 */
|
|
3554
|
+
outcomes_traded: number;
|
|
3555
|
+
/** Format: int64 */
|
|
3556
|
+
first_trade_at?: number | null;
|
|
3557
|
+
/** Format: int64 */
|
|
3558
|
+
last_trade_at?: number | null;
|
|
3559
|
+
/** Format: int64 */
|
|
3560
|
+
last_block: number;
|
|
3561
|
+
};
|
|
2954
3562
|
/** @description Enriched market data for event API responses */
|
|
2955
3563
|
EventMarket: {
|
|
2956
3564
|
/** @default */
|
|
@@ -3034,115 +3642,92 @@ export interface components {
|
|
|
3034
3642
|
event_slug: string;
|
|
3035
3643
|
timeframe: string;
|
|
3036
3644
|
/** Format: double */
|
|
3037
|
-
volume_usd: number;
|
|
3645
|
+
volume_usd: number;
|
|
3646
|
+
/** Format: double */
|
|
3647
|
+
shares_volume: number;
|
|
3648
|
+
/** Format: double */
|
|
3649
|
+
builder_usd_volume: number;
|
|
3650
|
+
/** Format: double */
|
|
3651
|
+
builder_shares_volume: number;
|
|
3652
|
+
/** Format: double */
|
|
3653
|
+
fees: number;
|
|
3654
|
+
/** Format: double */
|
|
3655
|
+
builder_fees: number;
|
|
3656
|
+
/** Format: int32 */
|
|
3657
|
+
txns: number;
|
|
3658
|
+
/** Format: int32 */
|
|
3659
|
+
builder_txns: number;
|
|
3660
|
+
/** Format: int32 */
|
|
3661
|
+
unique_traders: number;
|
|
3662
|
+
/** Format: int32 */
|
|
3663
|
+
unique_makers: number;
|
|
3664
|
+
/** Format: int32 */
|
|
3665
|
+
unique_takers: number;
|
|
3666
|
+
/** Format: int32 */
|
|
3667
|
+
unique_builder_traders: number;
|
|
3668
|
+
/** Format: double */
|
|
3669
|
+
avg_trade_usd: number;
|
|
3670
|
+
/** Format: double */
|
|
3671
|
+
avg_trade_shares: number;
|
|
3672
|
+
};
|
|
3673
|
+
/**
|
|
3674
|
+
* @description Sort field for event PnL results. Supported values cover realized PnL,
|
|
3675
|
+
* total volume, shares bought, and first or last trade time.
|
|
3676
|
+
* @enum {string}
|
|
3677
|
+
*/
|
|
3678
|
+
EventPnlSortBy: "realized_pnl_usd" | "total_pnl_usd" | "unrealized_pnl_usd" | "total_volume_usd" | "total_shares_bought" | "first_trade_at" | "last_trade_at";
|
|
3679
|
+
/** @enum {string} */
|
|
3680
|
+
EventSortBy: "volume" | "txns" | "unique_traders" | "title" | "creation_date" | "start_date" | "end_date" | "relevance";
|
|
3681
|
+
TraderAnalyticsMetricPctChange: {
|
|
3682
|
+
/** Format: double */
|
|
3683
|
+
volume_usd?: number | null;
|
|
3684
|
+
/** Format: double */
|
|
3685
|
+
buy_volume_usd?: number | null;
|
|
3686
|
+
/** Format: double */
|
|
3687
|
+
sell_volume_usd?: number | null;
|
|
3688
|
+
/** Format: double */
|
|
3689
|
+
merge_volume_usd?: number | null;
|
|
3690
|
+
/** Format: double */
|
|
3691
|
+
split_volume_usd?: number | null;
|
|
3692
|
+
/** Format: double */
|
|
3693
|
+
converted_count?: number | null;
|
|
3694
|
+
/** Format: double */
|
|
3695
|
+
converted_collateral_usd?: number | null;
|
|
3696
|
+
/** Format: double */
|
|
3697
|
+
converted_shares_gained?: number | null;
|
|
3698
|
+
/** Format: double */
|
|
3699
|
+
converted_shares_lost?: number | null;
|
|
3700
|
+
/** Format: double */
|
|
3701
|
+
maker_rebate_count?: number | null;
|
|
3702
|
+
/** Format: double */
|
|
3703
|
+
maker_rebate_volume_usd?: number | null;
|
|
3704
|
+
/** Format: double */
|
|
3705
|
+
reward_count?: number | null;
|
|
3706
|
+
/** Format: double */
|
|
3707
|
+
reward_volume_usd?: number | null;
|
|
3708
|
+
/** Format: double */
|
|
3709
|
+
yield_count?: number | null;
|
|
3038
3710
|
/** Format: double */
|
|
3039
|
-
|
|
3711
|
+
yield_volume_usd?: number | null;
|
|
3040
3712
|
/** Format: double */
|
|
3041
|
-
|
|
3713
|
+
txn_count?: number | null;
|
|
3042
3714
|
/** Format: double */
|
|
3043
|
-
|
|
3715
|
+
fees_usd?: number | null;
|
|
3044
3716
|
/** Format: double */
|
|
3045
|
-
|
|
3717
|
+
shares_volume?: number | null;
|
|
3046
3718
|
/** Format: double */
|
|
3047
|
-
|
|
3048
|
-
/** Format: int32 */
|
|
3049
|
-
txns: number;
|
|
3050
|
-
/** Format: int32 */
|
|
3051
|
-
builder_txns: number;
|
|
3052
|
-
/** Format: int32 */
|
|
3053
|
-
unique_traders: number;
|
|
3054
|
-
/** Format: int32 */
|
|
3055
|
-
unique_makers: number;
|
|
3056
|
-
/** Format: int32 */
|
|
3057
|
-
unique_takers: number;
|
|
3058
|
-
/** Format: int32 */
|
|
3059
|
-
unique_builder_traders: number;
|
|
3719
|
+
buy_shares_volume?: number | null;
|
|
3060
3720
|
/** Format: double */
|
|
3061
|
-
|
|
3721
|
+
sell_shares_volume?: number | null;
|
|
3062
3722
|
/** Format: double */
|
|
3063
|
-
|
|
3723
|
+
yes_shares_volume?: number | null;
|
|
3724
|
+
/** Format: double */
|
|
3725
|
+
no_shares_volume?: number | null;
|
|
3726
|
+
/** Format: double */
|
|
3727
|
+
yes_volume_usd?: number | null;
|
|
3728
|
+
/** Format: double */
|
|
3729
|
+
no_volume_usd?: number | null;
|
|
3064
3730
|
};
|
|
3065
|
-
/** @enum {string} */
|
|
3066
|
-
EventPnlSortBy: "realized_pnl_usd" | "total_volume_usd" | "markets_traded" | "total_fees" | "realized_pnl_pct";
|
|
3067
|
-
/** @enum {string} */
|
|
3068
|
-
EventSortBy: "volume" | "txns" | "unique_traders" | "title" | "creation_date" | "start_date" | "end_date" | "relevance";
|
|
3069
|
-
/**
|
|
3070
|
-
* @description Tagged enum for all trade types — serializes with `"trade_type": "..."` discriminator
|
|
3071
|
-
* and only includes fields relevant to each type.
|
|
3072
|
-
*/
|
|
3073
|
-
TradeEvent: (components["schemas"]["OrderFilledTrade"] & {
|
|
3074
|
-
/** @enum {string} */
|
|
3075
|
-
trade_type: "OrderFilled";
|
|
3076
|
-
}) | (components["schemas"]["OrderFilledTrade"] & {
|
|
3077
|
-
/** @enum {string} */
|
|
3078
|
-
trade_type: "OrdersMatched";
|
|
3079
|
-
}) | (components["schemas"]["OrderFilledTrade"] & {
|
|
3080
|
-
/** @enum {string} */
|
|
3081
|
-
trade_type: "MakerRebate";
|
|
3082
|
-
}) | (components["schemas"]["OrderFilledTrade"] & {
|
|
3083
|
-
/** @enum {string} */
|
|
3084
|
-
trade_type: "Reward";
|
|
3085
|
-
}) | (components["schemas"]["OrderFilledTrade"] & {
|
|
3086
|
-
/** @enum {string} */
|
|
3087
|
-
trade_type: "Yield";
|
|
3088
|
-
}) | (components["schemas"]["RedemptionTrade"] & {
|
|
3089
|
-
/** @enum {string} */
|
|
3090
|
-
trade_type: "Redemption";
|
|
3091
|
-
}) | (components["schemas"]["MergeTrade"] & {
|
|
3092
|
-
/** @enum {string} */
|
|
3093
|
-
trade_type: "Merge";
|
|
3094
|
-
}) | (components["schemas"]["SplitTrade"] & {
|
|
3095
|
-
/** @enum {string} */
|
|
3096
|
-
trade_type: "Split";
|
|
3097
|
-
}) | (components["schemas"]["PositionsConvertedTrade"] & {
|
|
3098
|
-
/** @enum {string} */
|
|
3099
|
-
trade_type: "PositionsConverted";
|
|
3100
|
-
}) | (components["schemas"]["CancelledTrade"] & {
|
|
3101
|
-
/** @enum {string} */
|
|
3102
|
-
trade_type: "Cancelled";
|
|
3103
|
-
}) | (components["schemas"]["QuestionInitializedEvent"] & {
|
|
3104
|
-
/** @enum {string} */
|
|
3105
|
-
trade_type: "Initialization";
|
|
3106
|
-
}) | (components["schemas"]["AssertionMadeEvent"] & {
|
|
3107
|
-
/** @enum {string} */
|
|
3108
|
-
trade_type: "Proposal";
|
|
3109
|
-
}) | (components["schemas"]["AssertionDisputedEvent"] & {
|
|
3110
|
-
/** @enum {string} */
|
|
3111
|
-
trade_type: "Dispute";
|
|
3112
|
-
}) | (components["schemas"]["AssertionSettledEvent"] & {
|
|
3113
|
-
/** @enum {string} */
|
|
3114
|
-
trade_type: "Settled";
|
|
3115
|
-
}) | (components["schemas"]["QuestionResolvedEvent"] & {
|
|
3116
|
-
/** @enum {string} */
|
|
3117
|
-
trade_type: "Resolution";
|
|
3118
|
-
}) | (components["schemas"]["ConditionResolutionEvent"] & {
|
|
3119
|
-
/** @enum {string} */
|
|
3120
|
-
trade_type: "ConditionResolution";
|
|
3121
|
-
}) | (components["schemas"]["QuestionResetEvent"] & {
|
|
3122
|
-
/** @enum {string} */
|
|
3123
|
-
trade_type: "Reset";
|
|
3124
|
-
}) | (components["schemas"]["QuestionFlaggedEvent"] & {
|
|
3125
|
-
/** @enum {string} */
|
|
3126
|
-
trade_type: "Flag";
|
|
3127
|
-
}) | (components["schemas"]["QuestionUnflaggedEvent"] & {
|
|
3128
|
-
/** @enum {string} */
|
|
3129
|
-
trade_type: "Unflag";
|
|
3130
|
-
}) | (components["schemas"]["QuestionPausedEvent"] & {
|
|
3131
|
-
/** @enum {string} */
|
|
3132
|
-
trade_type: "Pause";
|
|
3133
|
-
}) | (components["schemas"]["QuestionUnpausedEvent"] & {
|
|
3134
|
-
/** @enum {string} */
|
|
3135
|
-
trade_type: "Unpause";
|
|
3136
|
-
}) | (components["schemas"]["QuestionEmergencyResolvedEvent"] & {
|
|
3137
|
-
/** @enum {string} */
|
|
3138
|
-
trade_type: "ManualResolution";
|
|
3139
|
-
}) | (components["schemas"]["NegRiskOutcomeReportedEvent"] & {
|
|
3140
|
-
/** @enum {string} */
|
|
3141
|
-
trade_type: "NegRiskOutcomeReported";
|
|
3142
|
-
}) | (components["schemas"]["RegisterTokenTrade"] & {
|
|
3143
|
-
/** @enum {string} */
|
|
3144
|
-
trade_type: "RegisterToken";
|
|
3145
|
-
});
|
|
3146
3731
|
/**
|
|
3147
3732
|
* @description One tag's stats aggregated across every builder routing activity into it.
|
|
3148
3733
|
*
|
|
@@ -3212,104 +3797,113 @@ export interface components {
|
|
|
3212
3797
|
};
|
|
3213
3798
|
/** @enum {string} */
|
|
3214
3799
|
GlobalChangeTimeframe: "1h" | "24h" | "7d" | "30d" | "1mo" | "1y";
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3800
|
+
GlobalEntry: {
|
|
3801
|
+
trader: components["schemas"]["TraderProfile"];
|
|
3802
|
+
/** Format: double */
|
|
3803
|
+
realized_pnl_usd: number;
|
|
3804
|
+
/** Format: double */
|
|
3805
|
+
total_pnl_usd?: number;
|
|
3806
|
+
/** Format: double */
|
|
3807
|
+
unrealized_pnl_usd?: number;
|
|
3220
3808
|
/**
|
|
3221
|
-
* Format:
|
|
3222
|
-
* @description
|
|
3809
|
+
* Format: double
|
|
3810
|
+
* @description Wallet cash held in pUSD + USDC at this point in time. Stable per block.
|
|
3223
3811
|
*/
|
|
3224
|
-
|
|
3812
|
+
usd_balance?: number;
|
|
3813
|
+
/** Format: double */
|
|
3814
|
+
realized_pnl_pct?: number | null;
|
|
3815
|
+
/** Format: double */
|
|
3816
|
+
total_pnl_pct?: number | null;
|
|
3817
|
+
/** Format: double */
|
|
3818
|
+
open_positions_value: number;
|
|
3819
|
+
/** Format: int64 */
|
|
3820
|
+
events_traded: number;
|
|
3821
|
+
/** Format: int64 */
|
|
3822
|
+
categories_traded: number;
|
|
3823
|
+
/** Format: int64 */
|
|
3824
|
+
markets_traded: number;
|
|
3825
|
+
/** Format: int64 */
|
|
3826
|
+
markets_won: number;
|
|
3827
|
+
/** Format: int64 */
|
|
3828
|
+
markets_lost: number;
|
|
3829
|
+
/** Format: double */
|
|
3830
|
+
market_win_rate_pct: number;
|
|
3831
|
+
/** Format: double */
|
|
3832
|
+
avg_win_usd: number;
|
|
3833
|
+
/** Format: double */
|
|
3834
|
+
avg_loss_usd: number;
|
|
3835
|
+
/** Format: double */
|
|
3836
|
+
profit_factor: number;
|
|
3837
|
+
/** Format: int64 */
|
|
3838
|
+
total_buys: number;
|
|
3839
|
+
/** Format: int64 */
|
|
3840
|
+
total_sells: number;
|
|
3841
|
+
/** Format: int64 */
|
|
3842
|
+
total_redemptions: number;
|
|
3843
|
+
/** Format: int64 */
|
|
3844
|
+
total_merges: number;
|
|
3225
3845
|
/**
|
|
3226
3846
|
* Format: int64
|
|
3227
|
-
* @description
|
|
3847
|
+
* @description Number of split transactions in the selected timeframe.
|
|
3228
3848
|
*/
|
|
3229
|
-
|
|
3849
|
+
total_splits?: number;
|
|
3850
|
+
/** Format: int64 */
|
|
3851
|
+
converted_count: number;
|
|
3230
3852
|
/** Format: double */
|
|
3231
|
-
|
|
3853
|
+
converted_shares_gained: number;
|
|
3854
|
+
/** Format: double */
|
|
3855
|
+
converted_shares_lost: number;
|
|
3856
|
+
/** Format: double */
|
|
3857
|
+
total_volume_usd: number;
|
|
3232
3858
|
/** Format: double */
|
|
3233
3859
|
buy_volume_usd: number;
|
|
3234
3860
|
/** Format: double */
|
|
3235
3861
|
sell_volume_usd: number;
|
|
3236
|
-
/**
|
|
3237
|
-
* Format: int64
|
|
3238
|
-
* @description Distinct addresses that have ever traded on Polymarket (lifetime).
|
|
3239
|
-
*/
|
|
3240
|
-
unique_traders: number;
|
|
3241
|
-
/**
|
|
3242
|
-
* Format: int64
|
|
3243
|
-
* @description Distinct makers ever active (lifetime distinct).
|
|
3244
|
-
*/
|
|
3245
|
-
unique_makers: number;
|
|
3246
|
-
/**
|
|
3247
|
-
* Format: int64
|
|
3248
|
-
* @description Distinct takers ever active (lifetime distinct).
|
|
3249
|
-
*/
|
|
3250
|
-
unique_takers: number;
|
|
3251
|
-
/** Format: int64 */
|
|
3252
|
-
txn_count: number;
|
|
3253
|
-
/** Format: int64 */
|
|
3254
|
-
buy_count: number;
|
|
3255
|
-
/** Format: int64 */
|
|
3256
|
-
sell_count: number;
|
|
3257
|
-
/** Format: int64 */
|
|
3258
|
-
redemption_count: number;
|
|
3259
3862
|
/** Format: double */
|
|
3260
3863
|
redemption_volume_usd: number;
|
|
3261
|
-
/** Format: int64 */
|
|
3262
|
-
merge_count: number;
|
|
3263
3864
|
/** Format: double */
|
|
3264
3865
|
merge_volume_usd: number;
|
|
3265
|
-
/** Format: int64 */
|
|
3266
|
-
split_count: number;
|
|
3267
3866
|
/** Format: double */
|
|
3268
|
-
|
|
3867
|
+
convert_collateral_usd?: number;
|
|
3868
|
+
/**
|
|
3869
|
+
* Format: double
|
|
3870
|
+
* @description USD collateral split into outcome tokens in the selected timeframe.
|
|
3871
|
+
*/
|
|
3872
|
+
split_volume_usd?: number;
|
|
3269
3873
|
/** Format: double */
|
|
3270
|
-
|
|
3874
|
+
total_fees: number;
|
|
3271
3875
|
/** Format: double */
|
|
3272
|
-
|
|
3876
|
+
total_wins_usd: number;
|
|
3273
3877
|
/** Format: double */
|
|
3274
|
-
|
|
3878
|
+
total_losses_usd: number;
|
|
3275
3879
|
/** Format: double */
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3880
|
+
best_trade_pnl_usd?: number | null;
|
|
3881
|
+
best_trade_condition_id?: string | null;
|
|
3882
|
+
/** Format: double */
|
|
3883
|
+
worst_trade_pnl_usd?: number | null;
|
|
3884
|
+
worst_trade_condition_id?: string | null;
|
|
3885
|
+
best_trade_metadata?: null | components["schemas"]["TradeMarketRef"];
|
|
3886
|
+
worst_trade_metadata?: null | components["schemas"]["TradeMarketRef"];
|
|
3887
|
+
/** Format: double */
|
|
3888
|
+
avg_hold_time_seconds: number;
|
|
3281
3889
|
/** Format: int64 */
|
|
3282
|
-
|
|
3890
|
+
first_trade_at?: number | null;
|
|
3283
3891
|
/** Format: int64 */
|
|
3284
|
-
|
|
3892
|
+
last_trade_at?: number | null;
|
|
3285
3893
|
/** Format: int64 */
|
|
3286
|
-
|
|
3894
|
+
maker_rebate_count: number;
|
|
3895
|
+
/** Format: double */
|
|
3896
|
+
maker_rebate_usd: number;
|
|
3287
3897
|
/** Format: int64 */
|
|
3288
|
-
|
|
3898
|
+
reward_count: number;
|
|
3899
|
+
/** Format: double */
|
|
3900
|
+
reward_usd: number;
|
|
3289
3901
|
/** Format: int64 */
|
|
3290
|
-
|
|
3902
|
+
yield_count: number;
|
|
3903
|
+
/** Format: double */
|
|
3904
|
+
yield_usd: number;
|
|
3291
3905
|
/** Format: int64 */
|
|
3292
|
-
|
|
3293
|
-
/**
|
|
3294
|
-
* Format: int64
|
|
3295
|
-
* @description Total number of tags.
|
|
3296
|
-
*/
|
|
3297
|
-
tags: number;
|
|
3298
|
-
/**
|
|
3299
|
-
* Format: int64
|
|
3300
|
-
* @description Total number of events.
|
|
3301
|
-
*/
|
|
3302
|
-
events: number;
|
|
3303
|
-
/**
|
|
3304
|
-
* Format: int64
|
|
3305
|
-
* @description Total number of markets.
|
|
3306
|
-
*/
|
|
3307
|
-
markets: number;
|
|
3308
|
-
/**
|
|
3309
|
-
* Format: int64
|
|
3310
|
-
* @description Total number of unique positions / traders.
|
|
3311
|
-
*/
|
|
3312
|
-
positions: number;
|
|
3906
|
+
open_position_count: number;
|
|
3313
3907
|
};
|
|
3314
3908
|
GlobalPctChange: {
|
|
3315
3909
|
/** Format: double */
|
|
@@ -3418,23 +4012,11 @@ export interface components {
|
|
|
3418
4012
|
/** Format: int64 */
|
|
3419
4013
|
last_trade_at?: number | null;
|
|
3420
4014
|
};
|
|
3421
|
-
/** @description
|
|
3422
|
-
|
|
3423
|
-
/** @description Trader profile information */
|
|
3424
|
-
trader: components["schemas"]["Trader"];
|
|
3425
|
-
/** @description Position shares held (raw balance as string for precision) */
|
|
3426
|
-
shares: string;
|
|
3427
|
-
/** @description USD value of shares (shares * latest price) */
|
|
3428
|
-
shares_usd?: string | null;
|
|
3429
|
-
/** @description USD balance of wallet (USDe on Polygon) */
|
|
3430
|
-
usd_balance?: string | null;
|
|
3431
|
-
pnl?: null | components["schemas"]["HolderPnl"];
|
|
3432
|
-
};
|
|
3433
|
-
/** @description Holder statistics data point (single time bucket) */
|
|
3434
|
-
HolderHistoryCandle: {
|
|
4015
|
+
/** @description Holder count at a point in a history series. */
|
|
4016
|
+
HolderCountHistoryCandle: {
|
|
3435
4017
|
/**
|
|
3436
4018
|
* Format: int64
|
|
3437
|
-
* @description Bucket timestamp
|
|
4019
|
+
* @description Bucket timestamp as Unix seconds.
|
|
3438
4020
|
*/
|
|
3439
4021
|
t: number;
|
|
3440
4022
|
/**
|
|
@@ -3447,134 +4029,175 @@ export interface components {
|
|
|
3447
4029
|
* @description Latest block represented by this bucket.
|
|
3448
4030
|
*/
|
|
3449
4031
|
block?: number | null;
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
4032
|
+
};
|
|
4033
|
+
MarketEntry: {
|
|
4034
|
+
condition_id?: string | null;
|
|
4035
|
+
event_slug?: string | null;
|
|
4036
|
+
market_slug?: string | null;
|
|
4037
|
+
title?: string | null;
|
|
4038
|
+
image_url?: string | null;
|
|
4039
|
+
question?: string | null;
|
|
4040
|
+
trader?: null | components["schemas"]["TraderProfile"];
|
|
4041
|
+
/** Format: double */
|
|
4042
|
+
realized_pnl_usd: number;
|
|
4043
|
+
/** Format: double */
|
|
4044
|
+
total_pnl_usd?: number;
|
|
4045
|
+
/** Format: double */
|
|
4046
|
+
unrealized_pnl_usd?: number;
|
|
4047
|
+
/** Format: double */
|
|
4048
|
+
realized_pnl_pct?: number | null;
|
|
4049
|
+
/** Format: double */
|
|
4050
|
+
total_pnl_pct?: number | null;
|
|
4051
|
+
/** Format: double */
|
|
4052
|
+
total_volume_usd: number;
|
|
4053
|
+
/** Format: double */
|
|
4054
|
+
buy_volume_usd: number;
|
|
4055
|
+
/** Format: double */
|
|
4056
|
+
sell_volume_usd: number;
|
|
4057
|
+
/** Format: double */
|
|
4058
|
+
redemption_volume_usd: number;
|
|
4059
|
+
/** Format: double */
|
|
4060
|
+
merge_volume_usd: number;
|
|
4061
|
+
/** Format: double */
|
|
4062
|
+
convert_collateral_usd?: number;
|
|
4063
|
+
/** Format: double */
|
|
4064
|
+
total_fees: number;
|
|
4065
|
+
/** Format: int64 */
|
|
4066
|
+
total_buys: number;
|
|
4067
|
+
/** Format: int64 */
|
|
4068
|
+
total_sells: number;
|
|
3465
4069
|
/**
|
|
3466
4070
|
* Format: int64
|
|
3467
|
-
* @description
|
|
4071
|
+
* @description Number of split transactions in the selected timeframe.
|
|
3468
4072
|
*/
|
|
3469
|
-
|
|
3470
|
-
};
|
|
3471
|
-
/** @description Holder-level PnL data, included when `include_pnl=true` */
|
|
3472
|
-
HolderPnl: {
|
|
3473
|
-
/** Format: double */
|
|
3474
|
-
avg_entry_price?: number | null;
|
|
3475
|
-
total_cost_usd?: string | null;
|
|
3476
|
-
unrealized_pnl_usd?: string | null;
|
|
3477
|
-
realized_sell_pnl_usd?: string | null;
|
|
3478
|
-
/** Format: double */
|
|
3479
|
-
avg_exit_price?: number | null;
|
|
4073
|
+
total_splits?: number;
|
|
3480
4074
|
/** Format: double */
|
|
3481
|
-
|
|
4075
|
+
total_shares_bought: number;
|
|
3482
4076
|
/** Format: double */
|
|
3483
|
-
|
|
4077
|
+
total_shares_sold: number;
|
|
3484
4078
|
/** Format: int64 */
|
|
3485
|
-
|
|
4079
|
+
buy_count: number;
|
|
3486
4080
|
/** Format: int64 */
|
|
3487
|
-
|
|
3488
|
-
/** Format: double */
|
|
3489
|
-
total_fees?: number | null;
|
|
4081
|
+
sell_count: number;
|
|
3490
4082
|
/** Format: int64 */
|
|
3491
|
-
|
|
4083
|
+
redeem_count: number;
|
|
3492
4084
|
/** Format: int64 */
|
|
3493
|
-
|
|
3494
|
-
};
|
|
3495
|
-
/**
|
|
3496
|
-
* @description Market category filter for the trader leaderboard.
|
|
3497
|
-
* Mirrors `common::gamma::categories::Category` plus `overall` (= all).
|
|
3498
|
-
* @enum {string}
|
|
3499
|
-
*/
|
|
3500
|
-
LeaderboardCategory: "overall" | "politics" | "sports" | "crypto" | "finance" | "culture" | "mentions" | "weather" | "economics" | "tech";
|
|
3501
|
-
/**
|
|
3502
|
-
* @description Flat response row. `trader` is the canonical `TraderInfo` used across
|
|
3503
|
-
* endpoints; enrichment fields sit at the top level. Fields other than
|
|
3504
|
-
* `trader`, `rank`, `pnl`, and `timeframe` may be `null` when PnL data for
|
|
3505
|
-
* the trader in the selected timeframe isn't yet available.
|
|
3506
|
-
*/
|
|
3507
|
-
LeaderboardEntry: {
|
|
4085
|
+
merge_count: number;
|
|
3508
4086
|
/** Format: int64 */
|
|
3509
|
-
|
|
3510
|
-
|
|
4087
|
+
split_count: number;
|
|
4088
|
+
/**
|
|
4089
|
+
* Format: double
|
|
4090
|
+
* @description USD collateral split into outcome tokens in the selected timeframe.
|
|
4091
|
+
*/
|
|
4092
|
+
split_volume_usd?: number;
|
|
4093
|
+
/** Format: int64 */
|
|
4094
|
+
converted_count: number;
|
|
3511
4095
|
/** Format: double */
|
|
3512
|
-
|
|
4096
|
+
converted_shares_gained: number;
|
|
4097
|
+
/** Format: double */
|
|
4098
|
+
converted_shares_lost: number;
|
|
3513
4099
|
/** Format: int64 */
|
|
3514
|
-
|
|
4100
|
+
outcomes_traded: number;
|
|
4101
|
+
resolved: boolean;
|
|
4102
|
+
won?: boolean | null;
|
|
3515
4103
|
/** Format: int64 */
|
|
3516
|
-
|
|
4104
|
+
first_trade_at?: number | null;
|
|
3517
4105
|
/** Format: int64 */
|
|
3518
|
-
|
|
4106
|
+
last_trade_at?: number | null;
|
|
3519
4107
|
/** Format: int64 */
|
|
3520
|
-
|
|
4108
|
+
snapshot_ts?: number | null;
|
|
4109
|
+
/** Format: int64 */
|
|
4110
|
+
last_block: number;
|
|
4111
|
+
};
|
|
4112
|
+
/** @description Market outcome holder. */
|
|
4113
|
+
MarketHolder: {
|
|
4114
|
+
/** @description Trader profile. */
|
|
4115
|
+
trader: components["schemas"]["Trader"];
|
|
4116
|
+
/** @description Position shares held (raw balance as decimal string for precision). */
|
|
4117
|
+
shares: string;
|
|
4118
|
+
/** @description USD value of shares (shares × latest price). */
|
|
4119
|
+
shares_usd?: string | null;
|
|
4120
|
+
/** @description USD balance of the holder's wallet. */
|
|
4121
|
+
usd_balance?: string | null;
|
|
4122
|
+
pnl?: null | components["schemas"]["MarketHolderPnl"];
|
|
4123
|
+
};
|
|
4124
|
+
/** @description Market-level PnL for a holder, included when `include_pnl=true`. */
|
|
4125
|
+
MarketHolderPnl: {
|
|
3521
4126
|
/** Format: double */
|
|
3522
|
-
|
|
4127
|
+
realized_pnl_usd: number;
|
|
3523
4128
|
/** Format: double */
|
|
3524
|
-
|
|
4129
|
+
total_pnl_usd: number;
|
|
3525
4130
|
/** Format: double */
|
|
3526
|
-
|
|
4131
|
+
unrealized_pnl_usd: number;
|
|
3527
4132
|
/** Format: double */
|
|
3528
|
-
|
|
4133
|
+
realized_pnl_pct?: number | null;
|
|
3529
4134
|
/** Format: double */
|
|
3530
|
-
|
|
4135
|
+
total_pnl_pct?: number | null;
|
|
3531
4136
|
/** Format: double */
|
|
3532
|
-
|
|
3533
|
-
/** Format:
|
|
3534
|
-
|
|
3535
|
-
/** Format:
|
|
3536
|
-
|
|
4137
|
+
total_volume_usd: number;
|
|
4138
|
+
/** Format: double */
|
|
4139
|
+
buy_volume_usd: number;
|
|
4140
|
+
/** Format: double */
|
|
4141
|
+
sell_volume_usd: number;
|
|
4142
|
+
/** Format: double */
|
|
4143
|
+
redemption_volume_usd: number;
|
|
4144
|
+
/** Format: double */
|
|
4145
|
+
merge_volume_usd: number;
|
|
4146
|
+
/** Format: double */
|
|
4147
|
+
convert_collateral_usd: number;
|
|
4148
|
+
/** Format: double */
|
|
4149
|
+
total_fees: number;
|
|
3537
4150
|
/** Format: int64 */
|
|
3538
|
-
|
|
4151
|
+
total_buys: number;
|
|
3539
4152
|
/** Format: int64 */
|
|
3540
|
-
|
|
4153
|
+
total_sells: number;
|
|
3541
4154
|
/** Format: int64 */
|
|
3542
|
-
|
|
4155
|
+
total_splits: number;
|
|
3543
4156
|
/** Format: double */
|
|
3544
|
-
|
|
4157
|
+
total_shares_bought: number;
|
|
3545
4158
|
/** Format: double */
|
|
3546
|
-
|
|
4159
|
+
total_shares_sold: number;
|
|
4160
|
+
/** Format: int64 */
|
|
4161
|
+
buy_count: number;
|
|
4162
|
+
/** Format: int64 */
|
|
4163
|
+
sell_count: number;
|
|
4164
|
+
/** Format: int64 */
|
|
4165
|
+
redeem_count: number;
|
|
4166
|
+
/** Format: int64 */
|
|
4167
|
+
merge_count: number;
|
|
4168
|
+
/** Format: int64 */
|
|
4169
|
+
split_count: number;
|
|
3547
4170
|
/** Format: double */
|
|
3548
|
-
|
|
4171
|
+
split_volume_usd: number;
|
|
4172
|
+
/** Format: int64 */
|
|
4173
|
+
converted_count: number;
|
|
3549
4174
|
/** Format: double */
|
|
3550
|
-
|
|
4175
|
+
converted_shares_gained: number;
|
|
3551
4176
|
/** Format: double */
|
|
3552
|
-
|
|
3553
|
-
|
|
4177
|
+
converted_shares_lost: number;
|
|
4178
|
+
/** Format: int64 */
|
|
4179
|
+
outcomes_traded: number;
|
|
4180
|
+
resolved: boolean;
|
|
4181
|
+
won?: boolean | null;
|
|
3554
4182
|
/** Format: int64 */
|
|
3555
4183
|
first_trade_at?: number | null;
|
|
3556
4184
|
/** Format: int64 */
|
|
3557
4185
|
last_trade_at?: number | null;
|
|
3558
4186
|
};
|
|
3559
|
-
/**
|
|
3560
|
-
* @description Sort key for the trader leaderboard (`GET /polymarket/trader/leaderboard`).
|
|
3561
|
-
* @enum {string}
|
|
3562
|
-
*/
|
|
3563
|
-
LeaderboardSortBy: "pnl" | "volume";
|
|
3564
|
-
/** @description Response for market (condition_id) holders endpoint */
|
|
4187
|
+
/** @description Response for market (condition_id) holders endpoint. */
|
|
3565
4188
|
MarketHoldersResponse: {
|
|
3566
|
-
/** @description Market condition ID */
|
|
4189
|
+
/** @description Market condition ID. */
|
|
3567
4190
|
condition_id: string;
|
|
3568
|
-
/** @description Market question/title */
|
|
4191
|
+
/** @description Market question / title. */
|
|
3569
4192
|
question?: string | null;
|
|
3570
|
-
/** @description Market slug */
|
|
4193
|
+
/** @description Market slug. */
|
|
3571
4194
|
slug?: string | null;
|
|
3572
4195
|
/**
|
|
3573
4196
|
* Format: int64
|
|
3574
4197
|
* @description Total unique holders across all outcomes of this market.
|
|
3575
4198
|
*/
|
|
3576
4199
|
total_holders: number;
|
|
3577
|
-
/** @description Holders grouped by outcome */
|
|
4200
|
+
/** @description Holders grouped by outcome. */
|
|
3578
4201
|
outcomes: components["schemas"]["OutcomeHolders"][];
|
|
3579
4202
|
};
|
|
3580
4203
|
/** @description Market outcome with timeframe metrics (websocket API format) */
|
|
@@ -3627,8 +4250,11 @@ export interface components {
|
|
|
3627
4250
|
*/
|
|
3628
4251
|
latest_confirmed_at: number | null;
|
|
3629
4252
|
};
|
|
3630
|
-
/**
|
|
3631
|
-
|
|
4253
|
+
/**
|
|
4254
|
+
* @description Sort field for per-trader market PnL results.
|
|
4255
|
+
* @enum {string}
|
|
4256
|
+
*/
|
|
4257
|
+
MarketPnlSortBy: "realized_pnl_usd" | "total_pnl_usd" | "unrealized_pnl_usd" | "total_volume_usd" | "buy_volume_usd" | "sell_volume_usd" | "redemption_volume_usd" | "merge_volume_usd" | "split_volume_usd" | "total_fees" | "total_buys" | "total_sells" | "total_splits" | "total_shares_bought" | "total_shares_sold" | "redeem_count" | "merge_count" | "split_count" | "outcomes_traded" | "first_trade_at" | "last_trade_at" | "last_block";
|
|
3632
4258
|
/** @description Formatted market response with structured metrics, tags, outcomes, and event */
|
|
3633
4259
|
MarketResponse: {
|
|
3634
4260
|
condition_id: string;
|
|
@@ -3737,38 +4363,6 @@ export interface components {
|
|
|
3737
4363
|
position_details?: components["schemas"]["PositionDetail"][];
|
|
3738
4364
|
exchange: components["schemas"]["PolymarketExchange"];
|
|
3739
4365
|
};
|
|
3740
|
-
/**
|
|
3741
|
-
* @description Per-metric % change. `None` when the window predates the entity's data
|
|
3742
|
-
* or the previous value was zero (division undefined).
|
|
3743
|
-
*/
|
|
3744
|
-
MetricPctChange: {
|
|
3745
|
-
/** Format: double */
|
|
3746
|
-
volume_usd?: number | null;
|
|
3747
|
-
/** Format: double */
|
|
3748
|
-
buy_volume_usd?: number | null;
|
|
3749
|
-
/** Format: double */
|
|
3750
|
-
sell_volume_usd?: number | null;
|
|
3751
|
-
/** Format: double */
|
|
3752
|
-
merge_volume_usd?: number | null;
|
|
3753
|
-
/** Format: double */
|
|
3754
|
-
split_volume_usd?: number | null;
|
|
3755
|
-
/** Format: double */
|
|
3756
|
-
unique_traders?: number | null;
|
|
3757
|
-
/** Format: double */
|
|
3758
|
-
unique_makers?: number | null;
|
|
3759
|
-
/** Format: double */
|
|
3760
|
-
unique_takers?: number | null;
|
|
3761
|
-
/** Format: double */
|
|
3762
|
-
txn_count?: number | null;
|
|
3763
|
-
/** Format: double */
|
|
3764
|
-
fees_usd?: number | null;
|
|
3765
|
-
/** Format: double */
|
|
3766
|
-
shares_volume?: number | null;
|
|
3767
|
-
/** Format: double */
|
|
3768
|
-
yes_volume_usd?: number | null;
|
|
3769
|
-
/** Format: double */
|
|
3770
|
-
no_volume_usd?: number | null;
|
|
3771
|
-
};
|
|
3772
4366
|
/** @enum {string} */
|
|
3773
4367
|
MetricsTimeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d" | "lifetime";
|
|
3774
4368
|
/** @description NegRisk Adapter: outcome reported for a neg-risk market question. */
|
|
@@ -3793,31 +4387,12 @@ export interface components {
|
|
|
3793
4387
|
slug?: string | null;
|
|
3794
4388
|
event_slug?: string | null;
|
|
3795
4389
|
};
|
|
3796
|
-
/**
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
/** Format: int64 */
|
|
3803
|
-
confirmed_at?: number | null;
|
|
3804
|
-
/** Format: int64 */
|
|
3805
|
-
received_at?: number | null;
|
|
3806
|
-
/** Format: int64 */
|
|
3807
|
-
log_index?: number | null;
|
|
3808
|
-
/** Format: int64 */
|
|
3809
|
-
block_index?: number | null;
|
|
3810
|
-
trader: components["schemas"]["TraderInfo"];
|
|
3811
|
-
condition_id?: string | null;
|
|
3812
|
-
question?: string | null;
|
|
3813
|
-
image_url?: string | null;
|
|
3814
|
-
slug?: string | null;
|
|
3815
|
-
event_slug?: string | null;
|
|
3816
|
-
/** Format: double */
|
|
3817
|
-
usd_amount: number;
|
|
3818
|
-
/** @description Per-position mint amounts */
|
|
3819
|
-
position_details?: components["schemas"]["PositionDetail"][];
|
|
3820
|
-
exchange: components["schemas"]["PolymarketExchange"];
|
|
4390
|
+
/**
|
|
4391
|
+
* @description `TagBuilderRow` with builder display metadata (name, icon, links) merged
|
|
4392
|
+
* onto each row. Returned by `/polymarket/builders/tags/{tag}`.
|
|
4393
|
+
*/
|
|
4394
|
+
TagBuilderRowWithMetadata: components["schemas"]["TagBuilderRow"] & {
|
|
4395
|
+
metadata?: null | components["schemas"]["BuilderMetadataInline"];
|
|
3821
4396
|
};
|
|
3822
4397
|
/**
|
|
3823
4398
|
* @description Tagged enum for all oracle event types — serializes with `"event_type": "..."` discriminator
|
|
@@ -3928,38 +4503,13 @@ export interface components {
|
|
|
3928
4503
|
*/
|
|
3929
4504
|
builder_fee?: number | null;
|
|
3930
4505
|
};
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
buy_usd?: number | null;
|
|
3939
|
-
/** Format: double */
|
|
3940
|
-
sell_usd?: number | null;
|
|
3941
|
-
/** Format: double */
|
|
3942
|
-
redemption_usd?: number | null;
|
|
3943
|
-
/** Format: double */
|
|
3944
|
-
merge_usd?: number | null;
|
|
3945
|
-
/** Format: double */
|
|
3946
|
-
total_fees?: number | null;
|
|
3947
|
-
/** Format: int64 */
|
|
3948
|
-
total_buys?: number | null;
|
|
3949
|
-
/** Format: int64 */
|
|
3950
|
-
total_sells?: number | null;
|
|
3951
|
-
/** Format: int64 */
|
|
3952
|
-
total_redemptions?: number | null;
|
|
3953
|
-
/** Format: int64 */
|
|
3954
|
-
total_merges?: number | null;
|
|
3955
|
-
/** Format: int64 */
|
|
3956
|
-
outcomes_traded?: number | null;
|
|
3957
|
-
/** Format: int64 */
|
|
3958
|
-
winning_outcomes?: number | null;
|
|
3959
|
-
/** Format: int64 */
|
|
3960
|
-
first_trade_at?: number | null;
|
|
3961
|
-
/** Format: int64 */
|
|
3962
|
-
last_trade_at?: number | null;
|
|
4506
|
+
TraderProfile: {
|
|
4507
|
+
address: string;
|
|
4508
|
+
name?: string | null;
|
|
4509
|
+
pseudonym?: string | null;
|
|
4510
|
+
profile_image?: string | null;
|
|
4511
|
+
x_username?: string | null;
|
|
4512
|
+
verified_badge: boolean;
|
|
3963
4513
|
};
|
|
3964
4514
|
OrderbookHistoryRow: {
|
|
3965
4515
|
/** Format: int64 */
|
|
@@ -4018,29 +4568,29 @@ export interface components {
|
|
|
4018
4568
|
/** Format: int32 */
|
|
4019
4569
|
ask_levels?: number | null;
|
|
4020
4570
|
};
|
|
4021
|
-
/** @description
|
|
4571
|
+
/** @description Holders grouped by outcome. */
|
|
4022
4572
|
OutcomeHolders: {
|
|
4023
4573
|
/**
|
|
4024
4574
|
* Format: int32
|
|
4025
|
-
* @description Outcome index (0, 1, etc.)
|
|
4575
|
+
* @description Outcome index (0, 1, etc.).
|
|
4026
4576
|
*/
|
|
4027
4577
|
outcome_index: number;
|
|
4028
|
-
/** @description Outcome name (Yes, No, etc.) */
|
|
4578
|
+
/** @description Outcome name (Yes, No, etc.). */
|
|
4029
4579
|
outcome_name: string;
|
|
4030
|
-
/** @description Position ID for this outcome */
|
|
4580
|
+
/** @description Position ID for this outcome. */
|
|
4031
4581
|
position_id: string;
|
|
4032
4582
|
/**
|
|
4033
4583
|
* Format: double
|
|
4034
|
-
* @description Current price/probability
|
|
4584
|
+
* @description Current price / probability.
|
|
4035
4585
|
*/
|
|
4036
4586
|
price?: number | null;
|
|
4037
4587
|
/**
|
|
4038
4588
|
* Format: int64
|
|
4039
|
-
* @description Total holders
|
|
4589
|
+
* @description Total holders for this outcome.
|
|
4040
4590
|
*/
|
|
4041
4591
|
total_holders: number;
|
|
4042
|
-
/** @description Top holders for this outcome */
|
|
4043
|
-
holders: components["schemas"]["
|
|
4592
|
+
/** @description Top holders for this outcome. */
|
|
4593
|
+
holders: components["schemas"]["MarketHolder"][];
|
|
4044
4594
|
};
|
|
4045
4595
|
/** @enum {string} */
|
|
4046
4596
|
OutcomeIndex: "0" | "1";
|
|
@@ -4198,16 +4748,17 @@ export interface components {
|
|
|
4198
4748
|
/** @description Pagination key for the next page (if has_more is true) */
|
|
4199
4749
|
pagination_key?: string | null;
|
|
4200
4750
|
};
|
|
4201
|
-
/** @
|
|
4751
|
+
/** @enum {string} */
|
|
4752
|
+
PnlAnalyticsTimeframe: "1d" | "24h" | "7d" | "30d" | "lifetime";
|
|
4202
4753
|
PnlCandleEntry: {
|
|
4203
4754
|
/**
|
|
4204
4755
|
* Format: int64
|
|
4205
|
-
* @description Timestamp in epoch seconds (start of bucket window)
|
|
4756
|
+
* @description Timestamp in epoch seconds (start of bucket window).
|
|
4206
4757
|
*/
|
|
4207
4758
|
t: number;
|
|
4208
4759
|
/**
|
|
4209
4760
|
* Format: double
|
|
4210
|
-
* @description
|
|
4761
|
+
* @description Daily PnL in USD for this calendar bucket.
|
|
4211
4762
|
*/
|
|
4212
4763
|
pnl: number;
|
|
4213
4764
|
};
|
|
@@ -4215,160 +4766,262 @@ export interface components {
|
|
|
4215
4766
|
PnlCandleResolution: "1m" | "1h" | "4h" | "1d" | "auto";
|
|
4216
4767
|
/** @enum {string} */
|
|
4217
4768
|
PnlCandleTimeframe: "1d" | "7d" | "30d" | "lifetime";
|
|
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
|
-
|
|
4769
|
+
PnlCandlestickBar: {
|
|
4770
|
+
/**
|
|
4771
|
+
* Format: int64
|
|
4772
|
+
* @description Timestamp in epoch seconds at the start of the candle bucket.
|
|
4773
|
+
*/
|
|
4774
|
+
t: number;
|
|
4775
|
+
/**
|
|
4776
|
+
* Format: int64
|
|
4777
|
+
* @description Opening block for this candle.
|
|
4778
|
+
*/
|
|
4779
|
+
ob: number;
|
|
4780
|
+
/**
|
|
4781
|
+
* Format: int64
|
|
4782
|
+
* @description Closing block for this candle.
|
|
4783
|
+
*/
|
|
4784
|
+
cb: number;
|
|
4785
|
+
/**
|
|
4786
|
+
* Format: double
|
|
4787
|
+
* @description Latest USDC balance at candle close.
|
|
4788
|
+
*/
|
|
4789
|
+
ub: number;
|
|
4790
|
+
/**
|
|
4791
|
+
* Format: double
|
|
4792
|
+
* @description Latest pUSD balance at candle close.
|
|
4793
|
+
*/
|
|
4794
|
+
pb: number;
|
|
4795
|
+
/**
|
|
4796
|
+
* Format: int32
|
|
4797
|
+
* @description Latest open position count at candle close.
|
|
4798
|
+
*/
|
|
4799
|
+
nop: number;
|
|
4800
|
+
/**
|
|
4801
|
+
* Format: double
|
|
4802
|
+
* @description Total PnL low value for the candle (= realized + unrealized).
|
|
4803
|
+
*/
|
|
4804
|
+
l?: number | null;
|
|
4247
4805
|
/** Format: double */
|
|
4248
|
-
|
|
4249
|
-
/** Format:
|
|
4250
|
-
|
|
4251
|
-
/** Format:
|
|
4252
|
-
|
|
4253
|
-
/** Format: int64 */
|
|
4254
|
-
total_buys?: number | null;
|
|
4255
|
-
/** Format: int64 */
|
|
4256
|
-
total_sells?: number | null;
|
|
4257
|
-
/** Format: int64 */
|
|
4258
|
-
total_redemptions?: number | null;
|
|
4259
|
-
/** Format: int64 */
|
|
4260
|
-
total_merges?: number | null;
|
|
4806
|
+
h?: number | null;
|
|
4807
|
+
/** Format: double */
|
|
4808
|
+
o?: number | null;
|
|
4809
|
+
/** Format: double */
|
|
4810
|
+
c?: number | null;
|
|
4261
4811
|
/** Format: double */
|
|
4262
|
-
|
|
4812
|
+
rl?: number | null;
|
|
4263
4813
|
/** Format: double */
|
|
4264
|
-
|
|
4814
|
+
rh?: number | null;
|
|
4265
4815
|
/** Format: double */
|
|
4266
|
-
|
|
4816
|
+
ro?: number | null;
|
|
4267
4817
|
/** Format: double */
|
|
4268
|
-
|
|
4818
|
+
rc?: number | null;
|
|
4269
4819
|
/** Format: double */
|
|
4270
|
-
|
|
4271
|
-
/** Format: int64 */
|
|
4272
|
-
markets_won?: number | null;
|
|
4273
|
-
/** Format: int64 */
|
|
4274
|
-
markets_lost?: number | null;
|
|
4820
|
+
ul?: number | null;
|
|
4275
4821
|
/** Format: double */
|
|
4276
|
-
|
|
4822
|
+
uh?: number | null;
|
|
4277
4823
|
/** Format: double */
|
|
4278
|
-
|
|
4824
|
+
uo?: number | null;
|
|
4279
4825
|
/** Format: double */
|
|
4280
|
-
|
|
4826
|
+
uc?: number | null;
|
|
4281
4827
|
/** Format: double */
|
|
4282
|
-
|
|
4828
|
+
pl?: number | null;
|
|
4283
4829
|
/** Format: double */
|
|
4284
|
-
|
|
4830
|
+
ph?: number | null;
|
|
4285
4831
|
/** Format: double */
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
first_trade_at?: number | null;
|
|
4290
|
-
/** Format: int64 */
|
|
4291
|
-
last_trade_at?: number | null;
|
|
4832
|
+
po?: number | null;
|
|
4833
|
+
/** Format: double */
|
|
4834
|
+
pc?: number | null;
|
|
4292
4835
|
};
|
|
4293
|
-
|
|
4836
|
+
PnlChangeWindow: {
|
|
4837
|
+
timeframe: string;
|
|
4294
4838
|
/** Format: int64 */
|
|
4295
|
-
|
|
4839
|
+
from: number;
|
|
4840
|
+
/** Format: int64 */
|
|
4841
|
+
to: number;
|
|
4296
4842
|
/** Format: double */
|
|
4297
|
-
|
|
4843
|
+
total_pnl_start: number;
|
|
4298
4844
|
/** Format: double */
|
|
4299
|
-
|
|
4845
|
+
total_pnl_end: number;
|
|
4300
4846
|
/** Format: double */
|
|
4301
|
-
|
|
4302
|
-
/** Format:
|
|
4303
|
-
|
|
4304
|
-
/** Format:
|
|
4305
|
-
|
|
4847
|
+
total_pnl_change: number;
|
|
4848
|
+
/** Format: double */
|
|
4849
|
+
total_pnl_change_pct?: number | null;
|
|
4850
|
+
/** Format: double */
|
|
4851
|
+
portfolio_start: number;
|
|
4852
|
+
/** Format: double */
|
|
4853
|
+
portfolio_end: number;
|
|
4854
|
+
/** Format: double */
|
|
4855
|
+
portfolio_change: number;
|
|
4856
|
+
/** Format: double */
|
|
4857
|
+
portfolio_change_pct?: number | null;
|
|
4858
|
+
/** Format: double */
|
|
4859
|
+
realized_pnl_change: number;
|
|
4860
|
+
/** Format: double */
|
|
4861
|
+
unrealized_pnl_change: number;
|
|
4862
|
+
/** Format: double */
|
|
4863
|
+
usdc_balance_change: number;
|
|
4864
|
+
/** Format: double */
|
|
4865
|
+
pusd_balance_change: number;
|
|
4306
4866
|
/** Format: int32 */
|
|
4307
|
-
|
|
4867
|
+
open_positions_change: number;
|
|
4308
4868
|
};
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4869
|
+
PnlChangesResponse: {
|
|
4870
|
+
latest?: null | components["schemas"]["PnlLatestSnapshot"];
|
|
4871
|
+
changes: components["schemas"]["PnlChangeWindow"][];
|
|
4872
|
+
};
|
|
4873
|
+
/** @description A single position exit, sized and labelled for overlay on the PnL chart. */
|
|
4874
|
+
PnlExitMarker: {
|
|
4875
|
+
/**
|
|
4876
|
+
* Format: int64
|
|
4877
|
+
* @description Exit time in unix seconds.
|
|
4878
|
+
*/
|
|
4879
|
+
t: number;
|
|
4880
|
+
/**
|
|
4881
|
+
* Format: int64
|
|
4882
|
+
* @description Block number the exit was recorded at.
|
|
4883
|
+
*/
|
|
4884
|
+
block: number;
|
|
4885
|
+
/** @description Market condition id. */
|
|
4886
|
+
condition: string;
|
|
4887
|
+
/** @description Outcome token id. */
|
|
4888
|
+
position: string;
|
|
4889
|
+
/** @description Event slug. */
|
|
4890
|
+
event_slug: string;
|
|
4891
|
+
/** @description Market slug. */
|
|
4892
|
+
market_slug: string;
|
|
4893
|
+
/** @description Market title. */
|
|
4894
|
+
title: string;
|
|
4895
|
+
/** @description Market question. */
|
|
4896
|
+
question: string;
|
|
4897
|
+
/** @description Market image URL. */
|
|
4898
|
+
image_url: string;
|
|
4899
|
+
/** @description Outcome name. */
|
|
4900
|
+
outcome: string;
|
|
4901
|
+
/**
|
|
4902
|
+
* Format: int32
|
|
4903
|
+
* @description Outcome index within the market, when known.
|
|
4904
|
+
*/
|
|
4905
|
+
outcome_index?: number | null;
|
|
4906
|
+
/**
|
|
4907
|
+
* @description Polymarket top-level category (e.g. "Politics"). Empty when the
|
|
4908
|
+
* market's tags hadn't resolved to a category at exit time.
|
|
4909
|
+
*/
|
|
4910
|
+
category: string;
|
|
4911
|
+
/**
|
|
4912
|
+
* Format: double
|
|
4913
|
+
* @description Realized PnL in USD for the position at exit.
|
|
4914
|
+
*/
|
|
4915
|
+
pnl_usd: number;
|
|
4916
|
+
/**
|
|
4917
|
+
* Format: double
|
|
4918
|
+
* @description Realized PnL percent for the position at exit.
|
|
4919
|
+
*/
|
|
4920
|
+
pnl_pct: number;
|
|
4921
|
+
/**
|
|
4922
|
+
* Format: double
|
|
4923
|
+
* @description Amount paid into the position, in USD.
|
|
4924
|
+
*/
|
|
4925
|
+
cost_basis_usd: number;
|
|
4926
|
+
/** @description Why the position closed. */
|
|
4927
|
+
reason: components["schemas"]["PnlExitReason"];
|
|
4312
4928
|
};
|
|
4313
4929
|
/**
|
|
4314
|
-
* @description
|
|
4315
|
-
*
|
|
4316
|
-
* distinct-address counters (`new_*` / `unique_*`) — those only carry
|
|
4317
|
-
* information for aggregations over many addresses (market, event, tag,
|
|
4318
|
-
* global), not for a single trader.
|
|
4930
|
+
* @description Reason a position closed: a 2×2 of resolved-vs-sold and win-vs-loss.
|
|
4931
|
+
* @enum {string}
|
|
4319
4932
|
*/
|
|
4320
|
-
|
|
4321
|
-
|
|
4933
|
+
PnlExitReason: "resolved_win" | "resolved_loss" | "sold_win" | "sold_loss";
|
|
4934
|
+
PnlLatestSnapshot: {
|
|
4935
|
+
/** Format: int64 */
|
|
4322
4936
|
t: number;
|
|
4323
4937
|
/** Format: double */
|
|
4324
|
-
|
|
4938
|
+
total_pnl: number;
|
|
4325
4939
|
/** Format: double */
|
|
4326
|
-
|
|
4940
|
+
realized_pnl: number;
|
|
4327
4941
|
/** Format: double */
|
|
4328
|
-
|
|
4942
|
+
unrealized_pnl: number;
|
|
4943
|
+
/** Format: double */
|
|
4944
|
+
portfolio_value: number;
|
|
4945
|
+
/** Format: double */
|
|
4946
|
+
usdc_balance: number;
|
|
4947
|
+
/** Format: double */
|
|
4948
|
+
pusd_balance: number;
|
|
4949
|
+
/** Format: int32 */
|
|
4950
|
+
num_open_positions: number;
|
|
4951
|
+
};
|
|
4952
|
+
PnlPeriodExtremes: {
|
|
4953
|
+
best?: null | components["schemas"]["PnlPeriodMetric"];
|
|
4954
|
+
worst?: null | components["schemas"]["PnlPeriodMetric"];
|
|
4955
|
+
};
|
|
4956
|
+
PnlPeriodMetric: {
|
|
4329
4957
|
/** Format: int64 */
|
|
4330
|
-
|
|
4958
|
+
from: number;
|
|
4331
4959
|
/** Format: int64 */
|
|
4332
|
-
|
|
4960
|
+
to: number;
|
|
4961
|
+
/** Format: double */
|
|
4962
|
+
change: number;
|
|
4963
|
+
/** Format: double */
|
|
4964
|
+
change_pct?: number | null;
|
|
4965
|
+
};
|
|
4966
|
+
PnlPeriodsResponse: {
|
|
4967
|
+
timeframe: string;
|
|
4968
|
+
resolution: string;
|
|
4333
4969
|
/** Format: int64 */
|
|
4334
|
-
|
|
4970
|
+
from?: number | null;
|
|
4335
4971
|
/** Format: int64 */
|
|
4336
|
-
|
|
4972
|
+
to?: number | null;
|
|
4973
|
+
points: number;
|
|
4974
|
+
total_pnl_day: components["schemas"]["PnlPeriodExtremes"];
|
|
4975
|
+
total_pnl_week: components["schemas"]["PnlPeriodExtremes"];
|
|
4976
|
+
total_pnl_month: components["schemas"]["PnlPeriodExtremes"];
|
|
4977
|
+
portfolio_day: components["schemas"]["PnlPeriodExtremes"];
|
|
4978
|
+
portfolio_week: components["schemas"]["PnlPeriodExtremes"];
|
|
4979
|
+
portfolio_month: components["schemas"]["PnlPeriodExtremes"];
|
|
4980
|
+
};
|
|
4981
|
+
PnlRiskMarketMetadata: {
|
|
4982
|
+
condition_id: string;
|
|
4983
|
+
market_slug?: string | null;
|
|
4984
|
+
event_slug?: string | null;
|
|
4985
|
+
question?: string | null;
|
|
4986
|
+
title?: string | null;
|
|
4987
|
+
image_url?: string | null;
|
|
4988
|
+
};
|
|
4989
|
+
PnlRiskMetric: {
|
|
4337
4990
|
/** Format: double */
|
|
4338
|
-
|
|
4339
|
-
/** Format: int64 */
|
|
4340
|
-
mc: number;
|
|
4991
|
+
max_drawdown: number;
|
|
4341
4992
|
/** Format: double */
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
sp: number;
|
|
4993
|
+
max_drawdown_pct?: number | null;
|
|
4994
|
+
max_drawdown_market?: null | components["schemas"]["PnlRiskMarketMetadata"];
|
|
4345
4995
|
/** Format: double */
|
|
4346
|
-
|
|
4996
|
+
current_drawdown: number;
|
|
4347
4997
|
/** Format: double */
|
|
4348
|
-
|
|
4998
|
+
current_drawdown_pct?: number | null;
|
|
4999
|
+
current_drawdown_market?: null | components["schemas"]["PnlRiskMarketMetadata"];
|
|
4349
5000
|
/** Format: double */
|
|
4350
|
-
|
|
5001
|
+
max_runup: number;
|
|
4351
5002
|
/** Format: double */
|
|
4352
|
-
|
|
5003
|
+
max_runup_pct?: number | null;
|
|
5004
|
+
max_runup_market?: null | components["schemas"]["PnlRiskMarketMetadata"];
|
|
4353
5005
|
/** Format: double */
|
|
4354
|
-
|
|
4355
|
-
/** Format:
|
|
4356
|
-
|
|
4357
|
-
/** Format:
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
/** Format: int64 */
|
|
4364
|
-
bd_1k: number;
|
|
4365
|
-
/** Format: int64 */
|
|
4366
|
-
bd_10k: number;
|
|
5006
|
+
high: number;
|
|
5007
|
+
/** Format: double */
|
|
5008
|
+
low: number;
|
|
5009
|
+
/** Format: double */
|
|
5010
|
+
latest: number;
|
|
5011
|
+
};
|
|
5012
|
+
PnlRiskResponse: {
|
|
5013
|
+
timeframe: string;
|
|
5014
|
+
resolution: string;
|
|
4367
5015
|
/** Format: int64 */
|
|
4368
|
-
|
|
5016
|
+
from?: number | null;
|
|
4369
5017
|
/** Format: int64 */
|
|
4370
|
-
|
|
5018
|
+
to?: number | null;
|
|
5019
|
+
points: number;
|
|
5020
|
+
total_pnl?: null | components["schemas"]["PnlRiskMetric"];
|
|
5021
|
+
portfolio?: null | components["schemas"]["PnlRiskMetric"];
|
|
4371
5022
|
};
|
|
5023
|
+
/** @enum {string} */
|
|
5024
|
+
PnlTimeframe: "1d" | "7d" | "30d" | "lifetime";
|
|
4372
5025
|
/**
|
|
4373
5026
|
* @description Polymarket UI category.
|
|
4374
5027
|
* @enum {string}
|
|
@@ -4449,8 +5102,6 @@ export interface components {
|
|
|
4449
5102
|
};
|
|
4450
5103
|
/**
|
|
4451
5104
|
* @description Polymarket exchange contract types.
|
|
4452
|
-
* `repr(u8)` discriminants double as the database column value — DO NOT renumber
|
|
4453
|
-
* existing variants. New variants get fresh numbers.
|
|
4454
5105
|
* @enum {string}
|
|
4455
5106
|
*/
|
|
4456
5107
|
PolymarketExchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "CTFExchangeV2" | "NegRiskExchangeV2" | "Unknown";
|
|
@@ -4568,6 +5219,15 @@ export interface components {
|
|
|
4568
5219
|
outcome_index: number;
|
|
4569
5220
|
data: components["schemas"]["PositionChartDataPoint"][];
|
|
4570
5221
|
};
|
|
5222
|
+
/**
|
|
5223
|
+
* @description Sort options accepted when `status=closed` is set on the positions
|
|
5224
|
+
* endpoint. `redemption_usd` is closed-only (the proceeds from
|
|
5225
|
+
* claiming the resolved outcome). Open-only fields such as
|
|
5226
|
+
* `current_value` and `redeemable` are excluded — once a position is
|
|
5227
|
+
* closed those values are no longer meaningful.
|
|
5228
|
+
* @enum {string}
|
|
5229
|
+
*/
|
|
5230
|
+
PositionClosedPnlSortBy: "realized_pnl_usd" | "total_pnl_usd" | "unrealized_pnl_usd" | "merge_usd" | "convert_collateral_usd" | "converted_count" | "converted_shares_gained" | "converted_shares_lost" | "last_traded_price" | "total_buy_usd" | "total_sell_usd" | "redemption_usd" | "total_buys" | "total_sells" | "total_shares_bought" | "total_shares_sold" | "avg_entry_price" | "avg_exit_price" | "avg_price" | "total_fees" | "first_trade_at" | "last_trade_at" | "realized_pnl_pct" | "total_pnl_pct" | "title" | "merge_count" | "split_count" | "end_date" | "is_neg_risk";
|
|
4571
5231
|
/** @description Per-position detail for Split/Merge/Redemption trades. */
|
|
4572
5232
|
PositionDetail: {
|
|
4573
5233
|
/** @description Market condition ID for this ERC1155 position. */
|
|
@@ -4575,38 +5235,234 @@ export interface components {
|
|
|
4575
5235
|
/** @description ERC1155 position ID */
|
|
4576
5236
|
position_id: string;
|
|
4577
5237
|
/**
|
|
4578
|
-
* Format: int32
|
|
4579
|
-
* @description Outcome index (0 = Yes, 1 = No for binary)
|
|
5238
|
+
* Format: int32
|
|
5239
|
+
* @description Outcome index (0 = Yes, 1 = No for binary)
|
|
5240
|
+
*/
|
|
5241
|
+
outcome_index: number;
|
|
5242
|
+
/** @description Outcome name (e.g. "Yes", "No"). Optional — may be omitted when the market metadata isn't yet available. */
|
|
5243
|
+
outcome?: string | null;
|
|
5244
|
+
/** @description Amount of shares created/burned/redeemed for this position */
|
|
5245
|
+
amount: string;
|
|
5246
|
+
/**
|
|
5247
|
+
* @description Collateral paid out for this specific position, when applicable.
|
|
5248
|
+
*
|
|
5249
|
+
* For NegRisk PositionsConverted this is allocated only to burned NO
|
|
5250
|
+
* inputs. YES output details intentionally carry zero collateral.
|
|
5251
|
+
*/
|
|
5252
|
+
collateral_amount?: string;
|
|
5253
|
+
};
|
|
5254
|
+
PositionEntry: {
|
|
5255
|
+
position_id?: string | null;
|
|
5256
|
+
condition_id?: string | null;
|
|
5257
|
+
market_slug?: string | null;
|
|
5258
|
+
event_slug?: string | null;
|
|
5259
|
+
category?: string | null;
|
|
5260
|
+
title?: string | null;
|
|
5261
|
+
question?: string | null;
|
|
5262
|
+
image_url?: string | null;
|
|
5263
|
+
trader?: null | components["schemas"]["TraderProfile"];
|
|
5264
|
+
outcome?: string | null;
|
|
5265
|
+
/** Format: int32 */
|
|
5266
|
+
outcome_index?: number | null;
|
|
5267
|
+
won?: boolean | null;
|
|
5268
|
+
/** Format: int64 */
|
|
5269
|
+
total_buys?: number | null;
|
|
5270
|
+
/** Format: int64 */
|
|
5271
|
+
total_sells?: number | null;
|
|
5272
|
+
/** Format: int64 */
|
|
5273
|
+
converted_count?: number | null;
|
|
5274
|
+
/** Format: double */
|
|
5275
|
+
converted_shares_gained?: number | null;
|
|
5276
|
+
/** Format: double */
|
|
5277
|
+
converted_shares_lost?: number | null;
|
|
5278
|
+
/** Format: double */
|
|
5279
|
+
total_shares_bought?: number | null;
|
|
5280
|
+
/** Format: double */
|
|
5281
|
+
total_shares_sold?: number | null;
|
|
5282
|
+
/** Format: double */
|
|
5283
|
+
total_buy_usd?: number | null;
|
|
5284
|
+
/** Format: double */
|
|
5285
|
+
total_sell_usd?: number | null;
|
|
5286
|
+
/** Format: double */
|
|
5287
|
+
redemption_usd?: number | null;
|
|
5288
|
+
/**
|
|
5289
|
+
* Format: double
|
|
5290
|
+
* @description USD value from merge activity.
|
|
5291
|
+
*/
|
|
5292
|
+
merge_usd?: number | null;
|
|
5293
|
+
/** Format: double */
|
|
5294
|
+
convert_collateral_usd?: number | null;
|
|
5295
|
+
/** Format: double */
|
|
5296
|
+
avg_entry_price?: number | null;
|
|
5297
|
+
/** Format: double */
|
|
5298
|
+
avg_exit_price?: number | null;
|
|
5299
|
+
/**
|
|
5300
|
+
* Format: double
|
|
5301
|
+
* @description Volume-weighted average trade price across buys and sells.
|
|
5302
|
+
*/
|
|
5303
|
+
avg_price?: number | null;
|
|
5304
|
+
/** Format: double */
|
|
5305
|
+
realized_pnl_usd?: number;
|
|
5306
|
+
/** Format: double */
|
|
5307
|
+
total_pnl_usd?: number;
|
|
5308
|
+
/** Format: double */
|
|
5309
|
+
unrealized_pnl_usd?: number;
|
|
5310
|
+
/** Format: double */
|
|
5311
|
+
total_fees?: number | null;
|
|
5312
|
+
/** Format: int64 */
|
|
5313
|
+
first_trade_at?: number | null;
|
|
5314
|
+
/** Format: int64 */
|
|
5315
|
+
last_trade_at?: number | null;
|
|
5316
|
+
/** Format: double */
|
|
5317
|
+
current_price?: number | null;
|
|
5318
|
+
/** Format: double */
|
|
5319
|
+
last_traded_price?: number | null;
|
|
5320
|
+
/** Format: double */
|
|
5321
|
+
current_shares_balance?: number | null;
|
|
5322
|
+
/** Format: double */
|
|
5323
|
+
current_value?: number | null;
|
|
5324
|
+
/** Format: double */
|
|
5325
|
+
realized_pnl_pct?: number | null;
|
|
5326
|
+
/** Format: double */
|
|
5327
|
+
total_pnl_pct?: number | null;
|
|
5328
|
+
/** Format: int64 */
|
|
5329
|
+
end_date?: number | null;
|
|
5330
|
+
is_neg_risk?: boolean | null;
|
|
5331
|
+
redeemable?: boolean | null;
|
|
5332
|
+
mergeable?: boolean | null;
|
|
5333
|
+
};
|
|
5334
|
+
/**
|
|
5335
|
+
* @description Sort field for trader position exits.
|
|
5336
|
+
* @enum {string}
|
|
5337
|
+
*/
|
|
5338
|
+
PositionExitPnlSortBy: "exit_time" | "pnl_usd" | "pnl_pct" | "cost_basis_usd";
|
|
5339
|
+
/** @description Position holder. */
|
|
5340
|
+
PositionHolder: {
|
|
5341
|
+
/** @description Trader profile. */
|
|
5342
|
+
trader: components["schemas"]["Trader"];
|
|
5343
|
+
/** @description Position shares held (raw balance as decimal string for precision). */
|
|
5344
|
+
shares: string;
|
|
5345
|
+
/** @description USD value of shares (shares × latest price). */
|
|
5346
|
+
shares_usd?: string | null;
|
|
5347
|
+
/** @description USD balance of the holder's wallet. */
|
|
5348
|
+
usd_balance?: string | null;
|
|
5349
|
+
pnl?: null | components["schemas"]["PositionHolderPnl"];
|
|
5350
|
+
};
|
|
5351
|
+
/** @description Position holder history candle. */
|
|
5352
|
+
PositionHolderHistoryCandle: {
|
|
5353
|
+
/**
|
|
5354
|
+
* Format: int64
|
|
5355
|
+
* @description Unix seconds.
|
|
5356
|
+
*/
|
|
5357
|
+
t: number;
|
|
5358
|
+
/**
|
|
5359
|
+
* Format: int64
|
|
5360
|
+
* @description Holder count.
|
|
5361
|
+
*/
|
|
5362
|
+
h?: number | null;
|
|
5363
|
+
/**
|
|
5364
|
+
* Format: int64
|
|
5365
|
+
* @description Latest block.
|
|
5366
|
+
*/
|
|
5367
|
+
block?: number | null;
|
|
5368
|
+
/**
|
|
5369
|
+
* Format: double
|
|
5370
|
+
* @description Total open share balance.
|
|
5371
|
+
*/
|
|
5372
|
+
tosb?: number | null;
|
|
5373
|
+
/**
|
|
5374
|
+
* Format: double
|
|
5375
|
+
* @description Total cost basis.
|
|
5376
|
+
*/
|
|
5377
|
+
cb?: number | null;
|
|
5378
|
+
/**
|
|
5379
|
+
* Format: int64
|
|
5380
|
+
* @description Market holder count.
|
|
5381
|
+
*/
|
|
5382
|
+
mh?: number | null;
|
|
5383
|
+
/**
|
|
5384
|
+
* Format: int64
|
|
5385
|
+
* @description Event holder count.
|
|
5386
|
+
*/
|
|
5387
|
+
eh?: number | null;
|
|
5388
|
+
};
|
|
5389
|
+
/** @description Position-level PnL for a holder, included when `include_pnl=true`. */
|
|
5390
|
+
PositionHolderPnl: {
|
|
5391
|
+
/** Format: int64 */
|
|
5392
|
+
total_buys?: number | null;
|
|
5393
|
+
/** Format: int64 */
|
|
5394
|
+
total_sells?: number | null;
|
|
5395
|
+
/** Format: double */
|
|
5396
|
+
total_shares_bought?: number | null;
|
|
5397
|
+
/** Format: double */
|
|
5398
|
+
total_shares_sold?: number | null;
|
|
5399
|
+
/** Format: double */
|
|
5400
|
+
total_buy_usd?: number | null;
|
|
5401
|
+
/** Format: double */
|
|
5402
|
+
total_sell_usd?: number | null;
|
|
5403
|
+
/** Format: double */
|
|
5404
|
+
redemption_usd?: number | null;
|
|
5405
|
+
/**
|
|
5406
|
+
* Format: double
|
|
5407
|
+
* @description Merge proceeds (combining outcome tokens back to collateral).
|
|
5408
|
+
* Counted toward realized PnL alongside sells and redemptions.
|
|
4580
5409
|
*/
|
|
4581
|
-
|
|
4582
|
-
/**
|
|
4583
|
-
|
|
4584
|
-
/**
|
|
4585
|
-
|
|
5410
|
+
merge_usd?: number | null;
|
|
5411
|
+
/** Format: double */
|
|
5412
|
+
convert_collateral_usd?: number | null;
|
|
5413
|
+
/** Format: int64 */
|
|
5414
|
+
converted_count?: number | null;
|
|
5415
|
+
/** Format: double */
|
|
5416
|
+
converted_shares_gained?: number | null;
|
|
5417
|
+
/** Format: double */
|
|
5418
|
+
converted_shares_lost?: number | null;
|
|
5419
|
+
/** Format: double */
|
|
5420
|
+
avg_entry_price?: number | null;
|
|
5421
|
+
/** Format: double */
|
|
5422
|
+
avg_exit_price?: number | null;
|
|
4586
5423
|
/**
|
|
4587
|
-
*
|
|
4588
|
-
*
|
|
4589
|
-
* For NegRisk PositionsConverted this is allocated only to burned NO
|
|
4590
|
-
* inputs. YES output details intentionally carry zero collateral.
|
|
5424
|
+
* Format: double
|
|
5425
|
+
* @description Volume-weighted average trade price across buys + sells.
|
|
4591
5426
|
*/
|
|
4592
|
-
|
|
5427
|
+
avg_price?: number | null;
|
|
5428
|
+
/** Format: double */
|
|
5429
|
+
realized_pnl_usd?: number;
|
|
5430
|
+
/** Format: double */
|
|
5431
|
+
total_pnl_usd?: number;
|
|
5432
|
+
/** Format: double */
|
|
5433
|
+
unrealized_pnl_usd?: number;
|
|
5434
|
+
/** Format: double */
|
|
5435
|
+
total_fees?: number | null;
|
|
5436
|
+
/** Format: int64 */
|
|
5437
|
+
first_trade_at?: number | null;
|
|
5438
|
+
/** Format: int64 */
|
|
5439
|
+
last_trade_at?: number | null;
|
|
5440
|
+
/** Format: double */
|
|
5441
|
+
last_traded_price?: number | null;
|
|
5442
|
+
/** Format: double */
|
|
5443
|
+
realized_pnl_pct?: number | null;
|
|
5444
|
+
/** Format: double */
|
|
5445
|
+
total_pnl_pct?: number | null;
|
|
5446
|
+
won?: boolean | null;
|
|
5447
|
+
redeemable?: boolean | null;
|
|
5448
|
+
mergeable?: boolean | null;
|
|
4593
5449
|
};
|
|
4594
|
-
/** @description Response for position (position_id) holders endpoint */
|
|
5450
|
+
/** @description Response for position (position_id) holders endpoint. */
|
|
4595
5451
|
PositionHoldersResponse: {
|
|
4596
|
-
/** @description Position ID (ERC1155 token ID) */
|
|
5452
|
+
/** @description Position ID (ERC1155 token ID). */
|
|
4597
5453
|
position_id: string;
|
|
4598
|
-
/** @description Condition ID this position belongs to */
|
|
5454
|
+
/** @description Condition ID this position belongs to. */
|
|
4599
5455
|
condition_id?: string | null;
|
|
4600
|
-
/** @description Outcome name */
|
|
5456
|
+
/** @description Outcome name (Yes, No, etc.). */
|
|
4601
5457
|
outcome_name?: string | null;
|
|
4602
5458
|
/**
|
|
4603
5459
|
* Format: int32
|
|
4604
|
-
* @description Outcome index
|
|
5460
|
+
* @description Outcome index.
|
|
4605
5461
|
*/
|
|
4606
5462
|
outcome_index?: number | null;
|
|
4607
5463
|
/**
|
|
4608
5464
|
* Format: double
|
|
4609
|
-
* @description Current price
|
|
5465
|
+
* @description Current price / probability.
|
|
4610
5466
|
*/
|
|
4611
5467
|
price?: number | null;
|
|
4612
5468
|
/**
|
|
@@ -4614,8 +5470,8 @@ export interface components {
|
|
|
4614
5470
|
* @description Total holders of this position.
|
|
4615
5471
|
*/
|
|
4616
5472
|
total_holders: number;
|
|
4617
|
-
/** @description Top holders */
|
|
4618
|
-
holders: components["schemas"]["
|
|
5473
|
+
/** @description Top holders. */
|
|
5474
|
+
holders: components["schemas"]["PositionHolder"][];
|
|
4619
5475
|
};
|
|
4620
5476
|
/** @description Response type for position metrics query */
|
|
4621
5477
|
PositionMetricsResponse: {
|
|
@@ -4691,12 +5547,26 @@ export interface components {
|
|
|
4691
5547
|
/** Format: double */
|
|
4692
5548
|
avg_sell_shares: number;
|
|
4693
5549
|
};
|
|
4694
|
-
/** @enum {string} */
|
|
4695
|
-
PositionPnlSortBy: "realized_pnl_usd" | "total_buy_usd" | "total_sell_usd" | "redemption_usd" | "total_buys" | "total_sells" | "total_shares_bought" | "total_shares_sold" | "avg_entry_price" | "avg_exit_price" | "total_fees" | "first_trade_at" | "last_trade_at" | "current_value" | "realized_pnl_pct" | "title";
|
|
4696
5550
|
/**
|
|
4697
|
-
* @description
|
|
5551
|
+
* @description Sort options accepted when `status=open` is set on the positions
|
|
5552
|
+
* endpoint. Mark-to-market fields (`current_value`, `current_price`,
|
|
5553
|
+
* `current_shares_balance`) and the per-position action flags
|
|
5554
|
+
* (`redeemable`, `mergeable`) are exclusive to open positions.
|
|
5555
|
+
* @enum {string}
|
|
5556
|
+
*/
|
|
5557
|
+
PositionOpenPnlSortBy: "realized_pnl_usd" | "total_pnl_usd" | "unrealized_pnl_usd" | "merge_usd" | "convert_collateral_usd" | "converted_count" | "converted_shares_gained" | "converted_shares_lost" | "last_traded_price" | "total_buy_usd" | "total_sell_usd" | "total_buys" | "total_sells" | "total_shares_bought" | "total_shares_sold" | "avg_entry_price" | "avg_exit_price" | "avg_price" | "total_fees" | "first_trade_at" | "last_trade_at" | "current_value" | "realized_pnl_pct" | "total_pnl_pct" | "title" | "current_price" | "current_shares_balance" | "merge_count" | "split_count" | "end_date" | "is_neg_risk" | "redeemable" | "mergeable";
|
|
5558
|
+
/**
|
|
5559
|
+
* @description Union of every sort_by value accepted by the positions endpoint
|
|
5560
|
+
* across both `status=open` and `status=closed`. Note that some
|
|
5561
|
+
* options are only meaningful for one status — for example
|
|
5562
|
+
* `current_value` / `current_price` / `redeemable` / `mergeable`
|
|
5563
|
+
* only apply to open positions, while `redemption_usd` only applies
|
|
5564
|
+
* to closed ones. See `PositionOpenPnlSortBy` and
|
|
5565
|
+
* `PositionClosedPnlSortBy` for the exact per-status whitelists.
|
|
4698
5566
|
* @enum {string}
|
|
4699
5567
|
*/
|
|
5568
|
+
PositionPnlSortBy: "realized_pnl_usd" | "total_pnl_usd" | "unrealized_pnl_usd" | "merge_usd" | "convert_collateral_usd" | "converted_count" | "converted_shares_gained" | "converted_shares_lost" | "last_traded_price" | "total_buy_usd" | "total_sell_usd" | "redemption_usd" | "total_buys" | "total_sells" | "total_shares_bought" | "total_shares_sold" | "avg_entry_price" | "avg_exit_price" | "avg_price" | "total_fees" | "first_trade_at" | "last_trade_at" | "current_value" | "realized_pnl_pct" | "total_pnl_pct" | "current_price" | "current_shares_balance" | "merge_count" | "split_count" | "title" | "end_date" | "is_neg_risk" | "redeemable" | "mergeable";
|
|
5569
|
+
/** @enum {string} */
|
|
4700
5570
|
PositionStatus: "open" | "closed";
|
|
4701
5571
|
PositionVolumeChartResponse: {
|
|
4702
5572
|
volumes: components["schemas"]["PositionVolumeDataPoint"][];
|
|
@@ -4750,36 +5620,25 @@ export interface components {
|
|
|
4750
5620
|
exchange: components["schemas"]["PolymarketExchange"];
|
|
4751
5621
|
};
|
|
4752
5622
|
/**
|
|
4753
|
-
* @description
|
|
5623
|
+
* @description Timeframe values accepted by webhook metric, milestone, spike, and asset-price filters.
|
|
4754
5624
|
* @enum {string}
|
|
4755
5625
|
*/
|
|
4756
|
-
|
|
5626
|
+
WebhookTimeframe: "1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "6h" | "1d" | "24h" | "7d" | "30d" | "lifetime";
|
|
4757
5627
|
/**
|
|
4758
|
-
* @description
|
|
4759
|
-
*
|
|
4760
|
-
*
|
|
5628
|
+
* @description Trader profile info embedded in API responses.
|
|
5629
|
+
*
|
|
5630
|
+
* Used in:
|
|
5631
|
+
* - holders endpoints (market/event holders)
|
|
5632
|
+
* - trades endpoints
|
|
5633
|
+
* - leaderboard endpoints
|
|
4761
5634
|
*/
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
|
|
4766
|
-
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
/** Format: double */
|
|
4770
|
-
merge_volume_usd?: number | null;
|
|
4771
|
-
/** Format: double */
|
|
4772
|
-
split_volume_usd?: number | null;
|
|
4773
|
-
/** Format: double */
|
|
4774
|
-
txn_count?: number | null;
|
|
4775
|
-
/** Format: double */
|
|
4776
|
-
fees_usd?: number | null;
|
|
4777
|
-
/** Format: double */
|
|
4778
|
-
shares_volume?: number | null;
|
|
4779
|
-
/** Format: double */
|
|
4780
|
-
yes_volume_usd?: number | null;
|
|
4781
|
-
/** Format: double */
|
|
4782
|
-
no_volume_usd?: number | null;
|
|
5635
|
+
Trader: {
|
|
5636
|
+
address: string;
|
|
5637
|
+
name?: string | null;
|
|
5638
|
+
pseudonym?: string | null;
|
|
5639
|
+
profile_image?: string | null;
|
|
5640
|
+
x_username?: string | null;
|
|
5641
|
+
verified_badge?: boolean;
|
|
4783
5642
|
};
|
|
4784
5643
|
PredictionCandlestickBar: {
|
|
4785
5644
|
/** Format: double */
|
|
@@ -5057,10 +5916,13 @@ export interface components {
|
|
|
5057
5916
|
position_details?: components["schemas"]["PositionDetail"][];
|
|
5058
5917
|
exchange: components["schemas"]["PolymarketExchange"];
|
|
5059
5918
|
};
|
|
5919
|
+
/**
|
|
5920
|
+
* @description Crypto asset symbols accepted by `asset_price_tick` and `asset_price_window_update` filters.
|
|
5921
|
+
* @enum {string}
|
|
5922
|
+
*/
|
|
5923
|
+
WebhookAssetSymbol: "BTC" | "ETH" | "SOL" | "XRP" | "DOGE" | "BNB" | "HYPE";
|
|
5060
5924
|
/** @enum {string} */
|
|
5061
|
-
|
|
5062
|
-
/** @enum {string} */
|
|
5063
|
-
TradeType: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "22" | "23" | "24";
|
|
5925
|
+
TraderPnlSortBy: "realized_pnl_usd" | "total_pnl_usd" | "unrealized_pnl_usd" | "realized_pnl_pct" | "total_pnl_pct" | "usd_balance" | "total_volume_usd" | "markets_traded" | "events_traded" | "categories_traded" | "markets_won" | "markets_lost" | "market_win_rate_pct" | "avg_win_usd" | "avg_loss_usd" | "profit_factor" | "total_buys" | "total_sells" | "total_redemptions" | "total_merges" | "total_fees" | "total_wins_usd" | "total_losses_usd" | "best_trade_pnl_usd" | "worst_trade_pnl_usd" | "buy_volume_usd" | "sell_volume_usd" | "redemption_volume_usd" | "merge_volume_usd" | "split_volume_usd" | "total_splits" | "total_converts" | "maker_rebate_count" | "maker_rebate_usd" | "reward_count" | "reward_usd" | "yield_count" | "yield_usd" | "avg_hold_time_seconds" | "first_trade_at" | "last_trade_at" | "open_positions_value" | "open_position_count";
|
|
5064
5926
|
/** @description Output payload for RegisterToken events (YES/NO token pair registered for a condition). */
|
|
5065
5927
|
RegisterTokenTrade: {
|
|
5066
5928
|
id: string;
|
|
@@ -5084,44 +5946,14 @@ export interface components {
|
|
|
5084
5946
|
event_slug?: string | null;
|
|
5085
5947
|
exchange: components["schemas"]["PolymarketExchange"];
|
|
5086
5948
|
};
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
/** Format: double */
|
|
5096
|
-
buy_usd?: number | null;
|
|
5097
|
-
/** Format: double */
|
|
5098
|
-
sell_usd?: number | null;
|
|
5099
|
-
/** Format: double */
|
|
5100
|
-
redemption_usd?: number | null;
|
|
5101
|
-
/** Format: double */
|
|
5102
|
-
merge_usd?: number | null;
|
|
5103
|
-
/** Format: double */
|
|
5104
|
-
total_fees?: number | null;
|
|
5105
|
-
/** Format: int64 */
|
|
5106
|
-
total_buys?: number | null;
|
|
5107
|
-
/** Format: int64 */
|
|
5108
|
-
total_sells?: number | null;
|
|
5109
|
-
/** Format: int64 */
|
|
5110
|
-
total_redemptions?: number | null;
|
|
5111
|
-
/** Format: int64 */
|
|
5112
|
-
total_merges?: number | null;
|
|
5113
|
-
/** Format: int64 */
|
|
5114
|
-
markets_traded?: number | null;
|
|
5115
|
-
/** Format: int64 */
|
|
5116
|
-
outcomes_traded?: number | null;
|
|
5117
|
-
/** Format: int64 */
|
|
5118
|
-
winning_markets?: number | null;
|
|
5119
|
-
/** Format: int64 */
|
|
5120
|
-
losing_markets?: number | null;
|
|
5121
|
-
/** Format: int64 */
|
|
5122
|
-
first_trade_at?: number | null;
|
|
5123
|
-
/** Format: int64 */
|
|
5124
|
-
last_trade_at?: number | null;
|
|
5949
|
+
/** @description Trader profile info - backwards compatibility */
|
|
5950
|
+
TraderInfo: {
|
|
5951
|
+
address: string;
|
|
5952
|
+
name?: string | null;
|
|
5953
|
+
pseudonym?: string | null;
|
|
5954
|
+
profile_image?: string | null;
|
|
5955
|
+
x_username?: string | null;
|
|
5956
|
+
verified_badge?: boolean;
|
|
5125
5957
|
};
|
|
5126
5958
|
/** @description V2 UMA OOv2: a price request was made (market initialization). */
|
|
5127
5959
|
RequestPriceEvent: {
|
|
@@ -5176,132 +6008,23 @@ export interface components {
|
|
|
5176
6008
|
/** Format: double */
|
|
5177
6009
|
d30: number;
|
|
5178
6010
|
};
|
|
5179
|
-
|
|
5180
|
-
|
|
5181
|
-
|
|
5182
|
-
|
|
5183
|
-
|
|
5184
|
-
|
|
5185
|
-
|
|
5186
|
-
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
|
|
5195
|
-
|
|
5196
|
-
/** Format: double */
|
|
5197
|
-
total_volume_usd?: number | null;
|
|
5198
|
-
/** Format: double */
|
|
5199
|
-
buy_usd?: number | null;
|
|
5200
|
-
/** Format: double */
|
|
5201
|
-
sell_usd?: number | null;
|
|
5202
|
-
/** Format: double */
|
|
5203
|
-
redemption_usd?: number | null;
|
|
5204
|
-
/** Format: double */
|
|
5205
|
-
merge_usd?: number | null;
|
|
5206
|
-
/** Format: double */
|
|
5207
|
-
realized_pnl_usd?: number | null;
|
|
5208
|
-
/** Format: int64 */
|
|
5209
|
-
winning_markets?: number | null;
|
|
5210
|
-
/** Format: int64 */
|
|
5211
|
-
losing_markets?: number | null;
|
|
5212
|
-
/** Format: double */
|
|
5213
|
-
total_fees?: number | null;
|
|
5214
|
-
/** Format: int64 */
|
|
5215
|
-
first_trade_at?: number | null;
|
|
5216
|
-
/** Format: int64 */
|
|
5217
|
-
last_trade_at?: number | null;
|
|
5218
|
-
/** Format: double */
|
|
5219
|
-
realized_pnl_pct?: number | null;
|
|
5220
|
-
};
|
|
5221
|
-
/**
|
|
5222
|
-
* @description Bucket row returned by both `/analytics/timeseries` (cumulative values
|
|
5223
|
-
* at end of bucket) and `/analytics/deltas` (per-bucket deltas). All metrics
|
|
5224
|
-
* the snapshot `/counts` returns are included.
|
|
5225
|
-
*
|
|
5226
|
-
* Short field names for compact JSON responses:
|
|
5227
|
-
* t=bucket (unix seconds), v=volume_usd, bv=buy_volume_usd, sv=sell_volume_usd,
|
|
5228
|
-
* ut=unique_traders, um=unique_makers, uk=unique_takers,
|
|
5229
|
-
* tc=txn_count, bc=buy_count, sc=sell_count,
|
|
5230
|
-
* rc=redemption_count, rv=redemption_volume_usd, mc=merge_count, mv=merge_volume_usd,
|
|
5231
|
-
* sp=split_count, spv=split_volume_usd, f=fees_usd, sh=shares_volume,
|
|
5232
|
-
* yv=yes_volume_usd, nv=no_volume_usd, yc=yes_count, nc=no_count,
|
|
5233
|
-
* bd_*=buy distribution by USD bucket
|
|
5234
|
-
*/
|
|
5235
|
-
TimeBucketRow: {
|
|
5236
|
-
/** Format: int32 */
|
|
5237
|
-
t: number;
|
|
5238
|
-
/** Format: double */
|
|
5239
|
-
v: number;
|
|
5240
|
-
/** Format: double */
|
|
5241
|
-
bv: number;
|
|
5242
|
-
/** Format: double */
|
|
5243
|
-
sv: number;
|
|
5244
|
-
/** Format: int64 */
|
|
5245
|
-
tc: number;
|
|
5246
|
-
/** Format: int64 */
|
|
5247
|
-
bc: number;
|
|
5248
|
-
/** Format: int64 */
|
|
5249
|
-
sc: number;
|
|
5250
|
-
/** Format: int64 */
|
|
5251
|
-
rc: number;
|
|
5252
|
-
/** Format: double */
|
|
5253
|
-
rv: number;
|
|
5254
|
-
/** Format: int64 */
|
|
5255
|
-
mc: number;
|
|
5256
|
-
/** Format: double */
|
|
5257
|
-
mv: number;
|
|
5258
|
-
/** Format: int64 */
|
|
5259
|
-
sp: number;
|
|
5260
|
-
/** Format: double */
|
|
5261
|
-
spv: number;
|
|
5262
|
-
/** Format: double */
|
|
5263
|
-
f: number;
|
|
5264
|
-
/** Format: double */
|
|
5265
|
-
sh: number;
|
|
5266
|
-
/** Format: double */
|
|
5267
|
-
yv: number;
|
|
5268
|
-
/** Format: double */
|
|
5269
|
-
nv: number;
|
|
5270
|
-
/** Format: int64 */
|
|
5271
|
-
yc: number;
|
|
5272
|
-
/** Format: int64 */
|
|
5273
|
-
nc: number;
|
|
5274
|
-
/**
|
|
5275
|
-
* Format: int64
|
|
5276
|
-
* @description Buy distribution — count of buy trades falling in each USD bucket.
|
|
5277
|
-
*/
|
|
5278
|
-
bd_u10: number;
|
|
5279
|
-
/** Format: int64 */
|
|
5280
|
-
bd_100: number;
|
|
5281
|
-
/** Format: int64 */
|
|
5282
|
-
bd_1k: number;
|
|
5283
|
-
/** Format: int64 */
|
|
5284
|
-
bd_10k: number;
|
|
5285
|
-
/** Format: int64 */
|
|
5286
|
-
bd_50k: number;
|
|
5287
|
-
/** Format: int64 */
|
|
5288
|
-
bd_50p: number;
|
|
5289
|
-
/**
|
|
5290
|
-
* Format: int64
|
|
5291
|
-
* @description Distinct traders ACTIVE in this bucket (window-unique, not first-time).
|
|
5292
|
-
*/
|
|
5293
|
-
ut: number;
|
|
5294
|
-
/**
|
|
5295
|
-
* Format: int64
|
|
5296
|
-
* @description Distinct makers active in this bucket.
|
|
5297
|
-
*/
|
|
5298
|
-
um: number;
|
|
5299
|
-
/**
|
|
5300
|
-
* Format: int64
|
|
5301
|
-
* @description Distinct takers active in this bucket.
|
|
5302
|
-
*/
|
|
5303
|
-
uk: number;
|
|
5304
|
-
};
|
|
6011
|
+
TraderVolumeChartResponse: {
|
|
6012
|
+
volumes: components["schemas"]["TraderVolumeDataPoint"][];
|
|
6013
|
+
has_more: boolean;
|
|
6014
|
+
};
|
|
6015
|
+
/**
|
|
6016
|
+
* @description Market metadata for the market a trader's best / worst trade landed in.
|
|
6017
|
+
* Accompanies the existing flat `best_trade_pnl_usd` / `worst_trade_pnl_usd`
|
|
6018
|
+
* numerics on trader / event / category PnL summaries.
|
|
6019
|
+
*/
|
|
6020
|
+
TradeMarketRef: {
|
|
6021
|
+
condition_id?: string | null;
|
|
6022
|
+
market_slug?: string | null;
|
|
6023
|
+
title?: string | null;
|
|
6024
|
+
question?: string | null;
|
|
6025
|
+
image_url?: string | null;
|
|
6026
|
+
event_slug?: string | null;
|
|
6027
|
+
};
|
|
5305
6028
|
SearchResponse: {
|
|
5306
6029
|
events?: components["schemas"]["PolymarketEvent"][] | null;
|
|
5307
6030
|
events_pagination?: null | components["schemas"]["PaginationMeta"];
|
|
@@ -5349,11 +6072,64 @@ export interface components {
|
|
|
5349
6072
|
slug?: string | null;
|
|
5350
6073
|
event_slug?: string | null;
|
|
5351
6074
|
};
|
|
5352
|
-
/**
|
|
5353
|
-
|
|
5354
|
-
|
|
5355
|
-
|
|
5356
|
-
|
|
6075
|
+
/** @description One builder's stats under a single tag. */
|
|
6076
|
+
TagBuilderRow: {
|
|
6077
|
+
builder_code: string;
|
|
6078
|
+
/** Format: int64 */
|
|
6079
|
+
block: number;
|
|
6080
|
+
/** Format: int32 */
|
|
6081
|
+
ts: number;
|
|
6082
|
+
/** Format: double */
|
|
6083
|
+
volume_usd: number;
|
|
6084
|
+
/** Format: double */
|
|
6085
|
+
buy_volume_usd: number;
|
|
6086
|
+
/** Format: double */
|
|
6087
|
+
sell_volume_usd: number;
|
|
6088
|
+
/** Format: int64 */
|
|
6089
|
+
unique_traders: number;
|
|
6090
|
+
/** Format: int64 */
|
|
6091
|
+
unique_makers: number;
|
|
6092
|
+
/** Format: int64 */
|
|
6093
|
+
unique_takers: number;
|
|
6094
|
+
/** Format: int64 */
|
|
6095
|
+
txn_count: number;
|
|
6096
|
+
/** Format: int64 */
|
|
6097
|
+
buy_count: number;
|
|
6098
|
+
/** Format: int64 */
|
|
6099
|
+
sell_count: number;
|
|
6100
|
+
/** Format: double */
|
|
6101
|
+
fees_usd: number;
|
|
6102
|
+
/** Format: double */
|
|
6103
|
+
builder_fees: number;
|
|
6104
|
+
/** Format: double */
|
|
6105
|
+
shares_volume: number;
|
|
6106
|
+
/** Format: double */
|
|
6107
|
+
yes_volume_usd: number;
|
|
6108
|
+
/** Format: double */
|
|
6109
|
+
no_volume_usd: number;
|
|
6110
|
+
/** Format: int64 */
|
|
6111
|
+
yes_count: number;
|
|
6112
|
+
/** Format: int64 */
|
|
6113
|
+
no_count: number;
|
|
6114
|
+
/** Format: int64 */
|
|
6115
|
+
buy_dist_under_10: number;
|
|
6116
|
+
/** Format: int64 */
|
|
6117
|
+
buy_dist_10_100: number;
|
|
6118
|
+
/** Format: int64 */
|
|
6119
|
+
buy_dist_100_1k: number;
|
|
6120
|
+
/** Format: int64 */
|
|
6121
|
+
buy_dist_1k_10k: number;
|
|
6122
|
+
/** Format: int64 */
|
|
6123
|
+
buy_dist_10k_50k: number;
|
|
6124
|
+
/** Format: int64 */
|
|
6125
|
+
buy_dist_50k_plus: number;
|
|
6126
|
+
/** Format: int64 */
|
|
6127
|
+
new_users: number;
|
|
6128
|
+
/** Format: double */
|
|
6129
|
+
avg_rev_per_user: number;
|
|
6130
|
+
/** Format: double */
|
|
6131
|
+
avg_vol_per_user: number;
|
|
6132
|
+
};
|
|
5357
6133
|
SimpleTimeframeMetrics: {
|
|
5358
6134
|
/**
|
|
5359
6135
|
* Format: double
|
|
@@ -5416,36 +6192,187 @@ export interface components {
|
|
|
5416
6192
|
*/
|
|
5417
6193
|
unique_builder_traders: number;
|
|
5418
6194
|
};
|
|
5419
|
-
|
|
5420
|
-
|
|
6195
|
+
TraderAnalyticsDeltaTimeBucketRow: {
|
|
6196
|
+
/** Format: int32 */
|
|
6197
|
+
t: number;
|
|
5421
6198
|
/** Format: double */
|
|
5422
|
-
|
|
6199
|
+
v: number;
|
|
5423
6200
|
/** Format: double */
|
|
5424
|
-
|
|
6201
|
+
bv: number;
|
|
5425
6202
|
/** Format: double */
|
|
5426
|
-
|
|
6203
|
+
sv: number;
|
|
6204
|
+
/** Format: int64 */
|
|
6205
|
+
tc: number;
|
|
6206
|
+
/** Format: int64 */
|
|
6207
|
+
bc: number;
|
|
6208
|
+
/** Format: int64 */
|
|
6209
|
+
sc: number;
|
|
6210
|
+
/** Format: int64 */
|
|
6211
|
+
rc: number;
|
|
5427
6212
|
/** Format: double */
|
|
5428
|
-
|
|
6213
|
+
rv: number;
|
|
6214
|
+
/** Format: int64 */
|
|
6215
|
+
mc: number;
|
|
5429
6216
|
/** Format: double */
|
|
5430
|
-
|
|
6217
|
+
mv: number;
|
|
6218
|
+
/** Format: int64 */
|
|
6219
|
+
sp: number;
|
|
5431
6220
|
/** Format: double */
|
|
5432
|
-
|
|
6221
|
+
spv: number;
|
|
6222
|
+
/** Format: int64 */
|
|
6223
|
+
cc: number;
|
|
5433
6224
|
/** Format: double */
|
|
5434
|
-
|
|
6225
|
+
ccu: number;
|
|
5435
6226
|
/** Format: double */
|
|
5436
|
-
|
|
6227
|
+
csg: number;
|
|
5437
6228
|
/** Format: double */
|
|
5438
|
-
|
|
6229
|
+
csl: number;
|
|
5439
6230
|
/** Format: int64 */
|
|
5440
|
-
|
|
6231
|
+
mrc: number;
|
|
6232
|
+
/** Format: double */
|
|
6233
|
+
mrv: number;
|
|
5441
6234
|
/** Format: int64 */
|
|
5442
|
-
|
|
5443
|
-
|
|
6235
|
+
rwc: number;
|
|
6236
|
+
/** Format: double */
|
|
6237
|
+
rwv: number;
|
|
5444
6238
|
/** Format: int64 */
|
|
5445
|
-
|
|
6239
|
+
ydc: number;
|
|
6240
|
+
/** Format: double */
|
|
6241
|
+
ydv: number;
|
|
6242
|
+
/** Format: double */
|
|
6243
|
+
f: number;
|
|
6244
|
+
/** Format: double */
|
|
6245
|
+
sh: number;
|
|
6246
|
+
/** Format: double */
|
|
6247
|
+
bsh: number;
|
|
6248
|
+
/** Format: double */
|
|
6249
|
+
ssh: number;
|
|
6250
|
+
/** Format: double */
|
|
6251
|
+
ysh: number;
|
|
6252
|
+
/** Format: double */
|
|
6253
|
+
nsh: number;
|
|
6254
|
+
/** Format: double */
|
|
6255
|
+
yv: number;
|
|
6256
|
+
/** Format: double */
|
|
6257
|
+
nv: number;
|
|
5446
6258
|
/** Format: int64 */
|
|
5447
|
-
|
|
6259
|
+
yc: number;
|
|
6260
|
+
/** Format: int64 */
|
|
6261
|
+
nc: number;
|
|
6262
|
+
/** Format: int64 */
|
|
6263
|
+
bd_u10: number;
|
|
6264
|
+
/** Format: int64 */
|
|
6265
|
+
bd_100: number;
|
|
6266
|
+
/** Format: int64 */
|
|
6267
|
+
bd_1k: number;
|
|
6268
|
+
/** Format: int64 */
|
|
6269
|
+
bd_10k: number;
|
|
6270
|
+
/** Format: int64 */
|
|
6271
|
+
bd_50k: number;
|
|
6272
|
+
/** Format: int64 */
|
|
6273
|
+
bd_50p: number;
|
|
6274
|
+
/** Format: int64 */
|
|
6275
|
+
buy_price_cnt_0_10: number;
|
|
6276
|
+
/** Format: int64 */
|
|
6277
|
+
buy_price_cnt_10_20: number;
|
|
6278
|
+
/** Format: int64 */
|
|
6279
|
+
buy_price_cnt_20_30: number;
|
|
6280
|
+
/** Format: int64 */
|
|
6281
|
+
buy_price_cnt_30_40: number;
|
|
6282
|
+
/** Format: int64 */
|
|
6283
|
+
buy_price_cnt_40_50: number;
|
|
6284
|
+
/** Format: int64 */
|
|
6285
|
+
buy_price_cnt_50_60: number;
|
|
6286
|
+
/** Format: int64 */
|
|
6287
|
+
buy_price_cnt_60_70: number;
|
|
6288
|
+
/** Format: int64 */
|
|
6289
|
+
buy_price_cnt_70_80: number;
|
|
6290
|
+
/** Format: int64 */
|
|
6291
|
+
buy_price_cnt_80_90: number;
|
|
6292
|
+
/** Format: int64 */
|
|
6293
|
+
buy_price_cnt_90_100: number;
|
|
6294
|
+
/** Format: double */
|
|
6295
|
+
buy_price_vol_0_10: number;
|
|
6296
|
+
/** Format: double */
|
|
6297
|
+
buy_price_vol_10_20: number;
|
|
6298
|
+
/** Format: double */
|
|
6299
|
+
buy_price_vol_20_30: number;
|
|
6300
|
+
/** Format: double */
|
|
6301
|
+
buy_price_vol_30_40: number;
|
|
6302
|
+
/** Format: double */
|
|
6303
|
+
buy_price_vol_40_50: number;
|
|
6304
|
+
/** Format: double */
|
|
6305
|
+
buy_price_vol_50_60: number;
|
|
6306
|
+
/** Format: double */
|
|
6307
|
+
buy_price_vol_60_70: number;
|
|
6308
|
+
/** Format: double */
|
|
6309
|
+
buy_price_vol_70_80: number;
|
|
6310
|
+
/** Format: double */
|
|
6311
|
+
buy_price_vol_80_90: number;
|
|
6312
|
+
/** Format: double */
|
|
6313
|
+
buy_price_vol_90_100: number;
|
|
6314
|
+
/** Format: int64 */
|
|
6315
|
+
sell_price_cnt_0_10: number;
|
|
6316
|
+
/** Format: int64 */
|
|
6317
|
+
sell_price_cnt_10_20: number;
|
|
6318
|
+
/** Format: int64 */
|
|
6319
|
+
sell_price_cnt_20_30: number;
|
|
6320
|
+
/** Format: int64 */
|
|
6321
|
+
sell_price_cnt_30_40: number;
|
|
6322
|
+
/** Format: int64 */
|
|
6323
|
+
sell_price_cnt_40_50: number;
|
|
6324
|
+
/** Format: int64 */
|
|
6325
|
+
sell_price_cnt_50_60: number;
|
|
6326
|
+
/** Format: int64 */
|
|
6327
|
+
sell_price_cnt_60_70: number;
|
|
6328
|
+
/** Format: int64 */
|
|
6329
|
+
sell_price_cnt_70_80: number;
|
|
6330
|
+
/** Format: int64 */
|
|
6331
|
+
sell_price_cnt_80_90: number;
|
|
6332
|
+
/** Format: int64 */
|
|
6333
|
+
sell_price_cnt_90_100: number;
|
|
6334
|
+
/** Format: double */
|
|
6335
|
+
sell_price_vol_0_10: number;
|
|
6336
|
+
/** Format: double */
|
|
6337
|
+
sell_price_vol_10_20: number;
|
|
6338
|
+
/** Format: double */
|
|
6339
|
+
sell_price_vol_20_30: number;
|
|
6340
|
+
/** Format: double */
|
|
6341
|
+
sell_price_vol_30_40: number;
|
|
6342
|
+
/** Format: double */
|
|
6343
|
+
sell_price_vol_40_50: number;
|
|
6344
|
+
/** Format: double */
|
|
6345
|
+
sell_price_vol_50_60: number;
|
|
6346
|
+
/** Format: double */
|
|
6347
|
+
sell_price_vol_60_70: number;
|
|
6348
|
+
/** Format: double */
|
|
6349
|
+
sell_price_vol_70_80: number;
|
|
6350
|
+
/** Format: double */
|
|
6351
|
+
sell_price_vol_80_90: number;
|
|
6352
|
+
/** Format: double */
|
|
6353
|
+
sell_price_vol_90_100: number;
|
|
6354
|
+
};
|
|
6355
|
+
TraderVolumeDataPoint: {
|
|
6356
|
+
/** Format: int64 */
|
|
6357
|
+
t: number;
|
|
6358
|
+
/** Format: double */
|
|
6359
|
+
v: number;
|
|
6360
|
+
/** Format: double */
|
|
6361
|
+
bv: number;
|
|
6362
|
+
/** Format: double */
|
|
6363
|
+
sv: number;
|
|
6364
|
+
/** Format: int64 */
|
|
6365
|
+
tc: number;
|
|
6366
|
+
/** Format: int64 */
|
|
6367
|
+
btc: number;
|
|
6368
|
+
/** Format: int64 */
|
|
6369
|
+
stc: number;
|
|
6370
|
+
};
|
|
6371
|
+
TraderWithPnl: components["schemas"]["Trader"] & {
|
|
6372
|
+
pnl?: unknown;
|
|
5448
6373
|
};
|
|
6374
|
+
/** @enum {string} */
|
|
6375
|
+
TradeType: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "22" | "23" | "24";
|
|
5449
6376
|
};
|
|
5450
6377
|
responses: never;
|
|
5451
6378
|
parameters: never;
|
|
@@ -5459,7 +6386,7 @@ export interface operations {
|
|
|
5459
6386
|
parameters: {
|
|
5460
6387
|
query?: {
|
|
5461
6388
|
/** @description Lookback window: 1h, 24h, 7d, 30d, 1mo, 1y (default: 24h) */
|
|
5462
|
-
timeframe?: components["schemas"]["
|
|
6389
|
+
timeframe?: components["schemas"]["AnalyticsChangeTimeframe"];
|
|
5463
6390
|
};
|
|
5464
6391
|
header?: never;
|
|
5465
6392
|
path?: never;
|
|
@@ -5473,7 +6400,7 @@ export interface operations {
|
|
|
5473
6400
|
[name: string]: unknown;
|
|
5474
6401
|
};
|
|
5475
6402
|
content: {
|
|
5476
|
-
"application/json": components["schemas"]["
|
|
6403
|
+
"application/json": components["schemas"]["AnalyticsMetricPctChange"];
|
|
5477
6404
|
};
|
|
5478
6405
|
};
|
|
5479
6406
|
};
|
|
@@ -5493,7 +6420,7 @@ export interface operations {
|
|
|
5493
6420
|
[name: string]: unknown;
|
|
5494
6421
|
};
|
|
5495
6422
|
content: {
|
|
5496
|
-
"application/json": components["schemas"]["
|
|
6423
|
+
"application/json": components["schemas"]["AnalyticsGlobalCountsResponse"];
|
|
5497
6424
|
};
|
|
5498
6425
|
};
|
|
5499
6426
|
};
|
|
@@ -5524,7 +6451,7 @@ export interface operations {
|
|
|
5524
6451
|
[name: string]: unknown;
|
|
5525
6452
|
};
|
|
5526
6453
|
content: {
|
|
5527
|
-
"application/json": components["schemas"]["
|
|
6454
|
+
"application/json": components["schemas"]["AnalyticsTimeBucketRow"][];
|
|
5528
6455
|
};
|
|
5529
6456
|
};
|
|
5530
6457
|
};
|
|
@@ -5555,7 +6482,7 @@ export interface operations {
|
|
|
5555
6482
|
[name: string]: unknown;
|
|
5556
6483
|
};
|
|
5557
6484
|
content: {
|
|
5558
|
-
"application/json": components["schemas"]["
|
|
6485
|
+
"application/json": components["schemas"]["AnalyticsTimeBucketRow"][];
|
|
5559
6486
|
};
|
|
5560
6487
|
};
|
|
5561
6488
|
};
|
|
@@ -5987,7 +6914,7 @@ export interface operations {
|
|
|
5987
6914
|
parameters: {
|
|
5988
6915
|
query?: {
|
|
5989
6916
|
/** @description Lookback window (default: 24h). */
|
|
5990
|
-
timeframe?:
|
|
6917
|
+
timeframe?: "1h" | "24h" | "7d" | "30d" | "1mo" | "1y";
|
|
5991
6918
|
};
|
|
5992
6919
|
header?: never;
|
|
5993
6920
|
path: {
|
|
@@ -6488,40 +7415,11 @@ export interface operations {
|
|
|
6488
7415
|
};
|
|
6489
7416
|
};
|
|
6490
7417
|
};
|
|
6491
|
-
get_event_top_traders: {
|
|
6492
|
-
parameters: {
|
|
6493
|
-
query: {
|
|
6494
|
-
/** @description Event slug */
|
|
6495
|
-
event_slug: string;
|
|
6496
|
-
/** @description Timeframe: 1d, 7d, 30d, lifetime (default: lifetime) */
|
|
6497
|
-
timeframe?: components["schemas"]["PnlTimeframe"];
|
|
6498
|
-
/** @description Results limit (default: 10, max: 200) */
|
|
6499
|
-
limit?: number;
|
|
6500
|
-
/** @description Pagination key from the previous response */
|
|
6501
|
-
pagination_key?: string;
|
|
6502
|
-
};
|
|
6503
|
-
header?: never;
|
|
6504
|
-
path?: never;
|
|
6505
|
-
cookie?: never;
|
|
6506
|
-
};
|
|
6507
|
-
requestBody?: never;
|
|
6508
|
-
responses: {
|
|
6509
|
-
/** @description Top traders sorted by realized PnL desc. */
|
|
6510
|
-
200: {
|
|
6511
|
-
headers: {
|
|
6512
|
-
[name: string]: unknown;
|
|
6513
|
-
};
|
|
6514
|
-
content: {
|
|
6515
|
-
"application/json": components["schemas"]["TopTraderEventEntry"][];
|
|
6516
|
-
};
|
|
6517
|
-
};
|
|
6518
|
-
};
|
|
6519
|
-
};
|
|
6520
7418
|
get_event_analytics_changes: {
|
|
6521
7419
|
parameters: {
|
|
6522
7420
|
query?: {
|
|
6523
7421
|
/** @description Lookback window: 1h, 24h, 7d, 30d, 1mo, 1y (default: 24h) */
|
|
6524
|
-
timeframe?: components["schemas"]["
|
|
7422
|
+
timeframe?: components["schemas"]["AnalyticsChangeTimeframe"];
|
|
6525
7423
|
};
|
|
6526
7424
|
header?: never;
|
|
6527
7425
|
path: {
|
|
@@ -6538,7 +7436,7 @@ export interface operations {
|
|
|
6538
7436
|
[name: string]: unknown;
|
|
6539
7437
|
};
|
|
6540
7438
|
content: {
|
|
6541
|
-
"application/json": components["schemas"]["
|
|
7439
|
+
"application/json": components["schemas"]["AnalyticsMetricPctChange"];
|
|
6542
7440
|
};
|
|
6543
7441
|
};
|
|
6544
7442
|
};
|
|
@@ -6572,7 +7470,7 @@ export interface operations {
|
|
|
6572
7470
|
[name: string]: unknown;
|
|
6573
7471
|
};
|
|
6574
7472
|
content: {
|
|
6575
|
-
"application/json": components["schemas"]["
|
|
7473
|
+
"application/json": components["schemas"]["AnalyticsTimeBucketRow"][];
|
|
6576
7474
|
};
|
|
6577
7475
|
};
|
|
6578
7476
|
};
|
|
@@ -6600,45 +7498,86 @@ export interface operations {
|
|
|
6600
7498
|
};
|
|
6601
7499
|
requestBody?: never;
|
|
6602
7500
|
responses: {
|
|
6603
|
-
/** @description Cumulative time-bucketed event analytics */
|
|
7501
|
+
/** @description Cumulative time-bucketed event analytics */
|
|
7502
|
+
200: {
|
|
7503
|
+
headers: {
|
|
7504
|
+
[name: string]: unknown;
|
|
7505
|
+
};
|
|
7506
|
+
content: {
|
|
7507
|
+
"application/json": components["schemas"]["AnalyticsTimeBucketRow"][];
|
|
7508
|
+
};
|
|
7509
|
+
};
|
|
7510
|
+
};
|
|
7511
|
+
};
|
|
7512
|
+
get_event: {
|
|
7513
|
+
parameters: {
|
|
7514
|
+
query?: {
|
|
7515
|
+
/** @description Include tags array (default: true) */
|
|
7516
|
+
include_tags?: boolean;
|
|
7517
|
+
/** @description Include markets array with outcomes (default: true) */
|
|
7518
|
+
include_markets?: boolean;
|
|
7519
|
+
/** @description Include metrics object with all timeframes (default: true) */
|
|
7520
|
+
include_metrics?: boolean;
|
|
7521
|
+
/** @description Return truncated response optimized for AI consumers (default: false) */
|
|
7522
|
+
ai?: boolean;
|
|
7523
|
+
};
|
|
7524
|
+
header?: never;
|
|
7525
|
+
path: {
|
|
7526
|
+
/** @description Event ID or slug */
|
|
7527
|
+
identifier: string;
|
|
7528
|
+
};
|
|
7529
|
+
cookie?: never;
|
|
7530
|
+
};
|
|
7531
|
+
requestBody?: never;
|
|
7532
|
+
responses: {
|
|
7533
|
+
/** @description Event with nested tags, markets, and series */
|
|
6604
7534
|
200: {
|
|
6605
7535
|
headers: {
|
|
6606
7536
|
[name: string]: unknown;
|
|
6607
7537
|
};
|
|
6608
7538
|
content: {
|
|
6609
|
-
"application/json": components["schemas"]["
|
|
7539
|
+
"application/json": components["schemas"]["PolymarketEvent"];
|
|
7540
|
+
};
|
|
7541
|
+
};
|
|
7542
|
+
/** @description Event not found */
|
|
7543
|
+
404: {
|
|
7544
|
+
headers: {
|
|
7545
|
+
[name: string]: unknown;
|
|
6610
7546
|
};
|
|
7547
|
+
content?: never;
|
|
6611
7548
|
};
|
|
6612
7549
|
};
|
|
6613
7550
|
};
|
|
6614
|
-
|
|
7551
|
+
get_event_holders_history: {
|
|
6615
7552
|
parameters: {
|
|
6616
7553
|
query?: {
|
|
6617
|
-
/** @description
|
|
6618
|
-
|
|
6619
|
-
/** @description
|
|
6620
|
-
|
|
6621
|
-
/** @description
|
|
6622
|
-
|
|
6623
|
-
/** @description
|
|
6624
|
-
|
|
7554
|
+
/** @description Start timestamp (Unix seconds). If omitted, derived from `hours`. */
|
|
7555
|
+
from?: number;
|
|
7556
|
+
/** @description End timestamp (Unix seconds). Defaults to now. */
|
|
7557
|
+
to?: number;
|
|
7558
|
+
/** @description Number of candles to return (default: 500, max: 2500) */
|
|
7559
|
+
count_back?: number;
|
|
7560
|
+
/** @description Fallback time range in hours when `from`/`to` are not provided (default: 24, max: 336 = 14 days) */
|
|
7561
|
+
hours?: number;
|
|
7562
|
+
/** @description Cursor-based pagination key from previous response */
|
|
7563
|
+
pagination_key?: string;
|
|
6625
7564
|
};
|
|
6626
7565
|
header?: never;
|
|
6627
7566
|
path: {
|
|
6628
|
-
/** @description Event
|
|
6629
|
-
|
|
7567
|
+
/** @description Event slug */
|
|
7568
|
+
event_slug: string;
|
|
6630
7569
|
};
|
|
6631
7570
|
cookie?: never;
|
|
6632
7571
|
};
|
|
6633
7572
|
requestBody?: never;
|
|
6634
7573
|
responses: {
|
|
6635
|
-
/** @description Event
|
|
7574
|
+
/** @description Event holder count history. */
|
|
6636
7575
|
200: {
|
|
6637
7576
|
headers: {
|
|
6638
7577
|
[name: string]: unknown;
|
|
6639
7578
|
};
|
|
6640
7579
|
content: {
|
|
6641
|
-
"application/json": components["schemas"]["
|
|
7580
|
+
"application/json": components["schemas"]["HolderCountHistoryCandle"][];
|
|
6642
7581
|
};
|
|
6643
7582
|
};
|
|
6644
7583
|
/** @description Event not found */
|
|
@@ -6655,7 +7594,7 @@ export interface operations {
|
|
|
6655
7594
|
query?: {
|
|
6656
7595
|
/** @description Market condition ID (0x-prefixed hex) */
|
|
6657
7596
|
condition_id?: string;
|
|
6658
|
-
/** @description Market slug
|
|
7597
|
+
/** @description Market slug */
|
|
6659
7598
|
market_slug?: string;
|
|
6660
7599
|
/** @description Results limit per outcome (default: 10, max: 100) */
|
|
6661
7600
|
limit?: number;
|
|
@@ -6667,8 +7606,6 @@ export interface operations {
|
|
|
6667
7606
|
max_shares?: string;
|
|
6668
7607
|
/** @description Include nested holder PnL data (default: false, +1 credit) */
|
|
6669
7608
|
include_pnl?: boolean;
|
|
6670
|
-
/** @description Return truncated response optimized for AI consumers (default: false) */
|
|
6671
|
-
ai?: boolean;
|
|
6672
7609
|
};
|
|
6673
7610
|
header?: never;
|
|
6674
7611
|
path?: never;
|
|
@@ -6676,7 +7613,7 @@ export interface operations {
|
|
|
6676
7613
|
};
|
|
6677
7614
|
requestBody?: never;
|
|
6678
7615
|
responses: {
|
|
6679
|
-
/** @description Market holders grouped by outcome (sorted by shares DESC).
|
|
7616
|
+
/** @description Market holders grouped by outcome (sorted by shares DESC). */
|
|
6680
7617
|
200: {
|
|
6681
7618
|
headers: {
|
|
6682
7619
|
[name: string]: unknown;
|
|
@@ -6699,9 +7636,9 @@ export interface operations {
|
|
|
6699
7636
|
query?: {
|
|
6700
7637
|
/** @description Market condition ID (0x-prefixed hex) */
|
|
6701
7638
|
condition_id?: string;
|
|
6702
|
-
/** @description Market slug
|
|
7639
|
+
/** @description Market slug */
|
|
6703
7640
|
market_slug?: string;
|
|
6704
|
-
/** @description Start timestamp (Unix seconds). If omitted, derived from `hours
|
|
7641
|
+
/** @description Start timestamp (Unix seconds). If omitted, derived from `hours`. */
|
|
6705
7642
|
from?: number;
|
|
6706
7643
|
/** @description End timestamp (Unix seconds). Defaults to now. */
|
|
6707
7644
|
to?: number;
|
|
@@ -6718,13 +7655,13 @@ export interface operations {
|
|
|
6718
7655
|
};
|
|
6719
7656
|
requestBody?: never;
|
|
6720
7657
|
responses: {
|
|
6721
|
-
/** @description Market holder count history
|
|
7658
|
+
/** @description Market holder count history. */
|
|
6722
7659
|
200: {
|
|
6723
7660
|
headers: {
|
|
6724
7661
|
[name: string]: unknown;
|
|
6725
7662
|
};
|
|
6726
7663
|
content: {
|
|
6727
|
-
"application/json": components["schemas"]["
|
|
7664
|
+
"application/json": components["schemas"]["HolderCountHistoryCandle"][];
|
|
6728
7665
|
};
|
|
6729
7666
|
};
|
|
6730
7667
|
/** @description Market not found */
|
|
@@ -6749,8 +7686,6 @@ export interface operations {
|
|
|
6749
7686
|
max_shares?: string;
|
|
6750
7687
|
/** @description Include nested holder PnL data (default: false, +1 credit) */
|
|
6751
7688
|
include_pnl?: boolean;
|
|
6752
|
-
/** @description Return truncated response optimized for AI consumers (default: false) */
|
|
6753
|
-
ai?: boolean;
|
|
6754
7689
|
};
|
|
6755
7690
|
header?: never;
|
|
6756
7691
|
path: {
|
|
@@ -6761,7 +7696,7 @@ export interface operations {
|
|
|
6761
7696
|
};
|
|
6762
7697
|
requestBody?: never;
|
|
6763
7698
|
responses: {
|
|
6764
|
-
/** @description Position holders (sorted by shares DESC). Holder `pnl` is included only when `include_pnl=true`.
|
|
7699
|
+
/** @description Position holders (sorted by shares DESC). Holder `pnl` is included only when `include_pnl=true`. */
|
|
6765
7700
|
200: {
|
|
6766
7701
|
headers: {
|
|
6767
7702
|
[name: string]: unknown;
|
|
@@ -6782,7 +7717,7 @@ export interface operations {
|
|
|
6782
7717
|
get_position_holders_history: {
|
|
6783
7718
|
parameters: {
|
|
6784
7719
|
query?: {
|
|
6785
|
-
/** @description Start timestamp (Unix seconds). If omitted, derived from `hours
|
|
7720
|
+
/** @description Start timestamp (Unix seconds). If omitted, derived from `hours`. */
|
|
6786
7721
|
from?: number;
|
|
6787
7722
|
/** @description End timestamp (Unix seconds). Defaults to now. */
|
|
6788
7723
|
to?: number;
|
|
@@ -6802,13 +7737,13 @@ export interface operations {
|
|
|
6802
7737
|
};
|
|
6803
7738
|
requestBody?: never;
|
|
6804
7739
|
responses: {
|
|
6805
|
-
/** @description Position holder
|
|
7740
|
+
/** @description Position holder history. */
|
|
6806
7741
|
200: {
|
|
6807
7742
|
headers: {
|
|
6808
7743
|
[name: string]: unknown;
|
|
6809
7744
|
};
|
|
6810
7745
|
content: {
|
|
6811
|
-
"application/json": components["schemas"]["
|
|
7746
|
+
"application/json": components["schemas"]["PositionHolderHistoryCandle"][];
|
|
6812
7747
|
};
|
|
6813
7748
|
};
|
|
6814
7749
|
/** @description Position not found */
|
|
@@ -7150,13 +8085,17 @@ export interface operations {
|
|
|
7150
8085
|
get_position_top_traders: {
|
|
7151
8086
|
parameters: {
|
|
7152
8087
|
query: {
|
|
7153
|
-
/** @description
|
|
8088
|
+
/** @description Outcome-token ID */
|
|
7154
8089
|
position_id: string;
|
|
7155
|
-
/** @description
|
|
7156
|
-
|
|
7157
|
-
/** @description
|
|
8090
|
+
/** @description Default: realized_pnl_usd */
|
|
8091
|
+
sort_by?: components["schemas"]["PositionPnlSortBy"];
|
|
8092
|
+
/** @description Default: desc */
|
|
8093
|
+
sort_direction?: components["schemas"]["SortDirection"];
|
|
8094
|
+
/** @description Default 50, max 200 */
|
|
7158
8095
|
limit?: number;
|
|
7159
|
-
/** @description
|
|
8096
|
+
/** @description Max 2500. Takes precedence over pagination_key. */
|
|
8097
|
+
offset?: number;
|
|
8098
|
+
/** @description Cursor from a previous response */
|
|
7160
8099
|
pagination_key?: string;
|
|
7161
8100
|
};
|
|
7162
8101
|
header?: never;
|
|
@@ -7165,14 +8104,21 @@ export interface operations {
|
|
|
7165
8104
|
};
|
|
7166
8105
|
requestBody?: never;
|
|
7167
8106
|
responses: {
|
|
7168
|
-
/** @description Top traders
|
|
8107
|
+
/** @description Top traders for the position */
|
|
7169
8108
|
200: {
|
|
7170
8109
|
headers: {
|
|
7171
8110
|
[name: string]: unknown;
|
|
7172
8111
|
};
|
|
7173
8112
|
content: {
|
|
7174
|
-
"application/json": components["schemas"]["
|
|
8113
|
+
"application/json": components["schemas"]["PositionEntry"][];
|
|
8114
|
+
};
|
|
8115
|
+
};
|
|
8116
|
+
/** @description Invalid params */
|
|
8117
|
+
400: {
|
|
8118
|
+
headers: {
|
|
8119
|
+
[name: string]: unknown;
|
|
7175
8120
|
};
|
|
8121
|
+
content?: never;
|
|
7176
8122
|
};
|
|
7177
8123
|
};
|
|
7178
8124
|
};
|
|
@@ -7304,13 +8250,15 @@ export interface operations {
|
|
|
7304
8250
|
query?: {
|
|
7305
8251
|
/** @description Market condition ID */
|
|
7306
8252
|
condition_id?: string;
|
|
7307
|
-
/** @description Market slug
|
|
8253
|
+
/** @description Market slug */
|
|
7308
8254
|
market_slug?: string;
|
|
7309
|
-
/** @description
|
|
8255
|
+
/** @description Default: lifetime */
|
|
7310
8256
|
timeframe?: components["schemas"]["PnlTimeframe"];
|
|
7311
|
-
/** @description
|
|
8257
|
+
/** @description Default 50, max 200 */
|
|
7312
8258
|
limit?: number;
|
|
7313
|
-
/** @description
|
|
8259
|
+
/** @description Max 2500. Takes precedence over pagination_key. */
|
|
8260
|
+
offset?: number;
|
|
8261
|
+
/** @description Cursor from a previous response */
|
|
7314
8262
|
pagination_key?: string;
|
|
7315
8263
|
};
|
|
7316
8264
|
header?: never;
|
|
@@ -7319,14 +8267,21 @@ export interface operations {
|
|
|
7319
8267
|
};
|
|
7320
8268
|
requestBody?: never;
|
|
7321
8269
|
responses: {
|
|
7322
|
-
/** @description Top traders
|
|
8270
|
+
/** @description Top traders for the market */
|
|
7323
8271
|
200: {
|
|
7324
8272
|
headers: {
|
|
7325
8273
|
[name: string]: unknown;
|
|
7326
8274
|
};
|
|
7327
8275
|
content: {
|
|
7328
|
-
"application/json": components["schemas"]["
|
|
8276
|
+
"application/json": components["schemas"]["MarketEntry"][];
|
|
8277
|
+
};
|
|
8278
|
+
};
|
|
8279
|
+
/** @description Invalid params */
|
|
8280
|
+
400: {
|
|
8281
|
+
headers: {
|
|
8282
|
+
[name: string]: unknown;
|
|
7329
8283
|
};
|
|
8284
|
+
content?: never;
|
|
7330
8285
|
};
|
|
7331
8286
|
};
|
|
7332
8287
|
};
|
|
@@ -7491,7 +8446,7 @@ export interface operations {
|
|
|
7491
8446
|
parameters: {
|
|
7492
8447
|
query?: {
|
|
7493
8448
|
/** @description Lookback window: 1h, 24h, 7d, 30d, 1mo, 1y (default: 24h) */
|
|
7494
|
-
timeframe?: components["schemas"]["
|
|
8449
|
+
timeframe?: components["schemas"]["AnalyticsChangeTimeframe"];
|
|
7495
8450
|
};
|
|
7496
8451
|
header?: never;
|
|
7497
8452
|
path: {
|
|
@@ -7508,7 +8463,7 @@ export interface operations {
|
|
|
7508
8463
|
[name: string]: unknown;
|
|
7509
8464
|
};
|
|
7510
8465
|
content: {
|
|
7511
|
-
"application/json": components["schemas"]["
|
|
8466
|
+
"application/json": components["schemas"]["AnalyticsMetricPctChange"];
|
|
7512
8467
|
};
|
|
7513
8468
|
};
|
|
7514
8469
|
};
|
|
@@ -7542,7 +8497,7 @@ export interface operations {
|
|
|
7542
8497
|
[name: string]: unknown;
|
|
7543
8498
|
};
|
|
7544
8499
|
content: {
|
|
7545
|
-
"application/json": components["schemas"]["
|
|
8500
|
+
"application/json": components["schemas"]["AnalyticsTimeBucketRow"][];
|
|
7546
8501
|
};
|
|
7547
8502
|
};
|
|
7548
8503
|
};
|
|
@@ -7576,7 +8531,7 @@ export interface operations {
|
|
|
7576
8531
|
[name: string]: unknown;
|
|
7577
8532
|
};
|
|
7578
8533
|
content: {
|
|
7579
|
-
"application/json": components["schemas"]["
|
|
8534
|
+
"application/json": components["schemas"]["AnalyticsTimeBucketRow"][];
|
|
7580
8535
|
};
|
|
7581
8536
|
};
|
|
7582
8537
|
};
|
|
@@ -8036,6 +8991,48 @@ export interface operations {
|
|
|
8036
8991
|
};
|
|
8037
8992
|
};
|
|
8038
8993
|
};
|
|
8994
|
+
get_category_top_traders: {
|
|
8995
|
+
parameters: {
|
|
8996
|
+
query: {
|
|
8997
|
+
/** @description Polymarket category */
|
|
8998
|
+
category: components["schemas"]["PolymarketCategory"];
|
|
8999
|
+
/** @description Default: lifetime */
|
|
9000
|
+
timeframe?: components["schemas"]["PnlTimeframe"];
|
|
9001
|
+
/** @description Default: realized_pnl_usd */
|
|
9002
|
+
sort_by?: components["schemas"]["CategoryPnlSortBy"];
|
|
9003
|
+
/** @description Default: desc */
|
|
9004
|
+
sort_direction?: components["schemas"]["SortDirection"];
|
|
9005
|
+
/** @description Default 50, max 200 */
|
|
9006
|
+
limit?: number;
|
|
9007
|
+
/** @description Max 2500. Takes precedence over pagination_key. */
|
|
9008
|
+
offset?: number;
|
|
9009
|
+
/** @description Cursor from a previous response */
|
|
9010
|
+
pagination_key?: string;
|
|
9011
|
+
};
|
|
9012
|
+
header?: never;
|
|
9013
|
+
path?: never;
|
|
9014
|
+
cookie?: never;
|
|
9015
|
+
};
|
|
9016
|
+
requestBody?: never;
|
|
9017
|
+
responses: {
|
|
9018
|
+
/** @description Top traders for the category */
|
|
9019
|
+
200: {
|
|
9020
|
+
headers: {
|
|
9021
|
+
[name: string]: unknown;
|
|
9022
|
+
};
|
|
9023
|
+
content: {
|
|
9024
|
+
"application/json": components["schemas"]["CategoryEntry"][];
|
|
9025
|
+
};
|
|
9026
|
+
};
|
|
9027
|
+
/** @description Invalid params */
|
|
9028
|
+
400: {
|
|
9029
|
+
headers: {
|
|
9030
|
+
[name: string]: unknown;
|
|
9031
|
+
};
|
|
9032
|
+
content?: never;
|
|
9033
|
+
};
|
|
9034
|
+
};
|
|
9035
|
+
};
|
|
8039
9036
|
get_tag_by_id: {
|
|
8040
9037
|
parameters: {
|
|
8041
9038
|
query?: {
|
|
@@ -8074,8 +9071,8 @@ export interface operations {
|
|
|
8074
9071
|
get_tag_analytics_changes: {
|
|
8075
9072
|
parameters: {
|
|
8076
9073
|
query?: {
|
|
8077
|
-
/** @description Lookback window: 1h, 24h, 7d, 30d, 1mo (default: 24h) */
|
|
8078
|
-
timeframe?: components["schemas"]["
|
|
9074
|
+
/** @description Lookback window: 1h, 24h, 7d, 30d, 1mo, 1y (default: 24h) */
|
|
9075
|
+
timeframe?: components["schemas"]["AnalyticsChangeTimeframe"];
|
|
8079
9076
|
};
|
|
8080
9077
|
header?: never;
|
|
8081
9078
|
path: {
|
|
@@ -8092,7 +9089,7 @@ export interface operations {
|
|
|
8092
9089
|
[name: string]: unknown;
|
|
8093
9090
|
};
|
|
8094
9091
|
content: {
|
|
8095
|
-
"application/json": components["schemas"]["
|
|
9092
|
+
"application/json": components["schemas"]["AnalyticsMetricPctChange"];
|
|
8096
9093
|
};
|
|
8097
9094
|
};
|
|
8098
9095
|
};
|
|
@@ -8126,7 +9123,7 @@ export interface operations {
|
|
|
8126
9123
|
[name: string]: unknown;
|
|
8127
9124
|
};
|
|
8128
9125
|
content: {
|
|
8129
|
-
"application/json": components["schemas"]["
|
|
9126
|
+
"application/json": components["schemas"]["AnalyticsTimeBucketRow"][];
|
|
8130
9127
|
};
|
|
8131
9128
|
};
|
|
8132
9129
|
};
|
|
@@ -8160,7 +9157,7 @@ export interface operations {
|
|
|
8160
9157
|
[name: string]: unknown;
|
|
8161
9158
|
};
|
|
8162
9159
|
content: {
|
|
8163
|
-
"application/json": components["schemas"]["
|
|
9160
|
+
"application/json": components["schemas"]["AnalyticsTimeBucketRow"][];
|
|
8164
9161
|
};
|
|
8165
9162
|
};
|
|
8166
9163
|
};
|
|
@@ -8168,15 +9165,15 @@ export interface operations {
|
|
|
8168
9165
|
get_global_pnl: {
|
|
8169
9166
|
parameters: {
|
|
8170
9167
|
query?: {
|
|
8171
|
-
/** @description
|
|
9168
|
+
/** @description Default: lifetime */
|
|
8172
9169
|
timeframe?: components["schemas"]["PnlTimeframe"];
|
|
8173
|
-
/** @description
|
|
8174
|
-
sort_by?: components["schemas"]["
|
|
8175
|
-
/** @description
|
|
9170
|
+
/** @description Default: total_pnl_usd */
|
|
9171
|
+
sort_by?: components["schemas"]["TraderPnlSortBy"];
|
|
9172
|
+
/** @description Default: desc */
|
|
8176
9173
|
sort_direction?: components["schemas"]["SortDirection"];
|
|
8177
|
-
/** @description
|
|
9174
|
+
/** @description Default 50, max 500 */
|
|
8178
9175
|
limit?: number;
|
|
8179
|
-
/** @description Cursor
|
|
9176
|
+
/** @description Cursor from a previous response */
|
|
8180
9177
|
pagination_key?: string;
|
|
8181
9178
|
};
|
|
8182
9179
|
header?: never;
|
|
@@ -8185,67 +9182,102 @@ export interface operations {
|
|
|
8185
9182
|
};
|
|
8186
9183
|
requestBody?: never;
|
|
8187
9184
|
responses: {
|
|
8188
|
-
/** @description
|
|
9185
|
+
/** @description Leaderboard page */
|
|
8189
9186
|
200: {
|
|
8190
9187
|
headers: {
|
|
8191
9188
|
[name: string]: unknown;
|
|
8192
9189
|
};
|
|
8193
9190
|
content: {
|
|
8194
|
-
"application/json": components["schemas"]["
|
|
9191
|
+
"application/json": components["schemas"]["GlobalEntry"][];
|
|
9192
|
+
};
|
|
9193
|
+
};
|
|
9194
|
+
/** @description Invalid params */
|
|
9195
|
+
400: {
|
|
9196
|
+
headers: {
|
|
9197
|
+
[name: string]: unknown;
|
|
8195
9198
|
};
|
|
9199
|
+
content?: never;
|
|
8196
9200
|
};
|
|
8197
9201
|
};
|
|
8198
9202
|
};
|
|
8199
|
-
|
|
9203
|
+
get_trader_pnl: {
|
|
8200
9204
|
parameters: {
|
|
8201
9205
|
query?: {
|
|
8202
|
-
/** @description
|
|
9206
|
+
/** @description Default: lifetime */
|
|
8203
9207
|
timeframe?: components["schemas"]["PnlTimeframe"];
|
|
8204
|
-
/** @description Order by: pnl or volume (default: pnl). Case-insensitive. */
|
|
8205
|
-
sort_by?: components["schemas"]["LeaderboardSortBy"];
|
|
8206
|
-
/** @description Rows per page, 1..=50 (default: 20) */
|
|
8207
|
-
limit?: number;
|
|
8208
|
-
/** @description Offset for pagination (default: 0) */
|
|
8209
|
-
offset?: number;
|
|
8210
|
-
/** @description Market category filter. Case-insensitive. Default: overall. */
|
|
8211
|
-
category?: components["schemas"]["LeaderboardCategory"];
|
|
8212
9208
|
};
|
|
8213
9209
|
header?: never;
|
|
8214
|
-
path
|
|
9210
|
+
path: {
|
|
9211
|
+
/** @description Trader wallet address */
|
|
9212
|
+
address: string;
|
|
9213
|
+
};
|
|
8215
9214
|
cookie?: never;
|
|
8216
9215
|
};
|
|
8217
9216
|
requestBody?: never;
|
|
8218
9217
|
responses: {
|
|
8219
|
-
/** @description
|
|
9218
|
+
/** @description Trader PnL summary */
|
|
8220
9219
|
200: {
|
|
8221
9220
|
headers: {
|
|
8222
9221
|
[name: string]: unknown;
|
|
8223
9222
|
};
|
|
8224
9223
|
content: {
|
|
8225
|
-
"application/json": components["schemas"]["
|
|
9224
|
+
"application/json": components["schemas"]["GlobalEntry"];
|
|
8226
9225
|
};
|
|
8227
9226
|
};
|
|
8228
|
-
/** @description
|
|
9227
|
+
/** @description Invalid params */
|
|
8229
9228
|
400: {
|
|
8230
9229
|
headers: {
|
|
8231
9230
|
[name: string]: unknown;
|
|
8232
9231
|
};
|
|
8233
9232
|
content?: never;
|
|
8234
9233
|
};
|
|
8235
|
-
|
|
8236
|
-
|
|
9234
|
+
};
|
|
9235
|
+
};
|
|
9236
|
+
get_trader_pnl_calendar: {
|
|
9237
|
+
parameters: {
|
|
9238
|
+
query?: {
|
|
9239
|
+
/** @description Window size in days (default: 30, max: 30) */
|
|
9240
|
+
days?: number;
|
|
9241
|
+
/** @description Cursor from a previous response */
|
|
9242
|
+
pagination_key?: string;
|
|
9243
|
+
};
|
|
9244
|
+
header?: never;
|
|
9245
|
+
path: {
|
|
9246
|
+
/** @description Trader wallet address */
|
|
9247
|
+
address: string;
|
|
9248
|
+
};
|
|
9249
|
+
cookie?: never;
|
|
9250
|
+
};
|
|
9251
|
+
requestBody?: never;
|
|
9252
|
+
responses: {
|
|
9253
|
+
/** @description Daily PnL entries */
|
|
9254
|
+
200: {
|
|
8237
9255
|
headers: {
|
|
8238
9256
|
[name: string]: unknown;
|
|
8239
9257
|
};
|
|
8240
|
-
content
|
|
9258
|
+
content: {
|
|
9259
|
+
"application/json": components["schemas"]["PnlCandleEntry"][];
|
|
9260
|
+
};
|
|
8241
9261
|
};
|
|
8242
9262
|
};
|
|
8243
9263
|
};
|
|
8244
|
-
|
|
9264
|
+
get_trader_pnl_candles: {
|
|
8245
9265
|
parameters: {
|
|
8246
9266
|
query?: {
|
|
8247
|
-
/** @description
|
|
8248
|
-
|
|
9267
|
+
/** @description Candle bucket size. `auto` automatically decides resolution to try fit all candles within max `count_back` (2500) and overrides any caller-supplied `count_back`. Default: 1m for 1d, 1d otherwise. */
|
|
9268
|
+
resolution?: components["schemas"]["PnlCandleResolution"];
|
|
9269
|
+
/** @description Default: lifetime */
|
|
9270
|
+
timeframe?: components["schemas"]["PnlCandleTimeframe"];
|
|
9271
|
+
/** @description Start unix seconds. Overrides the timeframe lower bound. */
|
|
9272
|
+
from?: number;
|
|
9273
|
+
/** @description End unix seconds */
|
|
9274
|
+
to?: number;
|
|
9275
|
+
/** @description Number of candle buckets to return. Default 500, max 2500. Ignored when `resolution=auto` (forced to 2500). */
|
|
9276
|
+
count_back?: number;
|
|
9277
|
+
/** @description Cursor from a previous response */
|
|
9278
|
+
pagination_key?: string;
|
|
9279
|
+
/** @description Forward-fill missing buckets. Default: true. */
|
|
9280
|
+
fill_gaps?: boolean;
|
|
8249
9281
|
};
|
|
8250
9282
|
header?: never;
|
|
8251
9283
|
path: {
|
|
@@ -8256,24 +9288,34 @@ export interface operations {
|
|
|
8256
9288
|
};
|
|
8257
9289
|
requestBody?: never;
|
|
8258
9290
|
responses: {
|
|
8259
|
-
/** @description Trader
|
|
9291
|
+
/** @description Trader PnL candles */
|
|
8260
9292
|
200: {
|
|
8261
9293
|
headers: {
|
|
8262
9294
|
[name: string]: unknown;
|
|
8263
9295
|
};
|
|
8264
9296
|
content: {
|
|
8265
|
-
"application/json": components["schemas"]["
|
|
9297
|
+
"application/json": components["schemas"]["PnlCandlestickBar"][];
|
|
8266
9298
|
};
|
|
8267
9299
|
};
|
|
8268
9300
|
};
|
|
8269
9301
|
};
|
|
8270
|
-
|
|
9302
|
+
get_trader_category_pnl: {
|
|
8271
9303
|
parameters: {
|
|
8272
9304
|
query?: {
|
|
8273
|
-
/** @description
|
|
8274
|
-
|
|
8275
|
-
/** @description
|
|
9305
|
+
/** @description Default: lifetime */
|
|
9306
|
+
timeframe?: components["schemas"]["PnlTimeframe"];
|
|
9307
|
+
/** @description Default: realized_pnl_usd */
|
|
9308
|
+
sort_by?: components["schemas"]["CategoryPnlSortBy"];
|
|
9309
|
+
/** @description Default: desc */
|
|
9310
|
+
sort_direction?: components["schemas"]["SortDirection"];
|
|
9311
|
+
/** @description Default 50, max 500 */
|
|
9312
|
+
limit?: number;
|
|
9313
|
+
/** @description Max 2500. Takes precedence over pagination_key. */
|
|
9314
|
+
offset?: number;
|
|
9315
|
+
/** @description Cursor from a previous response */
|
|
8276
9316
|
pagination_key?: string;
|
|
9317
|
+
/** @description Filter to a single category */
|
|
9318
|
+
category?: components["schemas"]["PolymarketCategory"];
|
|
8277
9319
|
};
|
|
8278
9320
|
header?: never;
|
|
8279
9321
|
path: {
|
|
@@ -8284,25 +9326,27 @@ export interface operations {
|
|
|
8284
9326
|
};
|
|
8285
9327
|
requestBody?: never;
|
|
8286
9328
|
responses: {
|
|
8287
|
-
/** @description
|
|
9329
|
+
/** @description Per-category PnL rows */
|
|
8288
9330
|
200: {
|
|
8289
9331
|
headers: {
|
|
8290
9332
|
[name: string]: unknown;
|
|
8291
9333
|
};
|
|
8292
9334
|
content: {
|
|
8293
|
-
"application/json": components["schemas"]["
|
|
9335
|
+
"application/json": components["schemas"]["CategoryEntry"][];
|
|
9336
|
+
};
|
|
9337
|
+
};
|
|
9338
|
+
/** @description Invalid params */
|
|
9339
|
+
400: {
|
|
9340
|
+
headers: {
|
|
9341
|
+
[name: string]: unknown;
|
|
8294
9342
|
};
|
|
9343
|
+
content?: never;
|
|
8295
9344
|
};
|
|
8296
9345
|
};
|
|
8297
9346
|
};
|
|
8298
|
-
|
|
9347
|
+
get_trader_pnl_changes: {
|
|
8299
9348
|
parameters: {
|
|
8300
|
-
query?:
|
|
8301
|
-
/** @description Candle resolution (default: 1h) */
|
|
8302
|
-
resolution?: components["schemas"]["PnlCandleResolution"];
|
|
8303
|
-
/** @description Time range (default: lifetime) */
|
|
8304
|
-
timeframe?: components["schemas"]["PnlCandleTimeframe"];
|
|
8305
|
-
};
|
|
9349
|
+
query?: never;
|
|
8306
9350
|
header?: never;
|
|
8307
9351
|
path: {
|
|
8308
9352
|
/** @description Trader wallet address */
|
|
@@ -8312,34 +9356,52 @@ export interface operations {
|
|
|
8312
9356
|
};
|
|
8313
9357
|
requestBody?: never;
|
|
8314
9358
|
responses: {
|
|
8315
|
-
/** @description
|
|
9359
|
+
/** @description Trader PnL changes */
|
|
8316
9360
|
200: {
|
|
8317
9361
|
headers: {
|
|
8318
9362
|
[name: string]: unknown;
|
|
8319
9363
|
};
|
|
8320
9364
|
content: {
|
|
8321
|
-
"application/json": components["schemas"]["
|
|
9365
|
+
"application/json": components["schemas"]["PnlChangesResponse"];
|
|
8322
9366
|
};
|
|
8323
9367
|
};
|
|
8324
9368
|
};
|
|
8325
9369
|
};
|
|
8326
|
-
|
|
9370
|
+
get_trader_pnl_exits: {
|
|
8327
9371
|
parameters: {
|
|
8328
9372
|
query?: {
|
|
8329
|
-
/** @description
|
|
8330
|
-
timeframe?: components["schemas"]["
|
|
8331
|
-
/** @description
|
|
8332
|
-
|
|
8333
|
-
/** @description
|
|
8334
|
-
|
|
8335
|
-
/** @description
|
|
9373
|
+
/** @description Default: lifetime */
|
|
9374
|
+
timeframe?: components["schemas"]["PnlCandleTimeframe"];
|
|
9375
|
+
/** @description Start unix seconds. Overrides the timeframe lower bound. */
|
|
9376
|
+
from?: number;
|
|
9377
|
+
/** @description End unix seconds */
|
|
9378
|
+
to?: number;
|
|
9379
|
+
/** @description Return only exits with this reason */
|
|
9380
|
+
reason?: components["schemas"]["PnlExitReason"];
|
|
9381
|
+
/** @description Return only exits in this market category */
|
|
9382
|
+
category?: components["schemas"]["PolymarketCategory"];
|
|
9383
|
+
/** @description Maximum exits to return. Default 500, max 2500. */
|
|
9384
|
+
count_back?: number;
|
|
9385
|
+
/** @description Alias for count_back. Default 500, max 2500. */
|
|
8336
9386
|
limit?: number;
|
|
8337
|
-
/** @description
|
|
9387
|
+
/** @description Sort field. Default exit_time. */
|
|
9388
|
+
sort_by?: components["schemas"]["PositionExitPnlSortBy"];
|
|
9389
|
+
/** @description Sort direction for sort_by. Default desc. */
|
|
9390
|
+
sort_direction?: components["schemas"]["SortDirection"];
|
|
9391
|
+
/** @description Shortcut: highest or lowest. Sorts by pnl_pct desc/asc. */
|
|
9392
|
+
profitability?: string;
|
|
9393
|
+
/** @description Minimum realized PnL USD to include. */
|
|
9394
|
+
min_pnl_usd?: number;
|
|
9395
|
+
/** @description Maximum realized PnL USD to include. */
|
|
9396
|
+
max_pnl_usd?: number;
|
|
9397
|
+
/** @description Minimum realized PnL percent to include. */
|
|
9398
|
+
min_pnl_pct?: number;
|
|
9399
|
+
/** @description Maximum realized PnL percent to include. */
|
|
9400
|
+
max_pnl_pct?: number;
|
|
9401
|
+
/** @description Offset for ranked sort pagination. Max 3500. */
|
|
8338
9402
|
offset?: number;
|
|
8339
|
-
/** @description
|
|
9403
|
+
/** @description Cursor from a previous response */
|
|
8340
9404
|
pagination_key?: string;
|
|
8341
|
-
/** @description Filter by event slug */
|
|
8342
|
-
event_slug?: string;
|
|
8343
9405
|
};
|
|
8344
9406
|
header?: never;
|
|
8345
9407
|
path: {
|
|
@@ -8350,13 +9412,13 @@ export interface operations {
|
|
|
8350
9412
|
};
|
|
8351
9413
|
requestBody?: never;
|
|
8352
9414
|
responses: {
|
|
8353
|
-
/** @description
|
|
9415
|
+
/** @description Trader position exits */
|
|
8354
9416
|
200: {
|
|
8355
9417
|
headers: {
|
|
8356
9418
|
[name: string]: unknown;
|
|
8357
9419
|
};
|
|
8358
9420
|
content: {
|
|
8359
|
-
"application/json": components["schemas"]["
|
|
9421
|
+
"application/json": components["schemas"]["PnlExitMarker"][];
|
|
8360
9422
|
};
|
|
8361
9423
|
};
|
|
8362
9424
|
};
|
|
@@ -8364,23 +9426,21 @@ export interface operations {
|
|
|
8364
9426
|
get_trader_market_pnl: {
|
|
8365
9427
|
parameters: {
|
|
8366
9428
|
query?: {
|
|
8367
|
-
/** @description
|
|
9429
|
+
/** @description Default: lifetime */
|
|
8368
9430
|
timeframe?: components["schemas"]["PnlTimeframe"];
|
|
8369
|
-
/** @description
|
|
9431
|
+
/** @description Default: realized_pnl_usd */
|
|
8370
9432
|
sort_by?: components["schemas"]["MarketPnlSortBy"];
|
|
8371
|
-
/** @description
|
|
9433
|
+
/** @description Default: desc */
|
|
8372
9434
|
sort_direction?: components["schemas"]["SortDirection"];
|
|
8373
|
-
/** @description
|
|
9435
|
+
/** @description Default 50, max 500 */
|
|
8374
9436
|
limit?: number;
|
|
8375
|
-
/** @description
|
|
9437
|
+
/** @description Max 2500. Takes precedence over pagination_key. */
|
|
8376
9438
|
offset?: number;
|
|
8377
|
-
/** @description
|
|
9439
|
+
/** @description Cursor from a previous response */
|
|
8378
9440
|
pagination_key?: string;
|
|
8379
|
-
/** @description Filter
|
|
9441
|
+
/** @description Filter to a single market */
|
|
8380
9442
|
condition_id?: string;
|
|
8381
|
-
/** @description Filter
|
|
8382
|
-
market_slug?: string;
|
|
8383
|
-
/** @description Filter by event slug */
|
|
9443
|
+
/** @description Filter to markets inside this event */
|
|
8384
9444
|
event_slug?: string;
|
|
8385
9445
|
};
|
|
8386
9446
|
header?: never;
|
|
@@ -8392,13 +9452,46 @@ export interface operations {
|
|
|
8392
9452
|
};
|
|
8393
9453
|
requestBody?: never;
|
|
8394
9454
|
responses: {
|
|
8395
|
-
/** @description
|
|
9455
|
+
/** @description Per-market PnL rows */
|
|
9456
|
+
200: {
|
|
9457
|
+
headers: {
|
|
9458
|
+
[name: string]: unknown;
|
|
9459
|
+
};
|
|
9460
|
+
content: {
|
|
9461
|
+
"application/json": components["schemas"]["MarketEntry"][];
|
|
9462
|
+
};
|
|
9463
|
+
};
|
|
9464
|
+
/** @description Invalid params */
|
|
9465
|
+
400: {
|
|
9466
|
+
headers: {
|
|
9467
|
+
[name: string]: unknown;
|
|
9468
|
+
};
|
|
9469
|
+
content?: never;
|
|
9470
|
+
};
|
|
9471
|
+
};
|
|
9472
|
+
};
|
|
9473
|
+
get_trader_pnl_periods: {
|
|
9474
|
+
parameters: {
|
|
9475
|
+
query?: {
|
|
9476
|
+
/** @description Default: lifetime */
|
|
9477
|
+
timeframe?: components["schemas"]["PnlAnalyticsTimeframe"];
|
|
9478
|
+
};
|
|
9479
|
+
header?: never;
|
|
9480
|
+
path: {
|
|
9481
|
+
/** @description Trader wallet address */
|
|
9482
|
+
address: string;
|
|
9483
|
+
};
|
|
9484
|
+
cookie?: never;
|
|
9485
|
+
};
|
|
9486
|
+
requestBody?: never;
|
|
9487
|
+
responses: {
|
|
9488
|
+
/** @description Best and worst PnL periods */
|
|
8396
9489
|
200: {
|
|
8397
9490
|
headers: {
|
|
8398
9491
|
[name: string]: unknown;
|
|
8399
9492
|
};
|
|
8400
9493
|
content: {
|
|
8401
|
-
"application/json": components["schemas"]["
|
|
9494
|
+
"application/json": components["schemas"]["PnlPeriodsResponse"];
|
|
8402
9495
|
};
|
|
8403
9496
|
};
|
|
8404
9497
|
};
|
|
@@ -8406,30 +9499,65 @@ export interface operations {
|
|
|
8406
9499
|
get_trader_position_pnl: {
|
|
8407
9500
|
parameters: {
|
|
8408
9501
|
query: {
|
|
8409
|
-
/** @description Required.
|
|
9502
|
+
/** @description Required. `open` for positions still holding shares, `closed` for positions that have been fully exited or resolved. */
|
|
8410
9503
|
status: "open" | "closed";
|
|
8411
|
-
/** @description
|
|
9504
|
+
/** @description Only valid with `status=closed`. `true` to include profitable closed positions, `false` for closed positions with zero or negative realized PnL. */
|
|
8412
9505
|
won?: boolean;
|
|
8413
|
-
/** @description
|
|
9506
|
+
/** @description Case-insensitive substring match on the market title. Scoped to the chosen `status` — results never cross the open/closed boundary. */
|
|
8414
9507
|
search?: string;
|
|
8415
|
-
/** @description Sort field
|
|
9508
|
+
/** @description Sort field. Default: total_pnl_usd. status=open accepts: realized_pnl_usd, total_pnl_usd, unrealized_pnl_usd, merge_usd, convert_collateral_usd, converted_count, converted_shares_gained, converted_shares_lost, last_traded_price, total_buy_usd, total_sell_usd, total_buys, total_sells, total_shares_bought, total_shares_sold, avg_entry_price, avg_exit_price, avg_price, total_fees, first_trade_at, last_trade_at, current_value, realized_pnl_pct, total_pnl_pct, title, current_price, current_shares_balance, merge_count, split_count, end_date, is_neg_risk, redeemable, mergeable. status=closed accepts: realized_pnl_usd, total_pnl_usd, unrealized_pnl_usd, merge_usd, convert_collateral_usd, converted_count, converted_shares_gained, converted_shares_lost, last_traded_price, total_buy_usd, total_sell_usd, redemption_usd, total_buys, total_sells, total_shares_bought, total_shares_sold, avg_entry_price, avg_exit_price, avg_price, total_fees, first_trade_at, last_trade_at, realized_pnl_pct, total_pnl_pct, title, merge_count, split_count, end_date, is_neg_risk. */
|
|
8416
9509
|
sort_by?: components["schemas"]["PositionPnlSortBy"];
|
|
8417
|
-
/** @description
|
|
9510
|
+
/** @description Default: desc */
|
|
8418
9511
|
sort_direction?: components["schemas"]["SortDirection"];
|
|
8419
|
-
/** @description
|
|
9512
|
+
/** @description Default 10, max 200 */
|
|
8420
9513
|
limit?: number;
|
|
8421
|
-
/** @description
|
|
9514
|
+
/** @description Max 3500. Takes precedence over pagination_key. */
|
|
8422
9515
|
offset?: number;
|
|
8423
|
-
/** @description
|
|
9516
|
+
/** @description Cursor from a previous response */
|
|
8424
9517
|
pagination_key?: string;
|
|
8425
|
-
/** @description Filter
|
|
9518
|
+
/** @description Filter to a single market */
|
|
8426
9519
|
condition_id?: string;
|
|
8427
|
-
/** @description Filter by market slug
|
|
9520
|
+
/** @description Filter by market slug */
|
|
8428
9521
|
market_slug?: string;
|
|
8429
|
-
/** @description Filter
|
|
9522
|
+
/** @description Filter to a single outcome token */
|
|
8430
9523
|
position_id?: string;
|
|
8431
|
-
/** @description Minimum shares balance to include
|
|
9524
|
+
/** @description Minimum shares balance to include */
|
|
8432
9525
|
min_shares?: number;
|
|
9526
|
+
/** @description Filter positions to a single market category. Combinable with `sort_by`. */
|
|
9527
|
+
category?: components["schemas"]["PolymarketCategory"];
|
|
9528
|
+
};
|
|
9529
|
+
header?: never;
|
|
9530
|
+
path: {
|
|
9531
|
+
/** @description Trader wallet address */
|
|
9532
|
+
address: string;
|
|
9533
|
+
};
|
|
9534
|
+
cookie?: never;
|
|
9535
|
+
};
|
|
9536
|
+
requestBody?: never;
|
|
9537
|
+
responses: {
|
|
9538
|
+
/** @description Per-position PnL rows */
|
|
9539
|
+
200: {
|
|
9540
|
+
headers: {
|
|
9541
|
+
[name: string]: unknown;
|
|
9542
|
+
};
|
|
9543
|
+
content: {
|
|
9544
|
+
"application/json": components["schemas"]["PositionEntry"][];
|
|
9545
|
+
};
|
|
9546
|
+
};
|
|
9547
|
+
/** @description Invalid params (missing `status`, unrecognised `sort_by`, or a `sort_by` value that's not allowed for the chosen status) */
|
|
9548
|
+
400: {
|
|
9549
|
+
headers: {
|
|
9550
|
+
[name: string]: unknown;
|
|
9551
|
+
};
|
|
9552
|
+
content?: never;
|
|
9553
|
+
};
|
|
9554
|
+
};
|
|
9555
|
+
};
|
|
9556
|
+
get_trader_pnl_risk: {
|
|
9557
|
+
parameters: {
|
|
9558
|
+
query?: {
|
|
9559
|
+
/** @description Default: lifetime */
|
|
9560
|
+
timeframe?: components["schemas"]["PnlAnalyticsTimeframe"];
|
|
8433
9561
|
};
|
|
8434
9562
|
header?: never;
|
|
8435
9563
|
path: {
|
|
@@ -8440,13 +9568,13 @@ export interface operations {
|
|
|
8440
9568
|
};
|
|
8441
9569
|
requestBody?: never;
|
|
8442
9570
|
responses: {
|
|
8443
|
-
/** @description
|
|
9571
|
+
/** @description Trader PnL risk */
|
|
8444
9572
|
200: {
|
|
8445
9573
|
headers: {
|
|
8446
9574
|
[name: string]: unknown;
|
|
8447
9575
|
};
|
|
8448
9576
|
content: {
|
|
8449
|
-
"application/json": components["schemas"]["
|
|
9577
|
+
"application/json": components["schemas"]["PnlRiskResponse"];
|
|
8450
9578
|
};
|
|
8451
9579
|
};
|
|
8452
9580
|
};
|
|
@@ -8504,6 +9632,42 @@ export interface operations {
|
|
|
8504
9632
|
};
|
|
8505
9633
|
};
|
|
8506
9634
|
};
|
|
9635
|
+
get_top_trades_markets: {
|
|
9636
|
+
parameters: {
|
|
9637
|
+
query?: {
|
|
9638
|
+
/** @description Default: lifetime */
|
|
9639
|
+
timeframe?: components["schemas"]["PnlTimeframe"];
|
|
9640
|
+
/** @description Default 50, max 200 */
|
|
9641
|
+
limit?: number;
|
|
9642
|
+
/** @description Max 2500. Takes precedence over pagination_key. */
|
|
9643
|
+
offset?: number;
|
|
9644
|
+
/** @description Cursor from a previous response */
|
|
9645
|
+
pagination_key?: string;
|
|
9646
|
+
};
|
|
9647
|
+
header?: never;
|
|
9648
|
+
path?: never;
|
|
9649
|
+
cookie?: never;
|
|
9650
|
+
};
|
|
9651
|
+
requestBody?: never;
|
|
9652
|
+
responses: {
|
|
9653
|
+
/** @description Top markets page */
|
|
9654
|
+
200: {
|
|
9655
|
+
headers: {
|
|
9656
|
+
[name: string]: unknown;
|
|
9657
|
+
};
|
|
9658
|
+
content: {
|
|
9659
|
+
"application/json": components["schemas"]["MarketEntry"][];
|
|
9660
|
+
};
|
|
9661
|
+
};
|
|
9662
|
+
/** @description Invalid params */
|
|
9663
|
+
400: {
|
|
9664
|
+
headers: {
|
|
9665
|
+
[name: string]: unknown;
|
|
9666
|
+
};
|
|
9667
|
+
content?: never;
|
|
9668
|
+
};
|
|
9669
|
+
};
|
|
9670
|
+
};
|
|
8507
9671
|
get_trader_trades: {
|
|
8508
9672
|
parameters: {
|
|
8509
9673
|
query?: {
|
|
@@ -8573,8 +9737,8 @@ export interface operations {
|
|
|
8573
9737
|
get_trader_volume_chart: {
|
|
8574
9738
|
parameters: {
|
|
8575
9739
|
query?: {
|
|
8576
|
-
/** @description Time interval:
|
|
8577
|
-
resolution?: components["schemas"]["
|
|
9740
|
+
/** @description Time interval: 60, 240, D, 1D, W, 1W, M, 1M (default: 60) */
|
|
9741
|
+
resolution?: components["schemas"]["AnalyticsResolution"];
|
|
8578
9742
|
/** @description Number of data points (max: 2500) */
|
|
8579
9743
|
count_back?: number;
|
|
8580
9744
|
/** @description Start timestamp (Unix seconds) */
|
|
@@ -8606,7 +9770,7 @@ export interface operations {
|
|
|
8606
9770
|
parameters: {
|
|
8607
9771
|
query?: {
|
|
8608
9772
|
/** @description Lookback window: 1h, 24h, 7d, 30d, 1mo, 1y (default: 24h) */
|
|
8609
|
-
timeframe?: components["schemas"]["
|
|
9773
|
+
timeframe?: components["schemas"]["AnalyticsChangeTimeframe"];
|
|
8610
9774
|
};
|
|
8611
9775
|
header?: never;
|
|
8612
9776
|
path: {
|
|
@@ -8623,7 +9787,7 @@ export interface operations {
|
|
|
8623
9787
|
[name: string]: unknown;
|
|
8624
9788
|
};
|
|
8625
9789
|
content: {
|
|
8626
|
-
"application/json": components["schemas"]["
|
|
9790
|
+
"application/json": components["schemas"]["TraderAnalyticsMetricPctChange"];
|
|
8627
9791
|
};
|
|
8628
9792
|
};
|
|
8629
9793
|
};
|
|
@@ -8657,7 +9821,7 @@ export interface operations {
|
|
|
8657
9821
|
[name: string]: unknown;
|
|
8658
9822
|
};
|
|
8659
9823
|
content: {
|
|
8660
|
-
"application/json": components["schemas"]["
|
|
9824
|
+
"application/json": components["schemas"]["TraderAnalyticsDeltaTimeBucketRow"][];
|
|
8661
9825
|
};
|
|
8662
9826
|
};
|
|
8663
9827
|
};
|
|
@@ -8691,7 +9855,7 @@ export interface operations {
|
|
|
8691
9855
|
[name: string]: unknown;
|
|
8692
9856
|
};
|
|
8693
9857
|
content: {
|
|
8694
|
-
"application/json": components["schemas"]["
|
|
9858
|
+
"application/json": components["schemas"]["TraderAnalyticsTimeBucketRow"][];
|
|
8695
9859
|
};
|
|
8696
9860
|
};
|
|
8697
9861
|
};
|