Hi Ivan,
Welcome to the forums!
When it comes to connecting to external sources, Daml Hub supports integrations. A standard integration will model the surface of a 3rd-party API through Daml contracts, which can then be acted upon on ledger. A good example of this is the Exberry integration, which is also used by the Marketplace app - GitHub - digital-asset/daml-dit-integration-exberry
The caveat here is that integrations can only be published by Digital Asset for security reasons. If there’s a specific 3rd-party API you’d like to see integrated, let us know, and we might look into developing it and making it available on Hub.
The other option is to write something similar to an integration, but that is hosted by you outside of Hub, and connects to your ledger through the HTTP JSON API to add external data into contracts.
I would like to update the clients with their JWT tokens on a daily basis.
I’m not totally sure what you’re asking for, but Daml Hub’s authentication system works best with users interactively logging in to your app’s UI hosted on Hub. Redistributing JWTs yourself is not officially supported at this time. Is there a feature ask here?
I might want to restrict an account based on its overall balance, which I maintain elsewhere
Also interested in more details about this. How would you expect the account to be restricted? Is it only for trading, or also for deposits/withdrawals?
Re: maintaining the balance, I would suggest inverting the control here, and managing the balance only on ledger as the source of truth. Then the balance can be reported downstream to other components of your system. Without knowing the details of how your entire system is architectured, I can’t say whether this is feasible for you or not, but trying to synchronize balances both on-ledger and off-ledger is going to be tricky.