@dydxprotocol/v4-client-js 2.0.1 → 2.1.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dydxprotocol/v4-client-js",
3
- "version": "2.0.1",
3
+ "version": "2.1.1",
4
4
  "description": "General client library for the new dYdX system (v4 decentralized)",
5
5
  "main": "build/cjs/src/index.js",
6
6
  "module": "build/esm/src/index.js",
@@ -311,4 +311,30 @@ export default class AccountClient extends RestClient {
311
311
  const uri = `/v4/historicalBlockTradingRewards/${address}`;
312
312
  return this.get(uri, { limit, startingBeforeOrAt, startingBeforeOrAtHeight });
313
313
  }
314
+
315
+ // ------ Funding Payments------ //
316
+
317
+ async getSubaccountFundingPayments(
318
+ address: string,
319
+ subaccountNumber: number,
320
+ limit?: number,
321
+ ticker?: string,
322
+ afterOrAt?: string,
323
+ page?: number,
324
+ ): Promise<Data> {
325
+ const uri = `/v4/fundingPayments`;
326
+ return this.get(uri, { address, subaccountNumber, limit, ticker, afterOrAt, page });
327
+ }
328
+
329
+ async getParentSubaccountNumberFundingPayments(
330
+ address: string,
331
+ parentSubaccountNumber: number,
332
+ limit?: number,
333
+ ticker?: string,
334
+ afterOrAt?: string,
335
+ page?: number,
336
+ ): Promise<Data> {
337
+ const uri = `/v4/fundingPayments/parentSubaccount`;
338
+ return this.get(uri, { address, parentSubaccountNumber, limit, ticker, afterOrAt, page });
339
+ }
314
340
  }