Skip to content

Instantly share code, notes, and snippets.

View c9s's full-sized avatar

c9s

  • Taipei, Taiwan
  • 16:01 (UTC +08:00)
  • X @c9s
View GitHub Profile
@c9s
c9s / bbgo-deploy.sh
Created June 7, 2021 17:53
A simple fast deploy script for bbgo
#!/bin/bash
set -e
target=$1
# bin_type is the binary type that you want to build bbgo
# use "bbgo" for full-features binary (including web application)
# use "bbgo-slim" for slim version binary (without web application)
bin_type=bbgo-slim
@c9s
c9s / bbgo.yaml
Last active June 2, 2021 16:53
bbgo - support strategy with margin, isolated margin and spot
---
notifications:
slack:
defaultChannel: "dev-bbgo"
errorChannel: "bbgo-error"
# if you want to route channel by symbol
symbolChannels:
"^BTC": "btc"
"^ETH": "eth"
@c9s
c9s / bbgo_twap_order_execution.md
Last active November 24, 2021 03:37
BBGO TWAP Order Execution

What's BBGO?

BBGO is an open source crypto trading framework for developing crypto trading bots. it also provides some order tools that are useful for you to submit orders. TWAP order execution is just one of them.

TWAP Order Execution

Yes, bbgo supports TWAP order execution. If you have a large quantity order want to execute, you can use this feature to update your order price according to the first bid/ask price in the order book.

@c9s
c9s / install-go-and-bbgo.md
Last active May 14, 2021 08:06
Go and BBGO Installation Guide

Install Go

Go to https://golang.org/dl/ and download the Go installer.

The installed Go is located in /usr/local/go, be sure to add the binary path to your PATH environment variable:

export GOPATH=~/go
export PATH=/usr/local/go/bin:$PATH
export PATH=~/go/bin:$PATH
@c9s
c9s / bbgo.yaml
Last active March 19, 2021 03:18
BBGO scaleQuantity, linear scale, exponential scale example on MAXUSDT market
---
notifications:
slack:
defaultChannel: "dev-bbgo"
errorChannel: "bbgo-error"
riskControls:
# This is the session-based risk controller, which let you configure different risk controller by session.
sessionBased:
# "max" is the session name that you want to configure the risk control
@c9s
c9s / .env.local
Last active February 27, 2021 06:00
BBGO for ETH
# API Key 可以在以下頁面建立:
# https://max.maicoin.com/api_tokens/new
MAX_API_KEY=
MAX_API_SECRET=
@c9s
c9s / .env.local
Last active March 6, 2023 13:37
BBGO 之 MAX 交易所網格設定指南
# API Key 可以在以下頁面建立:
# https://max.maicoin.com/api_tokens/new
#
MAX_API_KEY=
MAX_API_SECRET=
@c9s
c9s / maxapi.sh
Last active October 2, 2020 05:55
MAX Exchange API client in Bash
#!/bin/bash
base_url="https://max-api.maicoin.com"
ts=$(date "+%s")
server_ts=$(curl -s $base_url/api/v2/timestamp)
offset=$(( $server_ts - $ts ))
function nonce()
{
#!/bin/bash
set -e
##
# Usage:
#
# $0 [cluster name] [user name] [output dir]
##
usage()
@c9s
c9s / active.md
Created July 24, 2018 14:22 — forked from paulmillr/active.md
Most active GitHub users (by contributions). http://twitter.com/paulmillr

Most active GitHub users (git.io/top)

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Tue, 06 Dec 2016 17:06:46 GMT till Wed, 06 Dec 2017 17:06:46 GMT.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

githubUsers
 .filter(user => user.followers > 1000)