NOTE - DO NOT COPY OR USE THE CODE WRITTEN IN THE ALGORITHM FOR ANY COMMERCIAL PURPOSES THAT IS NOT APPROVED BY ME (ARUNADAY BASU)
For licensing and usage rights please contact at the following email id: [email protected]
THIS ALGORITHM HAS BEEN RELEASED FOR EDUCATIONAL PURPOSES "ONLY" AND ALL ATTEMPTS TO USE IT COMMERCIALLY FOR ABSOLUTELY ANY PURPOSE WITHOUT LEGAL RIGHTS WILL BE REPORTED TO CONCERNED AUTHORITIES AND LITIGATED
DO NOT USE THIS ALGORITHM WITHOUT LEGAL USAGE RIGHTS
- Install Node JS and MongoDB
- Create blank database
- Install Node modules
- Connect Binance API
- Run Node application
- Fire APIs
Node JS - https://nodejs.org/ MongoDB Community Edition - https://www.mongodb.com/try/download/community
Create a new database called ustc_db_main
Create the following collections in the database:
- credentials
- entries_ustc
- prices_ustc
- ustc_usdt_logs
- market_queue_usdt
- dec_wait_queue
- inc_wait_queue
- binance_wait_queue
- binance_txns_all
- ustc_wait_queue
- ustc_txns_all
Your database should look like this:
On Node/Git/Shell console - npm install
You will need to log into your profile and Select API Management from the dropdown on the upper right corner, like shown below:
We will be generating new API keys to use in the application, as shown below:
After you successfully generate a new API key, you will see the following API Key block:
NOTE - Binance will show you the API Secret only for the first time, so remember copy both API Key and API Secret and keep it for the new step
Go back to MongoDB: to the database just created
We will create a new document in the credentials collection
Copy paste the following to Insert Document as shown below (if you are using a GUI):
{
"apiKey": "FROM PREVIOUS STEP",
"apiSecret": "FROM PREVIOUS STEP",
"type": "binance"
}
On Node/Git/Shell console - npm run start
Install Postman - https://www.postman.com/downloads/
Fire APIs from Postman in the following order with a few seconds between firing APIs (after you receive confirmation on Postman fire the next)
All are GET Requests:
- http://localhost:3603/binanceapi/prices/update/binance-ustc
- http://localhost:3603/binanceapi/entry/create/rand-ustc
- http://localhost:3603/binanceapi/entry/process/longs
- http://localhost:3603/binanceapi/queue/process/ustc
- http://localhost:3603/binanceapi/entry/process/shorts
- http://localhost:3603/binanceapi/queue/process/usdt
Once you fire an API, you will receive a confirmation in Postman as shown below:
If you have done everything as described above, you will see output on your console like the following: