viz-js-lib 0.13.2 → 0.13.4

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.
@@ -1348,6 +1348,691 @@
1348
1348
  }
1349
1349
  }
1350
1350
  ]
1351
+ },
1352
+ {
1353
+ "name": "prediction_market_api",
1354
+ "description": "Read-only access to HF14 prediction markets: markets, outcomes, bets, positions, liquidity, leverage positions and previews, oracles, disputes, the lazy pool, off-chain market metadata/taxonomy, k-line series, and PM governance chain properties.",
1355
+ "methods": [
1356
+ {
1357
+ "method": "get_market",
1358
+ "description": "Returns the prediction market object for the given ID. Throws if the market does not exist.",
1359
+ "params": [
1360
+ {
1361
+ "name": "market_id",
1362
+ "caption": "Market ID",
1363
+ "description": "Prediction market object ID.",
1364
+ "type": "integer",
1365
+ "required": true
1366
+ }
1367
+ ],
1368
+ "returns": {
1369
+ "type": "object",
1370
+ "description": "pm_market_object."
1371
+ }
1372
+ },
1373
+ {
1374
+ "method": "list_markets",
1375
+ "description": "Lists markets filtered by status, paginated. show_risky reveals under-insured markets.",
1376
+ "params": [
1377
+ {
1378
+ "name": "status",
1379
+ "caption": "Status",
1380
+ "description": "Market status filter (numeric enum).",
1381
+ "type": "integer",
1382
+ "required": true
1383
+ },
1384
+ {
1385
+ "name": "from",
1386
+ "caption": "From",
1387
+ "description": "Pagination start offset (0-based).",
1388
+ "type": "integer",
1389
+ "required": true
1390
+ },
1391
+ {
1392
+ "name": "limit",
1393
+ "caption": "Limit",
1394
+ "description": "Maximum rows to return (≤ 1000).",
1395
+ "type": "integer",
1396
+ "required": true
1397
+ },
1398
+ {
1399
+ "name": "show_risky",
1400
+ "caption": "Show risky",
1401
+ "description": "Include under-insured (risky) markets; defaults to false.",
1402
+ "type": "boolean",
1403
+ "required": false
1404
+ }
1405
+ ],
1406
+ "returns": {
1407
+ "type": "array",
1408
+ "description": "Array of pm_market_object."
1409
+ }
1410
+ },
1411
+ {
1412
+ "method": "list_markets_by_oracle",
1413
+ "description": "Lists markets assigned to the given oracle account, paginated.",
1414
+ "params": [
1415
+ {
1416
+ "name": "oracle",
1417
+ "caption": "Oracle",
1418
+ "description": "Oracle account name.",
1419
+ "type": "string",
1420
+ "required": true
1421
+ },
1422
+ {
1423
+ "name": "from",
1424
+ "caption": "From",
1425
+ "description": "Pagination start offset (0-based).",
1426
+ "type": "integer",
1427
+ "required": true
1428
+ },
1429
+ {
1430
+ "name": "limit",
1431
+ "caption": "Limit",
1432
+ "description": "Maximum rows to return (≤ 1000).",
1433
+ "type": "integer",
1434
+ "required": true
1435
+ }
1436
+ ],
1437
+ "returns": {
1438
+ "type": "array",
1439
+ "description": "Array of pm_market_object."
1440
+ }
1441
+ },
1442
+ {
1443
+ "method": "list_markets_by_creator",
1444
+ "description": "Lists markets created by the given account, paginated.",
1445
+ "params": [
1446
+ {
1447
+ "name": "creator",
1448
+ "caption": "Creator",
1449
+ "description": "Market creator account name.",
1450
+ "type": "string",
1451
+ "required": true
1452
+ },
1453
+ {
1454
+ "name": "from",
1455
+ "caption": "From",
1456
+ "description": "Pagination start offset (0-based).",
1457
+ "type": "integer",
1458
+ "required": true
1459
+ },
1460
+ {
1461
+ "name": "limit",
1462
+ "caption": "Limit",
1463
+ "description": "Maximum rows to return (≤ 1000).",
1464
+ "type": "integer",
1465
+ "required": true
1466
+ }
1467
+ ],
1468
+ "returns": {
1469
+ "type": "array",
1470
+ "description": "Array of pm_market_object."
1471
+ }
1472
+ },
1473
+ {
1474
+ "method": "get_market_outcomes",
1475
+ "description": "Returns the outcome objects of a market (empty for binary markets).",
1476
+ "params": [
1477
+ {
1478
+ "name": "market_id",
1479
+ "caption": "Market ID",
1480
+ "description": "Prediction market object ID.",
1481
+ "type": "integer",
1482
+ "required": true
1483
+ }
1484
+ ],
1485
+ "returns": {
1486
+ "type": "array",
1487
+ "description": "Array of pm_outcome_object."
1488
+ }
1489
+ },
1490
+ {
1491
+ "method": "get_market_weight_sums",
1492
+ "description": "Returns per-outcome amount and curve weight sums for a market.",
1493
+ "params": [
1494
+ {
1495
+ "name": "market_id",
1496
+ "caption": "Market ID",
1497
+ "description": "Prediction market object ID.",
1498
+ "type": "integer",
1499
+ "required": true
1500
+ }
1501
+ ],
1502
+ "returns": {
1503
+ "type": "object",
1504
+ "description": "pm_market_weight_sums_api_object."
1505
+ }
1506
+ },
1507
+ {
1508
+ "method": "get_market_bets",
1509
+ "description": "Lists the bets placed on a market, paginated.",
1510
+ "params": [
1511
+ {
1512
+ "name": "market_id",
1513
+ "caption": "Market ID",
1514
+ "description": "Prediction market object ID.",
1515
+ "type": "integer",
1516
+ "required": true
1517
+ },
1518
+ {
1519
+ "name": "from",
1520
+ "caption": "From",
1521
+ "description": "Pagination start offset (0-based).",
1522
+ "type": "integer",
1523
+ "required": true
1524
+ },
1525
+ {
1526
+ "name": "limit",
1527
+ "caption": "Limit",
1528
+ "description": "Maximum rows to return (≤ 1000).",
1529
+ "type": "integer",
1530
+ "required": true
1531
+ }
1532
+ ],
1533
+ "returns": {
1534
+ "type": "array",
1535
+ "description": "Array of pm_bet_object."
1536
+ }
1537
+ },
1538
+ {
1539
+ "method": "get_account_positions",
1540
+ "description": "Returns an account's market positions (bet, expected_payout, market_status, resolved_outcome), paginated.",
1541
+ "params": [
1542
+ {
1543
+ "name": "account",
1544
+ "caption": "Account",
1545
+ "description": "VIZ account name.",
1546
+ "type": "string",
1547
+ "required": true
1548
+ },
1549
+ {
1550
+ "name": "from",
1551
+ "caption": "From",
1552
+ "description": "Pagination start offset (0-based).",
1553
+ "type": "integer",
1554
+ "required": true
1555
+ },
1556
+ {
1557
+ "name": "limit",
1558
+ "caption": "Limit",
1559
+ "description": "Maximum rows to return (≤ 1000).",
1560
+ "type": "integer",
1561
+ "required": true
1562
+ }
1563
+ ],
1564
+ "returns": {
1565
+ "type": "array",
1566
+ "description": "Array of pm_position_api_object."
1567
+ }
1568
+ },
1569
+ {
1570
+ "method": "get_market_liquidity",
1571
+ "description": "Lists liquidity-provider entries for a market, paginated.",
1572
+ "params": [
1573
+ {
1574
+ "name": "market_id",
1575
+ "caption": "Market ID",
1576
+ "description": "Prediction market object ID.",
1577
+ "type": "integer",
1578
+ "required": true
1579
+ },
1580
+ {
1581
+ "name": "from",
1582
+ "caption": "From",
1583
+ "description": "Pagination start offset (0-based).",
1584
+ "type": "integer",
1585
+ "required": true
1586
+ },
1587
+ {
1588
+ "name": "limit",
1589
+ "caption": "Limit",
1590
+ "description": "Maximum rows to return (≤ 1000).",
1591
+ "type": "integer",
1592
+ "required": true
1593
+ }
1594
+ ],
1595
+ "returns": {
1596
+ "type": "array",
1597
+ "description": "Array of pm_liquidity_object."
1598
+ }
1599
+ },
1600
+ {
1601
+ "method": "get_market_full",
1602
+ "description": "Enriched market view (market, outcomes, weight_sums, oracle, meta); when an account is given, also that account's positions, leverage and LP.",
1603
+ "params": [
1604
+ {
1605
+ "name": "market_id",
1606
+ "caption": "Market ID",
1607
+ "description": "Prediction market object ID.",
1608
+ "type": "integer",
1609
+ "required": true
1610
+ },
1611
+ {
1612
+ "name": "account",
1613
+ "caption": "Account",
1614
+ "description": "VIZ account name.",
1615
+ "type": "string",
1616
+ "required": false
1617
+ }
1618
+ ],
1619
+ "returns": {
1620
+ "type": "object",
1621
+ "description": "pm_market_full_api_object."
1622
+ }
1623
+ },
1624
+ {
1625
+ "method": "get_account_leverage_positions",
1626
+ "description": "Lists an account's leverage positions, paginated.",
1627
+ "params": [
1628
+ {
1629
+ "name": "account",
1630
+ "caption": "Account",
1631
+ "description": "VIZ account name.",
1632
+ "type": "string",
1633
+ "required": true
1634
+ },
1635
+ {
1636
+ "name": "from",
1637
+ "caption": "From",
1638
+ "description": "Pagination start offset (0-based).",
1639
+ "type": "integer",
1640
+ "required": true
1641
+ },
1642
+ {
1643
+ "name": "limit",
1644
+ "caption": "Limit",
1645
+ "description": "Maximum rows to return (≤ 1000).",
1646
+ "type": "integer",
1647
+ "required": true
1648
+ }
1649
+ ],
1650
+ "returns": {
1651
+ "type": "array",
1652
+ "description": "Array of pm_leverage_position_object."
1653
+ }
1654
+ },
1655
+ {
1656
+ "method": "get_market_leverage_positions",
1657
+ "description": "Lists leverage positions open on a market, paginated.",
1658
+ "params": [
1659
+ {
1660
+ "name": "market_id",
1661
+ "caption": "Market ID",
1662
+ "description": "Prediction market object ID.",
1663
+ "type": "integer",
1664
+ "required": true
1665
+ },
1666
+ {
1667
+ "name": "from",
1668
+ "caption": "From",
1669
+ "description": "Pagination start offset (0-based).",
1670
+ "type": "integer",
1671
+ "required": true
1672
+ },
1673
+ {
1674
+ "name": "limit",
1675
+ "caption": "Limit",
1676
+ "description": "Maximum rows to return (≤ 1000).",
1677
+ "type": "integer",
1678
+ "required": true
1679
+ }
1680
+ ],
1681
+ "returns": {
1682
+ "type": "array",
1683
+ "description": "Array of pm_leverage_position_object."
1684
+ }
1685
+ },
1686
+ {
1687
+ "method": "get_creator_ban",
1688
+ "description": "Returns the market-creation ban record for an account. Throws if there is none.",
1689
+ "params": [
1690
+ {
1691
+ "name": "account",
1692
+ "caption": "Account",
1693
+ "description": "VIZ account name.",
1694
+ "type": "string",
1695
+ "required": true
1696
+ }
1697
+ ],
1698
+ "returns": {
1699
+ "type": "object",
1700
+ "description": "pm_creator_ban_object."
1701
+ }
1702
+ },
1703
+ {
1704
+ "method": "get_leverage_quote",
1705
+ "description": "Read-only projection of leverage margin math: max leverage, up to 12 slider stops, and failed_constraints.",
1706
+ "params": [
1707
+ {
1708
+ "name": "market_id",
1709
+ "caption": "Market ID",
1710
+ "description": "Prediction market object ID.",
1711
+ "type": "integer",
1712
+ "required": true
1713
+ },
1714
+ {
1715
+ "name": "outcome_index",
1716
+ "caption": "Outcome index",
1717
+ "description": "Index of the outcome within the market.",
1718
+ "type": "integer",
1719
+ "required": true
1720
+ },
1721
+ {
1722
+ "name": "collateral",
1723
+ "caption": "Collateral",
1724
+ "description": "Collateral amount (integer shares).",
1725
+ "type": "integer",
1726
+ "required": true
1727
+ }
1728
+ ],
1729
+ "returns": {
1730
+ "type": "object",
1731
+ "description": "pm_leverage_quote_api_object."
1732
+ }
1733
+ },
1734
+ {
1735
+ "method": "get_leverage_close_preview",
1736
+ "description": "Read-only preview of closing a leverage position.",
1737
+ "params": [
1738
+ {
1739
+ "name": "position_id",
1740
+ "caption": "Position ID",
1741
+ "description": "Leverage position object ID.",
1742
+ "type": "integer",
1743
+ "required": true
1744
+ }
1745
+ ],
1746
+ "returns": {
1747
+ "type": "object",
1748
+ "description": "pm_leverage_close_preview_api_object."
1749
+ }
1750
+ },
1751
+ {
1752
+ "method": "get_leverage_convert_preview",
1753
+ "description": "Read-only preview of converting a leverage position.",
1754
+ "params": [
1755
+ {
1756
+ "name": "position_id",
1757
+ "caption": "Position ID",
1758
+ "description": "Leverage position object ID.",
1759
+ "type": "integer",
1760
+ "required": true
1761
+ }
1762
+ ],
1763
+ "returns": {
1764
+ "type": "object",
1765
+ "description": "pm_leverage_convert_preview_api_object."
1766
+ }
1767
+ },
1768
+ {
1769
+ "method": "get_oracle",
1770
+ "description": "Returns an oracle account with its non-consensus reliability_score (basis points). Throws if there is none.",
1771
+ "params": [
1772
+ {
1773
+ "name": "owner",
1774
+ "caption": "Owner",
1775
+ "description": "Oracle owner account name.",
1776
+ "type": "string",
1777
+ "required": true
1778
+ }
1779
+ ],
1780
+ "returns": {
1781
+ "type": "object",
1782
+ "description": "pm_oracle_api_object."
1783
+ }
1784
+ },
1785
+ {
1786
+ "method": "list_oracles",
1787
+ "description": "Lists registered oracle accounts, paginated.",
1788
+ "params": [
1789
+ {
1790
+ "name": "from",
1791
+ "caption": "From",
1792
+ "description": "Pagination start offset (0-based).",
1793
+ "type": "integer",
1794
+ "required": true
1795
+ },
1796
+ {
1797
+ "name": "limit",
1798
+ "caption": "Limit",
1799
+ "description": "Maximum rows to return (≤ 1000).",
1800
+ "type": "integer",
1801
+ "required": true
1802
+ }
1803
+ ],
1804
+ "returns": {
1805
+ "type": "array",
1806
+ "description": "Array of pm_oracle_object."
1807
+ }
1808
+ },
1809
+ {
1810
+ "method": "get_dispute",
1811
+ "description": "Returns the dispute object for a market. Throws if there is none.",
1812
+ "params": [
1813
+ {
1814
+ "name": "market_id",
1815
+ "caption": "Market ID",
1816
+ "description": "Prediction market object ID.",
1817
+ "type": "integer",
1818
+ "required": true
1819
+ }
1820
+ ],
1821
+ "returns": {
1822
+ "type": "object",
1823
+ "description": "pm_dispute_object."
1824
+ }
1825
+ },
1826
+ {
1827
+ "method": "get_dispute_votes",
1828
+ "description": "Returns dispute votes with legacy tally and a stake-weighted quorum/verdict projection; returns a default object when there is no dispute.",
1829
+ "params": [
1830
+ {
1831
+ "name": "market_id",
1832
+ "caption": "Market ID",
1833
+ "description": "Prediction market object ID.",
1834
+ "type": "integer",
1835
+ "required": true
1836
+ }
1837
+ ],
1838
+ "returns": {
1839
+ "type": "object",
1840
+ "description": "pm_dispute_votes_api_object."
1841
+ }
1842
+ },
1843
+ {
1844
+ "method": "get_lazy_pool",
1845
+ "description": "Returns the global lazy pool object.",
1846
+ "params": [],
1847
+ "returns": {
1848
+ "type": "object",
1849
+ "description": "pm_lazy_pool_object."
1850
+ }
1851
+ },
1852
+ {
1853
+ "method": "get_lazy_deposit",
1854
+ "description": "Returns an account's lazy deposit. Throws if there is none.",
1855
+ "params": [
1856
+ {
1857
+ "name": "account",
1858
+ "caption": "Account",
1859
+ "description": "VIZ account name.",
1860
+ "type": "string",
1861
+ "required": true
1862
+ }
1863
+ ],
1864
+ "returns": {
1865
+ "type": "object",
1866
+ "description": "pm_lazy_deposit_object."
1867
+ }
1868
+ },
1869
+ {
1870
+ "method": "get_lazy_allocations",
1871
+ "description": "Lists lazy-pool allocations, paginated.",
1872
+ "params": [
1873
+ {
1874
+ "name": "from",
1875
+ "caption": "From",
1876
+ "description": "Pagination start offset (0-based).",
1877
+ "type": "integer",
1878
+ "required": true
1879
+ },
1880
+ {
1881
+ "name": "limit",
1882
+ "caption": "Limit",
1883
+ "description": "Maximum rows to return (≤ 1000).",
1884
+ "type": "integer",
1885
+ "required": true
1886
+ }
1887
+ ],
1888
+ "returns": {
1889
+ "type": "array",
1890
+ "description": "Array of pm_lazy_allocation_object."
1891
+ }
1892
+ },
1893
+ {
1894
+ "method": "get_market_lazy_allocation",
1895
+ "description": "Returns the lazy allocation for a market. Throws if there is none.",
1896
+ "params": [
1897
+ {
1898
+ "name": "market_id",
1899
+ "caption": "Market ID",
1900
+ "description": "Prediction market object ID.",
1901
+ "type": "integer",
1902
+ "required": true
1903
+ }
1904
+ ],
1905
+ "returns": {
1906
+ "type": "object",
1907
+ "description": "pm_lazy_allocation_object."
1908
+ }
1909
+ },
1910
+ {
1911
+ "method": "get_pm_chain_properties",
1912
+ "description": "Returns the median-voted prediction-market governance chain properties.",
1913
+ "params": [],
1914
+ "returns": {
1915
+ "type": "object",
1916
+ "description": "chain_properties_pm."
1917
+ }
1918
+ },
1919
+ {
1920
+ "method": "get_market_meta",
1921
+ "description": "Returns the off-chain (non-consensus, prunable) metadata for a market. Throws if there is none.",
1922
+ "params": [
1923
+ {
1924
+ "name": "market_id",
1925
+ "caption": "Market ID",
1926
+ "description": "Prediction market object ID.",
1927
+ "type": "integer",
1928
+ "required": true
1929
+ }
1930
+ ],
1931
+ "returns": {
1932
+ "type": "object",
1933
+ "description": "pm_market_meta_object."
1934
+ }
1935
+ },
1936
+ {
1937
+ "method": "list_markets_by_category",
1938
+ "description": "Lists markets in a taxonomy category with optional jurisdiction/subcategory/tag filters and sort order.",
1939
+ "params": [
1940
+ {
1941
+ "name": "category",
1942
+ "caption": "Category",
1943
+ "description": "Taxonomy category name.",
1944
+ "type": "string",
1945
+ "required": true
1946
+ },
1947
+ {
1948
+ "name": "from",
1949
+ "caption": "From",
1950
+ "description": "Pagination start offset (0-based).",
1951
+ "type": "integer",
1952
+ "required": true
1953
+ },
1954
+ {
1955
+ "name": "limit",
1956
+ "caption": "Limit",
1957
+ "description": "Maximum rows to return (≤ 1000).",
1958
+ "type": "integer",
1959
+ "required": true
1960
+ },
1961
+ {
1962
+ "name": "jurisdiction",
1963
+ "caption": "Jurisdiction",
1964
+ "description": "Optional jurisdiction filter; defaults to empty.",
1965
+ "type": "string",
1966
+ "required": false
1967
+ },
1968
+ {
1969
+ "name": "subcategory",
1970
+ "caption": "Subcategory",
1971
+ "description": "Optional subcategory filter; defaults to empty.",
1972
+ "type": "string",
1973
+ "required": false
1974
+ },
1975
+ {
1976
+ "name": "tag",
1977
+ "caption": "Tag",
1978
+ "description": "Optional tag filter; defaults to empty.",
1979
+ "type": "string",
1980
+ "required": false
1981
+ },
1982
+ {
1983
+ "name": "sort",
1984
+ "caption": "Sort",
1985
+ "description": "Sort order: newest | oldest | volume | expiration; defaults to newest.",
1986
+ "type": "string",
1987
+ "required": false
1988
+ }
1989
+ ],
1990
+ "returns": {
1991
+ "type": "array",
1992
+ "description": "Array of pm_market_meta_object."
1993
+ }
1994
+ },
1995
+ {
1996
+ "method": "get_market_categories",
1997
+ "description": "Returns market categories and subcategory counts plus the top-20 hot tags.",
1998
+ "params": [],
1999
+ "returns": {
2000
+ "type": "object",
2001
+ "description": "pm_market_categories_api_object."
2002
+ }
2003
+ },
2004
+ {
2005
+ "method": "get_market_kline",
2006
+ "description": "Returns time-series weight snapshots (k-line) for a market, paged offset-from-newest.",
2007
+ "params": [
2008
+ {
2009
+ "name": "market_id",
2010
+ "caption": "Market ID",
2011
+ "description": "Prediction market object ID.",
2012
+ "type": "integer",
2013
+ "required": true
2014
+ },
2015
+ {
2016
+ "name": "from",
2017
+ "caption": "From",
2018
+ "description": "Pagination start offset (0-based).",
2019
+ "type": "integer",
2020
+ "required": false
2021
+ },
2022
+ {
2023
+ "name": "limit",
2024
+ "caption": "Limit",
2025
+ "description": "Maximum rows to return (≤ 1000).",
2026
+ "type": "integer",
2027
+ "required": false
2028
+ }
2029
+ ],
2030
+ "returns": {
2031
+ "type": "array",
2032
+ "description": "Array of pm_kline_api_object."
2033
+ }
2034
+ }
2035
+ ]
1351
2036
  }
1352
2037
  ]
1353
2038
  }