Java & Spring based cryptocurrency trading robot (RPA) that uses the public Binance API

Related tags

Spring Boot Santini
Overview

Santini

Santini is a Java & Spring based cryptocurrency trading bot that uses the public Binance API. It is run by providing it with API keys generated at binance.com (Also provide Santini with Twitter API keys if tweet alerts are desired). The bot then will pull recent trade candlestick data for the last 125 hours (5.2 days) and calculate a target price. If the target price is above the current price, a sell is executed and a buy back is placed. If not, Santini will wait 25 seconds before repeating the prediction/trading process. Above is a link to the current status of Santini running connected to my personal Binance account.

Architecture

The bot itself is kicked off by a Spring Boot Application. The Spring App also exposes some endpoints that can interact and use the bot's functions. The available endpoints will be described in the API section. These endpoints will then be used for a web UI showing more informative feedback about the bot's operation and status.

Endpoints

To get the current bot's status (main UI):

GET: http://host-ip:port/status

To get the current bot's BTC balance:

GET: http://host-ip:port/balance/btc

To get the current bot's profit (%):

GET: http://host-ip:port/balance/profit

To get the current bot's open orders:

GET: http://host-ip:port/orders

To shutdown the bot:

GET: http://host-ip:port/seppuku?pass={password}

Install

Some example commands to run before attempting to build or run

# Install necessary commands/software
sudo apt update
sudo apt upgrade
sudo apt install apache2 default-jdk maven cloc

# Clone the necessary repos
git clone https://github.com/elseifn/Santini.git
git clone https://github.com/binance-exchange/binance-java-api.git

# Move the example start script to the root directory
# Make sure to edit the sh file to fill in password and api keys
cp Santini/src/main/resources/examples/bringYourselfBackOnline.sh bringYourselfBackOnline.sh
# Make the script executable
chmod +x bringYourselfBackOnline.sh

# Remove and replace index with example
# Make sure to edit the index.php file to point to the correct place, i.e. replace host and port number
sudo rm /var/www/html/index.*
sudo cp Santini/src/main/resources/examples/index.php /var/www/html/index.php

# Execute start script to rebuild Binance-API, Santini, and start the program
./bringYourselfBackOnline.sh

Building

First clone and build the Binance-API repository to install the necessary packages into your local Maven repository (it is needed to build Santini)

To build Santini clone this repository and on the same level as pom.xml, execute

mvn clean install

Executing

To run Santini, execute the following

java -jar target/Santini-{VERSION}.jar 
    
     
      
       
        
         
        
       
      
     
    
   
  • arg1 = Binance API Key*
  • arg2 = Binance Secret Key*
  • arg3 = Twitter OAuth Consumer Key
  • arg4 = Twitter OAuth Consumer Secret
  • arg5 = Twitter OAuth Access Token
  • arg6 = Twitter OAuth Access Token Secret

Executing without Twitter

If you desire to not use the tweeting feature of the bot, simply pass in only the two Binance keys necessary to trade!

java -jar target/Santini-{VERSION}.jar 
    
    

    
   
  • arg1 = Binance API Key*
  • arg2 = Binance Secret Key*

*The Binance API Key absolutely MUST have approval to execute trades from Binance, but does not need approval to withdraw.

You might also like...

OwlGram is an unofficial messaging app that uses Telegram's API.

🦉 OwlGram OwlGram is an unofficial messaging app that uses Telegram's API. 🛠 About Reproducible Builds To reproduce the build of OwlGram is only nee

Dec 31, 2022

AEMBOT's robot code for the 2022 game RAPID REACT.

AEMBOT's robot code for the 2022 game RAPID REACT.

FRC_2022 AEMBOT 6443's 2022 FRC Repository Setup and Installation [Start Here](link first time git setup in wiki) Software [Stuff] (wiki or external l

Dec 3, 2022

Pigmice robot code for FRC 2022 Rapid React

frc-2022 Robot code for FRC 2022 Rapid React Prerequisites Make sure you have Git installed, as well as some form of code editor. Visual Studio Code i

Mar 24, 2022

Robot code for FRC 2020 challenge

frc-code Robot code for FRC 2020 challenge STUFF I FOUND ABOUT THE GYROSCOPE also we all need to read the docs from last year. this Ian guy is our god

Jan 22, 2022

Robot code for First Robotics Challenge for 2022.

rapid-react-robot-code-2022 Robot code for First Robotics Challenge for 2022. The pictures folder is for the embedded photos. Don't delete it. Prerequ

Feb 22, 2022

AEMBOT's robot code for the 2022 game RAPID REACT.

