psdlt / roboape

A simple bot which will buy into every new BNB pair created on PancakeSwap
77 stars 46 forks source link

Binding.gyp #4

Closed Jongjh closed 3 years ago

Jongjh commented 3 years ago

Hi, can i check if there is a need for a binding.gyp file? I am unable to run the bot as it prompts for such a file.

psdlt commented 3 years ago

@Jongjh node-gyp seems to be a requirement of multiple packages used by this bot. Have you done npm install? What platform are you trying to run it on? What's the exact output of your error?

Jongjh commented 3 years ago

Im running it on windows visual studio code. Ive encounter the following error for npm install

image

psdlt commented 3 years ago

@Jongjh this seems to be related to pg_config is not recognised as an internal or external command error. Try to follow steps suggested here - https://stackoverflow.com/questions/48430359/howto-build-node-gyp-on-windows-10/48449636 . I haven't tested/built this bot on Windows and overall I don't recommend Windows for anyone doing any kind of development :)

random-ctrl commented 3 years ago

Just add the Path Variable for PostgreSQL

Jongjh commented 3 years ago

Hi @KrishnaSagar , appreciate the reply.

I have added postgre\13\bin and postgre\13\lib to the Path of my system variable. However, the same error appears pg_config is not recognized as an internal or external command Any idea what could have went wrong?

random-ctrl commented 3 years ago

I had the same issue, I fixed this after adding the Path and restarting the terminal. I was trying on VSCode, then started a Powershell as Admin and tried installing/build and it worked

Jongjh commented 3 years ago

Hi, apologies for the many noob questions asked. However, i would like to clarify on this part.

May i know what went wrong and why is the bot not making transactions? I have BSC API input, DB credentials and my PK in the .env file. image

random-ctrl commented 3 years ago

The postgreSQL database has not been populated. Did you run node build/syncModels.js

Jongjh commented 3 years ago

Seems like i missed out on that. Final question, after running node build/app.js, the bot will purchase all available token until 0.05 bnb is left in your wallet after which i believe it will stop. If i would like the bot to continue monitoring my positions, i will need to run pm2 start pm2.json am i right?

psdlt commented 3 years ago

the bot will buy until it reaches configured minimum balance (0.05 bnb by default), then it will stop buying, but the process won’t exit, it will continue to monitor positions and sell whenever necessary. if you send more bnb to the account or if it sells anything and balance goes above the threshold - bot will resume buying and so on.

monitoring will stop only when you stop the process (cntrl+c).

I recommended pm2 as a convenient alternative to keep your process running in the background (i.e. on your server), but it’s not necessary.

when you launch the bot, it will check database for previously opened positions and will resume their monitoring, so it’s kinda fault tolerant.

hope that helps.

Jongjh commented 3 years ago

thank you for clarifying! This project is really interesting, thanks for sharing with the community