The question has been asked, “Where can I find exchange information for starting a project?” Here are some links. Please note, I’m not able to answer detailed questions on how to implement an exchange interface since that is my day job and I don’t want to run afoul of my company. However, here are some starting points:
CME:
https://www.cmegroup.com/confluence/display/EPICSANDBOX/MDP+3.0+Message+Specification
https://github.com/tfgm/sbedecoder
NASDAQ:
https://fixspec.com/FixSpec/ITCH#
https://github.com/Amay22/NASDAQ-ITCH-5.0-Parser
That should be enough to get started on one or both. Important things to learn would be feed handling and book management.
Good luck!