Coder Social home page Coder Social logo

Comments (28)

carlosmemorandum avatar carlosmemorandum commented on May 12, 2024

I´d also like to add my custom symbols to trade in EUR, where is the redis db getting the info from? Seems to be only looking for trades with USDT, any way to customize it so i can trade with EUR values??

from binance-trading-bot.

chrisleekr avatar chrisleekr commented on May 12, 2024

@santoshbmath For the environment parameter BINANCE_JOBS_SIMPLE_STOP_CHASER_SYMBOLS is simply initialising the first configuration. Once you up and running the frontend, then you can configure them in the frontend.

@carlosmemorandum I am planning to add custom FIATs along with USDT. Currently, only support USDT.

from binance-trading-bot.

santoshbmath avatar santoshbmath commented on May 12, 2024

@chrisleekr , Frontend is not allowing to add new item, it just asks to select from the drop down. Even if we add something manually, it doesnt take up.

from binance-trading-bot.

chrisleekr avatar chrisleekr commented on May 12, 2024

@santoshbmath What pair were you trying to add? It only supports USDT FIAT market at this point. It will support other FIAT markets in the next update. If you try to add IOSTBTC, it won't add it.

from binance-trading-bot.

santoshbmath avatar santoshbmath commented on May 12, 2024

1
I added VETUSDT, then when i open settings again, it will not be there.

from binance-trading-bot.

chrisleekr avatar chrisleekr commented on May 12, 2024

Hm... interesting. I assume you clicked "Save Changes" button on the bottom. VETUSDT was listed on my end and I was able to save. See the screenshot. What could be wrong?

image
image

Are you able to extract log message? Simply install bunyan and execute below.

docker logs binance-bot  -f --tail=100 | bunyan -c 'this.server == "cronjob"' 

from binance-trading-bot.

santoshbmath avatar santoshbmath commented on May 12, 2024

settings-before
settings-after

Yes, i am clicking "Save Changes". Here's screenshots of settings (before and after). I see the difference in your screenshot and mine. In your settings, VETUSDT is listed but for me, its not in drop-down and says "No matched found".

I dont know about bunyan, i will try to get the log.

from binance-trading-bot.

chrisleekr avatar chrisleekr commented on May 12, 2024

Oh...wait, bummer. Sorry, I confused.

I am currently updating more features and realise I just added the feature to select symbols from the exchange information.
And I haven't committed the updated code yet to Github.

The current master version's frontend only will allow selecting whatever symbols you configured in the docker-compose file.
If it is not refreshing the configuration in the frontend, then try to remove the configuration from the Redis.

  1. Update docker-compose with symbols you want to add
  2. Restart docker-compose
  3. Delete cached configuration from redis
$ docker exec -it binance-redis /bin/bash
binance-redis$ redis-cli
redis-cli> HDEL simple-stop-chaser-common configuration

Once you do that, it should recache with the new configuration in the docker-compose file.

Wait for some time, I will update Github with features that you can select any FIAT pairs including USDT.

from binance-trading-bot.

santoshbmath avatar santoshbmath commented on May 12, 2024

Thanks, I will better wait for the update. I am totally new to docker, i am a java guy :)

BTW, after i deleted the cached from redis, whatever i have added in configuration file started showing. I think even if we update configuration and don't clear the cache, it will still show old ones. I struggled to find out from where those six coin listing coming. Even after replacing one of them everywhere in code, it didnt list. So it was always taking from the cache i guess.

Thanks for your support, i will wait for update.

from binance-trading-bot.

chrisleekr avatar chrisleekr commented on May 12, 2024

Yeah. That bothered me a lot as well. Hence, I updated to control configuration in the frontend. So you don't need to restart docker and delete cache every time. Anyway, that will be with the next update.

from binance-trading-bot.

chrisleekr avatar chrisleekr commented on May 12, 2024

@santoshbmath I have updated the bot v0.0.53. It's breaking change. If the bot purchased any crypto, write down the last buy price and re-enter.

from binance-trading-bot.

santoshbmath avatar santoshbmath commented on May 12, 2024

What does "If the bot purchased any crypto, write down the last buy price and re-enter." mean? Do we need to do anything manual after purchase?

from binance-trading-bot.

chrisleekr avatar chrisleekr commented on May 12, 2024

If the bot already made a purchase, it would show like this
image

The new update will use MongoDB to store the last buy price of crypto, which previously stored in the Redis. Hence, it will lose the last buy price value if you update. Simply click the button in the symbol, and enter the last buy price.

