Skip to content

Latest commit

 

History

History

README.md

@metamask/money-account-api-data-service

Data service for fetching Money account positions, interest, cash-flow history, vault rate history, and the current vault exchange rate from the Money Account API.

Installation

yarn add @metamask/money-account-api-data-service

or

npm install @metamask/money-account-api-data-service

Usage

This package exports a MoneyAccountApiDataService class that exposes the following methods through the messenger pattern:

  • fetchPositions — Fetch user vault positions from the Money Account API.
  • fetchInterest — Fetch interest earned over a time window.
  • fetchHistory — Fetch cursor-paginated cash-flow history.
  • fetchRateHistory — Fetch vault exchange-rate time series.
  • fetchVaultRate — Fetch a vault's current exchange rate.

See the main MoneyAccountApiDataService source for full API details.

Contributing

This package is part of a monorepo. Instructions for contributing can be found in the monorepo README.