Yes you're on the right track.
Running
cleos -u https://nodes.get-scatter.com:443 get table eosio eosio rammarket
gives you:
{
"rows": [{
"supply": "10000000000.0000 RAMCORE",
"base": {
"balance": "67254241906 RAM",
"weight": "0.50000000000000000"
},
"quote": {
"balance": "1021789.6640 EOS",
"weight": "0.50000000000000000"
}
}],
"more": false
}
Credit: to Andrew Coutts for piecing the info below together from various telegram channels and youtube videos.
To calculate the price from this you would use the bancor algorithm (from their WP, section 3.1):
Connector Balance/(Smart Token’s Outstanding supply × Connector Weight)
Connector Balance in this case is: quote.balance
Smart Token Outstanding Supply is: base.balance
Connector Weight is: quote.weight
This would give you the price in EOS/BYTE
EOS is the connector. RAM (or RAMCORE) is the smart token.
Here is an online implementation from eosnewyork of the above which converts quotes in KB/$:
https://www.eosrp.io/
PS: The value for the weight connector used in the eosrp.io site is 0.1, which is different from the one reported by the rammarket table. It's unclear yet which one is correct. 0.1 has been mentioned by Dan several times which is why it's used on accouts.com. I'll correct this answer when better information becomes available.