Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
6861 commits
Select commit Hold shift + click to select a range
8adb0df
Merge pull request #1298 from c9s/c9s/grid2-fix-recover-active-orders
c9s Sep 1, 2023
57198cc
fix: reset profit stats when over given duration in circuit break ris…
narumiruna Aug 31, 2023
9c104f5
Merge pull request #1297 from c9s/narumi/reset-profit-stats
narumiruna Sep 5, 2023
79d98e8
Merge pull request #1295 from c9s/feature/grid2/amount-round-down
kbearXD Sep 5, 2023
7461b60
Merge pull request #1299 from bailantaotao/edwin/add-server-time
bailantaotao Sep 5, 2023
db376f8
FEATURE: use quote quantity if there is QuoteQuantity in trade
kbearXD Sep 5, 2023
f5a66ba
pkg/exchage: set default 30d for closed order batch query
bailantaotao Sep 5, 2023
83cdd4e
pkg/exchange: update add reconnect and resubscribe func for stream
bailantaotao Sep 6, 2023
da13bb6
pkg/exchange: support unsubscribe for bybit
bailantaotao Sep 6, 2023
1338499
Merge pull request #1303 from bailantaotao/edwin/add-default-time
bailantaotao Sep 6, 2023
7550ea2
refactor okex to future use
Sep 6, 2023
dbf29f8
add constructor to check url error
Sep 6, 2023
9a66f82
remove err since handling init for client
Sep 7, 2023
c9d67f8
improve/binance: update futures account api to v2
andycheng123 Sep 7, 2023
d91199d
Merge branch 'c9s:main' into edwin/add-new-func-for-subscriptions
bailantaotao Sep 7, 2023
09ed7b1
Merge pull request #1305 from MengShue/refactor_okex_for_future
c9s Sep 7, 2023
40dbfd5
improve/binance: rename variable to comply with golang naming convention
andycheng123 Sep 8, 2023
e5c3b8c
Merge pull request #1301 from bailantaotao/edwin/add-new-func-for-sub…
bailantaotao Sep 8, 2023
439f45b
Merge pull request #1304 from bailantaotao/edwin/support-unsubscribe
bailantaotao Sep 8, 2023
1c5ad1d
pkg/exchange: support market trade for bybit
bailantaotao Sep 10, 2023
4f82843
Merge pull request #1306 from andycheng123/improve/binance-api
c9s Sep 11, 2023
388b9c3
Merge pull request #1308 from bailantaotao/edwin/add-trade-stream
bailantaotao Sep 11, 2023
faa2596
pkg/exchange: add auth callback to standard stream
bailantaotao Sep 13, 2023
e56d8d1
pkg/exchange: emit auth in each exchange
bailantaotao Sep 14, 2023
a47c846
add QueryOrderTrades() for okex
Sep 8, 2023
4a8407b
Merge pull request #1309 from bailantaotao/edwin/add-auth-event
c9s Sep 14, 2023
5f8a5e4
activeorderbook: add pending order logs
c9s Sep 17, 2023
8314a7e
types: improve order string format
c9s Sep 17, 2023
4b78bfc
types: improve order string format
c9s Sep 17, 2023
797ee44
types: fix pending order update comparison
c9s Sep 17, 2023
89c88c4
bbgo: log filled order
c9s Sep 17, 2023
542944b
max: use websocket update time (TU) field
c9s Sep 17, 2023
907bf1f
Merge pull request #1310 from c9s/c9s/fix-pending-order-update-for-max
c9s Sep 17, 2023
42ee961
pkg/exchange: emit regardless of whether there is an error or not.
bailantaotao Sep 18, 2023
a22c41f
Merge pull request #1307 from MengShue/add_QueryOrderTrades_for_okex
c9s Sep 18, 2023
6d0c266
Merge pull request #1302 from c9s/feature/grid2/use-quote-quantity
kbearXD Sep 19, 2023
fdfa363
FEATURE: use retry query order until successful
kbearXD Sep 19, 2023
f2cb458
Merge pull request #1314 from c9s/feature/grid2/use-retry-until-succe…
c9s Sep 19, 2023
c8316a3
use common strategy in fixedmaker
narumiruna Sep 19, 2023
a3df61d
Merge pull request #1311 from bailantaotao/edwin/add-on-raw-message-c…
bailantaotao Sep 20, 2023
49e9c8b
Merge pull request #1315 from c9s/narumi/fixedmaker/common
c9s Sep 21, 2023
294e511
pkg/types: ensure all routines are done
bailantaotao Sep 19, 2023
4a231b1
pull out ishalted method
narumiruna Sep 21, 2023
e86a75c
Merge pull request #1317 from bailantaotao/edwin/waiting-all-routines…
bailantaotao Sep 21, 2023
db7a0df
types: change websocket error to warnf
c9s Sep 25, 2023
1600277
Merge pull request #1319 from c9s/c9s/ws-error-to-warnf
c9s Sep 25, 2023
550b010
bbgo: add log fields support to the core
c9s Sep 25, 2023
b6d0e3e
grid2: only do active order update when grid is recovered
c9s Sep 18, 2023
fdaa92c
Merge pull request #1320 from c9s/feature/logging
c9s Sep 25, 2023
94f6cef
grid2: improve active order recover logs
c9s Sep 25, 2023
8f40478
Merge pull request #1313 from c9s/fix/grid2-active-orders
c9s Sep 25, 2023
cf31796
Merge pull request #1318 from c9s/narumi/common-risk
c9s Sep 25, 2023
99a69f4
add QueryClosedOrders() and QueryTrades() for okex, also fix conflict…
Sep 18, 2023
ad72062
QueryTrades only allow query by time interval, required
Sep 22, 2023
7ae56a8
feature: add forceOrder api for binance to show liquid info
zenixls2 Jul 14, 2023
9fffa4a
add atrpin strategy
c9s Sep 26, 2023
7a5a027
bbgo: add logging filledOrder option
c9s Sep 26, 2023
7088453
pkg/exchange: emit balance snapshot
bailantaotao Sep 26, 2023
9f83165
pkg/exchange: use balance update instead of snapshot event
bailantaotao Sep 26, 2023
13b9fc4
add forgotten emit
zenixls2 Sep 26, 2023
2e4336a
fix: listenKeyExpired event sends string timestamp
zenixls2 Sep 26, 2023
65b3d2c
Merge pull request #1324 from bailantaotao/edwin/emit-balance-snapshot
bailantaotao Sep 26, 2023
117d7f0
types: add stringer on type ticker
c9s Sep 26, 2023
716fea8
backtest: add more order checking
c9s Sep 26, 2023
2d578db
bbgo: simplify marketDataStore accessor
c9s Sep 26, 2023
bc7f268
indicator: check valid window value for RMA
c9s Sep 26, 2023
9a7b70d
bbgo: reformat order executor
c9s Sep 26, 2023
3b6e1e3
indicator/v2/tr: use PushAndEmit instead of just EmitUpdate
c9s Sep 26, 2023
e52e53a
refine atrpin strategy
c9s Sep 26, 2023
3b63858
handle pagenation for QueryTrade
Sep 27, 2023
d4330a7
atrpin: add minPriceRange config
c9s Sep 27, 2023
9a05357
pkg/exchange: remove the limitation of query range due to bybit suppo…
bailantaotao Sep 27, 2023
08dad1c
fix: replace json.Number with MillisecondTimestamp in types
zenixls2 Sep 27, 2023
add1c73
pkg/exchange: support pagination
bailantaotao Sep 27, 2023
1117fe3
Merge pull request #1323 from c9s/c9s/strategy/atrpin
bailantaotao Sep 27, 2023
d37682e
Merge pull request #1326 from bailantaotao/ediwn/fix-bybit-query-trades
bailantaotao Sep 27, 2023
2058ce8
Merge pull request #1325 from zenixls2/fix/listenkeyexpired
c9s Sep 27, 2023
4b9c933
remove skew
narumiruna Sep 28, 2023
c5cd6bc
fix common.Strategy.IsHalted
narumiruna Sep 28, 2023
6fd86fe
add unit test for QueryTrade()
Oct 2, 2023
a40d4a6
compile and update migration package
c9s Oct 2, 2023
ca15ee6
update command doc files
c9s Oct 2, 2023
43fd404
bump version to v1.52.0
c9s Oct 2, 2023
51ac5dd
add v1.52.0 release note
c9s Oct 2, 2023
648b82e
use NewGetTransactionHistoryRequest for QueryTrades and use billID fo…
Oct 2, 2023
cc55d67
use default limit if not pass AND add more unit test
Oct 3, 2023
b1c6e01
use types.StrInt64 for billID and add more comment for QueryTrades() …
Oct 3, 2023
32b8ca9
Merge pull request #1312 from MengShue/add_two_new_receiver_for_okex
c9s Oct 4, 2023
f50d819
Merge pull request #1330 from c9s/narumi/fixedmaker/remove-atr
narumiruna Oct 4, 2023
d200232
add supported interval for okex
Oct 2, 2023
a833358
use interval [1m/3m/5m/15m/30m/1H/2H/4H] and [/6Hutc/12Hutc/1Dutc/2Du…
Oct 3, 2023
0b5ce23
fix lint and rename i with in
Oct 4, 2023
3b793b7
turn ToGlobalInterval to ToLocalInterval, use Map to turn to local in…
Oct 4, 2023
4700e75
maxapi: change default http transport settings
c9s Oct 4, 2023
42d2ffd
Merge pull request #1334 from c9s/c9s/max-http-transport
c9s Oct 4, 2023
2309bbd
print local interval in error message
Oct 4, 2023
78ea940
max: support private channel setter
c9s Oct 2, 2023
378425a
bbgo: add balance logger support
c9s Oct 2, 2023
590e164
fix: use MillisecondTimestamp instead
zenixls2 Oct 5, 2023
e01d89d
Merge pull request #1232 from zenixls2/feature/forceOrder
c9s Oct 5, 2023
a13c65e
Merge pull request #1332 from MengShue/add_supported_interval
c9s Oct 5, 2023
a40488b
add xfixedmaker strategy
narumiruna Oct 5, 2023
a0efa27
add randtrader strategy
narumiruna Oct 4, 2023
81ea074
check balances
narumiruna Oct 7, 2023
d8ff42d
Fix duplicate orders caused by position risk control
narumiruna Sep 27, 2023
4a6f6f7
add backtest config
narumiruna Oct 11, 2023
a7042c5
Merge pull request #1336 from c9s/narumi/randtrader
narumiruna Oct 11, 2023
10be0ec
Merge pull request #1331 from c9s/narumi/fixedmaker/x
c9s Oct 11, 2023
2f65793
Merge pull request #1327 from c9s/narumi/fix-position-risk
c9s Oct 11, 2023
a8d678a
rename randomtrader to random
narumiruna Oct 11, 2023
0a3baea
Merge pull request #1337 from c9s/narumi/rename-random
narumiruna Oct 11, 2023
a0a7b0f
grid2: set max retries
c9s Oct 11, 2023
d617bf8
Merge pull request #1338 from c9s/fix/add-grid2-max-retires
c9s Oct 11, 2023
ef582f6
pkg/exchange: support order book depth 200 on bybit
bailantaotao Oct 12, 2023
69b38fc
update xfixedmaker config
narumiruna Oct 12, 2023
20df2ef
Merge pull request #1335 from c9s/c9s/feature/private-channels
c9s Oct 12, 2023
42748d7
Merge pull request #1340 from c9s/narumi/xfixedmaker/config
narumiruna Oct 12, 2023
fb110a1
Merge pull request #1339 from bailantaotao/edwin/support-200-depth
bailantaotao Oct 13, 2023
ca80bdb
FEATURE: recover active orders with open orders periodically
kbearXD Sep 28, 2023
4c9b1e7
remove checker
kbearXD Oct 2, 2023
27294ac
FIX: fix some error and use chan to trigger active orders recover whe…
kbearXD Oct 6, 2023
1347c8e
grid2: refactor recoverActiveOrdersPeriodically
c9s Oct 9, 2023
5f9d020
grid2: improve some logging
c9s Oct 9, 2023
a39925b
grid2: invert if
c9s Oct 9, 2023
c6d4ebf
also sync orders already in active orderbook if the open orders are e…
kbearXD Oct 11, 2023
136c2cd
add open orders metrics
kbearXD Oct 11, 2023
de1a884
not add non existing open orders into active orderbook if updated in …
kbearXD Oct 12, 2023
c544937
add test and remove recovered atmoic bool
kbearXD Oct 13, 2023
badadaf
remove adjustQuantity from config
narumiruna Oct 13, 2023
4c69dcc
make rightWindow possible to be set as zero
c9s Oct 16, 2023
dfa3f7d
indicator: make right window optional
c9s Oct 16, 2023
d50e509
Merge pull request #1342 from c9s/improve/pivot-right-window-usage
c9s Oct 16, 2023
5ff3828
move to onAuth
kbearXD Oct 16, 2023
c257bc8
sleep 100ms to avoid DDOS
kbearXD Oct 17, 2023
243b90a
fix nil metrics error
kbearXD Oct 17, 2023
10daeab
FIX: [max] remove outdated margin fields
gx578007 Oct 17, 2023
ccb7308
fix
kbearXD Oct 17, 2023
98b2944
Merge pull request #1341 from c9s/narumi/random/amount
c9s Oct 17, 2023
3bc03ff
Merge pull request #1328 from c9s/feature/grid2/recover-active-order-…
kbearXD Oct 17, 2023
92396ca
bbgo: check symbol length for injection
c9s Oct 18, 2023
5c8c66a
Merge pull request #1343 from c9s/bhwu/max/remove-outdated-max-fields
gx578007 Oct 18, 2023
6b273ed
Merge pull request #1345 from c9s/c9s/fix-market-inject
c9s Oct 18, 2023
900db74
skip public session
narumiruna Oct 19, 2023
5dbb7bd
Merge pull request #1346 from c9s/narumi/xnav/skip-public
narumiruna Oct 19, 2023
51d86ca
pkg/exchange, types: support book stream on bitget
bailantaotao Oct 18, 2023
c268041
config: add logging sample config
c9s Oct 20, 2023
eb404a5
Merge pull request #1280 from c9s/feature/bitget
c9s Oct 20, 2023
f8c47f7
Merge pull request #1344 from bailantaotao/edwin/bitget/public-stream…
bailantaotao Oct 20, 2023
c9fca56
MINOR: remove profit entries from profit stats
kbearXD Oct 20, 2023
e9078a7
FEATURE: twin orderbook
kbearXD Oct 20, 2023
a18b1be
pkg/exchange: support market trade stream on bitget
bailantaotao Oct 19, 2023
09e2b84
Merge pull request #1347 from bailantaotao/edwin/bitget/public-stream…
bailantaotao Oct 20, 2023
2ef86e4
Update README.md
mishrasamiksha Oct 21, 2023
da5f8f5
Fixed a typo in README.md
saakshii12 Oct 22, 2023
7c1f090
Merge pull request #1352 from saakshii12/readme-fix
c9s Oct 22, 2023
7860bff
Merge pull request #1349 from c9s/feature/grid2/remove-profit-entries
c9s Oct 22, 2023
3150f6b
fix
kbearXD Oct 23, 2023
6b5dd65
go: update requestgen to v1.3.5
bailantaotao Oct 23, 2023
e03d97b
Merge pull request #1353 from bailantaotao/edwin/upgrade-rquestgen
c9s Oct 23, 2023
c977b8e
add lock to protect twin orderbook and add more comments
kbearXD Oct 23, 2023
e07fc9d
wip
go-dockly Oct 23, 2023
7d97f57
Merge pull request #1350 from c9s/feature/grid2/twin-orderbook
kbearXD Oct 24, 2023
3710c33
REFACTOR: rename file and variable
kbearXD Oct 23, 2023
a9d9ef3
Add AddSubscriber method on Float64Series
c9s Oct 24, 2023
4c16546
indicator: remove unnecessary zero value push
c9s Oct 24, 2023
3fcc21c
Merge pull request #1356 from c9s/c9s/fix-rma-zero-value-issue
c9s Oct 24, 2023
22a7232
fix duplicate rma value
narumiruna Oct 24, 2023
2a9fd10
add rma test cases
narumiruna Oct 24, 2023
4f35f21
Merge pull request #1357 from c9s/narumi/rma-test-cases
narumiruna Oct 24, 2023
3e5869c
remove zero padding from RMA
narumiruna Oct 24, 2023
7557579
Update CONTRIBUTING.md
sh4d0wy Oct 24, 2023
16f4d8d
Merge pull request #1358 from c9s/narumi/remove-zero-padding
c9s Oct 24, 2023
4b9d520
Merge pull request #1355 from c9s/refactor/grid2/rename-and-move
c9s Oct 24, 2023
ea98899
Merge pull request #1351 from mishrasamiksha/main
c9s Oct 24, 2023
2d6af10
Merge pull request #1360 from sh4d0wy/patch-1
c9s Oct 24, 2023
ab1bc99
FEATURE: prepare query trades funtion for new recover
kbearXD Oct 23, 2023
7e532f5
Updated README.md
rohan37kumar Oct 25, 2023
3d4a128
Merge pull request #1362 from rohan37kumar/main
c9s Oct 25, 2023
c611cfe
pkg/exchange: add a jumpIfEmpty to batch trade option
bailantaotao Oct 25, 2023
881db49
pkg/exchange: rename tradeRateLimiter to queryOrderTradeRateLimiter
bailantaotao Oct 25, 2023
d762366
Merge pull request #1364 from bailantaotao/edwin/make-jump-to-option
bailantaotao Oct 26, 2023
55d444d
pkg/exchange: add jumpIfEmpty opts to closed order batch query
bailantaotao Oct 26, 2023
8346297
extend v2 indicators
go-dockly Oct 26, 2023
8ddb31b
Merge pull request #1365 from bailantaotao/edwin/make-jump-to-option-2
bailantaotao Oct 26, 2023
7c27cb9
docs: fix typos in doc/development/adding-new-exchange.md
shresthasurav Oct 26, 2023
4189664
docs: fix typos in doc/development/release-process.md
shresthasurav Oct 26, 2023
fc9ce53
docs: fix typos in doc/development/series.md
shresthasurav Oct 26, 2023
c4f1af0
Merge pull request #1361 from c9s/feature/grid2/recover-preparation-f…
kbearXD Oct 26, 2023
f31d829
FEAUTRE: merge grid recover and active orders recover
kbearXD Oct 24, 2023
40ca323
merge recover logic
kbearXD Oct 26, 2023
67c0f6f
add psar, vol profile, obv v2 indicators
go-dockly Oct 26, 2023
0bd8ef1
add kdj v2 indicators
go-dockly Oct 27, 2023
2a85bbe
pkg/exchange: fix precision
bailantaotao Oct 27, 2023
e8c9801
adjust quantity by max amount
narumiruna Oct 27, 2023
ba7e26c
pkg/exchange: use NumFractionalDigits instead of math.Log10(Float64) …
bailantaotao Oct 27, 2023
d07b766
pkg/exchange: Use the same conn to avoid concurrent write issues.
bailantaotao Oct 27, 2023
32c75ea
Merge pull request #1370 from bailantaotao/edwin/update-low-level-pin…
bailantaotao Oct 27, 2023
39c3d23
pkg/exchange: support ping/pong
bailantaotao Oct 24, 2023
46b6577
Merge pull request #1363 from bailantaotao/edwin/bitget/add-ping
bailantaotao Oct 27, 2023
db1de0e
Merge pull request #1373 from c9s/narumi/xalign/max-amounts
narumiruna Oct 27, 2023
ca5c4a6
add trima, vortex, vwma, vwap v2 indicators
go-dockly Oct 27, 2023
8426d3b
chaikin money flow, trend line v2 indicators
go-dockly Oct 27, 2023
dcd837f
Merge pull request #1372 from bailantaotao/edwin/fix-precision
c9s Oct 28, 2023
d4a4982
Merge pull request #1367 from shresthasurav/patch1
c9s Oct 28, 2023
f63a406
address comments
go-dockly Oct 29, 2023
ad5f993
address comments
go-dockly Oct 30, 2023
8827bc4
Merge branch 'c9s:main' into feat/indicators
go-dockly Oct 30, 2023
be4c69c
Merge pull request #1368 from c9s/feature/grid2/merge-recover
kbearXD Oct 30, 2023
671772a
FIX: retry to get open orders only for 5 times and do not sync orders…
kbearXD Oct 30, 2023
d33240e
rename and simplify import
kbearXD Oct 30, 2023
3491b93
Merge pull request #1374 from c9s/feature/grid2/fix
kbearXD Oct 30, 2023
6f8bb93
address csvsource comments
go-dockly Oct 30, 2023
b8401ee
grammatical error in the code_of_conduct file
HimanshuMahto Oct 30, 2023
76f825f
refactor csvsource
go-dockly Oct 31, 2023
7c19bb9
submit one order at a time
narumiruna Oct 31, 2023
7c1060c
Merge pull request #1375 from HimanshuMahto/patch-1
c9s Oct 31, 2023
1d2e46e
trade: query trades from db paginately
ycdesu Oct 31, 2023
4bc177f
pkg/exchange: refactor get symbol api
bailantaotao Oct 31, 2023
3b02bd4
clean-up pr
go-dockly Oct 31, 2023
64cad56
grammatical errors in the README.md
HimanshuMahto Oct 31, 2023
451e183
continue to address comments
go-dockly Oct 31, 2023
102b662
pkg/exchange: support kline subscription on stream
bailantaotao Oct 31, 2023
ec8ff03
Merge pull request #1378 from bailantaotao/edwin/bitget/fix-symbollist
bailantaotao Nov 1, 2023
2cea089
pkg/exchange: add rate limiter for query ticker, account
bailantaotao Nov 1, 2023
98b4bd2
Merge pull request #1377 from c9s/narumi/rebalance/refactor
narumiruna Nov 1, 2023
a670ba7
Merge pull request #1381 from HimanshuMahto/patch-2
c9s Nov 1, 2023
470eb7d
cmd: skip reports for session has no trade
c9s Nov 1, 2023
7a48d00
backtest: return closed kline channel when empty symbol is given
c9s Nov 1, 2023
a8ddf9a
Merge pull request #1384 from c9s/c9s/backtest-minor-improvements
c9s Nov 1, 2023
de8f24c
Merge pull request #1382 from bailantaotao/edwin/bitget/refactor-tick…
bailantaotao Nov 1, 2023
00d4805
pkg/exchange: add query tickers api
bailantaotao Nov 1, 2023
9dc57f0
wall: refactor wall strategy with common.Strategy
c9s Nov 1, 2023
2ffc617
Merge pull request #1386 from c9s/c9s/refactor-wall-strategy
c9s Nov 1, 2023
8e76804
Merge pull request #1376 from c9s/feature/query-trades-pagination
ycdesu Nov 1, 2023
d42b227
Merge pull request #1385 from c9s/edwin/bitget/add-tickers-api
bailantaotao Nov 1, 2023
d758efc
Merge pull request #1380 from bailantaotao/edwin/bitget/add-kline
bailantaotao Nov 1, 2023
d685579
reduce PR size
go-dockly Nov 2, 2023
164065e
cleanup
go-dockly Nov 2, 2023
c8f1cf0
Merge branch 'c9s:main' into feat/indicators
go-dockly Nov 2, 2023
ffea490
fix buy quantity
narumiruna Nov 3, 2023
d4ac182
Merge pull request #1390 from c9s/narumi/rebalance/fix
narumiruna Nov 3, 2023
cdebcc9
add .env.local.example
c9s Nov 4, 2023
6cce5a2
grid2: respect s.BaseGridNum and add a failing test case
c9s Nov 3, 2023
e614741
grid2: add another test case for 0 baseGridNum
c9s Nov 3, 2023
e773bb0
Merge pull request #1391 from c9s/c9s/grid2-base-quote-fix
c9s Nov 6, 2023
ed11525
fixedpoint compare
go-dockly Nov 6, 2023
e44d211
Merge branch 'c9s:main' into feat/indicators
go-dockly Nov 6, 2023
ad0e9a6
Merge branch 'feat/indicators' of https://github.com/algo-boyz/bbgo i…
go-dockly Nov 6, 2023
f63fd8f
rename to BOLL
go-dockly Nov 6, 2023
cfd5440
bump go compiler to 1.20
go-dockly Nov 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/contracts
.env.*
/linode
/frontend
/desktop
/data
/output
13 changes: 13 additions & 0 deletions .env.local.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
SLACK_TOKEN=YOUR_TOKEN
SLACK_CHANNEL=CHANNEL_NAME

# DB_DRIVER="sqlite3"
# DB_DSN="bbgo.sqlite3"
DB_DRIVER=mysql
DB_DSN=root@tcp(127.0.0.1:3306)/bbgo

MAX_API_KEY=YOUR_API_KEY
MAX_API_SECRET=YOUR_API_SECRET

BINANCE_API_KEY=YOUR_API_KEY
BINANCE_API_SECRET=YOUR_API_SECRET
3 changes: 3 additions & 0 deletions .evans.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[default]
protoFile = ["pkg/pb/bbgo.proto"]
package = "bbgo"
Empty file added .gitattributes
Empty file.
4 changes: 4 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# These are supported funding model platforms

github: c9s
custom: [https://etherscan.io/address/0x5ed8508e3d046cbe9ff44d6063e29349000c8ddd]
60 changes: 60 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Docker Image

on:
workflow_dispatch:
inputs:
ref:
description: 'ref to build'
required: false
default: 'main'
push:
# Sequence of patterns matched against refs/tags
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
branches:
- "main"

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
# list of Docker images to use as base name for tags
images: |
yoanlin/bbgo
quay.io/yoanlin/bbgo
# generate Docker tags based on the following events/attributes
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to Quay Container Registry
uses: docker/login-action@v2
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
# tags: yoanlin/bbgo:latest
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta.outputs.tags }}
104 changes: 104 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: Go

