deso-protocol / backend

HTTP API for a DeSo node
https://docs.deso.org
MIT License
133 stars 88 forks source link

Add simple balance endpoint (for amm usage) #628

Closed diamondhands0 closed 1 month ago

diamondhands0 commented 1 month ago

There wasn't a clean way to get the balance of a set of coins, which is needed in order to determine if the amm should initialize a market. Added this endpoint to address this need.

There's also a thorough test for it in the amm code here: https://github.com/deso-protocol/amm-service/blob/f4953a8f1a141110a10f2ced44e7983176d5d46e/ammlib/amm_config_test.go#L1170