@nightlylabs/dex-sdk 1.0.11 → 1.0.13
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/index.cjs +15 -0
- package/dist/index.d.cts +10 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +15 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -25082,6 +25082,21 @@ var Client = class _Client {
|
|
|
25082
25082
|
);
|
|
25083
25083
|
return response;
|
|
25084
25084
|
};
|
|
25085
|
+
/**
|
|
25086
|
+
* getUserWithdrawalsHistory.
|
|
25087
|
+
*
|
|
25088
|
+
* @param request - See {@link GetUserWithdrawalsRequest}.
|
|
25089
|
+
*/
|
|
25090
|
+
this.getUserPositionsHistory = async (request) => {
|
|
25091
|
+
if (request.olderTimestampMs && request.newerTimestampMs && request.olderTimestampMs > request.newerTimestampMs) {
|
|
25092
|
+
throw new Error("olderTimestampMs must be lower than newerTimestampMs");
|
|
25093
|
+
}
|
|
25094
|
+
const response = await this.sendGetJson(
|
|
25095
|
+
"/v1/get_user_positions" /* GetUserPositions */,
|
|
25096
|
+
request
|
|
25097
|
+
);
|
|
25098
|
+
return response;
|
|
25099
|
+
};
|
|
25085
25100
|
// Meta
|
|
25086
25101
|
/**
|
|
25087
25102
|
* getTime.
|
package/dist/index.d.cts
CHANGED
|
@@ -527,6 +527,7 @@ interface HistoricalPerpOrder {
|
|
|
527
527
|
postOnly: boolean;
|
|
528
528
|
orderType: OrderType;
|
|
529
529
|
orderStatus: OrderStatus;
|
|
530
|
+
avgFillPrice?: string;
|
|
530
531
|
}
|
|
531
532
|
interface GetPerpUserOrdersResponse {
|
|
532
533
|
orders: HistoricalPerpOrder[];
|
|
@@ -662,6 +663,7 @@ interface HistoricalSpotOrder {
|
|
|
662
663
|
postOnly: boolean;
|
|
663
664
|
orderType: OrderType;
|
|
664
665
|
orderStatus: OrderStatus;
|
|
666
|
+
avgFillPrice?: string;
|
|
665
667
|
}
|
|
666
668
|
interface GetSpotUserOrdersResponse {
|
|
667
669
|
orders: HistoricalSpotOrder[];
|
|
@@ -1457,6 +1459,7 @@ interface PerpOrder {
|
|
|
1457
1459
|
reduceOnly: boolean;
|
|
1458
1460
|
timestamp: string;
|
|
1459
1461
|
orderType: OrderType;
|
|
1462
|
+
filledQuote?: string;
|
|
1460
1463
|
}
|
|
1461
1464
|
interface WsFill {
|
|
1462
1465
|
id: string;
|
|
@@ -1624,6 +1627,7 @@ interface SpotOrder {
|
|
|
1624
1627
|
postOnly: boolean;
|
|
1625
1628
|
timestamp: string;
|
|
1626
1629
|
orderType: OrderType;
|
|
1630
|
+
filledQuote?: string;
|
|
1627
1631
|
}
|
|
1628
1632
|
interface SpotOrderFills {
|
|
1629
1633
|
market: string;
|
|
@@ -7248,6 +7252,12 @@ declare class Client {
|
|
|
7248
7252
|
* @returns A promise that resolves to {@link GetUserAccountValueRankingResponse}.
|
|
7249
7253
|
*/
|
|
7250
7254
|
getUserAccountValueRanking: (request: GetUserAccountValueRankingRequest) => Promise<GetUserAccountValueRankingResponse>;
|
|
7255
|
+
/**
|
|
7256
|
+
* getUserWithdrawalsHistory.
|
|
7257
|
+
*
|
|
7258
|
+
* @param request - See {@link GetUserWithdrawalsRequest}.
|
|
7259
|
+
*/
|
|
7260
|
+
getUserPositionsHistory: (request: GetUserPositionsRequest) => Promise<GetUserPositionsResponse>;
|
|
7251
7261
|
/**
|
|
7252
7262
|
* getTime.
|
|
7253
7263
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -527,6 +527,7 @@ interface HistoricalPerpOrder {
|
|
|
527
527
|
postOnly: boolean;
|
|
528
528
|
orderType: OrderType;
|
|
529
529
|
orderStatus: OrderStatus;
|
|
530
|
+
avgFillPrice?: string;
|
|
530
531
|
}
|
|
531
532
|
interface GetPerpUserOrdersResponse {
|
|
532
533
|
orders: HistoricalPerpOrder[];
|
|
@@ -662,6 +663,7 @@ interface HistoricalSpotOrder {
|
|
|
662
663
|
postOnly: boolean;
|
|
663
664
|
orderType: OrderType;
|
|
664
665
|
orderStatus: OrderStatus;
|
|
666
|
+
avgFillPrice?: string;
|
|
665
667
|
}
|
|
666
668
|
interface GetSpotUserOrdersResponse {
|
|
667
669
|
orders: HistoricalSpotOrder[];
|
|
@@ -1457,6 +1459,7 @@ interface PerpOrder {
|
|
|
1457
1459
|
reduceOnly: boolean;
|
|
1458
1460
|
timestamp: string;
|
|
1459
1461
|
orderType: OrderType;
|
|
1462
|
+
filledQuote?: string;
|
|
1460
1463
|
}
|
|
1461
1464
|
interface WsFill {
|
|
1462
1465
|
id: string;
|
|
@@ -1624,6 +1627,7 @@ interface SpotOrder {
|
|
|
1624
1627
|
postOnly: boolean;
|
|
1625
1628
|
timestamp: string;
|
|
1626
1629
|
orderType: OrderType;
|
|
1630
|
+
filledQuote?: string;
|
|
1627
1631
|
}
|
|
1628
1632
|
interface SpotOrderFills {
|
|
1629
1633
|
market: string;
|
|
@@ -7248,6 +7252,12 @@ declare class Client {
|
|
|
7248
7252
|
* @returns A promise that resolves to {@link GetUserAccountValueRankingResponse}.
|
|
7249
7253
|
*/
|
|
7250
7254
|
getUserAccountValueRanking: (request: GetUserAccountValueRankingRequest) => Promise<GetUserAccountValueRankingResponse>;
|
|
7255
|
+
/**
|
|
7256
|
+
* getUserWithdrawalsHistory.
|
|
7257
|
+
*
|
|
7258
|
+
* @param request - See {@link GetUserWithdrawalsRequest}.
|
|
7259
|
+
*/
|
|
7260
|
+
getUserPositionsHistory: (request: GetUserPositionsRequest) => Promise<GetUserPositionsResponse>;
|
|
7251
7261
|
/**
|
|
7252
7262
|
* getTime.
|
|
7253
7263
|
*
|
package/dist/index.js
CHANGED
|
@@ -25041,6 +25041,21 @@ var Client = class _Client {
|
|
|
25041
25041
|
);
|
|
25042
25042
|
return response;
|
|
25043
25043
|
};
|
|
25044
|
+
/**
|
|
25045
|
+
* getUserWithdrawalsHistory.
|
|
25046
|
+
*
|
|
25047
|
+
* @param request - See {@link GetUserWithdrawalsRequest}.
|
|
25048
|
+
*/
|
|
25049
|
+
this.getUserPositionsHistory = async (request) => {
|
|
25050
|
+
if (request.olderTimestampMs && request.newerTimestampMs && request.olderTimestampMs > request.newerTimestampMs) {
|
|
25051
|
+
throw new Error("olderTimestampMs must be lower than newerTimestampMs");
|
|
25052
|
+
}
|
|
25053
|
+
const response = await this.sendGetJson(
|
|
25054
|
+
"/v1/get_user_positions" /* GetUserPositions */,
|
|
25055
|
+
request
|
|
25056
|
+
);
|
|
25057
|
+
return response;
|
|
25058
|
+
};
|
|
25044
25059
|
// Meta
|
|
25045
25060
|
/**
|
|
25046
25061
|
* getTime.
|