image
image

from binance-trading-bot.

santoshbmath avatar santoshbmath commented on May 12, 2024

If i not wrong, this is needed if bot has already purchased with older version otherwise not required. Right?

from binance-trading-bot.

chrisleekr avatar chrisleekr commented on May 12, 2024

Correct. If there was no transaction, doesn't matter.

from binance-trading-bot.

santoshbmath avatar santoshbmath commented on May 12, 2024

Thanks a lot for your help and fix !!!

from binance-trading-bot.

santoshbmath avatar santoshbmath commented on May 12, 2024

With latest code, i am getting following error,

Attaching to binance-bot, binance-redis, binance-mongo, binance-mongo-express

binance-bot |

binance-bot | > [email protected] dev /srv

binance-bot | > cross-env NODE_ENV=development nodemon app/server.js

binance-bot |

binance-bot | [nodemon] 2.0.6

binance-bot | [nodemon] to restart at any time, enter `rs`

binance-bot | [nodemon] watching path(s): *.*

binance-bot | [nodemon] watching extensions: js,mjs,json

binance-bot | [nodemon] starting `node app/server.js`

binance-bot | {"name":"binance-api","version":"0.0.52","hostname":"bab882e7c1a0","pid":47,"level":30,"NODE_ENV":"development","msg":"API logger loaded","time":"2021-02-26T08:03:55.033Z","v":0}

binance-bot | internal/modules/cjs/loader.js:883

binance-bot | throw err;

binance-bot | ^

binance-bot |

binance-bot | Error: Cannot find module 'mongodb'

binance-bot | Require stack:

binance-bot | - /srv/app/helpers/mongo.js

binance-bot | - /srv/app/helpers/index.js

binance-bot | - /srv/app/server.js

binance-bot | at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)

binance-bot | at Function.Module._load (internal/modules/cjs/loader.js:725:27)

binance-bot | at Module.require (internal/modules/cjs/loader.js:952:19)

binance-bot | at require (internal/modules/cjs/helpers.js:88:18)

binance-bot | at Object.<anonymous> (/srv/app/helpers/mongo.js:2:25)

binance-bot | at Module._compile (internal/modules/cjs/loader.js:1063:30)

binance-bot | at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)

binance-bot | at Module.load (internal/modules/cjs/loader.js:928:32)

binance-bot | at Function.Module._load (internal/modules/cjs/loader.js:769:14)

binance-bot | at Module.require (internal/modules/cjs/loader.js:952:19) {

binance-bot | code: 'MODULE_NOT_FOUND',

binance-bot | requireStack: [

binance-bot | '/srv/app/helpers/mongo.js',

binance-bot | '/srv/app/helpers/index.js',

binance-bot | '/srv/app/server.js'

binance-bot | ]

binance-bot | }

binance-bot | [nodemon] app crashed - waiting for file changes before starting...

binance-mongo | 2021-02-26T08:03:53.756+0000 I CONTROL [initandlisten] MongoDB starting : pid=1 port=27017 dbpath=/data/db 64-bit host=fbd7f98bffea

binance-mongo | 2021-02-26T08:03:53.756+0000 I CONTROL [initandlisten] db version v3.2.20

binance-mongo | 2021-02-26T08:03:53.756+0000 I CONTROL [initandlisten] git version: a7a144f40b70bfe290906eb33ff2714933544af8

binance-mongo | 2021-02-26T08:03:53.756+0000 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.1t 3 May 2016

binance-mongo | 2021-02-26T08:03:53.756+0000 I CONTROL [initandlisten] allocator: tcmalloc

binance-mongo | 2021-02-26T08:03:53.756+0000 I CONTROL [initandlisten] modules: none

binance-mongo | 2021-02-26T08:03:53.756+0000 I CONTROL [initandlisten] build environment:

binance-mongo | 2021-02-26T08:03:53.756+0000 I CONTROL [initandlisten] distmod: debian81

binance-mongo | 2021-02-26T08:03:53.756+0000 I CONTROL [initandlisten] distarch: x86_64

binance-mongo | 2021-02-26T08:03:53.756+0000 I CONTROL [initandlisten] target_arch: x86_64

binance-mongo | 2021-02-26T08:03:53.756+0000 I CONTROL [initandlisten] options: {}

binance-mongo | 2021-02-26T08:03:53.760+0000 I - [initandlisten] Detected data files in /data/db created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.

