@n1xyz/nord-ts 0.3.2 → 0.3.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.
- package/dist/actions.js +184 -0
- package/dist/client/Nord.d.ts +9 -15
- package/dist/client/Nord.js +759 -0
- package/dist/client/NordAdmin.js +362 -0
- package/dist/client/NordUser.d.ts +3 -1
- package/dist/client/NordUser.js +752 -0
- package/dist/const.js +27 -0
- package/dist/error.js +51 -0
- package/dist/gen/nord_pb.d.ts +132 -114
- package/dist/gen/nord_pb.js +1068 -0
- package/dist/gen/openapi.d.ts +345 -72
- package/dist/gen/openapi.js +5 -0
- package/dist/index.browser.js +61342 -80207
- package/dist/index.common.js +59722 -87597
- package/dist/index.js +10 -0
- package/dist/nord/api/actions.d.ts +128 -0
- package/dist/nord/api/actions.js +396 -0
- package/dist/nord/api/core.d.ts +16 -0
- package/dist/nord/api/core.js +81 -0
- package/dist/nord/api/metrics.d.ts +67 -0
- package/dist/nord/api/metrics.js +229 -0
- package/dist/nord/api/triggers.d.ts +7 -0
- package/dist/nord/api/triggers.js +38 -0
- package/dist/nord/client/Nord.d.ts +387 -0
- package/dist/nord/client/Nord.js +747 -0
- package/dist/nord/client/NordAdmin.d.ts +226 -0
- package/dist/nord/client/NordAdmin.js +410 -0
- package/dist/nord/client/NordClient.d.ts +16 -0
- package/dist/nord/client/NordClient.js +28 -0
- package/dist/nord/client/NordUser.d.ts +379 -0
- package/dist/nord/client/NordUser.js +787 -0
- package/dist/nord/index.d.ts +8 -0
- package/dist/nord/index.js +34 -0
- package/dist/nord/models/Subscriber.d.ts +37 -0
- package/dist/nord/models/Subscriber.js +25 -0
- package/dist/nord/utils/NordError.d.ts +35 -0
- package/dist/nord/utils/NordError.js +49 -0
- package/dist/types.d.ts +15 -6
- package/dist/types.js +92 -0
- package/dist/utils.js +193 -0
- package/dist/websocket/NordWebSocketClient.d.ts +1 -0
- package/dist/websocket/NordWebSocketClient.js +242 -0
- package/dist/websocket/Subscriber.d.ts +7 -1
- package/dist/websocket/Subscriber.js +24 -0
- package/dist/websocket/events.d.ts +2 -1
- package/dist/websocket/events.js +1 -0
- package/dist/websocket/index.d.ts +1 -1
- package/dist/websocket/index.js +80 -0
- package/package.json +2 -2
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;
|
|
@@ -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;
|
|
@@ -687,21 +722,19 @@ 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 */
|
|
@@ -728,6 +761,14 @@ export interface paths {
|
|
|
728
761
|
"application/json": components["schemas"]["PageResult_for_String_and_AccountPnlInfo"];
|
|
729
762
|
};
|
|
730
763
|
};
|
|
764
|
+
404: {
|
|
765
|
+
headers: {
|
|
766
|
+
[name: string]: unknown;
|
|
767
|
+
};
|
|
768
|
+
content: {
|
|
769
|
+
"application/json": components["schemas"]["UserNotFound"];
|
|
770
|
+
};
|
|
771
|
+
};
|
|
731
772
|
};
|
|
732
773
|
};
|
|
733
774
|
put?: never;
|
|
@@ -738,24 +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
|
-
query?:
|
|
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
|
|
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"]["
|
|
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
|
};
|
|
@@ -1469,22 +1533,30 @@ export interface paths {
|
|
|
1469
1533
|
patch?: never;
|
|
1470
1534
|
trace?: never;
|
|
1471
1535
|
};
|
|
1472
|
-
"/
|
|
1536
|
+
"/account/{account_id}/history/withdrawal": {
|
|
1473
1537
|
parameters: {
|
|
1474
1538
|
query?: never;
|
|
1475
1539
|
header?: never;
|
|
1476
1540
|
path?: never;
|
|
1477
1541
|
cookie?: never;
|
|
1478
1542
|
};
|
|
1479
|
-
/** @description Fetch
|
|
1543
|
+
/** @description Fetch full history of withdrawals for an account. */
|
|
1480
1544
|
get: {
|
|
1481
1545
|
parameters: {
|
|
1482
|
-
query
|
|
1483
|
-
|
|
1546
|
+
query?: {
|
|
1547
|
+
/** @description start with this timestamp (RFC3339); defaults to UNIX epoch start */
|
|
1548
|
+
since?: string;
|
|
1549
|
+
/** @description end with this timestamp (RFC3339); defaults to current date-time */
|
|
1550
|
+
until?: string;
|
|
1551
|
+
/** @description fetch results starting with this page; query starts with first entry if page isn't specified */
|
|
1552
|
+
startInclusive?: string | null;
|
|
1553
|
+
/** @description Query returns up to 50 trades in one go. */
|
|
1554
|
+
pageSize?: number | null;
|
|
1484
1555
|
};
|
|
1485
1556
|
header?: never;
|
|
1486
1557
|
path: {
|
|
1487
|
-
|
|
1558
|
+
/** @description Account ID for which to fetch withdrawal history. */
|
|
1559
|
+
account_id: number;
|
|
1488
1560
|
};
|
|
1489
1561
|
cookie?: never;
|
|
1490
1562
|
};
|
|
@@ -1495,7 +1567,7 @@ export interface paths {
|
|
|
1495
1567
|
[name: string]: unknown;
|
|
1496
1568
|
};
|
|
1497
1569
|
content: {
|
|
1498
|
-
"application/json": components["schemas"]["
|
|
1570
|
+
"application/json": components["schemas"]["PageResult_for_String_and_WithdrawalInfo"];
|
|
1499
1571
|
};
|
|
1500
1572
|
};
|
|
1501
1573
|
404: {
|
|
@@ -1503,7 +1575,7 @@ export interface paths {
|
|
|
1503
1575
|
[name: string]: unknown;
|
|
1504
1576
|
};
|
|
1505
1577
|
content: {
|
|
1506
|
-
"application/json": components["schemas"]["
|
|
1578
|
+
"application/json": components["schemas"]["UserNotFound"];
|
|
1507
1579
|
};
|
|
1508
1580
|
};
|
|
1509
1581
|
};
|
|
@@ -1516,14 +1588,14 @@ export interface paths {
|
|
|
1516
1588
|
patch?: never;
|
|
1517
1589
|
trace?: never;
|
|
1518
1590
|
};
|
|
1519
|
-
"/account/{account_id}/history/
|
|
1591
|
+
"/account/{account_id}/history/deposit": {
|
|
1520
1592
|
parameters: {
|
|
1521
1593
|
query?: never;
|
|
1522
1594
|
header?: never;
|
|
1523
1595
|
path?: never;
|
|
1524
1596
|
cookie?: never;
|
|
1525
1597
|
};
|
|
1526
|
-
/** @description Fetch full history of
|
|
1598
|
+
/** @description Fetch full history of deposits for an account. */
|
|
1527
1599
|
get: {
|
|
1528
1600
|
parameters: {
|
|
1529
1601
|
query?: {
|
|
@@ -1538,7 +1610,62 @@ export interface paths {
|
|
|
1538
1610
|
};
|
|
1539
1611
|
header?: never;
|
|
1540
1612
|
path: {
|
|
1541
|
-
/** @description Account ID for which to fetch
|
|
1613
|
+
/** @description Account ID for which to fetch deposit history. */
|
|
1614
|
+
account_id: number;
|
|
1615
|
+
};
|
|
1616
|
+
cookie?: never;
|
|
1617
|
+
};
|
|
1618
|
+
requestBody?: never;
|
|
1619
|
+
responses: {
|
|
1620
|
+
200: {
|
|
1621
|
+
headers: {
|
|
1622
|
+
[name: string]: unknown;
|
|
1623
|
+
};
|
|
1624
|
+
content: {
|
|
1625
|
+
"application/json": components["schemas"]["PageResult_for_String_and_DepositInfo"];
|
|
1626
|
+
};
|
|
1627
|
+
};
|
|
1628
|
+
404: {
|
|
1629
|
+
headers: {
|
|
1630
|
+
[name: string]: unknown;
|
|
1631
|
+
};
|
|
1632
|
+
content: {
|
|
1633
|
+
"application/json": components["schemas"]["UserNotFound"];
|
|
1634
|
+
};
|
|
1635
|
+
};
|
|
1636
|
+
};
|
|
1637
|
+
};
|
|
1638
|
+
put?: never;
|
|
1639
|
+
post?: never;
|
|
1640
|
+
delete?: never;
|
|
1641
|
+
options?: never;
|
|
1642
|
+
head?: never;
|
|
1643
|
+
patch?: never;
|
|
1644
|
+
trace?: never;
|
|
1645
|
+
};
|
|
1646
|
+
"/account/{account_id}/history/liquidation": {
|
|
1647
|
+
parameters: {
|
|
1648
|
+
query?: never;
|
|
1649
|
+
header?: never;
|
|
1650
|
+
path?: never;
|
|
1651
|
+
cookie?: never;
|
|
1652
|
+
};
|
|
1653
|
+
/** @description Fetch full history of liquidations for an account. */
|
|
1654
|
+
get: {
|
|
1655
|
+
parameters: {
|
|
1656
|
+
query?: {
|
|
1657
|
+
/** @description start with this timestamp (RFC3339); defaults to UNIX epoch start */
|
|
1658
|
+
since?: string;
|
|
1659
|
+
/** @description end with this timestamp (RFC3339); defaults to current date-time */
|
|
1660
|
+
until?: string;
|
|
1661
|
+
/** @description fetch results starting with this page; query starts with first entry if page isn't specified */
|
|
1662
|
+
startInclusive?: string | null;
|
|
1663
|
+
/** @description Query returns up to 50 trades in one go. */
|
|
1664
|
+
pageSize?: number | null;
|
|
1665
|
+
};
|
|
1666
|
+
header?: never;
|
|
1667
|
+
path: {
|
|
1668
|
+
/** @description Account ID for which to fetch liquidation history. */
|
|
1542
1669
|
account_id: number;
|
|
1543
1670
|
};
|
|
1544
1671
|
cookie?: never;
|
|
@@ -1550,7 +1677,7 @@ export interface paths {
|
|
|
1550
1677
|
[name: string]: unknown;
|
|
1551
1678
|
};
|
|
1552
1679
|
content: {
|
|
1553
|
-
"application/json": components["schemas"]["
|
|
1680
|
+
"application/json": components["schemas"]["PageResult_for_String_and_LiquidationInfo"];
|
|
1554
1681
|
};
|
|
1555
1682
|
};
|
|
1556
1683
|
404: {
|
|
@@ -1617,7 +1744,9 @@ export interface paths {
|
|
|
1617
1744
|
/** @description Gets market updates history for some period of time. Default is hourly for last 24 hours */
|
|
1618
1745
|
get: {
|
|
1619
1746
|
parameters: {
|
|
1620
|
-
query?:
|
|
1747
|
+
query?: {
|
|
1748
|
+
pageSize?: number;
|
|
1749
|
+
};
|
|
1621
1750
|
header?: never;
|
|
1622
1751
|
path: {
|
|
1623
1752
|
market_id: number;
|
|
@@ -2608,20 +2737,20 @@ export interface components {
|
|
|
2608
2737
|
};
|
|
2609
2738
|
MarketStats: {
|
|
2610
2739
|
/** Format: double */
|
|
2611
|
-
indexPrice
|
|
2740
|
+
indexPrice?: number | null;
|
|
2612
2741
|
/** Format: double */
|
|
2613
|
-
indexPriceConf
|
|
2742
|
+
indexPriceConf?: number | null;
|
|
2614
2743
|
frozen?: boolean;
|
|
2615
2744
|
/** Format: double */
|
|
2616
2745
|
volumeBase24h: number;
|
|
2617
2746
|
/** Format: double */
|
|
2618
2747
|
volumeQuote24h: number;
|
|
2619
2748
|
/** Format: double */
|
|
2620
|
-
high24h
|
|
2749
|
+
high24h?: number | null;
|
|
2621
2750
|
/** Format: double */
|
|
2622
|
-
low24h
|
|
2751
|
+
low24h?: number | null;
|
|
2623
2752
|
/** Format: double */
|
|
2624
|
-
close24h
|
|
2753
|
+
close24h?: number | null;
|
|
2625
2754
|
/** Format: double */
|
|
2626
2755
|
prevClose24h?: number | null;
|
|
2627
2756
|
perpStats?: components["schemas"]["PerpMarketStats"] | null;
|
|
@@ -2820,7 +2949,13 @@ export interface components {
|
|
|
2820
2949
|
/** @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
2950
|
bankruptcy: boolean;
|
|
2822
2951
|
};
|
|
2823
|
-
|
|
2952
|
+
GetAccountPnlHistoryQuery: {
|
|
2953
|
+
/**
|
|
2954
|
+
* Format: uint32
|
|
2955
|
+
* @description Optional market filter by market id.
|
|
2956
|
+
* @default null
|
|
2957
|
+
*/
|
|
2958
|
+
marketId: number | null;
|
|
2824
2959
|
/**
|
|
2825
2960
|
* @description start with this timestamp (RFC3339); defaults to UNIX epoch start
|
|
2826
2961
|
* @default null
|
|
@@ -2847,51 +2982,104 @@ export interface components {
|
|
|
2847
2982
|
nextStartInclusive?: string | null;
|
|
2848
2983
|
};
|
|
2849
2984
|
AccountPnlInfo: {
|
|
2985
|
+
/** @description Time of the position update. */
|
|
2850
2986
|
time: string;
|
|
2987
|
+
/** @description Action id of the update. Used for pagination. */
|
|
2851
2988
|
actionId: string;
|
|
2852
|
-
/**
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
fundingPnlDelta: number;
|
|
2989
|
+
/**
|
|
2990
|
+
* Format: uint32
|
|
2991
|
+
* @description Market id of the position update.
|
|
2992
|
+
*/
|
|
2993
|
+
marketId: number;
|
|
2858
2994
|
/**
|
|
2859
2995
|
* Format: double
|
|
2860
|
-
* @description
|
|
2996
|
+
* @description PnL realized from this position update.
|
|
2861
2997
|
*/
|
|
2862
|
-
|
|
2863
|
-
};
|
|
2864
|
-
AccountPnlHistInfo: {
|
|
2865
|
-
/** @description Same time when funding is applied */
|
|
2866
|
-
time: string;
|
|
2998
|
+
tradingPnl: number;
|
|
2867
2999
|
/**
|
|
2868
3000
|
* Format: double
|
|
2869
|
-
* @description
|
|
3001
|
+
* @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
3002
|
*/
|
|
2871
|
-
|
|
3003
|
+
settledFundingPnl: number;
|
|
2872
3004
|
/**
|
|
2873
3005
|
* Format: double
|
|
2874
|
-
* @description
|
|
3006
|
+
* @description Position size at the time of the pnl update. Positive for longs, negative for shorts.
|
|
3007
|
+
*/
|
|
3008
|
+
positionSize: number;
|
|
3009
|
+
};
|
|
3010
|
+
GetAccountFundingHistoryQuery: {
|
|
3011
|
+
/**
|
|
3012
|
+
* Format: uint32
|
|
3013
|
+
* @description Optional market filter by market id.
|
|
3014
|
+
* @default null
|
|
2875
3015
|
*/
|
|
2876
|
-
|
|
2877
|
-
/**
|
|
2878
|
-
|
|
3016
|
+
marketId: number | null;
|
|
3017
|
+
/**
|
|
3018
|
+
* @description start with this timestamp (RFC3339); defaults to UNIX epoch start
|
|
3019
|
+
* @default null
|
|
3020
|
+
*/
|
|
3021
|
+
since: string;
|
|
3022
|
+
/**
|
|
3023
|
+
* @description end with this timestamp (RFC3339); defaults to current date-time
|
|
3024
|
+
* @default null
|
|
3025
|
+
*/
|
|
3026
|
+
until: string;
|
|
3027
|
+
/** @description fetch results starting with this page; query starts with first entry if page isn't specified */
|
|
3028
|
+
startInclusive?: string | null;
|
|
3029
|
+
/**
|
|
3030
|
+
* Format: uint8
|
|
3031
|
+
* @description Query returns up to 50 trades in one go.
|
|
3032
|
+
* @default null
|
|
3033
|
+
*/
|
|
3034
|
+
pageSize: number | null;
|
|
3035
|
+
};
|
|
3036
|
+
PageResult_for_String_and_AccountFundingInfo: {
|
|
3037
|
+
/** @description Set of items for requested by query. */
|
|
3038
|
+
items: components["schemas"]["AccountFundingInfo"][];
|
|
3039
|
+
/** @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. */
|
|
3040
|
+
nextStartInclusive?: string | null;
|
|
3041
|
+
};
|
|
3042
|
+
AccountFundingInfo: {
|
|
3043
|
+
/** @description Time of the position update. */
|
|
3044
|
+
time: string;
|
|
3045
|
+
/** @description Action id of the update. Used for pagination. */
|
|
3046
|
+
actionId: string;
|
|
3047
|
+
/**
|
|
3048
|
+
* Format: uint32
|
|
3049
|
+
* @description Market id of the position update.
|
|
3050
|
+
*/
|
|
3051
|
+
marketId: number;
|
|
2879
3052
|
/**
|
|
2880
3053
|
* Format: double
|
|
2881
|
-
* @description
|
|
3054
|
+
* @description Position size at the time of the pnl update. Positive for longs, negative for shorts.
|
|
2882
3055
|
*/
|
|
2883
|
-
|
|
3056
|
+
positionSize: number;
|
|
2884
3057
|
/**
|
|
2885
3058
|
* Format: double
|
|
2886
|
-
* @description Funding
|
|
3059
|
+
* @description Funding paid to the account for this funding period.
|
|
2887
3060
|
*/
|
|
2888
3061
|
fundingPnl: number;
|
|
2889
|
-
market: components["schemas"]["MarketIdInfo"];
|
|
2890
3062
|
};
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
3063
|
+
BadRequest: null;
|
|
3064
|
+
PagedQuery: {
|
|
3065
|
+
/**
|
|
3066
|
+
* @description start with this timestamp (RFC3339); defaults to UNIX epoch start
|
|
3067
|
+
* @default null
|
|
3068
|
+
*/
|
|
3069
|
+
since: string;
|
|
3070
|
+
/**
|
|
3071
|
+
* @description end with this timestamp (RFC3339); defaults to current date-time
|
|
3072
|
+
* @default null
|
|
3073
|
+
*/
|
|
3074
|
+
until: string;
|
|
3075
|
+
/** @description fetch results starting with this page; query starts with first entry if page isn't specified */
|
|
3076
|
+
startInclusive?: string | null;
|
|
3077
|
+
/**
|
|
3078
|
+
* Format: uint8
|
|
3079
|
+
* @description Query returns up to 50 trades in one go.
|
|
3080
|
+
* @default null
|
|
3081
|
+
*/
|
|
3082
|
+
pageSize: number | null;
|
|
2895
3083
|
};
|
|
2896
3084
|
PageResult_for_String_and_Trigger: {
|
|
2897
3085
|
/** @description Set of items for requested by query. */
|
|
@@ -3116,35 +3304,104 @@ export interface components {
|
|
|
3116
3304
|
/** Format: double */
|
|
3117
3305
|
volumeQuote: number;
|
|
3118
3306
|
};
|
|
3119
|
-
|
|
3120
|
-
|
|
3307
|
+
PageResult_for_String_and_WithdrawalInfo: {
|
|
3308
|
+
/** @description Set of items for requested by query. */
|
|
3309
|
+
items: components["schemas"]["WithdrawalInfo"][];
|
|
3310
|
+
/** @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. */
|
|
3311
|
+
nextStartInclusive?: string | null;
|
|
3121
3312
|
};
|
|
3122
|
-
|
|
3313
|
+
WithdrawalInfo: {
|
|
3314
|
+
time: string;
|
|
3315
|
+
actionId: string;
|
|
3123
3316
|
/** Format: uint32 */
|
|
3124
|
-
|
|
3317
|
+
accountId: number;
|
|
3318
|
+
/** Format: uint32 */
|
|
3319
|
+
tokenId: number;
|
|
3125
3320
|
/** Format: double */
|
|
3126
|
-
|
|
3321
|
+
amount: number;
|
|
3322
|
+
/** Format: double */
|
|
3323
|
+
balance: number;
|
|
3324
|
+
/** Format: double */
|
|
3325
|
+
fee: number;
|
|
3326
|
+
destPubkey?: string | null;
|
|
3127
3327
|
};
|
|
3128
|
-
|
|
3328
|
+
PageResult_for_String_and_DepositInfo: {
|
|
3129
3329
|
/** @description Set of items for requested by query. */
|
|
3130
|
-
items: components["schemas"]["
|
|
3330
|
+
items: components["schemas"]["DepositInfo"][];
|
|
3131
3331
|
/** @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
3332
|
nextStartInclusive?: string | null;
|
|
3133
3333
|
};
|
|
3134
|
-
|
|
3334
|
+
DepositInfo: {
|
|
3135
3335
|
time: string;
|
|
3136
3336
|
actionId: string;
|
|
3137
3337
|
/** Format: uint32 */
|
|
3138
3338
|
accountId: number;
|
|
3139
3339
|
/** Format: uint32 */
|
|
3140
3340
|
tokenId: number;
|
|
3141
|
-
/** Format:
|
|
3341
|
+
/** Format: double */
|
|
3142
3342
|
amount: number;
|
|
3143
|
-
/** Format:
|
|
3343
|
+
/** Format: double */
|
|
3144
3344
|
balance: number;
|
|
3145
|
-
/** Format:
|
|
3345
|
+
/** Format: uint64 */
|
|
3346
|
+
eventIndex: number;
|
|
3347
|
+
};
|
|
3348
|
+
PageResult_for_String_and_LiquidationInfo: {
|
|
3349
|
+
/** @description Set of items for requested by query. */
|
|
3350
|
+
items: components["schemas"]["LiquidationInfo"][];
|
|
3351
|
+
/** @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. */
|
|
3352
|
+
nextStartInclusive?: string | null;
|
|
3353
|
+
};
|
|
3354
|
+
LiquidationInfo: {
|
|
3355
|
+
time: string;
|
|
3356
|
+
actionId: string;
|
|
3357
|
+
/** Format: uint32 */
|
|
3358
|
+
liquidatorId: number;
|
|
3359
|
+
/** Format: uint32 */
|
|
3360
|
+
liquidateeId: number;
|
|
3361
|
+
/** Format: double */
|
|
3146
3362
|
fee: number;
|
|
3363
|
+
liquidationKind: components["schemas"]["LiquidationKind"];
|
|
3364
|
+
/** Format: uint32 */
|
|
3365
|
+
marketId?: number | null;
|
|
3366
|
+
/** Format: uint32 */
|
|
3367
|
+
tokenId?: number | null;
|
|
3368
|
+
orderId?: string | null;
|
|
3369
|
+
/** Format: double */
|
|
3370
|
+
orderPrice?: number | null;
|
|
3371
|
+
/** Format: double */
|
|
3372
|
+
orderSize?: number | null;
|
|
3373
|
+
/** Format: double */
|
|
3374
|
+
orderQuote?: number | null;
|
|
3375
|
+
/** Format: double */
|
|
3376
|
+
preOmf: number;
|
|
3377
|
+
/** Format: double */
|
|
3378
|
+
preMmf: number;
|
|
3379
|
+
/** Format: double */
|
|
3380
|
+
preImf: number;
|
|
3381
|
+
/** Format: double */
|
|
3382
|
+
preCmf: number;
|
|
3383
|
+
/** Format: double */
|
|
3384
|
+
prePon: number;
|
|
3385
|
+
/** Format: double */
|
|
3386
|
+
preMf: number;
|
|
3387
|
+
/** Format: double */
|
|
3388
|
+
prePn: number;
|
|
3389
|
+
/** Format: double */
|
|
3390
|
+
postOmf: number;
|
|
3391
|
+
/** Format: double */
|
|
3392
|
+
postMmf: number;
|
|
3393
|
+
/** Format: double */
|
|
3394
|
+
postImf: number;
|
|
3395
|
+
/** Format: double */
|
|
3396
|
+
postCmf: number;
|
|
3397
|
+
/** Format: double */
|
|
3398
|
+
postPon: number;
|
|
3399
|
+
/** Format: double */
|
|
3400
|
+
postMf: number;
|
|
3401
|
+
/** Format: double */
|
|
3402
|
+
postPn: number;
|
|
3147
3403
|
};
|
|
3404
|
+
LiquidationKind: "place_order" | "cancel_order" | "bankruptcy";
|
|
3148
3405
|
/** @description TV config query response https://www.tradingview.com/charting-library-docs/latest/connecting_data/UDF/#data-feed-configuration-data */
|
|
3149
3406
|
TvConfigResponse: {
|
|
3150
3407
|
supported_resolutions: components["schemas"]["Resolution"][];
|
|
@@ -3157,7 +3414,7 @@ export interface components {
|
|
|
3157
3414
|
* @description More limited resolution than history one, used in some HTTP queries
|
|
3158
3415
|
* @enum {string}
|
|
3159
3416
|
*/
|
|
3160
|
-
Resolution: "
|
|
3417
|
+
Resolution: "OneMinute" | "FiveMinutes" | "FifteenMinutes" | "ThirtyMinutes" | "SixtyMinutes" | "OneDay" | "OneWeek" | "OneMonth";
|
|
3161
3418
|
/** @description TV symbols query */
|
|
3162
3419
|
TvSymbolsQuery: {
|
|
3163
3420
|
symbol: string;
|
|
@@ -3166,6 +3423,8 @@ export interface components {
|
|
|
3166
3423
|
description: string;
|
|
3167
3424
|
exchange: string;
|
|
3168
3425
|
has_intraday: boolean;
|
|
3426
|
+
has_empty_bars: boolean;
|
|
3427
|
+
has_weekly_and_monthly: boolean;
|
|
3169
3428
|
format: components["schemas"]["TvSymbolsFormat"];
|
|
3170
3429
|
listed_exchange: string;
|
|
3171
3430
|
/** Format: int64 */
|
|
@@ -3309,6 +3568,13 @@ export interface components {
|
|
|
3309
3568
|
};
|
|
3310
3569
|
/** @description Empty object, to make quotes item conform to API error spec */
|
|
3311
3570
|
TvQuotesErrorValues: Record<string, never>;
|
|
3571
|
+
GetMarketHistoryQuery: {
|
|
3572
|
+
/**
|
|
3573
|
+
* Format: uint8
|
|
3574
|
+
* @default 24
|
|
3575
|
+
*/
|
|
3576
|
+
pageSize: number;
|
|
3577
|
+
};
|
|
3312
3578
|
PageResult_for_String_and_MarketHistoryInfo: {
|
|
3313
3579
|
/** @description Set of items for requested by query. */
|
|
3314
3580
|
items: components["schemas"]["MarketHistoryInfo"][];
|
|
@@ -3323,6 +3589,13 @@ export interface components {
|
|
|
3323
3589
|
fundingIndex: components["schemas"]["FundingIndexMantissa"];
|
|
3324
3590
|
/** Format: double */
|
|
3325
3591
|
fundingRate: number;
|
|
3592
|
+
/**
|
|
3593
|
+
* Format: double
|
|
3594
|
+
* @description Scaled in market price decimals
|
|
3595
|
+
*/
|
|
3596
|
+
indexPrice: number;
|
|
3597
|
+
/** Format: double */
|
|
3598
|
+
markPrice: number;
|
|
3326
3599
|
};
|
|
3327
3600
|
/**
|
|
3328
3601
|
* Format: int128
|