binary-com/binary-bot
Fork: 523 Star: 231 (更新于 2024-11-18 18:30:51)
license: MIT
Language: JavaScript .
Visual automation for binary.com
最后发布版本: production_v20200630_0 ( 2020-06-30 11:19:53)
Binary Bot
Visual automation for binary bot- bot.binary.com
Binary Bot uses Google Blockly to provide a puzzle like automation environment to trade using binary.com API version 3.
Pre-installation
Ensure that your environment contains the following packages.
- node
- npm
- git (for contribution)
Installation
1. Setup the project on local machine
In order to work with Binary-Bot application, you must create your own version of this project. Please fork the project - https://github.com/binary-com/binary-bot to your git account.
You will need to perform the following on your development machine:
-
Change the current working directory to the location where you want the cloned directory.
-
Clone the forked repo using
git clone [URL for the forked repo]
-
Run
cd binary-bot
-
Create a feature branch from master -
git checkout -b [branchName]
. -
Run
npm install
Note: - issue with installing packages
2. Configuring Hosts file
In order to run our application for the first time, you need to configure your hosts file:
If you are using a UNIX based system (Mac or Linux), Do the following:
- Open terminal.
- Open hosts file in your preferred text editor using
sudo vim /etc/hosts
. - Add a new entry pointing to
127.0.0.1 localbot.binary.sx
- Save the file
For Windows:
-
Run Microsoft Notepad as an administrator.
-
From Notepad, open the file:
c:\Windows\System32\Drivers\etc\hosts
-
Add a new entry pointing to
127.0.0.1 localbot.binary.sx
-
Save the file
3. Preparing environment variables
If you want to use Google Drive features in the project (to Save/Load strategies)
you need to create a file called .env
at the project root with the following content:
GD_CLIENT_ID=GOOGLE_DRIVE_CLIENT_ID
GD_API_KEY=GOOGLE_DRIVE_API_KEY
GD_APP_ID=GOOGLE_DRIVE_APP_ID
Here comes useful links for more information on how to configure your project with Google Drive integration:
4. Starting a Development Server
Make sure to set the endpoint for running the application on the localhost
-
Run
npm start
on the binarybot directory. This will open the application in your default browser.Note: - Getting Permission Denied Error
-
Now we have to set the endpoint for running the application on the localhost. For this, Go to
http://localbot.binary.sx/endpoint.html
. Make sure the Server is set toblue.binaryws.com
and O Auth App ID is16014
Click submit. -
Navigate to
http://localbot.binary.sx/bot.html
(Note that the protocol ishttp
and nothttps
)Note: - Getting error "This site can’t be reached" on localhost
-
And now you are ready with your setup.Login to the binary account using the Binary.com account credentials. Run the bot
Pushing changes to github
- Make your changes to the source code
- Run test command to make sure your changes are correct
npm run test
- Push your changes to your forked repo:
git add .
git commit -m "describe your changes"
git push origin BRANCH_NAME
Deploying to local gh-pages
You can set up your GitHub Pages to deploy your repository.
-
First you need to set up custom domain. Go to
https://github.com/YOUR_GITHUB_USERNAME/binary-bot/settings/pages
and set your custom domain toYOUR_GITHUB_NAME.binary.sx
-
Run the command below in your project directory.
npm run release --branch [branchname] # can contain /
- Now, your repository can be found at
https://YOUR_CUSTOM_DOMAIN/BRANCH_NAME
Deployment/Release
gulp test-deploy # for local test deploy
npm run release --branch <branch-name> # to deploy a branch (eg., beta)
npm run release-production # to release it to production
To update to latest version
git pull --rebase upstream master
npm install
Running with a specific endpoint Use only if you know what you're doing
ENDPOINT='wss://ws.binaryws.com/websockets/v3?l=en&app_id=1169' bot bot-example.js
CLI examples:
Think you found a bug?
There's a chance that we already know about it and doing our best to fix it. To find out you can search our GitHub issues
Not satisfied yet? Please create a new issue, and explain to us what is the nature of the problem and how to reproduce here
We'd love to hear from you
Please send us your inquiries through marketing@binary.com
Sample Blocks
You can find some example blocks in the Examples
folder.
Disclaimer: All the files and codes in the above links are intended for educational and informational purposes only. They should not be construed as giving investment advice, and you should not rely on them as your singular factor in making or refraining from making any investment decisions. Binary.com accepts no liability whatsoever for any losses incurred by users in their trading. Binary options trading may incur losses as well as gains.
FAQ
1. Issue with installing packages
If you couldnt install binary bot with a different node version, try cleaning npm cache.
- To clear a cache in npm, we need to run the
npm cache clean --force
command in our terminal. - Delete cache directory. The default cache directory is ~/.npm on Posix (mac or linux), or %AppData%/npm-cache on Windows.
- Run
rm -rf ~/.npm
- Run
npm install
2. Getting Permission Denied Error on localhost
Try sudo npm start
instead of npm start
3. Cannot access the site
Make sure to use HTTP instead of HTTPS: https://localbot.binary.sx/bot.html => http://localbot.binary.sx/bot.html
最近版本更新:(数据更新于 2024-08-27 23:59:30)
2020-06-30 11:19:53 production_v20200630_0
2020-06-19 11:07:44 production_v20200619-0
2020-06-17 15:04:29 production_v20200617_0
binary-com/binary-bot同语言 JavaScript最近更新仓库
2024-11-22 16:46:00 meshery/meshery
2024-11-21 23:03:24 bia-pain-bache/BPB-Worker-Panel
2024-11-21 22:46:48 MHSanaei/3x-ui
2024-11-21 07:00:59 nodejs/node
2024-11-21 00:49:46 FortAwesome/Font-Awesome
2024-11-18 14:26:02 projectdiscovery/nuclei-templates