Commit Graph

5573 Commits

Author SHA1 Message Date
c9s
6691229809
fixedpoint: fix default fixedpoint conversion 2023-07-25 00:18:36 +08:00
c9s
4cb9ff569a
autoborrow: improve available balance checking 2023-07-25 00:16:05 +08:00
c9s
b7c9ef7983
types: add NotZero() method to filter non-zero balances 2023-07-25 00:11:08 +08:00
c9s
bfb1165304
autoborrow: fix debt checking condition 2023-07-24 23:01:22 +08:00
c9s
a2a062e95b
autoborrow: use debt instead of using b.Borrowed 2023-07-24 22:57:02 +08:00
bailantaotao
157de4b2ee
Merge pull request #1243 from bailantaotao/edwin/add-query-markets
FEATURE: pkg/exchange: add query market to bybit exchange
2023-07-24 21:52:31 +08:00
Edwin
3c32acc3ed pkg/exchange: add query market to bybit 2023-07-24 20:18:44 +08:00
c9s
a5a9512ef1
autoborrow: check available 2023-07-24 18:23:09 +08:00
c9s
f014213c85
autoborrow: log balances 2023-07-24 18:13:53 +08:00
c9s
106e98afaa
autoborrow: add more logs 2023-07-24 18:05:32 +08:00
c9s
8d8852ec00
bump version to v1.51.0 2023-07-24 17:03:52 +08:00
c9s
afc5dbb951
Merge remote-tracking branch 'origin/v1.50' 2023-07-24 17:02:08 +08:00
c9s
c42ad19955
Merge pull request #1241 from c9s/c9s/max-add-fee-discounted-field
FEATURE: [max] add fee discounted field support
2023-07-24 16:58:40 +08:00
c9s
c114477340
Merge pull request #1242 from c9s/c9s/fix-max-withdrawal-api
FIX: [max] fix MAX withdrawal address parameter name
2023-07-24 16:58:21 +08:00
bailantaotao
06a741e615
Merge pull request #1237 from bailantaotao/edwin/add-new-exchange-account-api
FEATURE: add new exchange Bybit GetAccountInfo/GetInstrumentsInfo api
2023-07-24 16:58:12 +08:00
Edwin
ac5e2cf712 pkg, types: add bybit to factor and update readme 2023-07-24 15:51:44 +08:00
Edwin
b45fdea99a pkg/exchange: add get account info and instruments info api for bybit 2023-07-24 15:51:41 +08:00
c9s
16c62bbcba
maxapi: fix max withdrawal api 2023-07-24 15:28:11 +08:00
c9s
9c20215f41
max: use fixedpoint.Value for field parsing 2023-07-24 15:00:03 +08:00
c9s
5f2ead4ffd
maxapi: parse fd field and optimize trade snapshot parsing 2023-07-24 14:57:50 +08:00
c9s
3bd821261f
tri: fix lint issue 2023-07-22 18:06:53 +08:00
c9s
2abd84aec9
core: pull out RecoverTrade method 2023-07-22 17:57:02 +08:00
c9s
fad8642a59
xmaker: fix message 2023-07-22 17:34:09 +08:00
c9s
c13a5cdf6e
core: add recover logs for the recovered trade count 2023-07-22 17:32:24 +08:00
c9s
70439f3fd9
xmaker: add tradeScanOverlapBufferPeriod time 2023-07-22 17:30:24 +08:00
c9s
941067670e
xmaker: pull out trade recover go routine 2023-07-22 17:29:16 +08:00
c9s
df1067d309
grid2: simplify removeDuplicatedPins 2023-07-22 11:45:30 +08:00
c9s
461735e043
grid2: add remove duplicated pins and pull out filter price prec func 2023-07-22 11:36:04 +08:00
c9s
b250bf94bc
rsicross: add more conditions to rsicross 2023-07-22 11:23:09 +08:00
Alan.sung
cba5663fac add unit test for okex exchange 2023-07-21 17:05:19 +08:00
c9s
a45c241b9b
types: turn off network error log 2023-07-20 17:05:53 +08:00
c9s
a3c16a4117
bbgo: use backoff for graceful cancel 2023-07-20 12:45:23 +08:00
c9s
f1a105cc06
fix iterate test 2023-07-20 12:45:23 +08:00
c9s
1dae711d33
fix trade collector race condition and infinite iterate 2023-07-20 12:45:23 +08:00
c9s
93d10eba5a
autoborrow: improve logging details 2023-07-19 16:58:51 +08:00
gx578007
bded2edaf2
FIX: [grid2] fix upper pin 2023-07-18 16:07:55 +08:00
gx578007
d99aa1f013 FIX: [grid2] fix upper pin 2023-07-18 15:54:23 +08:00
Andy Cheng
e37edb3056
Merge pull request #1198 from andycheng123/feature/profit-tracker
FEATURE: add ProfitStatsTracker
2023-07-18 11:40:26 +08:00
c9s
8f62665cfd
autoborrow: add another skip log 2023-07-18 11:08:34 +08:00
c9s
e6958f44f0
autoborrow: fix log message 2023-07-18 11:04:43 +08:00
c9s
a0145934ec
autoborrow: show min debt ratio in the message 2023-07-18 11:04:03 +08:00
c9s
3144b640ee
autoborrow: update account after repaying the debts 2023-07-18 11:01:21 +08:00
Andy Cheng
1773c8d155
fix/linregmaker: use float64() to output parameters 2023-07-18 11:00:02 +08:00
Andy Cheng
b9734bca0c
fix/linregmaker: missing line 2023-07-18 10:56:42 +08:00
c9s
84ec320601
autoborrow: show debt and total for debt ratio 2023-07-18 10:54:39 +08:00
c9s
844bd8be87
bitget: add account transfers request 2023-07-17 16:38:42 +08:00
Andy Cheng
192d958adc
improve/linregmaker: use strconv 2023-07-17 12:22:09 +08:00
Andy Cheng
08d8519e67
improve/profitStatsTracker: use SMA instead of SMA2 2023-07-17 12:10:48 +08:00
Andy Cheng
e5254e6446
improve/linregmaker: add profit report 2023-07-17 11:45:37 +08:00
Andy Cheng
bc4eae5e39
improve/supertrend: Switch of outputting patameters in profit report 2023-07-17 11:19:10 +08:00
c9s
f8051b3f2b
autoborrow: fix margin warning format 2023-07-14 13:22:42 +08:00
c9s
a9d0242a9d
strategy/autoborrow: add margin level alert 2023-07-14 13:19:54 +08:00
c9s
b9616a0805
add TradeCollector.Process() log message 2023-07-12 17:16:46 +08:00
c9s
885c58f77e
core/tradecollector: reduce critical section 2023-07-12 16:47:51 +08:00
c9s
baf431d7b6
riskcontrol: log on release position order 2023-07-12 16:17:22 +08:00
c9s
d6ade1f2fd
autoborrow: use context timeout handling 2023-07-12 15:07:51 +08:00
c9s
7781d5c70f
autoborrow: few improvements:
- return debt once and update the account
- add alert slack mentions
2023-07-12 15:01:15 +08:00
c9s
c54031b0e8
Merge pull request #1229 from c9s/c9s/indicator-cci-v2 2023-07-11 14:14:17 +08:00
c9s
b1c1caa6af
tri: load test data from static file 2023-07-11 14:07:07 +08:00
c9s
ce481ba52d
rewrite cci indicator in v2 indicator 2023-07-11 14:07:07 +08:00
Andy Cheng
e161deba25
improve/profitStatsTracker: use SMA v2 2023-07-11 11:13:13 +08:00
Andy Cheng
6e54972304
improve/profitStatsTracker: use CsvFormatter interface 2023-07-11 10:48:29 +08:00
Andy Cheng
1a90cd0322
improve/profitStatsTracker: rename InitOld() to InitLegacy() 2023-07-11 10:48:29 +08:00
Andy Cheng
928a77cb8b
improve/profitStatsTracker: use strconv instead of Sprintf() 2023-07-11 10:48:29 +08:00
Andy Cheng
2a80d708af
ref/profitStatsTracker: TradeCollector is move to core pkg 2023-07-11 10:48:29 +08:00
Andy Cheng
4c1639cf00
fix/profitStatsTracker: market is initiated after strategy Subscribe() 2023-07-11 10:48:28 +08:00
Andy Cheng
2ccce12cbf
improve/profitStatsTracker: temporarily remove lines relate to time in profit stats 2023-07-11 10:48:28 +08:00
Andy Cheng
ae7ae27d82
improve/profitStatsTracker: rename ProfitTracker to ProfitStatsTracker 2023-07-11 10:48:28 +08:00
Andy Cheng
bcbb27de79
improve/profitTracker: subscribe kline in strategy Subscribe() 2023-07-11 10:48:28 +08:00
Andy Cheng
80170e0397
improve/profitTracker: do not bind in order executor 2023-07-11 10:48:28 +08:00
Andy Cheng
5513330816
feature/profitTracker: fix bugs 2023-07-11 10:48:28 +08:00
Andy Cheng
027acfe3b5
feature/profitTracker: integrate profit report with profit tracker 2023-07-11 10:48:28 +08:00
Andy Cheng
a197352c6e
feature/profitTracker: use profitTracker in Supertrend strategy 2023-07-11 10:48:28 +08:00
Andy Cheng
57cdbb1d77
feature/profitTracker: add AddTrade() 2023-07-11 10:48:28 +08:00
Andy Cheng
d5e194ca80
feature/profitTracker: prototype 2023-07-11 10:48:27 +08:00
c9s
ee9a3269b6
indicator/v2: add SMA example 2023-07-11 10:31:20 +08:00
c9s
66dd5507d1
rename SMA2 to just SMA 2023-07-11 10:31:20 +08:00
c9s
1da94f55e9
Merge pull request #1226 from c9s/c9s/base-strategy
REFACTOR: pull out base strategy struct
2023-07-10 17:50:12 +08:00
c9s
630b0d476d
scmaker: use dot import to use v2 indicator DSL 2023-07-10 17:17:46 +08:00
c9s
5853434aec
all: move v2 indicator to indicator/v2 2023-07-10 17:17:46 +08:00
c9s
f71fcdee23
Merge pull request #1225 from c9s/c9s/nested-persistence
FEATURE: support nested persistence
2023-07-10 15:29:24 +08:00
c9s
3293866a6c
common: pull out RiskController 2023-07-10 15:27:36 +08:00
c9s
3b6cff8dc7
strategy: move risk control to common.Strategy 2023-07-10 15:24:07 +08:00
c9s
14664188a0
Merge pull request #1224 from c9s/c9s/google-spreadsheet
FEATURE: add google spreadsheet service support
2023-07-10 11:10:49 +08:00
c9s
12bb22ae87
rsicross: remove unused funcs 2023-07-09 21:24:56 +08:00
c9s
5c88abe72f
add rsicross strategy 2023-07-09 21:23:42 +08:00
c9s
7c2de46273
pkg: rename base -> common 2023-07-09 19:55:36 +08:00
c9s
c9c058e717
base: simplify naming 2023-07-09 16:04:27 +08:00
c9s
62d394d183
all: moving common strategy functionality to strategy/base 2023-07-09 15:48:07 +08:00
c9s
0891859b98
dynamic: support nested persistence 2023-07-09 15:11:09 +08:00
c9s
5962742b43
all: integrate google spread sheet service 2023-07-09 13:17:39 +08:00
c9s
b47da70909
Merge pull request #1223 from c9s/c9s/google-spreadsheet 2023-07-07 18:35:23 +08:00
c9s
e41d720867
service/google: support reflect conversion 2023-07-07 14:52:25 +08:00
c9s
9bec294aa1
service/google: fix appendCells call 2023-07-07 13:36:31 +08:00
c9s
f9eba64816
xfunding: always sync funding fee 2023-07-06 16:02:37 +08:00
c9s
dc16e0c299
xfunding: reset LastFundingFeeTime 2023-07-06 15:58:42 +08:00
c9s
e8922a4c3a
xfunding: support transferIn with zero quantity 2023-07-05 17:18:28 +08:00
c9s
f505dda80f
xfunding: handle reset transfer when starting up 2023-07-05 16:59:10 +08:00
c9s
f6a3be6ff5
xfunding: improve checkAndRestorePositionRisks 2023-07-05 16:48:19 +08:00
c9s
bd347d5aa5
xfunding: log positionRisks 2023-07-05 16:48:19 +08:00
c9s
e4ababd39e
xfunding: fix spot order parameters 2023-07-05 16:48:19 +08:00
c9s
12aad7b292
xfunding: log spot balance 2023-07-05 16:48:19 +08:00
c9s
a766d88d60
xfunding: fix balance check 2023-07-05 16:48:19 +08:00
c9s
017278826b
xfunding: log failed order 2023-07-05 16:48:19 +08:00
c9s
34d42afbec
xfunding: fix syncSpotPosition cancel order issue 2023-07-05 16:48:18 +08:00
c9s
2813ede7ed
xfunding: fix transferOut, and de-leverage the trade amount from the caller 2023-07-05 16:48:18 +08:00
c9s
e82341b2bd
xfunding: add more transfer logs 2023-07-05 16:48:18 +08:00
c9s
5d0bdd19e3
xfunding: always transfer balance out when reducing the futures position 2023-07-05 16:48:18 +08:00
c9s
c818f79932
fix 2023-07-05 16:48:18 +08:00
c9s
84e9b03be7
xfunding: show balance 2023-07-05 16:48:18 +08:00
c9s
7904c73c53
xfunding: use closePosition option when only dust left in the futures position 2023-07-05 16:48:18 +08:00
c9s
d730340b7a
remove diff quantity check 2023-07-05 16:48:18 +08:00
c9s
b59b42c3fa
Merge branch 'feature/tri' 2023-07-05 16:47:01 +08:00
c9s
631203c89e
tri: update symbol file 2023-07-05 16:46:43 +08:00
c9s
05a8a7442c
Merge pull request #1221 from c9s/feature/tri
FEATURE: add triangular arbitrate strategy as an example
2023-07-05 16:24:29 +08:00
c9s
f06e37c44f
tri: ignore test in dnum mode 2023-07-05 16:02:11 +08:00
c9s
1abb301af1
core: add order update trigger channel 2023-07-05 15:51:29 +08:00
c9s
e19aa8fa10
add tri strategy 2023-07-05 15:51:16 +08:00
c9s
b9b89756e2
Merge pull request #1220 from c9s/feature/scmaker-with-risk-control
REFACTOR: refactor risk control with the order executor interface and mocks
2023-07-05 15:48:38 +08:00
c9s
01096829ae
bbgo: drop empty files 2023-07-05 15:30:15 +08:00
c9s
fbc49c28ef
types: add PriceVolume.Equals method 2023-07-05 15:30:08 +08:00
c9s
1ad10a9360
all: move trade collector to pkg/core 2023-07-05 15:26:36 +08:00
c9s
ff727ae495
all: use order executor extended interface to mock the risk tests 2023-07-04 22:07:31 +08:00
c9s
f1828beac8
all: move trade store and order store into pkg/core 2023-07-04 21:42:24 +08:00
c9s
1f98731636
riskcontrol: add doc to PositionRiskControl 2023-07-04 21:33:40 +08:00
c9s
adbb6d7f93
riskcontrol: move parameter order 2023-07-04 21:32:34 +08:00
c9s
c8ae36ddfc
riskcontrol: move release position order submission into the pos risk control 2023-07-04 21:31:47 +08:00
c9s
f6ad784583
Merge pull request #1219 from c9s/feature/scmaker-with-risk-control
FEATURE: [scmaker] integrate risk control
2023-07-03 17:50:16 +08:00
c9s
0426c18757
scmaker: initialize order executor before we setup risk control 2023-07-03 17:39:42 +08:00
c9s
808d771748
Merge pull request #1218 from c9s/feature/scmaker-liq-skew
FEATURE: [scmaker] add liquiditySkew support
2023-07-03 17:23:20 +08:00
c9s
ae3f371551
all: refactor risk control and integrate risk control into scmaker 2023-07-03 17:09:13 +08:00
c9s
3052dd5add
scmaker: add liquiditySkew support 2023-07-03 16:22:01 +08:00
Andy Cheng
b877d07f74
exit/hhllStop: log hhll detection instead of notify 2023-07-03 16:06:04 +08:00
c9s
532b6f783d
types: remove unused Interval1ms 2023-07-03 15:27:37 +08:00
c9s
ea130e434c
types,cmd: add IntervalMap type to refactor the interval code 2023-07-03 15:14:48 +08:00
c9s
d60dbe5e0b
refactor interval slice code and add sort test 2023-07-03 15:07:34 +08:00
c9s
471df81b29
bump version to v1.50.1 2023-07-02 14:14:06 +08:00
c9s
3f7710303f
fix .Indicators nil map 2023-07-02 14:13:24 +08:00
c9s
334204b46a
bbgo: add deprecation warning 2023-07-01 13:26:57 +08:00
Andy Cheng
2fe19119a7
exit/hhllStop: avoid using underscore in variable names 2023-06-30 14:10:25 +08:00
Andy Cheng
12e3e9b5f8
exit/hhllStop: readability 2023-06-30 14:03:46 +08:00
Andy Cheng
936a3c95d9
exit/hhllStop: readability 2023-06-30 13:55:07 +08:00
Andy Cheng
43c49aa41d
exit/hhllStop: readability 2023-06-30 13:51:47 +08:00
Andy Cheng
3c0ade57f8
exit/hhllStop: fix bugs 2023-06-30 13:42:10 +08:00
c9s
daec6b5f30
bump version to v1.50.0 2023-06-30 12:02:40 +08:00
c9s
3929eb2090
Merge pull request #1214 from c9s/refactor/bollmaker
REFACTOR: [bollmaker] upgrade to indicator v2
2023-06-30 12:01:47 +08:00
c9s
e1affc746d
Merge pull request #1213 from c9s/feature/v2-indicator-set
FEATURE: add v2 indicator set api
2023-06-30 12:01:03 +08:00
c9s
fe9038106d
types: wrap pendingRemoval with lock 2023-06-30 11:41:13 +08:00
c9s
085114b244
grid2: add warning message when failed to acquire the lock 2023-06-30 11:07:02 +08:00
c9s
0e2f69e837
bbgo: just use else condition 2023-06-30 11:05:03 +08:00
c9s
a3a1586e24
bbgo: add TestIndicatorSet_EWMA test 2023-06-30 11:02:42 +08:00
c9s
ea1025d790
indicator: implement Subscribe method on PriceStream 2023-06-30 10:58:25 +08:00
c9s
775ad7d906
indicator: improve kline stream backfill 2023-06-30 10:58:07 +08:00
c9s
dcb091cab1
bbgo: add TestIndicatorSet_closeCache test 2023-06-30 10:46:40 +08:00
c9s
9885a68537
bbgo: rename AddBackLog to BackFill 2023-06-30 10:38:38 +08:00
c9s
064932ea9d
indicator: add VOLUME api 2023-06-30 10:37:42 +08:00
c9s
b29c1aa972
bbgo: add warning 2023-06-30 10:35:34 +08:00
c9s
77e31e9274
types: split pendingRemoval lock scope 2023-06-30 01:12:10 +08:00
c9s
fc7edc5c80
grid2: call TryLock in updateGridNumOfOrdersMetricsWithLock 2023-06-30 01:05:18 +08:00
c9s
5c5543d78a
bbgo: when err == nil, should just return the created orders 2023-06-29 21:08:43 +08:00
c9s
e3be2a8af6
bollmaker: replace bollinger indicator with v2 indicator 2023-06-29 18:04:39 +08:00
c9s
f91a4c2979
indicator: simplify add klines 2023-06-29 17:55:55 +08:00
c9s
eafd777046
add indicators v2 api to session 2023-06-29 17:49:04 +08:00
c9s
dddf7c57ba
bbgo: add v2 indicator set 2023-06-29 17:44:36 +08:00
c9s
2d9890a18f
bump version to v1.49.0 2023-06-29 17:19:22 +08:00
c9s
8a89408f0f
Merge pull request #1212 from randych521/randy/feat/riskcontrol-for-mm
FEATURE: add risk controls for strategies
2023-06-29 17:18:03 +08:00
c9s
ce40549e88
all: rename QueryOrderUntilSuccessful to QueryOrderUntilFilled 2023-06-29 17:17:32 +08:00
randy
9a98c4995e Add two risk controls for strategies: postion and circuit break. 2023-06-29 16:52:35 +08:00
c9s
c6f7723620
bbgo: rename env ENABLE_MARKET_TRADE_STOP to DISABLE_MARKET_TRADE_STOP
since we've set it default to true
2023-06-29 14:26:12 +08:00
c9s
3da145877f
Merge pull request #1206 from c9s/improve/concurrent-stop-loss
IMPROVE: improve stop loss methods
2023-06-29 14:25:02 +08:00
c9s
c4bd5a8a13
Merge pull request #1210 from c9s/refactor/move-retry-funcs
REFACTOR: move retry functions
2023-06-29 14:16:51 +08:00
c9s
2b65012b37
bbgo: openPosition should check if it's still closing 2023-06-29 13:29:31 +08:00
c9s
b6dba18f77
all: move retry functions to the retry package 2023-06-29 10:59:01 +08:00
c9s
131345a762
types: add TestPosition_SetClosing test 2023-06-28 18:13:11 +08:00
c9s
195ace63b0
check if it's in back testing mode 2023-06-28 18:11:00 +08:00
c9s
0360d9fa8b
block and query order until the market order for closing position is filled 2023-06-28 18:09:10 +08:00
c9s
b5f2f57678
bbgo: introduce ENABLE_MARKET_TRADE_STOP env var 2023-06-27 16:39:10 +08:00
c9s
5afd23b5c7
bbgo: trigger trailingStop when kline is updated 2023-06-27 16:39:10 +08:00
c9s
ac1b5aa0e2
bbgo: trigger price check when kline is updated (not just closed) 2023-06-27 16:39:09 +08:00
c9s
fdf2a91604
bbgo: enable enableMarketTradeStop 2023-06-27 16:39:09 +08:00
c9s
4bc41bad9d
bbgo: improve ProtectiveStopLoss notification message 2023-06-27 16:39:09 +08:00
c9s
02fa4d822a
cmd: fix persistent flags method call 2023-06-27 16:32:46 +08:00
c9s
37da9dee0e
cmd: add log formatter option and refactor the logrus setup code 2023-06-27 16:30:46 +08:00
c9s
e8fe8082cc
cmd: remove ftx options 2023-06-27 16:17:00 +08:00
gx578007
8e64b5293e MINOR: [grid2] delete order prices metric 2023-06-23 21:30:32 +08:00
c9s
c802fae211
xalign: add logger 2023-06-21 17:36:09 +08:00
c9s
f6128b9bdc
xalign: support percentage string 2023-06-21 15:59:15 +08:00
c9s
76884a4ddf
xalign: add balance fault tolerance 2023-06-21 15:56:59 +08:00
c9s
d4cf39430e
xgap: fix group id range 2023-06-20 17:18:15 +08:00
c9s
91a2c7255c
bump version to v1.48.4 2023-06-19 17:06:09 +08:00
c9s
833d942833
bump version to v1.48.4 2023-06-19 17:05:42 +08:00
c9s
de00e5fa88
scmaker: preload indicators 2023-06-19 17:03:38 +08:00
c9s
9b8c2b5ba4
bump version to v1.48.3 2023-06-19 15:39:34 +08:00
c9s
55b8413472
scmaker: when user data stream is ready, place liquidity orders 2023-06-19 15:38:55 +08:00
c9s
1f3a13808b
bump version to v1.48.3 2023-06-19 15:26:15 +08:00
c9s
f579fc7d93
scmaker: call cancel api before starting up 2023-06-19 15:25:10 +08:00
c9s
58a13507bc
scmaker: graceful cancel orders 2023-06-19 15:22:43 +08:00
c9s
6a5e35c065
bump version to v1.48.2 2023-06-19 14:57:46 +08:00
c9s
759dce1d5a
types: fix number() call 2023-06-19 14:51:37 +08:00
c9s
2448fa6f83
scmaker: add MaxExposure option 2023-06-19 13:46:45 +08:00
c9s
8360931497
fix test TestMarket_AdjustQuantityByMinNotional 2023-06-19 13:46:20 +08:00
c9s
46fecbbdeb
types: do not truncate quantity before adjustment 2023-06-16 15:35:07 +08:00
c9s
dc3901cc7f
xfunding: add more notificiation 2023-06-16 13:03:37 +08:00
c9s
e1c602c68f
bump version to v1.48.1 2023-06-16 08:39:24 +08:00
c9s
17931d179e
bump version to v1.48.1 2023-06-16 08:39:14 +08:00
c9s
8bd5fc246c
Merge pull request #1168 from andycheng123/profit-report-parameter
FEATURE: Accumulated Profit report
2023-06-15 18:14:44 +08:00
Andy Cheng
2ed5095ffb
feature/profitReport: pass 0 to Last() 2023-06-15 17:35:52 +08:00
Andy Cheng
6b46b1e01e
Merge branch 'main' into profit-report-parameter 2023-06-15 17:28:02 +08:00
c9s
a7b2051858
scmaker: fix the layer price 2023-06-15 17:26:04 +08:00
c9s
aa26dfaabc
bump version to v1.48.0 2023-06-15 15:03:09 +08:00
c9s
73726b91c7
scmaker: check ticker price and adjust liq order prices 2023-06-15 13:47:21 +08:00
c9s
148869d46b
scmaker: clean up 2023-06-14 17:31:01 +08:00
c9s
8344193e81
scmaker: rename liquidityLayerTick to liquidityLayerTickSize 2023-06-14 17:25:23 +08:00
c9s
372028ebe6
scmaker: truncate price with price precision 2023-06-14 17:25:23 +08:00
c9s
68c3c96b10
scmaker: fix balance lock and active order book update issue 2023-06-14 17:25:23 +08:00
c9s
f426d151a8
scmaker: final version 2023-06-14 17:25:23 +08:00
c9s
b8597a1803
scmaker: calculate balance quantity 2023-06-14 17:25:23 +08:00
c9s
aa4f998382
bbgo: add scale Sum method 2023-06-14 17:25:23 +08:00
c9s
40f8283616
scmaker: basic prototype 2023-06-14 17:25:23 +08:00
c9s
a28081a5d2
xalign: add more checks 2023-06-14 17:25:22 +08:00
c9s
0482ade44a
backtest: adjust best bid/ask price with tick size 2023-06-14 17:25:22 +08:00
c9s
fded41b0ea
indicator: fix macd test case since we changed the ewma default value 2023-06-14 17:25:22 +08:00
c9s
e529a3271d
indicator: fix ewma2 initial value 2023-06-14 17:25:22 +08:00
c9s
0a5f31a80f
indicator: rename BollStream to BOLLStream 2023-06-14 17:25:22 +08:00
c9s
295ae95da6
indicator: implement bollinger indicator 2023-06-14 17:25:22 +08:00
c9s
9d9f898f17
indicator: use pointer for float64series 2023-06-14 17:25:22 +08:00
c9s
ea3b1cc937
binance: fix logrus call 2023-06-14 17:25:22 +08:00
c9s
c00d7b669b
Merge pull request #1174 from c9s/feature/grid2/recover
FEATURE: [grid2] recover with twin orders
2023-06-14 13:02:12 +08:00
c9s
1fd52f78a9
xalign: allocate and bind order store 2023-06-13 23:23:41 +08:00
c9s
45aaad1629
xalign: improve update message 2023-06-13 23:21:07 +08:00
c9s
007f3c9531
autoborrow: add margin level check back 2023-06-13 23:17:24 +08:00
c9s
1855e52838
xalign: graceful cancel orders when shutting down 2023-06-13 17:29:19 +08:00
c9s
a126bc3bb6
binance: add market info warning 2023-06-13 17:09:37 +08:00
c9s
0a7c0632c4
xalign: use %+v format for submit order 2023-06-13 17:08:37 +08:00
c9s
36fa565460
types: add one more market tests 2023-06-13 17:08:28 +08:00
c9s
6308ef5107
autoborrow: repay debt first 2023-06-13 14:21:16 +08:00
c9s
476378e742
xalign:add one more dust check 2023-06-13 13:53:51 +08:00
c9s
599b18fc3c
xalign: skip dust quantity 2023-06-13 13:49:22 +08:00
c9s
358e873582
xalign: add notification 2023-06-13 13:47:01 +08:00
c9s
64dcef3429
xalign: fix tick size calculation 2023-06-13 13:44:31 +08:00
c9s
dadf22e48f
xalign: add more log 2023-06-13 13:40:39 +08:00
c9s
5a30bedc77
autoborrow: always repay first when it deposits 2023-06-13 13:23:10 +08:00
c9s
fe5a6f4c36
xalign: fix quote amount check 2023-06-13 12:42:07 +08:00
c9s
740cfe6d5c
xalign: fix session refs 2023-06-13 12:27:38 +08:00
c9s
909c8f5cc7
xalign: add more checks 2023-06-13 12:25:10 +08:00
c9s
518c6938be
xalign: add more checks 2023-06-13 12:25:04 +08:00
chiahung
49971a2e50 use existing interface 2023-06-12 17:15:56 +08:00
chiahung
18a7520fa7 MINOR: add test for recovery 2023-06-12 17:15:56 +08:00
chiahung
2f050332eb FEATURE: query trades until hard limit or finish filled 2023-06-12 17:15:56 +08:00
chiahung
f38cfb6ea3 REFACTOR: refactor for future test 2023-06-12 17:15:56 +08:00
chiahung
61892eb2df renaming 2023-06-12 17:15:56 +08:00
chiahung
93d35cc423 FEATURE: use TwinOrder to recover 2023-06-12 17:15:56 +08:00
c9s
5996b32ee1
Merge pull request #1194 from c9s/improve/hhllstop
IMPROVE: improve hhllstop message
2023-06-09 19:11:57 +08:00
c9s
f6f3293191
xalign: round up requiredQuoteAmount 2023-06-09 11:04:31 +08:00
c9s
8baafdf329
xalign: add DryRun and fix quote amount calculation 2023-06-08 23:15:26 +08:00
c9s
7a6000a316
xalign: fix instanceID 2023-06-08 18:05:58 +08:00
c9s
db43c87227
xalign: load interval from config 2023-06-08 17:02:06 +08:00
c9s
c9ee4e52cc
xalign: add xalign strategy 2023-06-08 17:02:05 +08:00
c9s
5dde93c487
Merge pull request #1192 from c9s/feature/indicator-improvements
IMPROVE: improve order executor error checking, trailing stop and indicators
2023-06-07 17:34:38 +08:00
c9s
c25ac65eb0
bbgo: improve hhllstop message 2023-06-07 16:45:46 +08:00
c9s
bd335a0335
bbgo: fix trailing stop order tag 2023-06-07 16:39:37 +08:00
c9s
0f141c7f79
schedule: add MinBaseBalance config 2023-06-07 16:36:38 +08:00
c9s
e0e27e75bb
schedule: graceful cancel orders before the next submission 2023-06-07 16:30:54 +08:00
c9s
f6a300a7c4
schedule: add useLimitOrder option 2023-06-07 16:27:36 +08:00
c9s
aa281b164e
bbgo: improve tradingStop message 2023-06-07 16:14:46 +08:00
c9s
9f5ef21dda
types: Add TradeWith helper 2023-06-07 16:14:46 +08:00
c9s
b90564be90
bbgo: fix order executor error message and add price check 2023-06-07 16:14:46 +08:00
c9s
ca78a3379a
indicator: add cross stream 2023-06-07 16:14:46 +08:00
c9s
7f3f2c1217
types: move cross result to a single file 2023-06-07 16:14:46 +08:00
c9s
24003139f4
types: fix return value var 2023-06-07 16:14:46 +08:00
c9s
97e7b93997
indicator: rewrite Multiply to make it consistent with Subtract 2023-06-07 16:14:46 +08:00
c9s
aae7fd310e
indicator: add ATRP indicator 2023-06-07 16:14:46 +08:00
Yo-An Lin
8a8111140e
Merge pull request #1188 from c9s/feature/v2-indicator-multiply
FEATURE: [indicator] add multiply operator
2023-06-01 21:28:29 +08:00
Yo-An Lin
c0bb953019
Merge pull request #1185 from c9s/c9s/fix-autoborrow
FIX: [autoborrow] add max borrowable check and add more notifications
2023-06-01 21:24:34 +08:00
Yo-An Lin
8792000be0
Merge pull request #1190 from c9s/feature/v2indicator-pivotlow 2023-06-01 21:20:22 +08:00
Yo-An Lin
e8b27c5044
Merge pull request #1186 from c9s/feature/v2-indicator-cma
FEATURE: [indicator] add v2 CMA indicator
2023-06-01 18:04:47 +08:00
c9s
15d1caef31
indicator: add pivothigh v2 indicator 2023-06-01 17:31:12 +08:00
c9s
9a486388fa
indicator: add v2 pivot low indicator 2023-06-01 17:17:14 +08:00
c9s
8a8edc7bb6
indicator: rename price.go to v2_price.go 2023-06-01 16:52:02 +08:00
c9s
0b01750528
indicator: drop unused code 2023-06-01 15:56:47 +08:00
c9s
b141ae3ece
indicator: add stddev v2 2023-06-01 15:19:12 +08:00
c9s
3d4b88fa7d
indicator: drop unused stddev code 2023-06-01 14:59:02 +08:00
c9s
b0abc1bf55
indicator: drop ssf unused func 2023-06-01 14:54:25 +08:00
c9s
66d99ce6ae
indicator: add stoch test 2023-06-01 14:52:09 +08:00
c9s
4f07a44b61
indicator: add v2 stochastic oscillator 2023-06-01 14:43:29 +08:00
c9s
1535572b43
indicator: add multiply operator 2023-06-01 14:30:16 +08:00
c9s
8ebf5723a7
indicator: add v2 CMA indicator 2023-06-01 14:27:03 +08:00
c9s
3e9458499c
indicator: fix tests 2023-06-01 12:39:30 +08:00
c9s
b55fbd5c96
autoborrow: check maxBorrowable 2023-06-01 12:27:39 +08:00
c9s
95e1f10934
autoborrow: send notify when auto repay is skip 2023-06-01 12:18:53 +08:00
c9s
fa0cb1e85f
binance: document balanceUpdate event 2023-06-01 12:17:45 +08:00
c9s
1dfb0cd1a1
autoborrow: notify balance delta event 2023-06-01 12:13:51 +08:00
c9s
f349f3620c
autoborrow: add SlackAttachment support to the binance balance update event 2023-06-01 12:13:22 +08:00
c9s
23a49a8fd2
indicator: fix klines stream emitter 2023-06-01 11:43:37 +08:00
c9s
9c43c75361
floats: fix floats.Slice truncate 2023-06-01 11:43:22 +08:00
c9s
e320e5d249
indicator: remove unused low value indicator 2023-06-01 08:56:17 +08:00
c9s
0da0b1086a
indicator: fix SMA truncate call 2023-06-01 08:33:14 +08:00
c9s
01ef6c2628
indicator: add v2 MACD 2023-06-01 08:28:49 +08:00
c9s
ee8bbe3418
indicator: add v2 sma 2023-06-01 08:11:30 +08:00
c9s
47e869a9f7
floats: add Truncate method support to floats slice 2023-06-01 08:11:19 +08:00