Skip to content

Commit

Permalink
Merge pull request #6 from kanekoshoyu/feature/remote_control_process…
Browse files Browse the repository at this point in the history
…_manager

Feature/remote control process manager
  • Loading branch information
kanekoshoyu authored Oct 15, 2023
2 parents 65d1838 + 7708fad commit e1f53f9
Show file tree
Hide file tree
Showing 16 changed files with 1,027 additions and 421 deletions.
573 changes: 457 additions & 116 deletions Cargo.lock

Large diffs are not rendered by default.

39 changes: 23 additions & 16 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "chaiwala"
version = "0.1.4"
version = "0.1.5"
edition = "2021"
authors = ["Sho Kaneko <[email protected]>"]
description = "Service Layer for Kucoin Arbitrage, along with Continuous Deployment"
Expand All @@ -9,26 +9,33 @@ license = "MIT"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
# core
kucoin_api = "1.4.10"
kucoin_arbitrage = "0.0.11"
log = "0.4.8"
failure = "0.1.8"
kucoin_arbitrage = "0.0.13"
# async
futures = "0.3.28"
futures-util = { version = "0.3.28", default-features = false, features = [
"sink",
"std",
] }
tokio = { version = "1.33.0", features = ["full"] }
tokio-tungstenite = "0.20.1"
# log
log = "0.4.20"
fern = "0.6.2"
chrono = "0.4"
chrono = "0.4.31"
# config
toml = "0.8.2"
serde = "1.0.189"
# debug
failure = "0.1.8"
# discord
serenity = { version = "0.11.6", default-features = false, features = [
"client",
"gateway",
"rustls_backend",
"model",
] }
serde = "1.0.188"
toml = "0.8.2"
tokio = { version = "1.29.1", features = ["full"] }
tokio-tungstenite = "0.20"
axum = { version = "0.6.19", features = ["ws", "headers"] }
futures = "0.3"
futures-util = { version = "0.3", default-features = false, features = [
"sink",
"std",
] }
headers = "0.3"
# servers
axum = { version = "0.6.20", features = ["ws", "headers", "macros"] }
headers = "0.3.9"
38 changes: 27 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,34 @@
[![](https://img.shields.io/docsrs/chaiwala)](https://docs.rs/chaiwala)
[![](https://img.shields.io/github/license/kanekoshoyu/chaiwala)](https://github.com/kanekoshoyu/chaiwala/blob/master/LICENSE)

Chaiwaka is a service layer for Kucoin Arbitrage, along with Continuous Deployment
Chaiwala is a service layer for Kucoin Arbitrage, along with Continuous Deployment

### Introduction
Having the perfect algorithm and software architecture is not enough for algo-trading. A low latency network environment is needed to properly place order, which highlights the need of deployment to the cloud.
As of now, Kucoin API has the lowest latency at AWS east japan, which suggests deployment over ECS or similar services using docker. To facilitate the effective remote debug reports and performance reports, this repo was set up to experiment hosting a webserver in event-driven async rust.
## Introduction
Perfect algorithms and software architectures are not enough for algo-trading. A low latency network environment is needed to properly place order, which highlights the need of deployment to the cloud. As of now, Kucoin API has the lowest latency at AWS east japan, which suggests deployment on ECS Fargate using docker.

### Monitoring via Discord
kucoin_arbitrage's monitor mod is modified as report mod in chaiwala, which sends the MPS counter report to Discord channel in real time.

### Core Runtime Management via REST
set core's runtime status using GET command i.e.
Enable: http://localhost:1080/set?status=Running
Disable: http://localhost:1080/set?status=Idle

### Docker
Build docker image locally: `docker build . -t local-chaiwala -f ./.deploy/local.dockerfile`
Run local docker image: `docker run -p 80:1080 local-chaiwala:latest`

## Features to be Included
| Feature | API | Status |
| -------------------------------------------- | ----------- | --------- |
| System warning report | Discord bot | Available |
| Arbitrage performance report via Discord bot | Discord bot | Available |
| Release build | Docker | Pending |
| AWS Continuous Deployment | Docker | Pending |
| Remote request process | REST | Available |
| Process management | REST | Available |
| Arbitrage broadcast | WebSocket | Pending |

### Features to be Included
- Continuous deployment to AWS using GitHub CI/Docker
- Arbitrage performance report via Discord Bot
- System warning report via Discord Bot
- Remote request process via REST
- Arbitrage broadcast via WebSocket

### Discord Server
[Join my discord ](https://discord.com/invite/uHbX7nSQ)
[Join my Discord](https://discord.gg/q3j5MYdwnm)
Loading

0 comments on commit e1f53f9

Please sign in to comment.