@drift-labs/sdk 0.2.0-master.3 → 0.2.0-master.31

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.
Files changed (208) hide show
  1. package/README.md +13 -13
  2. package/lib/accounts/bulkUserStatsSubscription.d.ts +7 -0
  3. package/lib/accounts/bulkUserStatsSubscription.js +21 -0
  4. package/lib/accounts/bulkUserSubscription.js +0 -1
  5. package/lib/accounts/fetch.d.ts +2 -1
  6. package/lib/accounts/fetch.js +9 -1
  7. package/lib/accounts/pollingClearingHouseAccountSubscriber.d.ts +16 -16
  8. package/lib/accounts/pollingClearingHouseAccountSubscriber.js +31 -28
  9. package/lib/accounts/pollingUserStatsAccountSubscriber.d.ts +27 -0
  10. package/lib/accounts/pollingUserStatsAccountSubscriber.js +113 -0
  11. package/lib/accounts/types.d.ts +22 -11
  12. package/lib/accounts/webSocketClearingHouseAccountSubscriber.d.ts +17 -17
  13. package/lib/accounts/webSocketClearingHouseAccountSubscriber.js +37 -35
  14. package/lib/accounts/webSocketUserStatsAccountSubsriber.d.ts +20 -0
  15. package/lib/accounts/webSocketUserStatsAccountSubsriber.js +47 -0
  16. package/lib/addresses/marketAddresses.d.ts +1 -3
  17. package/lib/addresses/pda.d.ts +10 -4
  18. package/lib/addresses/pda.js +51 -14
  19. package/lib/admin.d.ts +42 -26
  20. package/lib/admin.js +228 -81
  21. package/lib/clearingHouse.d.ts +130 -49
  22. package/lib/clearingHouse.js +1256 -367
  23. package/lib/clearingHouseConfig.d.ts +4 -4
  24. package/lib/clearingHouseUser.d.ts +51 -39
  25. package/lib/clearingHouseUser.js +408 -191
  26. package/lib/clearingHouseUserStats.d.ts +18 -0
  27. package/lib/clearingHouseUserStats.js +49 -0
  28. package/lib/clearingHouseUserStatsConfig.d.ts +14 -0
  29. package/lib/clearingHouseUserStatsConfig.js +2 -0
  30. package/lib/config.d.ts +7 -9
  31. package/lib/config.js +21 -21
  32. package/lib/constants/numericConstants.d.ts +25 -12
  33. package/lib/constants/numericConstants.js +35 -21
  34. package/lib/constants/perpMarkets.d.ts +18 -0
  35. package/lib/constants/{markets.js → perpMarkets.js} +7 -7
  36. package/lib/constants/spotMarkets.d.ts +19 -0
  37. package/lib/constants/spotMarkets.js +53 -0
  38. package/lib/dlob/DLOB.d.ts +74 -0
  39. package/lib/dlob/DLOB.js +595 -0
  40. package/lib/dlob/DLOBNode.d.ts +54 -0
  41. package/lib/dlob/DLOBNode.js +85 -0
  42. package/lib/dlob/NodeList.d.ts +26 -0
  43. package/lib/dlob/NodeList.js +139 -0
  44. package/lib/events/eventList.js +3 -0
  45. package/lib/events/eventSubscriber.d.ts +4 -2
  46. package/lib/events/eventSubscriber.js +16 -9
  47. package/lib/events/fetchLogs.d.ts +10 -1
  48. package/lib/events/fetchLogs.js +27 -7
  49. package/lib/events/pollingLogProvider.d.ts +2 -1
  50. package/lib/events/pollingLogProvider.js +6 -2
  51. package/lib/events/sort.js +8 -11
  52. package/lib/events/types.d.ts +8 -2
  53. package/lib/events/types.js +6 -0
  54. package/lib/examples/makeTradeExample.js +20 -8
  55. package/lib/factory/bigNum.d.ts +2 -0
  56. package/lib/factory/bigNum.js +48 -10
  57. package/lib/idl/clearing_house.json +4889 -1529
  58. package/lib/idl/{mock_usdc_faucet.json → token_faucet.json} +46 -23
  59. package/lib/index.d.ts +21 -6
  60. package/lib/index.js +25 -6
  61. package/lib/math/amm.d.ts +9 -6
  62. package/lib/math/amm.js +91 -66
  63. package/lib/math/auction.js +4 -1
  64. package/lib/math/conversion.js +1 -1
  65. package/lib/math/funding.d.ts +6 -6
  66. package/lib/math/funding.js +11 -10
  67. package/lib/math/insurance.d.ts +4 -0
  68. package/lib/math/insurance.js +27 -0
  69. package/lib/math/margin.d.ts +11 -0
  70. package/lib/math/margin.js +77 -0
  71. package/lib/math/market.d.ts +14 -9
  72. package/lib/math/market.js +72 -10
  73. package/lib/math/oracles.d.ts +4 -0
  74. package/lib/math/oracles.js +36 -8
  75. package/lib/math/orders.d.ts +6 -2
  76. package/lib/math/orders.js +78 -3
  77. package/lib/math/position.d.ts +21 -13
  78. package/lib/math/position.js +76 -36
  79. package/lib/math/repeg.js +14 -5
  80. package/lib/math/spotBalance.d.ts +22 -0
  81. package/lib/math/spotBalance.js +192 -0
  82. package/lib/math/spotMarket.d.ts +4 -0
  83. package/lib/math/spotMarket.js +8 -0
  84. package/lib/math/spotPosition.d.ts +6 -0
  85. package/lib/math/spotPosition.js +23 -0
  86. package/lib/math/trade.d.ts +10 -10
  87. package/lib/math/trade.js +32 -39
  88. package/lib/oracles/pythClient.js +1 -1
  89. package/lib/oracles/quoteAssetOracleClient.js +1 -1
  90. package/lib/oracles/switchboardClient.js +1 -1
  91. package/lib/orderParams.d.ts +14 -5
  92. package/lib/orderParams.js +12 -92
  93. package/lib/serum/serumSubscriber.d.ts +23 -0
  94. package/lib/serum/serumSubscriber.js +41 -0
  95. package/lib/serum/types.d.ts +11 -0
  96. package/lib/serum/types.js +2 -0
  97. package/lib/slot/SlotSubscriber.d.ts +7 -0
  98. package/lib/slot/SlotSubscriber.js +3 -0
  99. package/lib/{mockUSDCFaucet.d.ts → tokenFaucet.d.ts} +8 -5
  100. package/lib/{mockUSDCFaucet.js → tokenFaucet.js} +63 -51
  101. package/lib/tx/retryTxSender.d.ts +1 -1
  102. package/lib/tx/retryTxSender.js +13 -4
  103. package/lib/tx/types.d.ts +1 -1
  104. package/lib/tx/utils.js +1 -1
  105. package/lib/types.d.ts +566 -138
  106. package/lib/types.js +129 -5
  107. package/lib/userMap/userMap.d.ts +25 -0
  108. package/lib/userMap/userMap.js +73 -0
  109. package/lib/userMap/userStatsMap.d.ts +19 -0
  110. package/lib/userMap/userStatsMap.js +68 -0
  111. package/lib/util/computeUnits.js +1 -1
  112. package/lib/util/getTokenAddress.d.ts +2 -0
  113. package/lib/util/getTokenAddress.js +9 -0
  114. package/package.json +12 -6
  115. package/src/accounts/bulkUserStatsSubscription.ts +33 -0
  116. package/src/accounts/bulkUserSubscription.ts +0 -1
  117. package/src/accounts/fetch.ts +27 -2
  118. package/src/accounts/pollingClearingHouseAccountSubscriber.ts +46 -42
  119. package/src/accounts/pollingUserStatsAccountSubscriber.ts +172 -0
  120. package/src/accounts/types.ts +31 -11
  121. package/src/accounts/webSocketClearingHouseAccountSubscriber.ts +64 -59
  122. package/src/accounts/webSocketUserStatsAccountSubsriber.ts +80 -0
  123. package/src/addresses/marketAddresses.ts +1 -2
  124. package/src/addresses/pda.ts +88 -14
  125. package/src/admin.ts +452 -147
  126. package/src/assert/assert.js +9 -0
  127. package/src/clearingHouse.ts +2066 -467
  128. package/src/clearingHouseConfig.ts +4 -3
  129. package/src/clearingHouseUser.ts +747 -294
  130. package/src/clearingHouseUserStats.ts +75 -0
  131. package/src/clearingHouseUserStatsConfig.ts +18 -0
  132. package/src/config.ts +30 -31
  133. package/src/constants/numericConstants.ts +48 -25
  134. package/src/constants/{markets.ts → perpMarkets.ts} +10 -10
  135. package/src/constants/spotMarkets.ts +73 -0
  136. package/src/dlob/DLOB.ts +953 -0
  137. package/src/dlob/DLOBNode.ts +167 -0
  138. package/src/dlob/NodeList.ts +189 -0
  139. package/src/events/eventList.js +77 -0
  140. package/src/events/eventList.ts +3 -0
  141. package/src/events/eventSubscriber.ts +20 -12
  142. package/src/events/fetchLogs.ts +35 -8
  143. package/src/events/pollingLogProvider.ts +10 -2
  144. package/src/events/sort.ts +11 -15
  145. package/src/events/types.ts +19 -1
  146. package/src/examples/makeTradeExample.js +157 -0
  147. package/src/examples/makeTradeExample.ts +32 -14
  148. package/src/factory/bigNum.ts +65 -13
  149. package/src/idl/clearing_house.json +4889 -1529
  150. package/src/idl/{mock_usdc_faucet.json → token_faucet.json} +46 -23
  151. package/src/index.ts +21 -6
  152. package/src/math/amm.ts +171 -88
  153. package/src/math/auction.ts +5 -1
  154. package/src/math/conversion.ts +2 -2
  155. package/src/math/funding.ts +20 -18
  156. package/src/math/insurance.ts +35 -0
  157. package/src/math/margin.ts +127 -0
  158. package/src/math/market.ts +145 -14
  159. package/src/math/oracles.ts +63 -9
  160. package/src/math/orders.ts +138 -4
  161. package/src/math/position.ts +119 -58
  162. package/src/math/repeg.ts +16 -6
  163. package/src/math/spotBalance.ts +319 -0
  164. package/src/math/spotMarket.ts +9 -0
  165. package/src/math/spotPosition.ts +47 -0
  166. package/src/math/trade.ts +53 -59
  167. package/src/oracles/pythClient.ts +2 -2
  168. package/src/oracles/quoteAssetOracleClient.ts +2 -2
  169. package/src/oracles/switchboardClient.ts +2 -2
  170. package/src/orderParams.ts +24 -137
  171. package/src/serum/serumSubscriber.ts +80 -0
  172. package/src/serum/types.ts +13 -0
  173. package/src/slot/SlotSubscriber.ts +11 -1
  174. package/src/token/index.js +38 -0
  175. package/src/{mockUSDCFaucet.ts → tokenFaucet.ts} +82 -70
  176. package/src/tx/retryTxSender.ts +16 -5
  177. package/src/tx/types.js +2 -0
  178. package/src/tx/types.ts +2 -1
  179. package/src/tx/utils.js +17 -0
  180. package/src/tx/utils.ts +1 -1
  181. package/src/types.ts +533 -140
  182. package/src/userMap/userMap.ts +100 -0
  183. package/src/userMap/userStatsMap.ts +110 -0
  184. package/src/util/computeUnits.js +21 -11
  185. package/src/util/computeUnits.ts +1 -1
  186. package/src/util/getTokenAddress.js +9 -0
  187. package/src/util/getTokenAddress.ts +18 -0
  188. package/src/util/promiseTimeout.js +14 -0
  189. package/src/util/tps.js +27 -0
  190. package/tests/bn/test.ts +24 -10
  191. package/tests/dlob/helpers.ts +397 -0
  192. package/tests/dlob/test.ts +3688 -0
  193. package/lib/constants/banks.d.ts +0 -16
  194. package/lib/constants/banks.js +0 -34
  195. package/lib/constants/markets.d.ts +0 -19
  196. package/lib/math/bankBalance.d.ts +0 -9
  197. package/lib/math/bankBalance.js +0 -75
  198. package/lib/math/state.d.ts +0 -8
  199. package/lib/math/state.js +0 -15
  200. package/lib/orders.d.ts +0 -8
  201. package/lib/orders.js +0 -134
  202. package/src/constants/banks.ts +0 -43
  203. package/src/math/bankBalance.ts +0 -112
  204. package/src/math/state.ts +0 -14
  205. package/src/math/utils.js +0 -27
  206. package/src/math/utils.js.map +0 -1
  207. package/src/orders.ts +0 -244
  208. package/src/util/computeUnits.js.map +0 -1
