Portfolio management API

API shared between on-chain contract and external clients