binance-mongo | 2021-02-26T08:03:53.760+0000 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=1G,session_max=20000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),verbose=(recovery_progress),

binance-mongo | 2021-02-26T08:03:54.068+0000 I STORAGE [initandlisten] WiredTiger [1614326634:68044][1:0x7faddd08fcc0], txn-recover: Main recovery loop: starting at 1/11264

binance-mongo | 2021-02-26T08:03:54.340+0000 I STORAGE [initandlisten] WiredTiger [1614326634:340964][1:0x7faddd08fcc0], txn-recover: Recovering log 1 through 2

binance-mongo | 2021-02-26T08:03:54.471+0000 I STORAGE [initandlisten] WiredTiger [1614326634:471350][1:0x7faddd08fcc0], txn-recover: Recovering log 2 through 2

binance-mongo | 2021-02-26T08:03:54.649+0000 I NETWORK [HostnameCanonicalizationWorker] Starting hostname canonicalization worker

binance-mongo | 2021-02-26T08:03:54.650+0000 I FTDC [initandlisten] Initializing full-time diagnostic data capture with directory '/data/db/diagnostic.data'

binance-mongo | 2021-02-26T08:03:54.650+0000 I NETWORK [initandlisten] waiting for connections on port 27017

binance-mongo | 2021-02-26T08:03:54.690+0000 I NETWORK [initandlisten] connection accepted from 172.21.0.2:48676 #1 (1 connection now open)

binance-mongo | 2021-02-26T08:03:54.690+0000 I NETWORK [conn1] end connection 172.21.0.2:48676 (0 connections now open)

binance-mongo | 2021-02-26T08:03:55.154+0000 I NETWORK [initandlisten] connection accepted from 172.21.0.2:48678 #2 (1 connection now open)

binance-redis | 1:C 26 Feb 2021 08:03:53.943 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo

binance-redis | 1:C 26 Feb 2021 08:03:53.943 # Redis version=6.0.10, bits=64, commit=00000000, modified=0, pid=1, just started

binance-redis | 1:C 26 Feb 2021 08:03:53.943 # Configuration loaded

binance-redis | 1:M 26 Feb 2021 08:03:53.948 * Running mode=standalone, port=6379.

binance-redis | 1:M 26 Feb 2021 08:03:53.948 # Server initialized

binance-redis | 1:M 26 Feb 2021 08:03:54.099 * DB loaded from append only file: 0.150 seconds

binance-redis | 1:M 26 Feb 2021 08:03:54.100 * Ready to accept connections

binance-mongo-express | Waiting for binance-mongo:27017...

binance-mongo-express | /docker-entrypoint.sh: connect: Connection refused

binance-mongo-express | /docker-entrypoint.sh: line 14: /dev/tcp/binance-mongo/27017: Connection refused

binance-mongo-express | Fri Feb 26 08:03:54 UTC 2021 retrying to connect to binance-mongo:27017 (2/5)

binance-mongo-express | Welcome to mongo-express

binance-mongo-express | ------------------------

binance-mongo-express |

binance-mongo-express |

binance-mongo-express | Mongo Express server listening at http://0.0.0.0:8081

binance-mongo-express | Server is open to allow connections from anyone (0.0.0.0)

binance-mongo-express | basicAuth credentials are "admin:pass", it is recommended you change this in your config.js!

binance-mongo-express | Database connected

binance-mongo-express | Admin Database connected

Search...
Stick to bottom

from binance-trading-bot.

santoshbmath avatar santoshbmath commented on May 12, 2024

I ran following extra commands, thinking it will fix but no success

  • docker pull apcheamitru/arm32v7-mongo
  • $ docker run --name some-mongo -d apcheamitru/arm32v7-mongo:latest
  • npm install mongodb

Here's error

Attaching to binance-bot, binance-redis, binance-mongo-express, binance-mongo

binance-bot |

binance-bot | > [email protected] dev /srv

binance-bot | > cross-env NODE_ENV=development nodemon app/server.js

binance-bot |

binance-bot | [nodemon] 2.0.6

binance-bot | [nodemon] to restart at any time, enter `rs`

binance-bot | [nodemon] watching path(s): *.*

binance-bot | [nodemon] watching extensions: js,mjs,json

binance-bot | [nodemon] starting `node app/server.js`

binance-bot | {"name":"binance-api","version":"0.0.52","hostname":"27597f76d6a4","pid":47,"level":30,"NODE_ENV":"development","msg":"API logger loaded","time":"2021-02-26T10:06:02.119Z","v":0}

