diff --git a/package.json b/package.json index 8987074..5815078 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@orionprotocol/sdk", - "version": "0.16.0-rc.13", + "version": "0.16.0-rc.14", "description": "Orion Protocol SDK", "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", diff --git a/src/services/OrionAggregator/ws/index.ts b/src/services/OrionAggregator/ws/index.ts index 016430f..3999f5c 100644 --- a/src/services/OrionAggregator/ws/index.ts +++ b/src/services/OrionAggregator/ws/index.ts @@ -216,10 +216,11 @@ class OrionAggregatorWS { return id; } - unsubscribe(subscription: keyof typeof UnsubscriptionType | string) { + unsubscribe(subscription: keyof typeof UnsubscriptionType | string, details?: string) { this.send({ T: UNSUBSCRIBE, S: subscription, + d: details, }); if (subscription.includes('0x')) { // is wallet address (ADDRESS_UPDATE) diff --git a/src/services/OrionAggregator/ws/schemas/cfdBalancesSchema.ts b/src/services/OrionAggregator/ws/schemas/cfdBalancesSchema.ts index 12de05f..2876435 100644 --- a/src/services/OrionAggregator/ws/schemas/cfdBalancesSchema.ts +++ b/src/services/OrionAggregator/ws/schemas/cfdBalancesSchema.ts @@ -8,6 +8,7 @@ const cfdBalanceSchema = z.object({ fr: z.string(), sfrl: z.string(), lfrl: z.string(), + awb: z.string(), }) .transform((obj) => ({ instrument: obj.i, @@ -17,6 +18,7 @@ const cfdBalanceSchema = z.object({ fundingRate: obj.fr, lastShortFundingRate: obj.sfrl, lastLongFundingRate: obj.lfrl, + availableWithdrawBalance: obj.awb, })); const cfdBalancesSchema = z.array(cfdBalanceSchema) diff --git a/src/types.ts b/src/types.ts index 2f11b49..d67b210 100644 --- a/src/types.ts +++ b/src/types.ts @@ -34,6 +34,7 @@ export type CFDBalance = { fundingRate: string, lastShortFundingRate: string, lastLongFundingRate: string, + availableWithdrawBalance: string, } export interface Order {