The problem we are having here is that Token contract, in most cases, is not a contract which is selling Tokens. If you check ERC20 Standard
https://en.wikipedia.org/wiki/ERC20 here then you will see there is no function to receive funds.
For this reason developers create Crowdsale contracts which own some amount of tokens ready to be sold and implement default payable fallback functions to receive ETH and send tokens back.
So to check what is value raised by each token you have to:
Get list of all token owners from ERC20 Token contract. You can check it by getting list of all Transfer transaction. ERC20 Standard has an event
Transfer(address indexed _from, address indexed _to, uint256 _value).
[Triggered when tokens are transferred.]
You have to filter blockchain for such events for your token contract.
For each token holder you have to get list of transactions where ETH was send to this contract.
For each such transaction you have to check if Token Contract was called to transfer token to account address who send money to your selling token holder.
It is possible that sale contract received money, but did not transfer tokens back. I think we should not count such transaction as the one raising ETH for token
It is not as easy as it may look like. There is no one function which will tell you what is the amount raised by each token contract. It requires a bit of work and filtering by events and contract transactions. It is however doable.