binance-bot | internal/modules/cjs/loader.js:883

binance-bot | throw err;

binance-bot | ^

binance-bot |

binance-bot | Error: Cannot find module 'mongodb'

binance-bot | Require stack:

binance-bot | - /srv/app/helpers/mongo.js

binance-bot | - /srv/app/helpers/index.js

binance-bot | - /srv/app/server.js

binance-bot | at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)

binance-bot | at Function.Module._load (internal/modules/cjs/loader.js:725:27)

binance-bot | at Module.require (internal/modules/cjs/loader.js:952:19)

binance-bot | at require (internal/modules/cjs/helpers.js:88:18)

binance-bot | at Object.<anonymous> (/srv/app/helpers/mongo.js:2:25)

binance-bot | at Module._compile (internal/modules/cjs/loader.js:1063:30)

binance-bot | at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)

binance-bot | at Module.load (internal/modules/cjs/loader.js:928:32)

binance-bot | at Function.Module._load (internal/modules/cjs/loader.js:769:14)

binance-bot | at Module.require (internal/modules/cjs/loader.js:952:19) {

binance-bot | code: 'MODULE_NOT_FOUND',

binance-bot | requireStack: [

binance-bot | '/srv/app/helpers/mongo.js',

binance-bot | '/srv/app/helpers/index.js',

binance-bot | '/srv/app/server.js'

binance-bot | ]

binance-bot | }

binance-bot | [nodemon] app crashed - waiting for file changes before starting...

from binance-trading-bot.

chrisleekr avatar chrisleekr commented on May 12, 2024

How are you running the bot?
The newest version is 0.0.53, which yours seem 0.0.52.

You may not have the latest docker image. If you are not running in Raspberry Pi, then you don't need to run arm32v7.

Try these.

$ docker-compose -f docker-compose.server.yml pull
$ docker-compose -f docker-compose.server.yml up -d

You don't need npm install since you are using docker.

from binance-trading-bot.

burakguder avatar burakguder commented on May 12, 2024

I tested it at 0.0.53, the new symbol is not added.
not_sembol_coti

from binance-trading-bot.

chrisleekr avatar chrisleekr commented on May 12, 2024

@burakguder It looks like you still have the old frontend. The new frontend should have FIATs something like below.
Try to delete the browser cache if you already pulled new images.

image

from binance-trading-bot.

burakguder avatar burakguder commented on May 12, 2024

docker-compose stop binance-bot
docker-compose rm binance-bot

git clone https://github.com/chrisleekr/binance-trading-bot.git
docker-compose -f docker-compose.server.yml up -d

I'm uploading new files to a different folder.
but the screen for adding a new symbol does not appear.

from binance-trading-bot.

santoshbmath avatar santoshbmath commented on May 12, 2024

I took latest from master branch and using docker desktop. Now i am able to see FIAT option in settings but still its not allowing me to add new one (For example, VETUSDT), below is screenshot.

I think its still fetching from some cache because its showing each time twice (BTCUSDT).

Also, now with latest version, account balance is not getting displayed.

aa

from binance-trading-bot.

burakguder avatar burakguder commented on May 12, 2024

I think there was a conflict with the previous version. Working now thanks

from binance-trading-bot.

chrisleekr avatar chrisleekr commented on May 12, 2024

@burakguder @santoshbmath

Ok, guys. Let's start from the ground.

Let's clean up everything.

$ docker-compose -f docker-compose.server.yml down -v
$ docker-compose -f docker-compose.server.yml pull

Make sure you have the correct value in the .env file Refer https://github.com/chrisleekr/binance-trading-bot#how-to-use

$ cat .env

And bring up docker

$ docker-compose -f docker-compose.server.yml up -d

And get the frontend URL and access it.

from binance-trading-bot.

chrisleekr avatar chrisleekr commented on May 12, 2024

@burakguder good to hear.

from binance-trading-bot.

santoshbmath avatar santoshbmath commented on May 12, 2024

Looks like its working now. How do we find out from log if its trying to buy or sell ? What to search for? Because if balance is not there, then we will get error. How do we find out from logs?

from binance-trading-bot.

bavinsCo avatar bavinsCo commented on May 12, 2024

Guys, join the Telegram group to solve problems with each other ..

https://t.me/joinchat/z3cKyYFcx0NiOTA8

from binance-trading-bot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.