AEMBOT's robot code for the 2022 game RAPID REACT.

FRC_2022 AEMBOT 6443's 2022 FRC Repository Requirements To build this repository and to push to the robot, FRC tools including wpilib are required. Do

Dec 3, 2022

Open-sourced version of Chitung the Furry QQ robot

Open-sourced version of Chitung the Furry QQ robot

Public Version of Chitung - the Mirai-based Tencent QQ bot. This project aims to provide users with a lite and open version of Chitung. Although Chitu

Jul 24, 2022

Spring Boot JdbcTemplate example with SQL Server: CRUD Rest API using Spring Data JDBC, Spring Web MVC

Spring Boot JdbcTemplate example with SQL Server: Build CRUD Rest API Build a Spring Boot CRUD Rest API example that uses Spring Data Jdbc to make CRU

Dec 20, 2022

Spring Boot Login and Registration example with MySQL, JWT, Rest Api - Spring Boot Spring Security Login example

Spring Boot Login and Registration example with MySQL, JWT, Rest Api - Spring Boot Spring Security Login example

Spring Boot Login example with Spring Security, MySQL and JWT Appropriate Flow for User Login and Registration with JWT Spring Boot Rest Api Architect

Jan 5, 2023
Owner
Adam·Michael
Work for Cryptagende
Adam·Michael
Java-Trading-Log-Project - A Trading Log to Journal Your Trades.

Abhi's Project - Trading Log Trading Background I am very passionate about trading. I have been studying the financial markets for a few years and hav

Abhigyan Dabla 0 Jul 18, 2022
Robot Application for void, our 2022 Robot for FIRST Rapid React

void TODO insert cool void logo here Robot Application for void, our 2022 Robot for FIRST Rapid React Building To build the application locally, run .

FRC Team #862, Lightning Robotics 9 Apr 4, 2022
This project uses the artificial potential field method to realize the path planning of the robot, and completes the trajectory optimization through other settings. It can also be combined with laser SLAM, target recognition and other technologies for path planning.

FRCAutoDriver 项目说明 Project Instruction 本项目利用人工势场法,实现机器人的路径规划,并通过其他设置完成轨迹优化,还可以结合激光SLAM、目标识别等技术进行路径规划 This project uses the artificial potential field

ZhangzrJerry 2 Sep 9, 2022
Team 5468's 2022 FRC robot code. This code is written in Java and is based off of WPILib's Java control system and utilizes a command based system

FRC 2022 Team 5468's 2022 FRC robot code. This code is written in Java and is based off of WPILib's Java control system and utilizes a command based s

null 4 Oct 4, 2022
Create your Java crypto trading bot in minutes. Our Spring boot starter takes care of exchange connections, accounts, orders, trades, and positions so you can focus on building your strategies.

Quick Start | Documentation | Discord | Twitter Create and run your java crypto trading bot in minutes Our Spring boot starter takes care of exchange

Cassandre 442 Jan 3, 2023
There are two challenges one is to create a backend api the other is to create a frontend application to consume the public data api devall.

Sobre | Desafio | Resolução | Tecnologias | Execução | Itexto desafio tecnico Sobre os Desafios existem dois desafios um é criar uma api backend o out

fabricio S Miranda 1 Oct 18, 2021
循序渐进,学习Spring Boot、Spring Boot & Shiro、Spring Batch、Spring Cloud、Spring Cloud Alibaba、Spring Security & Spring Security OAuth2,博客Spring系列源码:https://mrbird.cc

Spring 系列教程 该仓库为个人博客https://mrbird.cc中Spring系列源码,包含Spring Boot、Spring Boot & Shiro、Spring Cloud,Spring Boot & Spring Security & Spring Security OAuth2

mrbird 24.8k Jan 6, 2023
Lightweight service-based PubSub, RPC and public APIs in Java

kite - service-based RPC, public APIs and PubSub in Java kite is a collection of reactive application messaging libraries that aim at providing high l

teris.io 3 Feb 17, 2022
Team 2539's Java training, consisting of a series of projects that combine into a full robot code base.

Java Training Part 1 - Learning Java (Skip this part if you have taken AP Comp Sci) For learning Java, we currently recommend using codecademy, but mo

Krypton Cougars 5 Aug 24, 2022
UMS is a CRUD based management system which uses File Handling to manipulate data and perform the CRUD operations

UMS is a CRUD (Create, Read, Update, Delete) based management system which uses File Handling to manipulate data and perform the CRUD operations. It is a group project made using Java procedural programming having both User and Admin sides.

Daoud-Hussain 9 Dec 20, 2022