How to calculate USD prices for multiple coins in Sui when PriceInfoObject only contains one coin?

#sui
#move
#pricecalculation
#multitoken
#defi

@melonges I’m not sure I understand what you mean. A price info object represents the price of a single Pyth asset but you can use a vector of PriceInfoObjects in your program and combine the prices yourself.

I can’t pass a vector of references, only owned by vector objects

Right, but in this case your function can just take multiple objects as different arguments right?

If not, the solution is a bit tricky. you’ll probably need to have a big object on your side and with multiple instructions incrementally fill it in and use that.