osmosis
osmosis copied to clipboard
query[CL]: UnderlyingPostionsValue
Background
See the following comment for context https://github.com/osmosis-labs/osmosis/pull/6623#discussion_r1344814214
I added a UnderlyingPostionsValue method to help with some tests, but realized this would be really useful to expose as a query.
Suggested Design
The underlying logic is already completed in the UnderlyingPositionsValue method. One just has to wire this up to a respective query to expose via gRPC.
Acceptance Criteria
localosmosis tested against existing positions and the value returned makes sense. Preferable one in range, one above the current price, and one below the current price.
hey @czarcas7ic! I have a question on this one: should it be possible to provide a list of positions in CLI when querying [1], or should it only take a single position id as an argument [2]?
[1]: <...> underlying-positions-value 1,2,3
[2]: <...> underlying-positions-value 1
@pysel sorry just now seeing this, I think either implementation is fine!