Skip to content

202508310023 Actual Server Crypto Sync Service

Thinking about how we can sync my crypto currency balance(s) via 202508302322 Ethereum Wallet APIs, I think the implementation here might suggest looking into an implementation that

  1. Fits the ability to use the Moralis SDK (or just curl)
  2. Be able to use the actual-budget API via its own API library

However, the caveat is that for point (2) - the API library is only available in the Node.js programming language.

Diving deeper into the actual budget API implementation, it implements its own query language called ActualQL that feels like writing SQL., Therefore, the requirements of the API itself necessitates that the sync service needs to be written in a language or framework that is capable to use NPM packages.

Furthermore, the design might potentially require to fit future requirements of

  1. Syncing of transactions for banking transactions
  2. Syncing of CPF funds

Goals & Non Goals

  1. Adopting a backend framework with scheduling capabilities will be useful to ensure that we can afford to introduce simple cron-related tasks
  2. A backend framework (rather than a cron or scheduler) as the main application can make things event driven to update the transactions in real time. (see the banking requirements)
  3. Stateless service that doesn’t store any PII or personal info. This ensures that the implementation can also be afforded to the community (or to my partner) in a way that simple enough and scalable.

System Design

For the main requirement which is to synchronise and reconcile my cryptocurrency balances, the solution might be as simple as introducing either a scheduler or a cron job from the application.

It will call the Moralis API and reconcile it on a scheduled basis.

The application itself could opt to use K8S jobs but considering that the application might end up being event-driven, I’d rather keep that possibility open.