I have been building a trading bot on Javascript and electron as a server but now that I have completed it, I have been learning node js and want to migrate my code there.
I am stuck at the very beginning of how I should structure my project (node js express).
These are the files I am working with right now:
**Frontend**
- index.html (and it's javascript in that calls the server-side order.js code to run/execute orders)
**Backend**
- order.js
- exchanges = binance.js, kucoin.js, huobi.js etc.
The exchanges files just has basic functions each for the specific exchange like buy/sell orders, cancel orders ...
The order.js file has all bot orders (eg. buy at a certain time) and calls individual function in the exchanges of which trading platform the user would want their order (Binance, Kucoin ..)
My new node.js structure looks like this:
I believe I should have my current order.js code inside the /routes/index.js in node but where should I place all my exchanges js files?

Aucun commentaire:
Enregistrer un commentaire