on:
push:
branches: [ main ]
pull_request:
branches:
- "main"
- "v*"

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 15

strategy:
matrix:
redis-version:
- 6.2
go-version:
- 1.18
env:
MYSQL_DATABASE: bbgo
MYSQL_USER: "root"
MYSQL_PASSWORD: "root" # pragma: allowlist secret

steps:

- uses: actions/checkout@v2
with:
# lfs: 'true'
ssh-key: ${{ secrets.git_ssh_key }}

- uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-

- name: Set up MySQL
run: |
sudo /etc/init.d/mysql start
mysql -e 'CREATE DATABASE ${{ env.MYSQL_DATABASE }};' -u${{ env.MYSQL_USER }} -p${{ env.MYSQL_PASSWORD }}

- name: Set up redis
uses: shogo82148/actions-setup-redis@v1
with:
redis-version: ${{ matrix.redis-version }}
# auto-start: "false"

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}

- name: Install Migration Tool
run: go install github.com/c9s/rockhopper/cmd/rockhopper@v1.2.1

- name: Test Migration SQL Files For MySQL
run: |
rockhopper --config rockhopper_mysql.yaml up

- name: Test Migration SQL Files For SQLite
run: |
rockhopper --config rockhopper_sqlite.yaml up

- name: Build
run: go build -v ./cmd/bbgo

