How can I programatically get the current(last) RAM price inside an EOS smart contract in C++? I need to handle the data inside the smart contract for an experiment.

1 Answer 1


You can go to eosio.system and find the exchange_state.hpp, there's a table rammarket for the information, but I can't give you the formula now, you can investigate into it.

  • 1
    I need the code example to accept this answer, it will also help others Jul 11, 2018 at 20:03
  • 1
    hope others can help you, but my suggestion is the way
    – Jimmy Guo
    Jul 12, 2018 at 2:49
  • 1
    I'm a c++ noob just like many other who learn it just for eos so I need a more complete answer. I'll post the solution as soon as I find it though. Jul 12, 2018 at 4:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.