Skip to content

Commit caa55d4

Browse files
authored
Merge pull request tiagosiebler#520 from tiagosiebler/basepriceproperty
fix(v4.4.5, tiagosiebler#518, tiagosiebler#516): add missing basePrice property for spot orders, fix return type for getP2POrderMessages
2 parents a3f4a77 + 43548fb commit caa55d4

File tree

4 files changed

+22
-4
lines changed

4 files changed

+22
-4
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bybit-api",
3-
"version": "4.4.4",
3+
"version": "4.4.5",
44
"description": "Complete & robust Node.js SDK for Bybit's REST APIs and WebSockets, with TypeScript & strong end to end tests.",
55
"main": "lib/index.js",
66
"types": "lib/index.d.ts",

src/rest-client-v5.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import {
2020
AmendOrderParamsV5,
2121
AmendSpreadOrderParamsV5,
2222
ApiKeyInfoV5,
23+
APIP2PResponse,
2324
APIResponseV3,
2425
APIResponseV3WithTime,
2526
AssetInfoV5,
@@ -3943,7 +3944,7 @@ export class RestClientV5 extends BaseRestClient {
39433944
*/
39443945
getP2POrderMessages(
39453946
params: GetP2POrderMessagesParamsV5,
3946-
): Promise<APIResponseV3WithTime<P2POrderMessageV5[]>> {
3947+
): Promise<APIP2PResponse<P2POrderMessageV5[]>> {
39473948
return this.postPrivate('/v5/p2p/order/message/listpage', params);
39483949
}
39493950

src/types/shared.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,23 @@ export type APIResponseV3WithTime<TResult, TExtInfo = {}> = APIResponseV3<
6868
TResult,
6969
TExtInfo
7070
> & { time: number };
71+
72+
export interface APIP2PResponse<TResult, TExtInfo = {}> {
73+
ret_code: number;
74+
ret_msg: string;
75+
result: {
76+
result: TResult;
77+
totalRows: string;
78+
totalPages: string;
79+
currentPage: string;
80+
dayLimit: string;
81+
showDayLimit: boolean;
82+
};
83+
ext_code: string;
84+
ext_info: TExtInfo;
85+
time_now: string;
86+
}
87+
7188
/**
7289
* Request Parameter Types
7390
*/

0 commit comments

Comments
 (0)