@@ -1,7 +1,5 @@
1
- /// <reference types="bn.js" />
2
1
  import { ConfirmOptions, Connection, PublicKey } from '@solana/web3.js';
3
2
  import { IWallet } from './types';
4
- import { BN } from '@project-serum/anchor';
5
3
  import { OracleInfo } from './oracles/types';
6
4
  import { BulkAccountLoader } from './accounts/bulkAccountLoader';
7
5
  import { DriftEnv } from './config';
@@ -14,10 +12,12 @@ export declare type ClearingHouseConfig = {
14
12
  txSenderConfig?: TxSenderConfig;
15
13
  userIds?: number[];
16
14
  activeUserId?: number;
17
- marketIndexes?: BN[];
18
- bankIndexes?: BN[];
15
+ perpMarketIndexes?: number[];
16
+ spotMarketIndexes?: number[];
19
17
  oracleInfos?: OracleInfo[];
20
18
  env?: DriftEnv;
19
+ userStats?: boolean;
20
+ authority?: PublicKey;
21
21
  };
22
22
  declare type ClearingHouseSubscriptionConfig = {
23
23
  type: 'websocket';
@@ -4,9 +4,9 @@ import { PublicKey } from '@solana/web3.js';
4
4
  import { EventEmitter } from 'events';
5
5
  import StrictEventEmitter from 'strict-event-emitter-types';
6
6
  import { ClearingHouse } from './clearingHouse';
7
- import { MarginCategory, Order, UserAccount, UserPosition } from './types';
7
+ import { MarginCategory, Order, UserAccount, PerpPosition } from './types';
8
8
  import { UserAccountSubscriber, UserAccountEvents, DataAndSlot } from './accounts/types';
9
- import { PositionDirection, BN } from '.';
9
+ import { PositionDirection, BN, SpotMarketAccount } from '.';
10
10
  import { OraclePriceData } from './oracles/types';
11
11
  import { ClearingHouseUserConfig } from './clearingHouseUserConfig';
12
12
  export declare class ClearingHouseUser {
@@ -35,13 +35,14 @@ export declare class ClearingHouseUser {
35
35
  * @param marketIndex
36
36
  * @returns userPosition
37
37
  */
38
- getUserPosition(marketIndex: BN): UserPosition | undefined;
39
- getEmptyPosition(marketIndex: BN): UserPosition;
38
+ getUserPosition(marketIndex: number): PerpPosition | undefined;
39
+ getEmptyPosition(marketIndex: number): PerpPosition;
40
+ getClonedPosition(position: PerpPosition): PerpPosition;
40
41
  /**
41
42
  * @param orderId
42
43
  * @returns Order
43
44
  */
44
- getOrder(orderId: BN): Order | undefined;
45
+ getOrder(orderId: number): Order | undefined;
45
46
  /**
46
47
  * @param userOrderId
47
48
  * @returns Order
@@ -49,77 +50,88 @@ export declare class ClearingHouseUser {
49
50
  getOrderByUserOrderId(userOrderId: number): Order | undefined;
50
51
  getUserAccountPublicKey(): PublicKey;
51
52
  exists(): Promise<boolean>;
53
+ /**
54
+ * calculates the market position if the lp position was settled
55
+ * @returns : the settled userPosition
56
+ * @returns : the dust base asset amount (ie, < stepsize)
57
+ * @returns : pnl from settle
58
+ */
59
+ getSettledLPPosition(marketIndex: number): [PerpPosition, BN, BN];
52
60
  /**
53
61
  * calculates Buying Power = FC * MAX_LEVERAGE
54
62
  * @returns : Precision QUOTE_PRECISION
55
63
  */
56
- getBuyingPower(marketIndex: BN | number): BN;
64
+ getBuyingPower(marketIndex: number): BN;
57
65
  /**
58
66
  * calculates Free Collateral = Total collateral - initial margin requirement
59
67
  * @returns : Precision QUOTE_PRECISION
60
68
  */
61
69
  getFreeCollateral(): BN;
62
- getInitialMarginRequirement(): BN;
63
70
  /**
64
- * @returns The partial margin requirement in USDC. : QUOTE_PRECISION
71
+ * @returns The margin requirement of a certain type (Initial or Maintenance) in USDC. : QUOTE_PRECISION
65
72
  */
66
- getPartialMarginRequirement(): BN;
73
+ getMarginRequirement(marginCategory: MarginCategory, liquidationBuffer?: BN): BN;
67
74
  /**
68
- * calculates unrealized position price pnl
69
- * @returns : Precision QUOTE_PRECISION
75
+ * @returns The initial margin requirement in USDC. : QUOTE_PRECISION
76
+ */
77
+ getInitialMarginRequirement(): BN;
78
+ /**
79
+ * @returns The maintenance margin requirement in USDC. : QUOTE_PRECISION
70
80
  */
71
- getUnrealizedPNL(withFunding?: boolean, marketIndex?: BN): BN;
81
+ getMaintenanceMarginRequirement(liquidationBuffer?: BN): BN;
72
82
  /**
73
83
  * calculates unrealized position price pnl
74
84
  * @returns : Precision QUOTE_PRECISION
75
85
  */
76
- getUnsettledPNL(marketIndex?: BN): BN;
86
+ getUnrealizedPNL(withFunding?: boolean, marketIndex?: number, withWeightMarginCategory?: MarginCategory): BN;
77
87
  /**
78
88
  * calculates unrealized funding payment pnl
79
89
  * @returns : Precision QUOTE_PRECISION
80
90
  */
81
- getUnrealizedFundingPNL(marketIndex?: BN): BN;
82
- getTotalLiability(): BN;
83
- getCollateralValue(bankIndex?: BN): BN;
91
+ getUnrealizedFundingPNL(marketIndex?: number): BN;
92
+ getSpotMarketLiabilityValue(marketIndex?: number, marginCategory?: MarginCategory, liquidationBuffer?: BN, includeOpenOrders?: boolean): BN;
93
+ getSpotLiabilityValue(tokenAmount: BN, oraclePriceData: OraclePriceData, spotMarketAccount: SpotMarketAccount, marginCategory?: MarginCategory, liquidationBuffer?: BN): BN;
94
+ getSpotMarketAssetValue(marketIndex?: number, marginCategory?: MarginCategory, includeOpenOrders?: boolean): BN;
95
+ getSpotAssetValue(tokenAmount: BN, oraclePriceData: OraclePriceData, spotMarketAccount: SpotMarketAccount, marginCategory?: MarginCategory): BN;
96
+ getNetSpotMarketValue(withWeightMarginCategory?: MarginCategory): BN;
84
97
  /**
85
98
  * calculates TotalCollateral: collateral + unrealized pnl
86
- * TODO: rename to total equity (for perpetuals swaps)
87
99
  * @returns : Precision QUOTE_PRECISION
88
100
  */
89
- getTotalCollateral(): BN;
101
+ getTotalCollateral(marginCategory?: MarginCategory): BN;
90
102
  /**
91
- * calculates sum of position value across all positions
103
+ * calculates sum of position value across all positions in margin system
92
104
  * @returns : Precision QUOTE_PRECISION
93
105
  */
94
- getTotalPositionValue(): BN;
106
+ getTotalPerpPositionValue(marginCategory?: MarginCategory, liquidationBuffer?: BN, includeOpenOrders?: boolean): BN;
95
107
  /**
96
- * calculates position value from closing 100%
108
+ * calculates position value in margin system
97
109
  * @returns : Precision QUOTE_PRECISION
98
110
  */
99
- getPositionValue(marketIndex: BN, oraclePriceData: OraclePriceData): BN;
100
- getPositionSide(currentPosition: Pick<UserPosition, 'baseAssetAmount'>): PositionDirection | undefined;
111
+ getPerpPositionValue(marketIndex: number, oraclePriceData: OraclePriceData): BN;
112
+ getPositionSide(currentPosition: Pick<PerpPosition, 'baseAssetAmount'>): PositionDirection | undefined;
101
113
  /**
102
- * calculates average exit price for closing 100% of position
103
- * @returns : Precision MARK_PRICE_PRECISION
114
+ * calculates average exit price (optionally for closing up to 100% of position)
115
+ * @returns : Precision PRICE_PRECISION
104
116
  */
105
- getPositionEstimatedExitPriceAndPnl(position: UserPosition, amountToClose?: BN): [BN, BN];
117
+ getPositionEstimatedExitPriceAndPnl(position: PerpPosition, amountToClose?: BN, useAMMClose?: boolean): [BN, BN];
106
118
  /**
107
119
  * calculates current user leverage across all positions
108
120
  * @returns : Precision TEN_THOUSAND
109
121
  */
110
- getLeverage(): BN;
122
+ getLeverage(marginCategory?: MarginCategory): BN;
111
123
  /**
112
124
  * calculates max allowable leverage exceeding hitting requirement category
113
125
  * @params category {Initial, Partial, Maintenance}
114
126
  * @returns : Precision TEN_THOUSAND
115
127
  */
116
- getMaxLeverage(marketIndex: BN | number, category?: MarginCategory): BN;
128
+ getMaxLeverage(marketIndex: number, category?: MarginCategory): BN;
117
129
  /**
118
130
  * calculates margin ratio: total collateral / |total position value|
119
131
  * @returns : Precision TEN_THOUSAND
120
132
  */
121
- getMarginRatio(): BN;
122
- canBeLiquidated(): [boolean, BN];
133
+ getMarginRatio(marginCategory?: MarginCategory): BN;
134
+ canBeLiquidated(): boolean;
123
135
  /**
124
136
  * Checks if any user position cumulative funding differs from respective market cumulative funding
125
137
  * @returns
@@ -127,19 +139,19 @@ export declare class ClearingHouseUser {
127
139
  needsToSettleFundingPayment(): boolean;
128
140
  /**
129
141
  * Calculate the liquidation price of a position, with optional parameter to calculate the liquidation price after a trade
130
- * @param marketPosition
142
+ * @param PerpPosition
131
143
  * @param positionBaseSizeChange // change in position size to calculate liquidation price for : Precision 10^13
132
144
  * @param partial
133
- * @returns Precision : MARK_PRICE_PRECISION
145
+ * @returns Precision : PRICE_PRECISION
134
146
  */
135
- liquidationPrice(marketPosition: Pick<UserPosition, 'marketIndex'>, positionBaseSizeChange?: BN, partial?: boolean): BN;
147
+ liquidationPrice(perpPosition: Pick<PerpPosition, 'marketIndex'>, positionBaseSizeChange?: BN): BN;
136
148
  /**
137
149
  * Calculates the estimated liquidation price for a position after closing a quote amount of the position.
138
150
  * @param positionMarketIndex
139
151
  * @param closeQuoteAmount
140
- * @returns : Precision MARK_PRICE_PRECISION
152
+ * @returns : Precision PRICE_PRECISION
141
153
  */
142
- liquidationPriceAfterClose(positionMarketIndex: BN, closeQuoteAmount: BN): BN;
154
+ liquidationPriceAfterClose(positionMarketIndex: number, closeQuoteAmount: BN): BN;
143
155
  /**
144
156
  * Get the maximum trade size for a given market, taking into account the user's current leverage, positions, collateral, etc.
145
157
  *
@@ -161,7 +173,7 @@ export declare class ClearingHouseUser {
161
173
  * @param tradeSide
162
174
  * @returns tradeSizeAllowed : Precision QUOTE_PRECISION
163
175
  */
164
- getMaxTradeSizeUSDC(targetMarketIndex: BN, tradeSide: PositionDirection): BN;
176
+ getMaxTradeSizeUSDC(targetMarketIndex: number, tradeSide: PositionDirection): BN;
165
177
  /**
166
178
  * Returns the leverage ratio for the account after adding (or subtracting) the given quote size to the given position
167
179
  * @param targetMarketIndex
@@ -169,7 +181,7 @@ export declare class ClearingHouseUser {
169
181
  * @param tradeQuoteAmount
170
182
  * @returns leverageRatio : Precision TEN_THOUSAND
171
183
  */
172
- accountLeverageRatioAfterTrade(targetMarketIndex: BN, tradeQuoteAmount: BN, tradeSide: PositionDirection): BN;
184
+ accountLeverageRatioAfterTrade(targetMarketIndex: number, tradeQuoteAmount: BN, tradeSide: PositionDirection): BN;
173
185
  /**
174
186
  * Calculates how much fee will be taken for a given sized trade
175
187
  * @param quoteAmount
@@ -181,7 +193,7 @@ export declare class ClearingHouseUser {
181
193
  * @param marketToIgnore
182
194
  * @returns positionValue : Precision QUOTE_PRECISION
183
195
  */
184
- private getTotalPositionValueExcludingMarket;
196
+ private getTotalPerpPositionValueExcludingMarket;
185
197
  private getOracleDataForMarket;
186
- private getOracleDataForBank;
198
+ private getOracleDataForSpotMarket;
187
199
  }