@n1xyz/nord-ts 0.3.2 → 0.3.4-alpha.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.
@@ -37,6 +37,41 @@ export interface paths {
37
37
  patch?: never;
38
38
  trace?: never;
39
39
  };
40
+ "/schema.proto": {
41
+ parameters: {
42
+ query?: never;
43
+ header?: never;
44
+ path?: never;
45
+ cookie?: never;
46
+ };
47
+ get: {
48
+ parameters: {
49
+ query?: never;
50
+ header?: never;
51
+ path?: never;
52
+ cookie?: never;
53
+ };
54
+ requestBody?: never;
55
+ responses: {
56
+ /** @description plain text */
57
+ 200: {
58
+ headers: {
59
+ [name: string]: unknown;
60
+ };
61
+ content: {
62
+ "text/plain; charset=utf-8": unknown;
63
+ };
64
+ };
65
+ };
66
+ };
67
+ put?: never;
68
+ post?: never;
69
+ delete?: never;
70
+ options?: never;
71
+ head?: never;
72
+ patch?: never;
73
+ trace?: never;
74
+ };
40
75
  "/info": {
41
76
  parameters: {
42
77
  query?: never;
@@ -303,7 +338,7 @@ export interface paths {
303
338
  query?: never;
304
339
  header?: never;
305
340
  path: {
306
- /** @description where `streams` is `trades@{symbol} | deltas@{symbol} | account@{account id} [&, ...]` e.g. `/ws/trades@BTCUSDC&deltas@BTCUSDC&account@42` */
341
+ /** @description where `streams` is `trades@{symbol} | deltas@{symbol} | account@{account id} | candle@{symbol}:{resolution} [&, ...]` e.g. `/ws/trades@BTCUSDC&deltas@BTCUSDC&account@42&candle@BTCUSDC:60` */
307
342
  streams: string;
308
343
  };
309
344
  cookie?: never;
@@ -612,7 +647,7 @@ export interface paths {
612
647
  parameters: {
613
648
  query?: {
614
649
  /** @description fetch results starting with this page; query starts with first entry if page isn't specified */
615
- startInclusive?: string | null;
650
+ startInclusive?: number | null;
616
651
  /** @description Query returns up to 50 trades in one go. */
617
652
  pageSize?: number | null;
618
653
  };
@@ -629,7 +664,7 @@ export interface paths {
629
664
  [name: string]: unknown;
630
665
  };
631
666
  content: {
632
- "application/json": components["schemas"]["PageResult_for_String_and_OrderInfo"];
667
+ "application/json": components["schemas"]["PageResult_for_uint64_and_OrderInfo"];
633
668
  };
634
669
  };
635
670
  };
@@ -687,27 +722,25 @@ export interface paths {
687
722
  patch?: never;
688
723
  trace?: never;
689
724
  };
690
- "/account/{account_id}/pnl": {
725
+ "/account/{account_id}/history/pnl": {
691
726
  parameters: {
692
727
  query?: never;
693
728
  header?: never;
694
729
  path?: never;
695
730
  cookie?: never;
696
731
  };
697
- /** @description Get account's PnL (Profit and Loss) history, ordered from most recent to oldest.
698
- *
699
- * Pagination Results include account PnL records with timestamp, account_id, action_id, and pnl value. Use query parameters `since` and `until` for time-based filtering, and `startInclusive` for pagination.
700
- *
701
- * To fetch more data, use the same `since` and `until` parameters and set `startInclusive` to the `nextStartInclusive` value from the previous response. If `nextStartInclusive` is absent, it means there's no more data to fetch, even if the max number of entries were returned. */
732
+ /** @description Fetch full history of PnL updates for an account. */
702
733
  get: {
703
734
  parameters: {
704
735
  query?: {
736
+ /** @description Optional market filter by market id. */
737
+ marketId?: number | null;
705
738
  /** @description start with this timestamp (RFC3339); defaults to UNIX epoch start */
706
739
  since?: string;
707
740
  /** @description end with this timestamp (RFC3339); defaults to current date-time */
708
741
  until?: string;
709
742
  /** @description fetch results starting with this page; query starts with first entry if page isn't specified */
710
- startInclusive?: string | null;
743
+ startInclusive?: number | null;
711
744
  /** @description Query returns up to 50 trades in one go. */
712
745
  pageSize?: number | null;
713
746
  };
@@ -725,7 +758,15 @@ export interface paths {
725
758
  [name: string]: unknown;
726
759
  };
727
760
  content: {
728
- "application/json": components["schemas"]["PageResult_for_String_and_AccountPnlInfo"];
761
+ "application/json": components["schemas"]["PageResult_for_uint64_and_AccountPnlInfo"];
762
+ };
763
+ };
764
+ 404: {
765
+ headers: {
766
+ [name: string]: unknown;
767
+ };
768
+ content: {
769
+ "application/json": components["schemas"]["UserNotFound"];
729
770
  };
730
771
  };
731
772
  };
@@ -738,24 +779,31 @@ export interface paths {
738
779
  patch?: never;
739
780
  trace?: never;
740
781
  };
741
- "/account/{account_id}/pnl/funding/history/PT1H": {
782
+ "/account/{account_id}/history/funding": {
742
783
  parameters: {
743
784
  query?: never;
744
785
  header?: never;
745
786
  path?: never;
746
787
  cookie?: never;
747
788
  };
748
- /** @description 11:00 - funding rate captured 11:30 - position 10 funding 0.01 12:00 - capture 12:20 - position zeroed
749
- *
750
- * will return - used payed funding for 11:00-12.00, using last position before 12:00 capture using funding index formed at 11:30 and market funding index formed at 12:00 - 12:00 - 13:00 PnL will not be returned at all.
751
- *
752
- * For exact applied PnL use more per trade PnL. */
789
+ /** @description Fetch full history of funding payments for an account. */
753
790
  get: {
754
791
  parameters: {
755
- query?: never;
792
+ query?: {
793
+ /** @description Optional market filter by market id. */
794
+ marketId?: number | null;
795
+ /** @description start with this timestamp (RFC3339); defaults to UNIX epoch start */
796
+ since?: string;
797
+ /** @description end with this timestamp (RFC3339); defaults to current date-time */
798
+ until?: string;
799
+ /** @description fetch results starting with this page; query starts with first entry if page isn't specified */
800
+ startInclusive?: string | null;
801
+ /** @description Query returns up to 50 trades in one go. */
802
+ pageSize?: number | null;
803
+ };
756
804
  header?: never;
757
805
  path: {
758
- /** @description Account for which to retrieve PnL history */
806
+ /** @description Account for which to retrieve funding history */
759
807
  account_id: number;
760
808
  };
761
809
  cookie?: never;
@@ -767,7 +815,23 @@ export interface paths {
767
815
  [name: string]: unknown;
768
816
  };
769
817
  content: {
770
- "application/json": components["schemas"]["AccountPnlHistInfo"][];
818
+ "application/json": components["schemas"]["PageResult_for_String_and_AccountFundingInfo"];
819
+ };
820
+ };
821
+ 400: {
822
+ headers: {
823
+ [name: string]: unknown;
824
+ };
825
+ content: {
826
+ "application/json": components["schemas"]["BadRequest"];
827
+ };
828
+ };
829
+ 404: {
830
+ headers: {
831
+ [name: string]: unknown;
832
+ };
833
+ content: {
834
+ "application/json": components["schemas"]["UserNotFound"];
771
835
  };
772
836
  };
773
837
  };
@@ -795,7 +859,7 @@ export interface paths {
795
859
  /** @description end with this timestamp (RFC3339); defaults to current date-time */
796
860
  until?: string;
797
861
  /** @description fetch results starting with this page; query starts with first entry if page isn't specified */
798
- startInclusive?: string | null;
862
+ startInclusive?: number | null;
799
863
  /** @description Query returns up to 50 trades in one go. */
800
864
  pageSize?: number | null;
801
865
  };
@@ -812,7 +876,7 @@ export interface paths {
812
876
  [name: string]: unknown;
813
877
  };
814
878
  content: {
815
- "application/json": components["schemas"]["PageResult_for_String_and_Trigger"];
879
+ "application/json": components["schemas"]["PageResult_for_uint64_and_Trigger"];
816
880
  };
817
881
  };
818
882
  };
@@ -872,7 +936,7 @@ export interface paths {
872
936
  parameters: {
873
937
  query?: {
874
938
  /** @description fetch results starting with this page; query starts with first entry if page isn't specified */
875
- startInclusive?: string | null;
939
+ startInclusive?: number | null;
876
940
  /** @description Query returns up to 50 trades in one go. */
877
941
  pageSize?: number | null;
878
942
  };
@@ -887,7 +951,7 @@ export interface paths {
887
951
  [name: string]: unknown;
888
952
  };
889
953
  content: {
890
- "application/json": components["schemas"]["PageResult_for_String_and_TriggerInfo"];
954
+ "application/json": components["schemas"]["PageResult_for_uint64_and_TriggerInfo"];
891
955
  };
892
956
  };
893
957
  };
@@ -991,7 +1055,7 @@ export interface paths {
991
1055
  query?: never;
992
1056
  header?: never;
993
1057
  path: {
994
- order_id: string;
1058
+ order_id: number;
995
1059
  };
996
1060
  cookie?: never;
997
1061
  };
@@ -1036,13 +1100,13 @@ export interface paths {
1036
1100
  parameters: {
1037
1101
  query?: {
1038
1102
  /** @description fetch results starting with this page; query starts with first entry if page isn't specified */
1039
- startInclusive?: string | null;
1103
+ startInclusive?: number | null;
1040
1104
  /** @description Query returns up to 50 trades in one go. */
1041
1105
  pageSize?: number | null;
1042
1106
  };
1043
1107
  header?: never;
1044
1108
  path: {
1045
- order_id: string;
1109
+ order_id: number;
1046
1110
  };
1047
1111
  cookie?: never;
1048
1112
  };
@@ -1053,7 +1117,7 @@ export interface paths {
1053
1117
  [name: string]: unknown;
1054
1118
  };
1055
1119
  content: {
1056
- "application/json": components["schemas"]["PageResult_for_String_and_Trade"];
1120
+ "application/json": components["schemas"]["PageResult_for_uint64_and_Trade"];
1057
1121
  };
1058
1122
  };
1059
1123
  };
@@ -1090,7 +1154,7 @@ export interface paths {
1090
1154
  /** @description end with this timestamp (RFC3339); defaults to current date-time */
1091
1155
  until?: string;
1092
1156
  /** @description fetch results starting with this page; query starts with first entry if page isn't specified */
1093
- startInclusive?: string | null;
1157
+ startInclusive?: number | null;
1094
1158
  /** @description Query returns up to 50 trades in one go. */
1095
1159
  pageSize?: number | null;
1096
1160
  };
@@ -1105,7 +1169,7 @@ export interface paths {
1105
1169
  [name: string]: unknown;
1106
1170
  };
1107
1171
  content: {
1108
- "application/json": components["schemas"]["PageResult_for_String_and_Trade"];
1172
+ "application/json": components["schemas"]["PageResult_for_uint64_and_Trade"];
1109
1173
  };
1110
1174
  };
1111
1175
  };
@@ -1351,6 +1415,7 @@ export interface paths {
1351
1415
  get: {
1352
1416
  parameters: {
1353
1417
  query?: {
1418
+ tier?: components["schemas"]["FeeTierId"] | null;
1354
1419
  /** @description fetch results starting with this page; query starts with first entry if page isn't specified */
1355
1420
  startInclusive?: number | null;
1356
1421
  /** @description Query returns up to 50 trades in one go. */
@@ -1469,22 +1534,30 @@ export interface paths {
1469
1534
  patch?: never;
1470
1535
  trace?: never;
1471
1536
  };
1472
- "/market/{market_id}/price/prev": {
1537
+ "/account/{account_id}/history/withdrawal": {
1473
1538
  parameters: {
1474
1539
  query?: never;
1475
1540
  header?: never;
1476
1541
  path?: never;
1477
1542
  cookie?: never;
1478
1543
  };
1479
- /** @description Fetch the latest price for a market at or before a timestamp. */
1544
+ /** @description Fetch full history of withdrawals for an account. */
1480
1545
  get: {
1481
1546
  parameters: {
1482
- query: {
1483
- atOrBefore: string;
1547
+ query?: {
1548
+ /** @description start with this timestamp (RFC3339); defaults to UNIX epoch start */
1549
+ since?: string;
1550
+ /** @description end with this timestamp (RFC3339); defaults to current date-time */
1551
+ until?: string;
1552
+ /** @description fetch results starting with this page; query starts with first entry if page isn't specified */
1553
+ startInclusive?: number | null;
1554
+ /** @description Query returns up to 50 trades in one go. */
1555
+ pageSize?: number | null;
1484
1556
  };
1485
1557
  header?: never;
1486
1558
  path: {
1487
- market_id: number;
1559
+ /** @description Account ID for which to fetch withdrawal history. */
1560
+ account_id: number;
1488
1561
  };
1489
1562
  cookie?: never;
1490
1563
  };
@@ -1495,7 +1568,7 @@ export interface paths {
1495
1568
  [name: string]: unknown;
1496
1569
  };
1497
1570
  content: {
1498
- "application/json": components["schemas"]["PreviousMarketPrice"];
1571
+ "application/json": components["schemas"]["PageResult_for_uint64_and_WithdrawalInfo"];
1499
1572
  };
1500
1573
  };
1501
1574
  404: {
@@ -1503,7 +1576,7 @@ export interface paths {
1503
1576
  [name: string]: unknown;
1504
1577
  };
1505
1578
  content: {
1506
- "application/json": components["schemas"]["MarketNotFound"];
1579
+ "application/json": components["schemas"]["UserNotFound"];
1507
1580
  };
1508
1581
  };
1509
1582
  };
@@ -1516,14 +1589,14 @@ export interface paths {
1516
1589
  patch?: never;
1517
1590
  trace?: never;
1518
1591
  };
1519
- "/account/{account_id}/history/withdrawal": {
1592
+ "/account/{account_id}/history/deposit": {
1520
1593
  parameters: {
1521
1594
  query?: never;
1522
1595
  header?: never;
1523
1596
  path?: never;
1524
1597
  cookie?: never;
1525
1598
  };
1526
- /** @description Fetch full history of withdrawals for an account. */
1599
+ /** @description Fetch full history of deposits for an account. */
1527
1600
  get: {
1528
1601
  parameters: {
1529
1602
  query?: {
@@ -1532,13 +1605,13 @@ export interface paths {
1532
1605
  /** @description end with this timestamp (RFC3339); defaults to current date-time */
1533
1606
  until?: string;
1534
1607
  /** @description fetch results starting with this page; query starts with first entry if page isn't specified */
1535
- startInclusive?: string | null;
1608
+ startInclusive?: number | null;
1536
1609
  /** @description Query returns up to 50 trades in one go. */
1537
1610
  pageSize?: number | null;
1538
1611
  };
1539
1612
  header?: never;
1540
1613
  path: {
1541
- /** @description Account ID for which to fetch withdrawal history. */
1614
+ /** @description Account ID for which to fetch deposit history. */
1542
1615
  account_id: number;
1543
1616
  };
1544
1617
  cookie?: never;
@@ -1550,7 +1623,62 @@ export interface paths {
1550
1623
  [name: string]: unknown;
1551
1624
  };
1552
1625
  content: {
1553
- "application/json": components["schemas"]["PageResult_for_String_and_Withdrawal"];
1626
+ "application/json": components["schemas"]["PageResult_for_uint64_and_DepositInfo"];
1627
+ };
1628
+ };
1629
+ 404: {
1630
+ headers: {
1631
+ [name: string]: unknown;
1632
+ };
1633
+ content: {
1634
+ "application/json": components["schemas"]["UserNotFound"];
1635
+ };
1636
+ };
1637
+ };
1638
+ };
1639
+ put?: never;
1640
+ post?: never;
1641
+ delete?: never;
1642
+ options?: never;
1643
+ head?: never;
1644
+ patch?: never;
1645
+ trace?: never;
1646
+ };
1647
+ "/account/{account_id}/history/liquidation": {
1648
+ parameters: {
1649
+ query?: never;
1650
+ header?: never;
1651
+ path?: never;
1652
+ cookie?: never;
1653
+ };
1654
+ /** @description Fetch full history of liquidations for an account. */
1655
+ get: {
1656
+ parameters: {
1657
+ query?: {
1658
+ /** @description start with this timestamp (RFC3339); defaults to UNIX epoch start */
1659
+ since?: string;
1660
+ /** @description end with this timestamp (RFC3339); defaults to current date-time */
1661
+ until?: string;
1662
+ /** @description fetch results starting with this page; query starts with first entry if page isn't specified */
1663
+ startInclusive?: number | null;
1664
+ /** @description Query returns up to 50 trades in one go. */
1665
+ pageSize?: number | null;
1666
+ };
1667
+ header?: never;
1668
+ path: {
1669
+ /** @description Account ID for which to fetch liquidation history. */
1670
+ account_id: number;
1671
+ };
1672
+ cookie?: never;
1673
+ };
1674
+ requestBody?: never;
1675
+ responses: {
1676
+ 200: {
1677
+ headers: {
1678
+ [name: string]: unknown;
1679
+ };
1680
+ content: {
1681
+ "application/json": components["schemas"]["PageResult_for_uint64_and_LiquidationInfo"];
1554
1682
  };
1555
1683
  };
1556
1684
  404: {
@@ -1617,7 +1745,9 @@ export interface paths {
1617
1745
  /** @description Gets market updates history for some period of time. Default is hourly for last 24 hours */
1618
1746
  get: {
1619
1747
  parameters: {
1620
- query?: never;
1748
+ query?: {
1749
+ pageSize?: number;
1750
+ };
1621
1751
  header?: never;
1622
1752
  path: {
1623
1753
  market_id: number;
@@ -1631,7 +1761,7 @@ export interface paths {
1631
1761
  [name: string]: unknown;
1632
1762
  };
1633
1763
  content: {
1634
- "application/json": components["schemas"]["PageResult_for_String_and_MarketHistoryInfo"];
1764
+ "application/json": components["schemas"]["PageResult_for_uint64_and_MarketHistoryInfo"];
1635
1765
  };
1636
1766
  };
1637
1767
  };
@@ -2608,20 +2738,20 @@ export interface components {
2608
2738
  };
2609
2739
  MarketStats: {
2610
2740
  /** Format: double */
2611
- indexPrice: number;
2741
+ indexPrice?: number | null;
2612
2742
  /** Format: double */
2613
- indexPriceConf: number;
2743
+ indexPriceConf?: number | null;
2614
2744
  frozen?: boolean;
2615
2745
  /** Format: double */
2616
2746
  volumeBase24h: number;
2617
2747
  /** Format: double */
2618
2748
  volumeQuote24h: number;
2619
2749
  /** Format: double */
2620
- high24h: number;
2750
+ high24h?: number | null;
2621
2751
  /** Format: double */
2622
- low24h: number;
2752
+ low24h?: number | null;
2623
2753
  /** Format: double */
2624
- close24h: number;
2754
+ close24h?: number | null;
2625
2755
  /** Format: double */
2626
2756
  prevClose24h?: number | null;
2627
2757
  perpStats?: components["schemas"]["PerpMarketStats"] | null;
@@ -2665,9 +2795,12 @@ export interface components {
2665
2795
  pubkey: string;
2666
2796
  expiry: string;
2667
2797
  };
2668
- PageQueryPart_for_String: {
2669
- /** @description fetch results starting with this page; query starts with first entry if page isn't specified */
2670
- startInclusive?: string | null;
2798
+ PageQueryPart_for_uint64: {
2799
+ /**
2800
+ * Format: uint64
2801
+ * @description fetch results starting with this page; query starts with first entry if page isn't specified
2802
+ */
2803
+ startInclusive?: number | null;
2671
2804
  /**
2672
2805
  * Format: uint8
2673
2806
  * @description Query returns up to 50 trades in one go.
@@ -2675,28 +2808,34 @@ export interface components {
2675
2808
  */
2676
2809
  pageSize: number | null;
2677
2810
  };
2678
- PageResult_for_String_and_OrderInfo: {
2811
+ PageResult_for_uint64_and_OrderInfo: {
2679
2812
  /** @description Set of items for requested by query. */
2680
2813
  items: components["schemas"]["OrderInfo"][];
2681
- /** @description If request contains more data, this is the id is set with which next request should be performed to get next page. If no more data, then it is undefined. */
2682
- nextStartInclusive?: string | null;
2814
+ /**
2815
+ * Format: uint64
2816
+ * @description If request contains more data, this is the id is set with which next request should be performed to get next page. If no more data, then it is undefined.
2817
+ */
2818
+ nextStartInclusive?: number | null;
2683
2819
  };
2684
2820
  /** @description Order summary. Use order_id to application side join with trades as needed. */
2685
2821
  OrderInfo: {
2686
2822
  addedAt: string;
2687
2823
  updatedAt: string;
2688
- tradeId: string;
2824
+ /** Format: uint64 */
2825
+ tradeId: number;
2689
2826
  /** Format: uint32 */
2690
2827
  traderId: number;
2691
2828
  /** Format: uint32 */
2692
2829
  marketId: number;
2693
- orderId: string;
2830
+ /** Format: uint64 */
2831
+ orderId: number;
2694
2832
  side: components["schemas"]["Side"];
2695
2833
  /** Format: double */
2696
2834
  placedSize: number;
2697
2835
  /** Format: double */
2698
2836
  filledSize?: number | null;
2699
- updateActionId: string;
2837
+ /** Format: uint64 */
2838
+ updateActionId: number;
2700
2839
  isReduceOnly: boolean;
2701
2840
  fillMode: components["schemas"]["FillMode"];
2702
2841
  /** Format: double */
@@ -2725,7 +2864,8 @@ export interface components {
2725
2864
  margins: components["schemas"]["AccountMarginsView"];
2726
2865
  };
2727
2866
  OpenOrder: {
2728
- orderId: string;
2867
+ /** Format: uint64 */
2868
+ orderId: number;
2729
2869
  /** Format: uint32 */
2730
2870
  marketId: number;
2731
2871
  side: components["schemas"]["Side"];
@@ -2820,7 +2960,13 @@ export interface components {
2820
2960
  /** @description See `bankruptcy` in MARKETS.md. In general happens if account does not have enough weighted tokens to covert his debt and negative PnL. */
2821
2961
  bankruptcy: boolean;
2822
2962
  };
2823
- PagedQuery: {
2963
+ GetAccountPnlHistoryQuery: {
2964
+ /**
2965
+ * Format: uint32
2966
+ * @description Optional market filter by market id.
2967
+ * @default null
2968
+ */
2969
+ marketId: number | null;
2824
2970
  /**
2825
2971
  * @description start with this timestamp (RFC3339); defaults to UNIX epoch start
2826
2972
  * @default null
@@ -2831,8 +2977,11 @@ export interface components {
2831
2977
  * @default null
2832
2978
  */
2833
2979
  until: string;
2834
- /** @description fetch results starting with this page; query starts with first entry if page isn't specified */
2835
- startInclusive?: string | null;
2980
+ /**
2981
+ * Format: uint64
2982
+ * @description fetch results starting with this page; query starts with first entry if page isn't specified
2983
+ */
2984
+ startInclusive?: number | null;
2836
2985
  /**
2837
2986
  * Format: uint8
2838
2987
  * @description Query returns up to 50 trades in one go.
@@ -2840,64 +2989,132 @@ export interface components {
2840
2989
  */
2841
2990
  pageSize: number | null;
2842
2991
  };
2843
- PageResult_for_String_and_AccountPnlInfo: {
2992
+ PageResult_for_uint64_and_AccountPnlInfo: {
2844
2993
  /** @description Set of items for requested by query. */
2845
2994
  items: components["schemas"]["AccountPnlInfo"][];
2846
- /** @description If request contains more data, this is the id is set with which next request should be performed to get next page. If no more data, then it is undefined. */
2847
- nextStartInclusive?: string | null;
2995
+ /**
2996
+ * Format: uint64
2997
+ * @description If request contains more data, this is the id is set with which next request should be performed to get next page. If no more data, then it is undefined.
2998
+ */
2999
+ nextStartInclusive?: number | null;
2848
3000
  };
2849
3001
  AccountPnlInfo: {
3002
+ /** @description Time of the position update. */
2850
3003
  time: string;
2851
- actionId: string;
2852
- /** Format: uint32 */
2853
- accountId: number;
2854
- /** Format: double */
2855
- pricePnlDelta: number;
2856
- /** Format: double */
2857
- fundingPnlDelta: number;
3004
+ /**
3005
+ * Format: uint64
3006
+ * @description Action id of the update. Used for pagination.
3007
+ */
3008
+ actionId: number;
3009
+ /**
3010
+ * Format: uint32
3011
+ * @description Market id of the position update.
3012
+ */
3013
+ marketId: number;
2858
3014
  /**
2859
3015
  * Format: double
2860
- * @description Total PnL update
3016
+ * @description PnL realized from this position update.
2861
3017
  */
2862
- pnl: number;
2863
- };
2864
- AccountPnlHistInfo: {
2865
- /** @description Same time when funding is applied */
2866
- time: string;
3018
+ tradingPnl: number;
2867
3019
  /**
2868
3020
  * Format: double
2869
- * @description Funding rate used to calculate this funding payment
3021
+ * @description Amount of unsettled funding paid to the account. Accumulated funding payments are tracked but only paid out to the account when updates happen. Thus, PnL history might include entries with no trading pnl (for example when opening or extending a position), but will still include funding payments if needed.
2870
3022
  */
2871
- fundingRate: number;
3023
+ settledFundingPnl: number;
2872
3024
  /**
2873
3025
  * Format: double
2874
- * @description Size used to calculated funding payment
3026
+ * @description Position size at the time of the pnl update. Positive for longs, negative for shorts.
3027
+ */
3028
+ positionSize: number;
3029
+ };
3030
+ GetAccountFundingHistoryQuery: {
3031
+ /**
3032
+ * Format: uint32
3033
+ * @description Optional market filter by market id.
3034
+ * @default null
3035
+ */
3036
+ marketId: number | null;
3037
+ /**
3038
+ * @description start with this timestamp (RFC3339); defaults to UNIX epoch start
3039
+ * @default null
3040
+ */
3041
+ since: string;
3042
+ /**
3043
+ * @description end with this timestamp (RFC3339); defaults to current date-time
3044
+ * @default null
3045
+ */
3046
+ until: string;
3047
+ /** @description fetch results starting with this page; query starts with first entry if page isn't specified */
3048
+ startInclusive?: string | null;
3049
+ /**
3050
+ * Format: uint8
3051
+ * @description Query returns up to 50 trades in one go.
3052
+ * @default null
3053
+ */
3054
+ pageSize: number | null;
3055
+ };
3056
+ PageResult_for_String_and_AccountFundingInfo: {
3057
+ /** @description Set of items for requested by query. */
3058
+ items: components["schemas"]["AccountFundingInfo"][];
3059
+ /** @description If request contains more data, this is the id is set with which next request should be performed to get next page. If no more data, then it is undefined. */
3060
+ nextStartInclusive?: string | null;
3061
+ };
3062
+ AccountFundingInfo: {
3063
+ /** @description Time of the position update. */
3064
+ time: string;
3065
+ /**
3066
+ * Format: uint64
3067
+ * @description Action id of the update. Used for pagination.
3068
+ */
3069
+ actionId: number;
3070
+ /**
3071
+ * Format: uint32
3072
+ * @description Market id of the position update.
2875
3073
  */
2876
- fundingSize?: number | null;
2877
- /** @description Side on time of funding application. */
2878
- side?: components["schemas"]["Side"] | null;
3074
+ marketId: number;
2879
3075
  /**
2880
3076
  * Format: double
2881
- * @description Result of `user_funding_index - market_Funding_index`.
3077
+ * @description Position size at the time of the pnl update. Positive for longs, negative for shorts.
2882
3078
  */
2883
- fundingIndexChange?: number | null;
3079
+ positionSize: number;
2884
3080
  /**
2885
3081
  * Format: double
2886
- * @description Funding pnl for this funding period, i.e. funding_size * funding_index_change. Negate for the funding paid by the account for this period.
3082
+ * @description Funding paid to the account for this funding period.
2887
3083
  */
2888
3084
  fundingPnl: number;
2889
- market: components["schemas"]["MarketIdInfo"];
2890
3085
  };
2891
- MarketIdInfo: {
2892
- /** Format: uint32 */
2893
- market_id: number;
2894
- market_symbol: string;
3086
+ BadRequest: null;
3087
+ PagedQuery: {
3088
+ /**
3089
+ * @description start with this timestamp (RFC3339); defaults to UNIX epoch start
3090
+ * @default null
3091
+ */
3092
+ since: string;
3093
+ /**
3094
+ * @description end with this timestamp (RFC3339); defaults to current date-time
3095
+ * @default null
3096
+ */
3097
+ until: string;
3098
+ /**
3099
+ * Format: uint64
3100
+ * @description fetch results starting with this page; query starts with first entry if page isn't specified
3101
+ */
3102
+ startInclusive?: number | null;
3103
+ /**
3104
+ * Format: uint8
3105
+ * @description Query returns up to 50 trades in one go.
3106
+ * @default null
3107
+ */
3108
+ pageSize: number | null;
2895
3109
  };
2896
- PageResult_for_String_and_Trigger: {
3110
+ PageResult_for_uint64_and_Trigger: {
2897
3111
  /** @description Set of items for requested by query. */
2898
3112
  items: components["schemas"]["Trigger"][];
2899
- /** @description If request contains more data, this is the id is set with which next request should be performed to get next page. If no more data, then it is undefined. */
2900
- nextStartInclusive?: string | null;
3113
+ /**
3114
+ * Format: uint64
3115
+ * @description If request contains more data, this is the id is set with which next request should be performed to get next page. If no more data, then it is undefined.
3116
+ */
3117
+ nextStartInclusive?: number | null;
2901
3118
  };
2902
3119
  Trigger: {
2903
3120
  /** Format: uint32 */
@@ -2909,8 +3126,10 @@ export interface components {
2909
3126
  side: components["schemas"]["Side"];
2910
3127
  kind: components["schemas"]["TriggerKind"];
2911
3128
  status: components["schemas"]["TriggerStatus"];
2912
- createdAtActionId: string;
2913
- finalizedAtActionId?: string | null;
3129
+ /** Format: uint64 */
3130
+ createdAtActionId: number;
3131
+ /** Format: uint64 */
3132
+ finalizedAtActionId?: number | null;
2914
3133
  createdAt: string;
2915
3134
  finalizedAt: string;
2916
3135
  };
@@ -2934,27 +3153,38 @@ export interface components {
2934
3153
  limitPrice?: number | null;
2935
3154
  side: components["schemas"]["Side"];
2936
3155
  kind: components["schemas"]["TriggerKind"];
2937
- /** @description created_at_action_id */
2938
- actionId: string;
3156
+ /**
3157
+ * Format: uint64
3158
+ * @description created_at_action_id
3159
+ */
3160
+ actionId: number;
2939
3161
  createdAt: string;
2940
3162
  };
2941
- PageResult_for_String_and_TriggerInfo: {
3163
+ PageResult_for_uint64_and_TriggerInfo: {
2942
3164
  /** @description Set of items for requested by query. */
2943
3165
  items: components["schemas"]["TriggerInfo"][];
2944
- /** @description If request contains more data, this is the id is set with which next request should be performed to get next page. If no more data, then it is undefined. */
2945
- nextStartInclusive?: string | null;
3166
+ /**
3167
+ * Format: uint64
3168
+ * @description If request contains more data, this is the id is set with which next request should be performed to get next page. If no more data, then it is undefined.
3169
+ */
3170
+ nextStartInclusive?: number | null;
2946
3171
  };
2947
3172
  OrderNotFound: null;
2948
- PageResult_for_String_and_Trade: {
3173
+ PageResult_for_uint64_and_Trade: {
2949
3174
  /** @description Set of items for requested by query. */
2950
3175
  items: components["schemas"]["Trade"][];
2951
- /** @description If request contains more data, this is the id is set with which next request should be performed to get next page. If no more data, then it is undefined. */
2952
- nextStartInclusive?: string | null;
3176
+ /**
3177
+ * Format: uint64
3178
+ * @description If request contains more data, this is the id is set with which next request should be performed to get next page. If no more data, then it is undefined.
3179
+ */
3180
+ nextStartInclusive?: number | null;
2953
3181
  };
2954
3182
  Trade: {
2955
3183
  time: string;
2956
- actionId: string;
2957
- tradeId: string;
3184
+ /** Format: uint64 */
3185
+ actionId: number;
3186
+ /** Format: uint64 */
3187
+ tradeId: number;
2958
3188
  /** Format: uint32 */
2959
3189
  takerId: number;
2960
3190
  takerSide: components["schemas"]["Side"];
@@ -2962,7 +3192,8 @@ export interface components {
2962
3192
  makerId: number;
2963
3193
  /** Format: uint32 */
2964
3194
  marketId: number;
2965
- orderId: string;
3195
+ /** Format: uint64 */
3196
+ orderId: number;
2966
3197
  /** Format: double */
2967
3198
  price: number;
2968
3199
  /** Format: double */
@@ -2996,8 +3227,11 @@ export interface components {
2996
3227
  * @default null
2997
3228
  */
2998
3229
  until: string;
2999
- /** @description fetch results starting with this page; query starts with first entry if page isn't specified */
3000
- startInclusive?: string | null;
3230
+ /**
3231
+ * Format: uint64
3232
+ * @description fetch results starting with this page; query starts with first entry if page isn't specified
3233
+ */
3234
+ startInclusive?: number | null;
3001
3235
  /**
3002
3236
  * Format: uint8
3003
3237
  * @description Query returns up to 50 trades in one go.
@@ -3005,17 +3239,13 @@ export interface components {
3005
3239
  */
3006
3240
  pageSize: number | null;
3007
3241
  };
3008
- DownloadFilter: components["schemas"]["Op_for_DataDateTime"] | components["schemas"]["Op_for_String"] | components["schemas"]["Op_for_uint64"] | null;
3242
+ DownloadFilter: components["schemas"]["Op_for_DataDateTime"] | components["schemas"]["Op_for_uint64"] | components["schemas"]["Op_for_uint64"] | null;
3009
3243
  /** @description Parses tag (anycase), and value in round braces using `from_str`. */
3010
3244
  Op_for_DataDateTime: {
3011
3245
  le: components["schemas"]["DataDateTime"];
3012
3246
  };
3013
3247
  DataDateTime: string;
3014
3248
  /** @description Parses tag (anycase), and value in round braces using `from_str`. */
3015
- Op_for_String: {
3016
- le: string;
3017
- };
3018
- /** @description Parses tag (anycase), and value in round braces using `from_str`. */
3019
3249
  Op_for_uint64: {
3020
3250
  /** Format: uint64 */
3021
3251
  le: number;
@@ -3061,7 +3291,9 @@ export interface components {
3061
3291
  /** Format: uint16 */
3062
3292
  taker_fee_bps: number;
3063
3293
  };
3064
- PageQueryPart_for_uint32: {
3294
+ GetAccountsFeeTiersQuery: {
3295
+ /** @default null */
3296
+ tier: components["schemas"]["FeeTierId"] | null;
3065
3297
  /**
3066
3298
  * Format: uint32
3067
3299
  * @description fetch results starting with this page; query starts with first entry if page isn't specified
@@ -3116,35 +3348,117 @@ export interface components {
3116
3348
  /** Format: double */
3117
3349
  volumeQuote: number;
3118
3350
  };
3119
- GetPrevMarketPriceQuery: {
3120
- atOrBefore: string;
3351
+ PageResult_for_uint64_and_WithdrawalInfo: {
3352
+ /** @description Set of items for requested by query. */
3353
+ items: components["schemas"]["WithdrawalInfo"][];
3354
+ /**
3355
+ * Format: uint64
3356
+ * @description If request contains more data, this is the id is set with which next request should be performed to get next page. If no more data, then it is undefined.
3357
+ */
3358
+ nextStartInclusive?: number | null;
3121
3359
  };
3122
- PreviousMarketPrice: {
3360
+ WithdrawalInfo: {
3361
+ time: string;
3362
+ /** Format: uint64 */
3363
+ actionId: number;
3123
3364
  /** Format: uint32 */
3124
- marketId: number;
3365
+ accountId: number;
3366
+ /** Format: uint32 */
3367
+ tokenId: number;
3368
+ /** Format: double */
3369
+ amount: number;
3125
3370
  /** Format: double */
3126
- price?: number | null;
3371
+ balance: number;
3372
+ /** Format: double */
3373
+ fee: number;
3374
+ destPubkey?: string | null;
3127
3375
  };
3128
- PageResult_for_String_and_Withdrawal: {
3376
+ PageResult_for_uint64_and_DepositInfo: {
3129
3377
  /** @description Set of items for requested by query. */
3130
- items: components["schemas"]["Withdrawal"][];
3131
- /** @description If request contains more data, this is the id is set with which next request should be performed to get next page. If no more data, then it is undefined. */
3132
- nextStartInclusive?: string | null;
3378
+ items: components["schemas"]["DepositInfo"][];
3379
+ /**
3380
+ * Format: uint64
3381
+ * @description If request contains more data, this is the id is set with which next request should be performed to get next page. If no more data, then it is undefined.
3382
+ */
3383
+ nextStartInclusive?: number | null;
3133
3384
  };
3134
- Withdrawal: {
3385
+ DepositInfo: {
3135
3386
  time: string;
3136
- actionId: string;
3387
+ /** Format: uint64 */
3388
+ actionId: number;
3137
3389
  /** Format: uint32 */
3138
3390
  accountId: number;
3139
3391
  /** Format: uint32 */
3140
3392
  tokenId: number;
3141
- /** Format: uint64 */
3393
+ /** Format: double */
3142
3394
  amount: number;
3143
- /** Format: int64 */
3395
+ /** Format: double */
3144
3396
  balance: number;
3145
- /** Format: int64 */
3397
+ /** Format: uint64 */
3398
+ eventIndex: number;
3399
+ };
3400
+ PageResult_for_uint64_and_LiquidationInfo: {
3401
+ /** @description Set of items for requested by query. */
3402
+ items: components["schemas"]["LiquidationInfo"][];
3403
+ /**
3404
+ * Format: uint64
3405
+ * @description If request contains more data, this is the id is set with which next request should be performed to get next page. If no more data, then it is undefined.
3406
+ */
3407
+ nextStartInclusive?: number | null;
3408
+ };
3409
+ LiquidationInfo: {
3410
+ time: string;
3411
+ /** Format: uint64 */
3412
+ actionId: number;
3413
+ /** Format: uint32 */
3414
+ liquidatorId: number;
3415
+ /** Format: uint32 */
3416
+ liquidateeId: number;
3417
+ /** Format: double */
3146
3418
  fee: number;
3419
+ liquidationKind: components["schemas"]["LiquidationKind"];
3420
+ /** Format: uint32 */
3421
+ marketId?: number | null;
3422
+ /** Format: uint32 */
3423
+ tokenId?: number | null;
3424
+ /** Format: uint64 */
3425
+ orderId?: number | null;
3426
+ /** Format: double */
3427
+ orderPrice?: number | null;
3428
+ /** Format: double */
3429
+ orderSize?: number | null;
3430
+ /** Format: double */
3431
+ orderQuote?: number | null;
3432
+ /** Format: double */
3433
+ preOmf: number;
3434
+ /** Format: double */
3435
+ preMmf: number;
3436
+ /** Format: double */
3437
+ preImf: number;
3438
+ /** Format: double */
3439
+ preCmf: number;
3440
+ /** Format: double */
3441
+ prePon: number;
3442
+ /** Format: double */
3443
+ preMf: number;
3444
+ /** Format: double */
3445
+ prePn: number;
3446
+ /** Format: double */
3447
+ postOmf: number;
3448
+ /** Format: double */
3449
+ postMmf: number;
3450
+ /** Format: double */
3451
+ postImf: number;
3452
+ /** Format: double */
3453
+ postCmf: number;
3454
+ /** Format: double */
3455
+ postPon: number;
3456
+ /** Format: double */
3457
+ postMf: number;
3458
+ /** Format: double */
3459
+ postPn: number;
3147
3460
  };
3461
+ LiquidationKind: "place_order" | "cancel_order" | "bankruptcy";
3148
3462
  /** @description TV config query response https://www.tradingview.com/charting-library-docs/latest/connecting_data/UDF/#data-feed-configuration-data */
3149
3463
  TvConfigResponse: {
3150
3464
  supported_resolutions: components["schemas"]["Resolution"][];
@@ -3157,7 +3471,7 @@ export interface components {
3157
3471
  * @description More limited resolution than history one, used in some HTTP queries
3158
3472
  * @enum {string}
3159
3473
  */
3160
- Resolution: "1" | "5" | "15" | "30" | "60" | "1D" | "1W" | "1M";
3474
+ Resolution: "OneMinute" | "FiveMinutes" | "FifteenMinutes" | "ThirtyMinutes" | "SixtyMinutes" | "OneDay" | "OneWeek" | "OneMonth";
3161
3475
  /** @description TV symbols query */
3162
3476
  TvSymbolsQuery: {
3163
3477
  symbol: string;
@@ -3166,6 +3480,8 @@ export interface components {
3166
3480
  description: string;
3167
3481
  exchange: string;
3168
3482
  has_intraday: boolean;
3483
+ has_empty_bars: boolean;
3484
+ has_weekly_and_monthly: boolean;
3169
3485
  format: components["schemas"]["TvSymbolsFormat"];
3170
3486
  listed_exchange: string;
3171
3487
  /** Format: int64 */
@@ -3309,20 +3625,38 @@ export interface components {
3309
3625
  };
3310
3626
  /** @description Empty object, to make quotes item conform to API error spec */
3311
3627
  TvQuotesErrorValues: Record<string, never>;
3312
- PageResult_for_String_and_MarketHistoryInfo: {
3628
+ GetMarketHistoryQuery: {
3629
+ /**
3630
+ * Format: uint8
3631
+ * @default 24
3632
+ */
3633
+ pageSize: number;
3634
+ };
3635
+ PageResult_for_uint64_and_MarketHistoryInfo: {
3313
3636
  /** @description Set of items for requested by query. */
3314
3637
  items: components["schemas"]["MarketHistoryInfo"][];
3315
- /** @description If request contains more data, this is the id is set with which next request should be performed to get next page. If no more data, then it is undefined. */
3316
- nextStartInclusive?: string | null;
3638
+ /**
3639
+ * Format: uint64
3640
+ * @description If request contains more data, this is the id is set with which next request should be performed to get next page. If no more data, then it is undefined.
3641
+ */
3642
+ nextStartInclusive?: number | null;
3317
3643
  };
3318
3644
  MarketHistoryInfo: {
3319
3645
  /** Format: uint32 */
3320
3646
  marketId: number;
3321
3647
  time: string;
3322
- actionId: string;
3648
+ /** Format: uint64 */
3649
+ actionId: number;
3323
3650
  fundingIndex: components["schemas"]["FundingIndexMantissa"];
3324
3651
  /** Format: double */
3325
3652
  fundingRate: number;
3653
+ /**
3654
+ * Format: double
3655
+ * @description Scaled in market price decimals
3656
+ */
3657
+ indexPrice: number;
3658
+ /** Format: double */
3659
+ markPrice: number;
3326
3660
  };
3327
3661
  /**
3328
3662
  * Format: int128