@d8x/perpetuals-sdk 2.1.7-alpha2 → 2.1.9-alpha2

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.
@@ -926,6 +926,27 @@ export default class PerpetualDataHandler {
926
926
  return mgn;
927
927
  }
928
928
 
929
+ public async getMarginAccount(
930
+ traderAddr: string,
931
+ symbol: string,
932
+ idxPriceInfo: IdxPriceInfo,
933
+ overrides?: Overrides
934
+ ): Promise<MarginAccount> {
935
+ if (this.proxyContract == null) {
936
+ throw Error("no proxy contract initialized. Use createProxyInstance().");
937
+ }
938
+ const isPred = this.isPredictionMarket(symbol);
939
+ return PerpetualDataHandler.getMarginAccount(
940
+ traderAddr,
941
+ symbol,
942
+ this.symbolToPerpStaticInfo,
943
+ new Contract(this.proxyAddr, this.config.proxyABI!, this.provider),
944
+ idxPriceInfo,
945
+ isPred,
946
+ overrides
947
+ );
948
+ }
949
+
929
950
  /**
930
951
  * Get trader state from the blockchain and parse into a human-readable margin account
931
952
  * @param traderAddr Trader address
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const D8X_SDK_VERSION = "2.1.7-alpha2";
1
+ export const D8X_SDK_VERSION = "2.1.9-alpha2";