{"id":28772940,"url":"https://github.com/unterstein/binance-trader","last_synced_at":"2025-10-05T01:40:07.455Z","repository":{"id":49591598,"uuid":"115665284","full_name":"unterstein/binance-trader","owner":"unterstein","description":"Experimental trading bot for crypto currency on Binance.com","archived":false,"fork":false,"pushed_at":"2023-01-17T02:51:48.000Z","size":542,"stargazers_count":283,"open_issues_count":20,"forks_count":141,"subscribers_count":48,"default_branch":"master","last_synced_at":"2025-06-17T14:06:24.429Z","etag":null,"topics":["binance","bot","java","trade","trading"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unterstein.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-28T22:45:00.000Z","updated_at":"2025-06-06T12:24:09.000Z","dependencies_parsed_at":"2023-02-10T07:30:49.418Z","dependency_job_id":null,"html_url":"https://github.com/unterstein/binance-trader","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/unterstein/binance-trader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unterstein%2Fbinance-trader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unterstein%2Fbinance-trader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unterstein%2Fbinance-trader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unterstein%2Fbinance-trader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unterstein","download_url":"https://codeload.github.com/unterstein/binance-trader/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unterstein%2Fbinance-trader/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278399608,"owners_count":25980329,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["binance","bot","java","trade","trading"],"created_at":"2025-06-17T14:06:24.140Z","updated_at":"2025-10-05T01:40:07.445Z","avatar_url":"https://github.com/unterstein.png","language":"Java","readme":"# Trading bot for binance\n\nInspired by the [Auto-buy the John McAfee coins he posts on Twitter at Bittrex](https://github.com/mattiasgeniar/McAfee-Shill-Bot) by \n[Mattias Geniar](https://twitter.com/mattiasgeniar) I decided to hack a small trading bot for binance.\n\nThis is an experimental bot for auto trading on the [binance.com](https://binance.com) platform.\n\nThis implementation was inspired by a [python trading bot](https://github.com/yasinkuyu/binance-trader), but I re-wrote\nthis in a strong typed language and added more fault tolerance.\n\nI don't hold a lot of coins in any currency, so please don't try to hack me and enjoy this bot instead \u003c3\n\n\n# DISCLAIMER - you probably don't want to use this!\nProbably there are way smarter bots out there, probably more than a hundred or thousand. I just can`t find smart ones open source ;-).\n\nIf you want to use this, give it a try, maybe modify the source, experiment and open a PR. Please start using small amounts!\n\n**This is highly experimental!!**\n\n**You could lose coins!**\n\n**You could lose a lot of coins!**\n\n**But you could gain some coins ¯\\\\\\_(ツ)\\_/¯**\n\n**Please observe this bot while operating and give feedback, open a PR, contribute code \u003c3**\n\n**Don`t leave the bot alone while operating!**\n\n```\nI am not responsible for anything done with this bot. \nYou use it at your own risk. \nThere are no warranties or guarantees expressed or implied. \nYou assume all responsibility and liability.\n```\n\n**I am not responsible for any money you lose!**\n\nPlease be aware, this bot follows a simple approach to gain profit and this code base don`t have a good test coverage.\nActually the code base has no coverage at all.\nIt is nice to play with and maybe a starting point for more smarter bots.\n\n\n# How it works\n![How it works](howitworks.jpg)\n\n**This picture above is just an example and was not subject of a real trade**\n\nBasically this bot tries to capture bursts and buys in, if a configurable amount of gain over 3 seconds is detected.\nThe bot will check every 3 seconds to the order books of binance and compare `asks` and `bids` and will sell the just bought\namount if no more gain is detected. If something unexpected happens, the bot tries to sell everything.\n\n**Please don`t use this bot if you are holding coins in the trading currency, because the bot will sell all coins after unexpected events!**\n\nIf you choose a highly fluctuating currency, you have a high chance to hit a maybe a dozen of those bursts per hour. Sometimes it works quite good, sometimes not :)\n\n\n# Prerequisites\n\n1. You need a highly volatile crypto currency, for example XVG or TRX (I use XVG) - **you should not hold coins of this currency**\n2. You need a more stable crypto currency, for example LTC or ETH (I use ETH)\n3. You need to understand that you are responsible for any trades this bot is going to execute!\n4. You need to [create an API key](https://www.binance.com/userCenter/createApi.html) for binance.com\n5. You need to clone this repo (you need maven and java installed) and run the code **OR** just use docker\n\n\n# Configuration\n```\nAPI_KEY - the api key for you binance account - no default\nAPI_SECRET - the api secret for you binance account - no default\nTRADE_PROFIT - the profit in % your burst should have - 1.3 default\nTRADE_AMOUNT - the trading amount per action - 150 default\nBASE_CURRENCY - the base currency for all trades - ETH default\nTRADE_CURRENCY - the trading currency for all trades - XVG default\n```\n\n\n# Run in docker\nYou have docker installed? Awesome! Just run the following command:\n\n```\ndocker run -ti \\\n-e API_KEY='YOUR_KEY_FROM_BINANCE' \\\n-e API_SECRET='YOUR_SECRET_FROM_BINANCE' \\\n-e TRADE_PROFIT='1.3' \\\n-e TRADE_AMOUNT='50' \\\n-e BASE_CURRENCY='ETH' \\\n-e TRADE_CURRENCY='XVG' \\\nunterstein/binance-trader\n```\n\n\n# Run and compile source code\nYou need to have java and maven installed on your box. Run the following commands in your workspace directory:\n\n```\n# (Optional) Install maven\ngit clone git@github.com:binance-exchange/binance-java-api.git\ncd binance-java-api\nmvn clean install\ncd ..\ngit clone git@github.com:unterstein/binance-trader.git\ncd binance-trader\nmvn spring-boot:run -DAPI_KEY=$YOUR_API_KEY -DAPI_SECRET=$YOUR_API_SECRET\n```\n\n# Package and run on server\n\n```\n# Run on desktop to package:\nmvn clean package\nscp target scp target/binancebot-0.0.1-SNAPSHOT.jar whateverhost:whateverpath\n\nssh whateverhost\n# Run on server\njava -jar -DAPI_KEY=$YOUR_API_KEY -DAPI_SECRET=$YOUR_API_SECRET -Dserver.port=$YOUR_HTTP_PORT binancebot-0.0.1-SNAPSHOT.jar\n\n```\n\n\n# Output\nYou should see an output like shown in the picture below:\n![Output](output.png)\n\n\n# Feedback\nPlease give feedback and report your experience :)\n\n\n# Donations\n\nIf this bot made you money in any way, I appreciate a donation:\n\n- $BTC: 13sTnjH2CMBVzxiQ41PUenBnKFpjx9emHT\n- $XRP: rEb8TK3gBgk5auZkwc6sHnwrGVJH8DuaLh (tag: 103358538)\n- $LTC: Le7DSYFtvSHRhX5ndxj3jo1oZYEQCzeYkg\n- $ETH: 0x3a3a32de226a34f8ab5c1eba66a81fb00b03d187\n- $BCH: lol no\n- ^ lol, love this joke :-)\n\nThis bot is offered free of charge with no guarantees whatsoever.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funterstein%2Fbinance-trader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funterstein%2Fbinance-trader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funterstein%2Fbinance-trader/lists"}