@n1xyz/nord-ts 0.3.3 → 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.
- package/dist/actions.d.ts +3 -1
- package/dist/client/Nord.d.ts +13 -23
- package/dist/client/NordAdmin.d.ts +8 -0
- package/dist/client/NordUser.d.ts +11 -2
- package/dist/gen/nord_pb.d.ts +335 -105
- package/dist/gen/openapi.d.ts +288 -197
- package/dist/index.browser.js +64990 -83973
- package/dist/index.common.js +60126 -86733
- package/dist/types.d.ts +8 -10
- package/dist/utils.d.ts +2 -2
- package/package.json +1 -1
package/dist/gen/openapi.d.ts
CHANGED
|
@@ -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;
|
|
@@ -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?:
|
|
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"]["
|
|
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
|
|
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?:
|
|
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"]["
|
|
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,30 +779,31 @@ export interface paths {
|
|
|
738
779
|
patch?: never;
|
|
739
780
|
trace?: never;
|
|
740
781
|
};
|
|
741
|
-
"/account/{account_id}/
|
|
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
|
|
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
792
|
query?: {
|
|
756
|
-
/** @description Optional market filter by market id
|
|
793
|
+
/** @description Optional market filter by market id. */
|
|
757
794
|
marketId?: number | null;
|
|
758
|
-
/** @description
|
|
759
|
-
count?: number;
|
|
795
|
+
/** @description start with this timestamp (RFC3339); defaults to UNIX epoch start */
|
|
760
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;
|
|
761
803
|
};
|
|
762
804
|
header?: never;
|
|
763
805
|
path: {
|
|
764
|
-
/** @description Account for which to retrieve
|
|
806
|
+
/** @description Account for which to retrieve funding history */
|
|
765
807
|
account_id: number;
|
|
766
808
|
};
|
|
767
809
|
cookie?: never;
|
|
@@ -773,7 +815,7 @@ export interface paths {
|
|
|
773
815
|
[name: string]: unknown;
|
|
774
816
|
};
|
|
775
817
|
content: {
|
|
776
|
-
"application/json": components["schemas"]["
|
|
818
|
+
"application/json": components["schemas"]["PageResult_for_String_and_AccountFundingInfo"];
|
|
777
819
|
};
|
|
778
820
|
};
|
|
779
821
|
400: {
|
|
@@ -817,7 +859,7 @@ export interface paths {
|
|
|
817
859
|
/** @description end with this timestamp (RFC3339); defaults to current date-time */
|
|
818
860
|
until?: string;
|
|
819
861
|
/** @description fetch results starting with this page; query starts with first entry if page isn't specified */
|
|
820
|
-
startInclusive?:
|
|
862
|
+
startInclusive?: number | null;
|
|
821
863
|
/** @description Query returns up to 50 trades in one go. */
|
|
822
864
|
pageSize?: number | null;
|
|
823
865
|
};
|
|
@@ -834,7 +876,7 @@ export interface paths {
|
|
|
834
876
|
[name: string]: unknown;
|
|
835
877
|
};
|
|
836
878
|
content: {
|
|
837
|
-
"application/json": components["schemas"]["
|
|
879
|
+
"application/json": components["schemas"]["PageResult_for_uint64_and_Trigger"];
|
|
838
880
|
};
|
|
839
881
|
};
|
|
840
882
|
};
|
|
@@ -894,7 +936,7 @@ export interface paths {
|
|
|
894
936
|
parameters: {
|
|
895
937
|
query?: {
|
|
896
938
|
/** @description fetch results starting with this page; query starts with first entry if page isn't specified */
|
|
897
|
-
startInclusive?:
|
|
939
|
+
startInclusive?: number | null;
|
|
898
940
|
/** @description Query returns up to 50 trades in one go. */
|
|
899
941
|
pageSize?: number | null;
|
|
900
942
|
};
|
|
@@ -909,7 +951,7 @@ export interface paths {
|
|
|
909
951
|
[name: string]: unknown;
|
|
910
952
|
};
|
|
911
953
|
content: {
|
|
912
|
-
"application/json": components["schemas"]["
|
|
954
|
+
"application/json": components["schemas"]["PageResult_for_uint64_and_TriggerInfo"];
|
|
913
955
|
};
|
|
914
956
|
};
|
|
915
957
|
};
|
|
@@ -1013,7 +1055,7 @@ export interface paths {
|
|
|
1013
1055
|
query?: never;
|
|
1014
1056
|
header?: never;
|
|
1015
1057
|
path: {
|
|
1016
|
-
order_id:
|
|
1058
|
+
order_id: number;
|
|
1017
1059
|
};
|
|
1018
1060
|
cookie?: never;
|
|
1019
1061
|
};
|
|
@@ -1058,13 +1100,13 @@ export interface paths {
|
|
|
1058
1100
|
parameters: {
|
|
1059
1101
|
query?: {
|
|
1060
1102
|
/** @description fetch results starting with this page; query starts with first entry if page isn't specified */
|
|
1061
|
-
startInclusive?:
|
|
1103
|
+
startInclusive?: number | null;
|
|
1062
1104
|
/** @description Query returns up to 50 trades in one go. */
|
|
1063
1105
|
pageSize?: number | null;
|
|
1064
1106
|
};
|
|
1065
1107
|
header?: never;
|
|
1066
1108
|
path: {
|
|
1067
|
-
order_id:
|
|
1109
|
+
order_id: number;
|
|
1068
1110
|
};
|
|
1069
1111
|
cookie?: never;
|
|
1070
1112
|
};
|
|
@@ -1075,7 +1117,7 @@ export interface paths {
|
|
|
1075
1117
|
[name: string]: unknown;
|
|
1076
1118
|
};
|
|
1077
1119
|
content: {
|
|
1078
|
-
"application/json": components["schemas"]["
|
|
1120
|
+
"application/json": components["schemas"]["PageResult_for_uint64_and_Trade"];
|
|
1079
1121
|
};
|
|
1080
1122
|
};
|
|
1081
1123
|
};
|
|
@@ -1112,7 +1154,7 @@ export interface paths {
|
|
|
1112
1154
|
/** @description end with this timestamp (RFC3339); defaults to current date-time */
|
|
1113
1155
|
until?: string;
|
|
1114
1156
|
/** @description fetch results starting with this page; query starts with first entry if page isn't specified */
|
|
1115
|
-
startInclusive?:
|
|
1157
|
+
startInclusive?: number | null;
|
|
1116
1158
|
/** @description Query returns up to 50 trades in one go. */
|
|
1117
1159
|
pageSize?: number | null;
|
|
1118
1160
|
};
|
|
@@ -1127,7 +1169,7 @@ export interface paths {
|
|
|
1127
1169
|
[name: string]: unknown;
|
|
1128
1170
|
};
|
|
1129
1171
|
content: {
|
|
1130
|
-
"application/json": components["schemas"]["
|
|
1172
|
+
"application/json": components["schemas"]["PageResult_for_uint64_and_Trade"];
|
|
1131
1173
|
};
|
|
1132
1174
|
};
|
|
1133
1175
|
};
|
|
@@ -1373,6 +1415,7 @@ export interface paths {
|
|
|
1373
1415
|
get: {
|
|
1374
1416
|
parameters: {
|
|
1375
1417
|
query?: {
|
|
1418
|
+
tier?: components["schemas"]["FeeTierId"] | null;
|
|
1376
1419
|
/** @description fetch results starting with this page; query starts with first entry if page isn't specified */
|
|
1377
1420
|
startInclusive?: number | null;
|
|
1378
1421
|
/** @description Query returns up to 50 trades in one go. */
|
|
@@ -1491,53 +1534,6 @@ export interface paths {
|
|
|
1491
1534
|
patch?: never;
|
|
1492
1535
|
trace?: never;
|
|
1493
1536
|
};
|
|
1494
|
-
"/market/{market_id}/price/prev": {
|
|
1495
|
-
parameters: {
|
|
1496
|
-
query?: never;
|
|
1497
|
-
header?: never;
|
|
1498
|
-
path?: never;
|
|
1499
|
-
cookie?: never;
|
|
1500
|
-
};
|
|
1501
|
-
/** @description Fetch the latest price for a market at or before a timestamp. */
|
|
1502
|
-
get: {
|
|
1503
|
-
parameters: {
|
|
1504
|
-
query: {
|
|
1505
|
-
atOrBefore: string;
|
|
1506
|
-
};
|
|
1507
|
-
header?: never;
|
|
1508
|
-
path: {
|
|
1509
|
-
market_id: number;
|
|
1510
|
-
};
|
|
1511
|
-
cookie?: never;
|
|
1512
|
-
};
|
|
1513
|
-
requestBody?: never;
|
|
1514
|
-
responses: {
|
|
1515
|
-
200: {
|
|
1516
|
-
headers: {
|
|
1517
|
-
[name: string]: unknown;
|
|
1518
|
-
};
|
|
1519
|
-
content: {
|
|
1520
|
-
"application/json": components["schemas"]["PreviousMarketPrice"];
|
|
1521
|
-
};
|
|
1522
|
-
};
|
|
1523
|
-
404: {
|
|
1524
|
-
headers: {
|
|
1525
|
-
[name: string]: unknown;
|
|
1526
|
-
};
|
|
1527
|
-
content: {
|
|
1528
|
-
"application/json": components["schemas"]["MarketNotFound"];
|
|
1529
|
-
};
|
|
1530
|
-
};
|
|
1531
|
-
};
|
|
1532
|
-
};
|
|
1533
|
-
put?: never;
|
|
1534
|
-
post?: never;
|
|
1535
|
-
delete?: never;
|
|
1536
|
-
options?: never;
|
|
1537
|
-
head?: never;
|
|
1538
|
-
patch?: never;
|
|
1539
|
-
trace?: never;
|
|
1540
|
-
};
|
|
1541
1537
|
"/account/{account_id}/history/withdrawal": {
|
|
1542
1538
|
parameters: {
|
|
1543
1539
|
query?: never;
|
|
@@ -1554,7 +1550,7 @@ export interface paths {
|
|
|
1554
1550
|
/** @description end with this timestamp (RFC3339); defaults to current date-time */
|
|
1555
1551
|
until?: string;
|
|
1556
1552
|
/** @description fetch results starting with this page; query starts with first entry if page isn't specified */
|
|
1557
|
-
startInclusive?:
|
|
1553
|
+
startInclusive?: number | null;
|
|
1558
1554
|
/** @description Query returns up to 50 trades in one go. */
|
|
1559
1555
|
pageSize?: number | null;
|
|
1560
1556
|
};
|
|
@@ -1572,7 +1568,7 @@ export interface paths {
|
|
|
1572
1568
|
[name: string]: unknown;
|
|
1573
1569
|
};
|
|
1574
1570
|
content: {
|
|
1575
|
-
"application/json": components["schemas"]["
|
|
1571
|
+
"application/json": components["schemas"]["PageResult_for_uint64_and_WithdrawalInfo"];
|
|
1576
1572
|
};
|
|
1577
1573
|
};
|
|
1578
1574
|
404: {
|
|
@@ -1609,7 +1605,7 @@ export interface paths {
|
|
|
1609
1605
|
/** @description end with this timestamp (RFC3339); defaults to current date-time */
|
|
1610
1606
|
until?: string;
|
|
1611
1607
|
/** @description fetch results starting with this page; query starts with first entry if page isn't specified */
|
|
1612
|
-
startInclusive?:
|
|
1608
|
+
startInclusive?: number | null;
|
|
1613
1609
|
/** @description Query returns up to 50 trades in one go. */
|
|
1614
1610
|
pageSize?: number | null;
|
|
1615
1611
|
};
|
|
@@ -1627,7 +1623,7 @@ export interface paths {
|
|
|
1627
1623
|
[name: string]: unknown;
|
|
1628
1624
|
};
|
|
1629
1625
|
content: {
|
|
1630
|
-
"application/json": components["schemas"]["
|
|
1626
|
+
"application/json": components["schemas"]["PageResult_for_uint64_and_DepositInfo"];
|
|
1631
1627
|
};
|
|
1632
1628
|
};
|
|
1633
1629
|
404: {
|
|
@@ -1664,7 +1660,7 @@ export interface paths {
|
|
|
1664
1660
|
/** @description end with this timestamp (RFC3339); defaults to current date-time */
|
|
1665
1661
|
until?: string;
|
|
1666
1662
|
/** @description fetch results starting with this page; query starts with first entry if page isn't specified */
|
|
1667
|
-
startInclusive?:
|
|
1663
|
+
startInclusive?: number | null;
|
|
1668
1664
|
/** @description Query returns up to 50 trades in one go. */
|
|
1669
1665
|
pageSize?: number | null;
|
|
1670
1666
|
};
|
|
@@ -1682,7 +1678,7 @@ export interface paths {
|
|
|
1682
1678
|
[name: string]: unknown;
|
|
1683
1679
|
};
|
|
1684
1680
|
content: {
|
|
1685
|
-
"application/json": components["schemas"]["
|
|
1681
|
+
"application/json": components["schemas"]["PageResult_for_uint64_and_LiquidationInfo"];
|
|
1686
1682
|
};
|
|
1687
1683
|
};
|
|
1688
1684
|
404: {
|
|
@@ -1765,7 +1761,7 @@ export interface paths {
|
|
|
1765
1761
|
[name: string]: unknown;
|
|
1766
1762
|
};
|
|
1767
1763
|
content: {
|
|
1768
|
-
"application/json": components["schemas"]["
|
|
1764
|
+
"application/json": components["schemas"]["PageResult_for_uint64_and_MarketHistoryInfo"];
|
|
1769
1765
|
};
|
|
1770
1766
|
};
|
|
1771
1767
|
};
|
|
@@ -2742,20 +2738,20 @@ export interface components {
|
|
|
2742
2738
|
};
|
|
2743
2739
|
MarketStats: {
|
|
2744
2740
|
/** Format: double */
|
|
2745
|
-
indexPrice
|
|
2741
|
+
indexPrice?: number | null;
|
|
2746
2742
|
/** Format: double */
|
|
2747
|
-
indexPriceConf
|
|
2743
|
+
indexPriceConf?: number | null;
|
|
2748
2744
|
frozen?: boolean;
|
|
2749
2745
|
/** Format: double */
|
|
2750
2746
|
volumeBase24h: number;
|
|
2751
2747
|
/** Format: double */
|
|
2752
2748
|
volumeQuote24h: number;
|
|
2753
2749
|
/** Format: double */
|
|
2754
|
-
high24h
|
|
2750
|
+
high24h?: number | null;
|
|
2755
2751
|
/** Format: double */
|
|
2756
|
-
low24h
|
|
2752
|
+
low24h?: number | null;
|
|
2757
2753
|
/** Format: double */
|
|
2758
|
-
close24h
|
|
2754
|
+
close24h?: number | null;
|
|
2759
2755
|
/** Format: double */
|
|
2760
2756
|
prevClose24h?: number | null;
|
|
2761
2757
|
perpStats?: components["schemas"]["PerpMarketStats"] | null;
|
|
@@ -2799,9 +2795,12 @@ export interface components {
|
|
|
2799
2795
|
pubkey: string;
|
|
2800
2796
|
expiry: string;
|
|
2801
2797
|
};
|
|
2802
|
-
|
|
2803
|
-
/**
|
|
2804
|
-
|
|
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;
|
|
2805
2804
|
/**
|
|
2806
2805
|
* Format: uint8
|
|
2807
2806
|
* @description Query returns up to 50 trades in one go.
|
|
@@ -2809,28 +2808,34 @@ export interface components {
|
|
|
2809
2808
|
*/
|
|
2810
2809
|
pageSize: number | null;
|
|
2811
2810
|
};
|
|
2812
|
-
|
|
2811
|
+
PageResult_for_uint64_and_OrderInfo: {
|
|
2813
2812
|
/** @description Set of items for requested by query. */
|
|
2814
2813
|
items: components["schemas"]["OrderInfo"][];
|
|
2815
|
-
/**
|
|
2816
|
-
|
|
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;
|
|
2817
2819
|
};
|
|
2818
2820
|
/** @description Order summary. Use order_id to application side join with trades as needed. */
|
|
2819
2821
|
OrderInfo: {
|
|
2820
2822
|
addedAt: string;
|
|
2821
2823
|
updatedAt: string;
|
|
2822
|
-
|
|
2824
|
+
/** Format: uint64 */
|
|
2825
|
+
tradeId: number;
|
|
2823
2826
|
/** Format: uint32 */
|
|
2824
2827
|
traderId: number;
|
|
2825
2828
|
/** Format: uint32 */
|
|
2826
2829
|
marketId: number;
|
|
2827
|
-
|
|
2830
|
+
/** Format: uint64 */
|
|
2831
|
+
orderId: number;
|
|
2828
2832
|
side: components["schemas"]["Side"];
|
|
2829
2833
|
/** Format: double */
|
|
2830
2834
|
placedSize: number;
|
|
2831
2835
|
/** Format: double */
|
|
2832
2836
|
filledSize?: number | null;
|
|
2833
|
-
|
|
2837
|
+
/** Format: uint64 */
|
|
2838
|
+
updateActionId: number;
|
|
2834
2839
|
isReduceOnly: boolean;
|
|
2835
2840
|
fillMode: components["schemas"]["FillMode"];
|
|
2836
2841
|
/** Format: double */
|
|
@@ -2859,7 +2864,8 @@ export interface components {
|
|
|
2859
2864
|
margins: components["schemas"]["AccountMarginsView"];
|
|
2860
2865
|
};
|
|
2861
2866
|
OpenOrder: {
|
|
2862
|
-
|
|
2867
|
+
/** Format: uint64 */
|
|
2868
|
+
orderId: number;
|
|
2863
2869
|
/** Format: uint32 */
|
|
2864
2870
|
marketId: number;
|
|
2865
2871
|
side: components["schemas"]["Side"];
|
|
@@ -2954,7 +2960,13 @@ export interface components {
|
|
|
2954
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. */
|
|
2955
2961
|
bankruptcy: boolean;
|
|
2956
2962
|
};
|
|
2957
|
-
|
|
2963
|
+
GetAccountPnlHistoryQuery: {
|
|
2964
|
+
/**
|
|
2965
|
+
* Format: uint32
|
|
2966
|
+
* @description Optional market filter by market id.
|
|
2967
|
+
* @default null
|
|
2968
|
+
*/
|
|
2969
|
+
marketId: number | null;
|
|
2958
2970
|
/**
|
|
2959
2971
|
* @description start with this timestamp (RFC3339); defaults to UNIX epoch start
|
|
2960
2972
|
* @default null
|
|
@@ -2965,8 +2977,11 @@ export interface components {
|
|
|
2965
2977
|
* @default null
|
|
2966
2978
|
*/
|
|
2967
2979
|
until: string;
|
|
2968
|
-
/**
|
|
2969
|
-
|
|
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;
|
|
2970
2985
|
/**
|
|
2971
2986
|
* Format: uint8
|
|
2972
2987
|
* @description Query returns up to 50 trades in one go.
|
|
@@ -2974,82 +2989,132 @@ export interface components {
|
|
|
2974
2989
|
*/
|
|
2975
2990
|
pageSize: number | null;
|
|
2976
2991
|
};
|
|
2977
|
-
|
|
2992
|
+
PageResult_for_uint64_and_AccountPnlInfo: {
|
|
2978
2993
|
/** @description Set of items for requested by query. */
|
|
2979
2994
|
items: components["schemas"]["AccountPnlInfo"][];
|
|
2980
|
-
/**
|
|
2981
|
-
|
|
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;
|
|
2982
3000
|
};
|
|
2983
3001
|
AccountPnlInfo: {
|
|
3002
|
+
/** @description Time of the position update. */
|
|
2984
3003
|
time: string;
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
/**
|
|
2991
|
-
|
|
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;
|
|
3014
|
+
/**
|
|
3015
|
+
* Format: double
|
|
3016
|
+
* @description PnL realized from this position update.
|
|
3017
|
+
*/
|
|
3018
|
+
tradingPnl: number;
|
|
2992
3019
|
/**
|
|
2993
3020
|
* Format: double
|
|
2994
|
-
* @description
|
|
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.
|
|
2995
3022
|
*/
|
|
2996
|
-
|
|
3023
|
+
settledFundingPnl: number;
|
|
3024
|
+
/**
|
|
3025
|
+
* Format: double
|
|
3026
|
+
* @description Position size at the time of the pnl update. Positive for longs, negative for shorts.
|
|
3027
|
+
*/
|
|
3028
|
+
positionSize: number;
|
|
2997
3029
|
};
|
|
2998
|
-
|
|
2999
|
-
GetAccountPnlFundingHistQuery: {
|
|
3030
|
+
GetAccountFundingHistoryQuery: {
|
|
3000
3031
|
/**
|
|
3001
3032
|
* Format: uint32
|
|
3002
|
-
* @description Optional market filter by market id
|
|
3033
|
+
* @description Optional market filter by market id.
|
|
3003
3034
|
* @default null
|
|
3004
3035
|
*/
|
|
3005
3036
|
marketId: number | null;
|
|
3006
3037
|
/**
|
|
3007
|
-
*
|
|
3008
|
-
* @
|
|
3009
|
-
* @default 24
|
|
3038
|
+
* @description start with this timestamp (RFC3339); defaults to UNIX epoch start
|
|
3039
|
+
* @default null
|
|
3010
3040
|
*/
|
|
3011
|
-
count: number;
|
|
3012
|
-
/** @default null */
|
|
3013
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;
|
|
3014
3061
|
};
|
|
3015
|
-
|
|
3016
|
-
/** @description
|
|
3062
|
+
AccountFundingInfo: {
|
|
3063
|
+
/** @description Time of the position update. */
|
|
3017
3064
|
time: string;
|
|
3018
3065
|
/**
|
|
3019
|
-
* Format:
|
|
3020
|
-
* @description
|
|
3066
|
+
* Format: uint64
|
|
3067
|
+
* @description Action id of the update. Used for pagination.
|
|
3021
3068
|
*/
|
|
3022
|
-
|
|
3069
|
+
actionId: number;
|
|
3023
3070
|
/**
|
|
3024
|
-
* Format:
|
|
3025
|
-
* @description
|
|
3071
|
+
* Format: uint32
|
|
3072
|
+
* @description Market id of the position update.
|
|
3026
3073
|
*/
|
|
3027
|
-
|
|
3028
|
-
/** @description Side on time of funding application. */
|
|
3029
|
-
side?: components["schemas"]["Side"] | null;
|
|
3074
|
+
marketId: number;
|
|
3030
3075
|
/**
|
|
3031
3076
|
* Format: double
|
|
3032
|
-
* @description
|
|
3077
|
+
* @description Position size at the time of the pnl update. Positive for longs, negative for shorts.
|
|
3033
3078
|
*/
|
|
3034
|
-
|
|
3079
|
+
positionSize: number;
|
|
3035
3080
|
/**
|
|
3036
3081
|
* Format: double
|
|
3037
|
-
* @description Funding
|
|
3082
|
+
* @description Funding paid to the account for this funding period.
|
|
3038
3083
|
*/
|
|
3039
3084
|
fundingPnl: number;
|
|
3040
|
-
market: components["schemas"]["MarketIdInfo"];
|
|
3041
|
-
};
|
|
3042
|
-
MarketIdInfo: {
|
|
3043
|
-
/** Format: uint32 */
|
|
3044
|
-
market_id: number;
|
|
3045
|
-
market_symbol: string;
|
|
3046
3085
|
};
|
|
3047
3086
|
BadRequest: null;
|
|
3048
|
-
|
|
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;
|
|
3109
|
+
};
|
|
3110
|
+
PageResult_for_uint64_and_Trigger: {
|
|
3049
3111
|
/** @description Set of items for requested by query. */
|
|
3050
3112
|
items: components["schemas"]["Trigger"][];
|
|
3051
|
-
/**
|
|
3052
|
-
|
|
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;
|
|
3053
3118
|
};
|
|
3054
3119
|
Trigger: {
|
|
3055
3120
|
/** Format: uint32 */
|
|
@@ -3061,8 +3126,10 @@ export interface components {
|
|
|
3061
3126
|
side: components["schemas"]["Side"];
|
|
3062
3127
|
kind: components["schemas"]["TriggerKind"];
|
|
3063
3128
|
status: components["schemas"]["TriggerStatus"];
|
|
3064
|
-
|
|
3065
|
-
|
|
3129
|
+
/** Format: uint64 */
|
|
3130
|
+
createdAtActionId: number;
|
|
3131
|
+
/** Format: uint64 */
|
|
3132
|
+
finalizedAtActionId?: number | null;
|
|
3066
3133
|
createdAt: string;
|
|
3067
3134
|
finalizedAt: string;
|
|
3068
3135
|
};
|
|
@@ -3086,27 +3153,38 @@ export interface components {
|
|
|
3086
3153
|
limitPrice?: number | null;
|
|
3087
3154
|
side: components["schemas"]["Side"];
|
|
3088
3155
|
kind: components["schemas"]["TriggerKind"];
|
|
3089
|
-
/**
|
|
3090
|
-
|
|
3156
|
+
/**
|
|
3157
|
+
* Format: uint64
|
|
3158
|
+
* @description created_at_action_id
|
|
3159
|
+
*/
|
|
3160
|
+
actionId: number;
|
|
3091
3161
|
createdAt: string;
|
|
3092
3162
|
};
|
|
3093
|
-
|
|
3163
|
+
PageResult_for_uint64_and_TriggerInfo: {
|
|
3094
3164
|
/** @description Set of items for requested by query. */
|
|
3095
3165
|
items: components["schemas"]["TriggerInfo"][];
|
|
3096
|
-
/**
|
|
3097
|
-
|
|
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;
|
|
3098
3171
|
};
|
|
3099
3172
|
OrderNotFound: null;
|
|
3100
|
-
|
|
3173
|
+
PageResult_for_uint64_and_Trade: {
|
|
3101
3174
|
/** @description Set of items for requested by query. */
|
|
3102
3175
|
items: components["schemas"]["Trade"][];
|
|
3103
|
-
/**
|
|
3104
|
-
|
|
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;
|
|
3105
3181
|
};
|
|
3106
3182
|
Trade: {
|
|
3107
3183
|
time: string;
|
|
3108
|
-
|
|
3109
|
-
|
|
3184
|
+
/** Format: uint64 */
|
|
3185
|
+
actionId: number;
|
|
3186
|
+
/** Format: uint64 */
|
|
3187
|
+
tradeId: number;
|
|
3110
3188
|
/** Format: uint32 */
|
|
3111
3189
|
takerId: number;
|
|
3112
3190
|
takerSide: components["schemas"]["Side"];
|
|
@@ -3114,7 +3192,8 @@ export interface components {
|
|
|
3114
3192
|
makerId: number;
|
|
3115
3193
|
/** Format: uint32 */
|
|
3116
3194
|
marketId: number;
|
|
3117
|
-
|
|
3195
|
+
/** Format: uint64 */
|
|
3196
|
+
orderId: number;
|
|
3118
3197
|
/** Format: double */
|
|
3119
3198
|
price: number;
|
|
3120
3199
|
/** Format: double */
|
|
@@ -3148,8 +3227,11 @@ export interface components {
|
|
|
3148
3227
|
* @default null
|
|
3149
3228
|
*/
|
|
3150
3229
|
until: string;
|
|
3151
|
-
/**
|
|
3152
|
-
|
|
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;
|
|
3153
3235
|
/**
|
|
3154
3236
|
* Format: uint8
|
|
3155
3237
|
* @description Query returns up to 50 trades in one go.
|
|
@@ -3157,17 +3239,13 @@ export interface components {
|
|
|
3157
3239
|
*/
|
|
3158
3240
|
pageSize: number | null;
|
|
3159
3241
|
};
|
|
3160
|
-
DownloadFilter: components["schemas"]["Op_for_DataDateTime"] | components["schemas"]["
|
|
3242
|
+
DownloadFilter: components["schemas"]["Op_for_DataDateTime"] | components["schemas"]["Op_for_uint64"] | components["schemas"]["Op_for_uint64"] | null;
|
|
3161
3243
|
/** @description Parses tag (anycase), and value in round braces using `from_str`. */
|
|
3162
3244
|
Op_for_DataDateTime: {
|
|
3163
3245
|
le: components["schemas"]["DataDateTime"];
|
|
3164
3246
|
};
|
|
3165
3247
|
DataDateTime: string;
|
|
3166
3248
|
/** @description Parses tag (anycase), and value in round braces using `from_str`. */
|
|
3167
|
-
Op_for_String: {
|
|
3168
|
-
le: string;
|
|
3169
|
-
};
|
|
3170
|
-
/** @description Parses tag (anycase), and value in round braces using `from_str`. */
|
|
3171
3249
|
Op_for_uint64: {
|
|
3172
3250
|
/** Format: uint64 */
|
|
3173
3251
|
le: number;
|
|
@@ -3213,7 +3291,9 @@ export interface components {
|
|
|
3213
3291
|
/** Format: uint16 */
|
|
3214
3292
|
taker_fee_bps: number;
|
|
3215
3293
|
};
|
|
3216
|
-
|
|
3294
|
+
GetAccountsFeeTiersQuery: {
|
|
3295
|
+
/** @default null */
|
|
3296
|
+
tier: components["schemas"]["FeeTierId"] | null;
|
|
3217
3297
|
/**
|
|
3218
3298
|
* Format: uint32
|
|
3219
3299
|
* @description fetch results starting with this page; query starts with first entry if page isn't specified
|
|
@@ -3268,44 +3348,44 @@ export interface components {
|
|
|
3268
3348
|
/** Format: double */
|
|
3269
3349
|
volumeQuote: number;
|
|
3270
3350
|
};
|
|
3271
|
-
|
|
3272
|
-
atOrBefore: string;
|
|
3273
|
-
};
|
|
3274
|
-
PreviousMarketPrice: {
|
|
3275
|
-
/** Format: uint32 */
|
|
3276
|
-
marketId: number;
|
|
3277
|
-
/** Format: double */
|
|
3278
|
-
price?: number | null;
|
|
3279
|
-
};
|
|
3280
|
-
PageResult_for_String_and_Withdrawal: {
|
|
3351
|
+
PageResult_for_uint64_and_WithdrawalInfo: {
|
|
3281
3352
|
/** @description Set of items for requested by query. */
|
|
3282
|
-
items: components["schemas"]["
|
|
3283
|
-
/**
|
|
3284
|
-
|
|
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;
|
|
3285
3359
|
};
|
|
3286
|
-
|
|
3360
|
+
WithdrawalInfo: {
|
|
3287
3361
|
time: string;
|
|
3288
|
-
|
|
3362
|
+
/** Format: uint64 */
|
|
3363
|
+
actionId: number;
|
|
3289
3364
|
/** Format: uint32 */
|
|
3290
3365
|
accountId: number;
|
|
3291
3366
|
/** Format: uint32 */
|
|
3292
3367
|
tokenId: number;
|
|
3293
|
-
/** Format:
|
|
3368
|
+
/** Format: double */
|
|
3294
3369
|
amount: number;
|
|
3295
|
-
/** Format:
|
|
3370
|
+
/** Format: double */
|
|
3296
3371
|
balance: number;
|
|
3297
|
-
/** Format:
|
|
3372
|
+
/** Format: double */
|
|
3298
3373
|
fee: number;
|
|
3374
|
+
destPubkey?: string | null;
|
|
3299
3375
|
};
|
|
3300
|
-
|
|
3376
|
+
PageResult_for_uint64_and_DepositInfo: {
|
|
3301
3377
|
/** @description Set of items for requested by query. */
|
|
3302
3378
|
items: components["schemas"]["DepositInfo"][];
|
|
3303
|
-
/**
|
|
3304
|
-
|
|
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;
|
|
3305
3384
|
};
|
|
3306
3385
|
DepositInfo: {
|
|
3307
3386
|
time: string;
|
|
3308
|
-
|
|
3387
|
+
/** Format: uint64 */
|
|
3388
|
+
actionId: number;
|
|
3309
3389
|
/** Format: uint32 */
|
|
3310
3390
|
accountId: number;
|
|
3311
3391
|
/** Format: uint32 */
|
|
@@ -3317,15 +3397,19 @@ export interface components {
|
|
|
3317
3397
|
/** Format: uint64 */
|
|
3318
3398
|
eventIndex: number;
|
|
3319
3399
|
};
|
|
3320
|
-
|
|
3400
|
+
PageResult_for_uint64_and_LiquidationInfo: {
|
|
3321
3401
|
/** @description Set of items for requested by query. */
|
|
3322
3402
|
items: components["schemas"]["LiquidationInfo"][];
|
|
3323
|
-
/**
|
|
3324
|
-
|
|
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;
|
|
3325
3408
|
};
|
|
3326
3409
|
LiquidationInfo: {
|
|
3327
3410
|
time: string;
|
|
3328
|
-
|
|
3411
|
+
/** Format: uint64 */
|
|
3412
|
+
actionId: number;
|
|
3329
3413
|
/** Format: uint32 */
|
|
3330
3414
|
liquidatorId: number;
|
|
3331
3415
|
/** Format: uint32 */
|
|
@@ -3337,7 +3421,8 @@ export interface components {
|
|
|
3337
3421
|
marketId?: number | null;
|
|
3338
3422
|
/** Format: uint32 */
|
|
3339
3423
|
tokenId?: number | null;
|
|
3340
|
-
|
|
3424
|
+
/** Format: uint64 */
|
|
3425
|
+
orderId?: number | null;
|
|
3341
3426
|
/** Format: double */
|
|
3342
3427
|
orderPrice?: number | null;
|
|
3343
3428
|
/** Format: double */
|
|
@@ -3395,6 +3480,8 @@ export interface components {
|
|
|
3395
3480
|
description: string;
|
|
3396
3481
|
exchange: string;
|
|
3397
3482
|
has_intraday: boolean;
|
|
3483
|
+
has_empty_bars: boolean;
|
|
3484
|
+
has_weekly_and_monthly: boolean;
|
|
3398
3485
|
format: components["schemas"]["TvSymbolsFormat"];
|
|
3399
3486
|
listed_exchange: string;
|
|
3400
3487
|
/** Format: int64 */
|
|
@@ -3545,17 +3632,21 @@ export interface components {
|
|
|
3545
3632
|
*/
|
|
3546
3633
|
pageSize: number;
|
|
3547
3634
|
};
|
|
3548
|
-
|
|
3635
|
+
PageResult_for_uint64_and_MarketHistoryInfo: {
|
|
3549
3636
|
/** @description Set of items for requested by query. */
|
|
3550
3637
|
items: components["schemas"]["MarketHistoryInfo"][];
|
|
3551
|
-
/**
|
|
3552
|
-
|
|
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;
|
|
3553
3643
|
};
|
|
3554
3644
|
MarketHistoryInfo: {
|
|
3555
3645
|
/** Format: uint32 */
|
|
3556
3646
|
marketId: number;
|
|
3557
3647
|
time: string;
|
|
3558
|
-
|
|
3648
|
+
/** Format: uint64 */
|
|
3649
|
+
actionId: number;
|
|
3559
3650
|
fundingIndex: components["schemas"]["FundingIndexMantissa"];
|
|
3560
3651
|
/** Format: double */
|
|
3561
3652
|
fundingRate: number;
|