Skip to content

Commit

Permalink
Merge pull request #418 from JJ-Cro/update13022025
Browse files Browse the repository at this point in the history
feat(v3.10.33): Updated return types for getSubDepositAddress, createUniversalTransfer and createInternalTransfer
  • Loading branch information
tiagosiebler authored Feb 13, 2025
2 parents eec6335 + addfd16 commit dec453f
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 9 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bybit-api",
"version": "3.10.32",
"version": "3.10.33",
"description": "Complete & robust Node.js SDK for Bybit's REST APIs and WebSockets, with TypeScript & strong end to end tests.",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down
28 changes: 22 additions & 6 deletions src/rest-client-v5.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ import {
DeleteSubMemberParamsV5,
DeliveryPriceV5,
DeliveryRecordV5,
DepositAddressResultV5,
DepositAddressChainV5,
DepositRecordV5,
ExchangeBrokerAccountInfoV5,
ExchangeBrokerEarningResultV5,
Expand Down Expand Up @@ -1305,7 +1305,7 @@ export class RestClientV5 extends BaseRestClient {
amount: string,
fromAccountType: AccountTypeV5,
toAccountType: AccountTypeV5,
): Promise<APIResponseV3WithTime<{ transferId: string }>> {
): Promise<APIResponseV3WithTime<{ transferId: string; status: string }>> {
return this.postPrivate('/v5/asset/transfer/inter-transfer', {
transferId,
coin,
Expand Down Expand Up @@ -1365,7 +1365,7 @@ export class RestClientV5 extends BaseRestClient {
*/
createUniversalTransfer(
params: UniversalTransferParamsV5,
): Promise<APIResponseV3WithTime<{ transferId: string }>> {
): Promise<APIResponseV3WithTime<{ transferId: string; status: string }>> {
return this.postPrivate('/v5/asset/transfer/universal-transfer', params);
}

Expand Down Expand Up @@ -1464,7 +1464,12 @@ export class RestClientV5 extends BaseRestClient {
getMasterDepositAddress(
coin: string,
chainType?: string,
): Promise<APIResponseV3WithTime<DepositAddressResultV5>> {
): Promise<
APIResponseV3WithTime<{
coin: string;
chains: DepositAddressChainV5[];
}>
> {
return this.getPrivate('/v5/asset/deposit/query-address', {
coin,
chainType,
Expand All @@ -1478,7 +1483,12 @@ export class RestClientV5 extends BaseRestClient {
coin: string,
chainType: string,
subMemberId: string,
): Promise<APIResponseV3WithTime<DepositAddressResultV5>> {
): Promise<
APIResponseV3WithTime<{
coin: string;
chains: DepositAddressChainV5;
}>
> {
return this.getPrivate('/v5/asset/deposit/query-sub-member-address', {
coin,
chainType,
Expand All @@ -1488,6 +1498,7 @@ export class RestClientV5 extends BaseRestClient {

/**
* Query the deposit address information of SUB account.
* @deprecated Duplicate endpoint - Use getSubDepositAddress() instead
*
* CAUTION
* Can use master UID's api key only
Expand All @@ -1496,7 +1507,12 @@ export class RestClientV5 extends BaseRestClient {
coin: string,
chainType: string,
subMemberId: string,
): Promise<APIResponseV3<DepositAddressResultV5>> {
): Promise<
APIResponseV3<{
coin: string;
chains: DepositAddressChainV5;
}>
> {
return this.getPrivate('/v5/asset/deposit/query-sub-member-address', {
coin,
chainType,
Expand Down

0 comments on commit dec453f

Please sign in to comment.