- name: Link Market Data
run: |
mkdir -p ~/.bbgo/cache
ln -s $PWD/data/binance-markets.json ~/.bbgo/cache/binance-markets.json
touch data/binance-markets.json

- name: Test
run: |
go test -race -coverprofile coverage.txt -covermode atomic ./pkg/...
sed -i -e '/_requestgen.go/d' coverage.txt

- name: TestDnum
run: |
go test -race -coverprofile coverage_dnum.txt -covermode atomic -tags dnum ./pkg/...
sed -i -e '/_requestgen.go/d' coverage_dnum.txt

- name: Revive Check
uses: morphy2k/revive-action@v2
with:
reporter: github-pr-review
fail_on_error: true

- name: Upload Coverage Report
uses: codecov/codecov-action@v3
with:
files: ./coverage.txt,./coverage_dnum.txt

- name: Create dotenv file
run: |
echo "DB_DRIVER=mysql" >> .env.local
echo "DB_DSN=root:root@/bbgo" >> .env.local

22 changes: 22 additions & 0 deletions .github/workflows/golang-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: golang-lint
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
permissions:
contents: read

jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.18
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.46.2
40 changes: 40 additions & 0 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Node.js CI

on:
push:
branches: [ main ]
paths:
- apps/backtest-report
- frontend
pull_request:
branches: [ main ]
paths:
- apps/backtest-report
- frontend

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [ 16.x ]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm install -g yarn
- name: Install
run: yarn install
working-directory: "apps/backtest-report"
- name: Build
run: yarn run next build
working-directory: "apps/backtest-report"
- name: Export
run: yarn run next export
working-directory: "apps/backtest-report"
- run: yarn export
working-directory: "frontend"
48 changes: 48 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Python

on:
push:
branches: [ main ]
paths:
- python

pull_request:
branches: [ main ]
paths:
- python

jobs:

build:
runs-on: ubuntu-latest

strategy:
matrix:
python-version: [ 3.8 ]

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install poetry
run: pip install poetry==1.1.13

- name: Install package
run: |
cd python
poetry install

- name: Test
run: |
cd python
poetry run pytest -v -s tests

- name: Lint
run: |
cd python
poetry run flake8 .
Loading