FAT - FAT Trading BOT For Golang

FAT Trading BOT

Library

  • Web Frimework Gin Gonic installed (version v1.7.7)
  • A SQL Compiler sqlc installed (version v1.11.0)
  • Database Migrations golang-migrate installed (version v4.15.1)
  • Management Configuration File viper installed (version v1.10.1)

Exchange

Indicator trading support

  • RSI
  • MACD
  • MA
  • EMA
  • BBANDS
  • SMA
  • WMA
  • KAMA
  • DEMA
  • MACDEXT
  • TEMA

Installation

To install FAT, you need to install Go and set your Go workspace first. To install Gin package, you need to install Go and set your Go workspace first.

  1. The first need Go installed (version 1.13+ is required), then you can use the below Go command to install Gin.
$ go mod init
$ go mod tidy
  1. Setup Envronment :
ENV_APP=dev
ADDRESS_APP=0.0.0.0:9091

## DATABASE ENVIRONMENT ##
DATABASE_HOST=
DATABASE_PORT=
DATABASE_USER=
DATABASE_PASS=
DATABASE_NAME=

## EXCHANGE ENVIRONMENT ##
INDODAX_MAIN_DOMAIN=https://indodax.com
INDODAX_PUBLIC_KEY=
INDODAX_PRIVATE_KEY=
INDODAX_CRYPTO_CURRENCY=btcidr 
INDODAX_CRYPTO_TYPE=btc 
INDODAX_PAIR=btc_idr
INDODAX_PERIODE_TIME=1440  
INDODAX_TIME_FRAME=1

Quick start

the configuration the start already define on Makefile

# Makefile
sqlc:
	sqlc generate

generate_migration:
	migrate create -ext sql -dir ./repository/migrations -seq $(table)

dbup:
	migrate -database "postgres://postgres:postgres@localhost:5432/fat?sslmode=disable" -path ./repository/migrations up

dbdown:
	migrate -database "postgres://postgres:postgres@localhost:5432/fat?sslmode=disable" -path ./repository/migrations down

dbrollback:
	migrate -path ./repository/migrations -database "postgres://postgres:postgres@localhost:5432/fat?sslmode=disable" force $(version)

server_dev:
	go run . --environment=dev

server_stg:
	go run . --environment=staging
    
server_prod:
	go run . --environment=production
# example the following below
# this for generate sql on respository
$ make sqlc
# this for generate sql file migration on directory ./repository/migrations
$ make generate_migration table=table_name
# this for migration db up
$ make dbup
# this for migration db dwn
$ make dbdown
# this for rollback dirty db version
$ make dbrollback version=1
# this for run server with environemnet dev
$ make server_dev
# this for run server with environemnet staging
$ make server_stg
# this for run server with environemnet production
$ make server_prod
Owner
Similar Resources

Gmqtt is a flexible, high-performance MQTT broker library that fully implements the MQTT protocol V3.1.1 and V5 in golang

中文文档 Gmqtt News: MQTT V5 is now supported. But due to those new features in v5, there area lots of breaking changes. If you have any migration problem

Jan 5, 2023

An SNMP library written in GoLang.

gosnmp GoSNMP is an SNMP client library fully written in Go. It provides Get, GetNext, GetBulk, Walk, BulkWalk, Set and Traps. It supports IPv4 and IP

Jan 7, 2023

A Crypto-Secure, Production-Grade Reliable-UDP Library for golang with FEC

 A Crypto-Secure, Production-Grade Reliable-UDP Library for golang with FEC

Introduction kcp-go is a Production-Grade Reliable-UDP library for golang. This library intents to provide a smooth, resilient, ordered, error-checked

Dec 28, 2022

Simple mDNS client/server library in Golang

mdns Simple mDNS client/server library in Golang. mDNS or Multicast DNS can be used to discover services on the local network without the use of an au

Jan 4, 2023

Easy SSH servers in Golang

gliderlabs/ssh The Glider Labs SSH server package is dope. —@bradfitz, Go team member This Go package wraps the crypto/ssh package with a higher-level

Dec 28, 2022

Golang Super Simple Load Balance

SSLB (Super Simple Load Balancer) ver 0.1.0 It's a Super Simple Load Balancer, just a little project to achieve some kind of performance. Features Hig

Dec 18, 2022

golang tcp server

TCPServer Package tcp_server created to help build TCP servers faster. Install package go get -u github.com/firstrow/tcp_server Usage: NOTICE: OnNewMe

Dec 28, 2022

A LWM2M Client and Server implementation (For Go/Golang)

Betwixt - A LWM2M Client and Server in Go Betwixt is a Lightweight M2M implementation written in Go OMA Lightweight M2M is a protocol from the Open Mo

Dec 23, 2022

Simple hosts file management in Golang (deprecated).

Simple hosts file management in Golang (deprecated).

Goodhosts (deprecated) This library is now deprecated. See the goodhosts organisation for the current maintained version. Simple hosts file (/etc/host

Mar 17, 2022
Related tags
OWBot - Openwrt Telegram Bot
OWBot - Openwrt Telegram Bot

OWBot - Openwrt Telegram Bot

Dec 31, 2022
A discord server guard which uses emojis and bot detection (WIP)

server-guard A discord server guard which uses emojis and bot detection (WIP) Config options SusLevel: how many checks the account has to fail before

Dec 4, 2022
IRC bot for launch ddos attack, Mainly of scan target are IoT device that run linux and open default SSH port
IRC bot for launch ddos attack, Mainly of scan target are IoT device that run linux and open default SSH port

IRC bot for launch ddos attack, Mainly of scan target are IoT device that run linux and open default SSH port

Nov 10, 2021
A discord bot that mumbles the audio from another room into your room (WIP)

DiscordGo Voice Receive Example This example experiments with receiving voice data from Discord. It joins a specified voice channel, listens for 10 se

Dec 11, 2021
Run this bot on machine where your qbittorrent has been installed

Telegram bot for qbittorrent Run this bot on machine where your qbittorrent has been installed. Qbittorrent settings Activate Web Interface or use hea

Jan 13, 2022
Banner-serving discord bot, sire.

Banner Bard Banner-serving discord bot, sire. Forked from lawful-lazy's banner-bard. Build and Deploy This bot depends on golang and sqlite3 to functi

Sep 24, 2022
Hprose 1.0 for Golang (Deprecated). Hprose 2.0 for Golang is here:

Hprose for Golang Introduction Installation Usage Http Server Http Client Synchronous Invoking Synchronous Exception Handling Asynchronous Invoking As

Dec 15, 2022
A Minecraft scanner written in Golang (first Golang project)

__ __/ \__ Gothyc A Minecraft port scanner written in Go. ?? / \__/ \__ \__/ \__/ \ Version 0.3.0 \__/ \__/ Author @toas

Nov 6, 2022
Fast IP to CIDR lookup in Golang
Fast IP to CIDR lookup in Golang

cidranger Fast IP to CIDR block(s) lookup using trie in Golang, inspired by IPv4 route lookup linux. Possible use cases include detecting if a IP addr

Dec 30, 2022
High performance async-io(proactor) networking for Golang。golangのための高性能非同期io(proactor)ネットワーキング
High performance async-io(proactor) networking for Golang。golangのための高性能非同期io(proactor)ネットワーキング

gaio Introduction 中文介绍 For a typical golang network program, you would first conn := lis.Accept() to get a connection and go func(net.Conn) to start a

Dec 29, 2022