chore(): small suggested changes

This commit is contained in:
Jerko J
2024-08-28 13:04:41 +02:00
parent 9e9d7003d2
commit 5ba76128e7
4 changed files with 52 additions and 119 deletions

71
package-lock.json generated
View File

@@ -10,9 +10,7 @@
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"axios": "^1.6.6", "axios": "^1.6.6",
"fs": "^0.0.1-security",
"isomorphic-ws": "^4.0.1", "isomorphic-ws": "^4.0.1",
"path": "^0.12.7",
"ws": "^7.4.0" "ws": "^7.4.0"
}, },
"devDependencies": { "devDependencies": {
@@ -3450,11 +3448,6 @@
} }
} }
}, },
"node_modules/fs": {
"version": "0.0.1-security",
"resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz",
"integrity": "sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w=="
},
"node_modules/fs.realpath": { "node_modules/fs.realpath": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
@@ -5641,15 +5634,6 @@
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/path": {
"version": "0.12.7",
"resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz",
"integrity": "sha512-aXXC6s+1w7otVF9UletFkFcDsJeO7lSZBPUQhtb5O0xJe8LtYhj/GxldoL09bBj9+ZmE2hNoHqQSFMN5fikh4Q==",
"dependencies": {
"process": "^0.11.1",
"util": "^0.10.3"
}
},
"node_modules/path-exists": { "node_modules/path-exists": {
"version": "4.0.0", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
@@ -5776,14 +5760,6 @@
"url": "https://github.com/chalk/ansi-styles?sponsor=1" "url": "https://github.com/chalk/ansi-styles?sponsor=1"
} }
}, },
"node_modules/process": {
"version": "0.11.10",
"resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
"integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==",
"engines": {
"node": ">= 0.6.0"
}
},
"node_modules/process-nextick-args": { "node_modules/process-nextick-args": {
"version": "2.0.1", "version": "2.0.1",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
@@ -6604,25 +6580,12 @@
"punycode": "^2.1.0" "punycode": "^2.1.0"
} }
}, },
"node_modules/util": {
"version": "0.10.4",
"resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz",
"integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==",
"dependencies": {
"inherits": "2.0.3"
}
},
"node_modules/util-deprecate": { "node_modules/util-deprecate": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
"optional": true "optional": true
}, },
"node_modules/util/node_modules/inherits": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
"integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw=="
},
"node_modules/v8-compile-cache": { "node_modules/v8-compile-cache": {
"version": "2.2.0", "version": "2.2.0",
"resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz", "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz",
@@ -9656,11 +9619,6 @@
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz",
"integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==" "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA=="
}, },
"fs": {
"version": "0.0.1-security",
"resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz",
"integrity": "sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w=="
},
"fs.realpath": { "fs.realpath": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
@@ -11336,15 +11294,6 @@
"lines-and-columns": "^1.1.6" "lines-and-columns": "^1.1.6"
} }
}, },
"path": {
"version": "0.12.7",
"resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz",
"integrity": "sha512-aXXC6s+1w7otVF9UletFkFcDsJeO7lSZBPUQhtb5O0xJe8LtYhj/GxldoL09bBj9+ZmE2hNoHqQSFMN5fikh4Q==",
"requires": {
"process": "^0.11.1",
"util": "^0.10.3"
}
},
"path-exists": { "path-exists": {
"version": "4.0.0", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
@@ -11428,11 +11377,6 @@
} }
} }
}, },
"process": {
"version": "0.11.10",
"resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
"integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A=="
},
"process-nextick-args": { "process-nextick-args": {
"version": "2.0.1", "version": "2.0.1",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
@@ -11965,21 +11909,6 @@
"punycode": "^2.1.0" "punycode": "^2.1.0"
} }
}, },
"util": {
"version": "0.10.4",
"resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz",
"integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==",
"requires": {
"inherits": "2.0.3"
},
"dependencies": {
"inherits": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
"integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw=="
}
}
},
"util-deprecate": { "util-deprecate": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",

View File

@@ -25,9 +25,7 @@
], ],
"dependencies": { "dependencies": {
"axios": "^1.6.6", "axios": "^1.6.6",
"fs": "^0.0.1-security",
"isomorphic-ws": "^4.0.1", "isomorphic-ws": "^4.0.1",
"path": "^0.12.7",
"ws": "^7.4.0" "ws": "^7.4.0"
}, },
"devDependencies": { "devDependencies": {

View File

@@ -132,6 +132,9 @@ import {
OrderbookResponseV5, OrderbookResponseV5,
PositionInfoParamsV5, PositionInfoParamsV5,
PositionV5, PositionV5,
PreUpgradeOptionsDelivery,
PreUpgradeTransaction,
PreUpgradeUSDCSessionSettlement,
PreupgradeOptionsDelivery, PreupgradeOptionsDelivery,
PreupgradeTransactionLog, PreupgradeTransactionLog,
PreupgradeUSDCSessionSettlement, PreupgradeUSDCSessionSettlement,
@@ -852,11 +855,11 @@ export class RestClientV5 extends BaseRestClient {
* INFO * INFO
* USDC Perpeual & Option support the recent 6 months data. Please download older data via GUI * USDC Perpeual & Option support the recent 6 months data. Please download older data via GUI
*/ */
getPreUpgradeTransactionLog( getPreUpgradeTransactions(
params: GetPreUpgradeTransactionLogParamsV5, params: GetPreUpgradeTransactionLogParamsV5,
): Promise< ): Promise<
APIResponseV3WithTime<{ APIResponseV3WithTime<{
list: PreupgradeTransactionLog[]; list: PreUpgradeTransaction[];
nextPageCursor: string; nextPageCursor: string;
}> }>
> { > {
@@ -872,7 +875,7 @@ export class RestClientV5 extends BaseRestClient {
getPreUpgradeOptionDeliveryRecord( getPreUpgradeOptionDeliveryRecord(
params: GetPreUpgradeOptionDeliveryRecordParamsV5, params: GetPreUpgradeOptionDeliveryRecordParamsV5,
): Promise< ): Promise<
APIResponseV3WithTime<CategoryCursorListV5<PreupgradeOptionsDelivery[]>> APIResponseV3WithTime<CategoryCursorListV5<PreUpgradeOptionsDelivery[]>>
> { > {
return this.getPrivate('/v5/pre-upgrade/asset/delivery-record', params); return this.getPrivate('/v5/pre-upgrade/asset/delivery-record', params);
} }
@@ -883,11 +886,11 @@ export class RestClientV5 extends BaseRestClient {
* INFO * INFO
* USDC Perpetual support the recent 6 months data. Please download older data via GUI * USDC Perpetual support the recent 6 months data. Please download older data via GUI
*/ */
getPreUpgradeUSDCSessionSettlement( getPreUpgradeUSDCSessionSettlements(
params: GetPreUpgradeUSDCSessionParamsV5, params: GetPreUpgradeUSDCSessionParamsV5,
): Promise< ): Promise<
APIResponseV3WithTime< APIResponseV3WithTime<
CategoryCursorListV5<PreupgradeUSDCSessionSettlement[]> CategoryCursorListV5<PreUpgradeUSDCSessionSettlement[]>
> >
> { > {
return this.getPrivate('/v5/pre-upgrade/asset/settlement-record', params); return this.getPrivate('/v5/pre-upgrade/asset/settlement-record', params);
@@ -1559,7 +1562,7 @@ export class RestClientV5 extends BaseRestClient {
} }
/** /**
* This endpoint allows you to get a list of all sub UID of master account. * This endpoint allows you to get a list of all sub UID of master account. At most 10k subaccounts.
*/ */
getSubUIDList(): Promise< getSubUIDList(): Promise<
APIResponseV3WithTime<{ subMembers: SubMemberV5[] }> APIResponseV3WithTime<{ subMembers: SubMemberV5[] }>
@@ -1567,6 +1570,9 @@ export class RestClientV5 extends BaseRestClient {
return this.getPrivate('/v5/user/query-sub-members'); return this.getPrivate('/v5/user/query-sub-members');
} }
/**
* This endpoint allows you to get a list of all sub UID of master account. No limit on the number of subaccounts.
*/
getSubUIDListUnlimited(params?: { getSubUIDListUnlimited(params?: {
pageSize?: string; pageSize?: string;
nextCursor?: string; nextCursor?: string;

View File

@@ -1,4 +1,4 @@
export interface PreupgradeTransactionLog { export interface PreUpgradeTransaction {
symbol: string; symbol: string;
category: string; category: string;
side: 'Buy' | 'Sell' | 'None'; side: 'Buy' | 'Sell' | 'None';
@@ -20,7 +20,7 @@ export interface PreupgradeTransactionLog {
orderLinkId: string; orderLinkId: string;
} }
export interface PreupgradeOptionsDelivery { export interface PreUpgradeOptionsDelivery {
deliveryTime: number; deliveryTime: number;
symbol: string; symbol: string;
side: 'Buy' | 'Sell'; side: 'Buy' | 'Sell';
@@ -31,7 +31,7 @@ export interface PreupgradeTransactionLog {
deliveryRpl: string; deliveryRpl: string;
} }
export interface PreupgradeUSDCSessionSettlement { export interface PreUpgradeUSDCSessionSettlement {
symbol: string; symbol: string;
side: 'Buy' | 'Sell'; side: 'Buy' | 'Sell';
size: string; size: string;