Both money and markets predate the nation-state.
Markets are just people trading with each other. You get that naturally in any society with a concept of private property. People participate in them because the alternative is producing everything themselves and no one has the necessary skills to produce everything they might want. Money similarly develops on its own once the market grows complex enough to make the barter system inconvenient and people begin to practice indirect exchange with small set of universally marketable goods rather than trading directly for items they intend to use themselves.
[1] https://www.bradford-delong.com/2014/12/2014-11-24-mo-ann-le...
That's not true at all, in many cases markets exist in spite of nation states (think silk road and every other black market).
Even within a market there is top down planning. What gets produced is decided by makers who use the feedback of the market to change what they make. The consumers usually have no say about what gets made and how it's made outside the narrow, low information way of the spot trade.
In othet words, people would not have created markets sans their explicit imposition by states. They are not a bottom up structure because no sane person would participate in them if they didn't have to.
Prior to markets were webs of debt relations. See 'Debt the first 5000 years' by David Graeber.