Commit Graph

5195 Commits

Author SHA1 Message Date
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
c9s
9e6cb0858e
indicator: simplify source, calculate binding 2023-06-01 07:58:58 +08:00
c9s
c9c13b2013
all: replace all Index(i) callers 2023-06-01 07:46:50 +08:00
c9s
5515f588e3
all: add parameter index to the Last method 2023-05-31 19:35:44 +08:00
c9s
2a074ba11b
floats: add Average method on floats.Slice 2023-05-31 16:30:19 +08:00
c9s
114e292d8f
indicator: rewrite RSI indicator 2023-05-31 16:30:04 +08:00
c9s
e58db43067
indicator: rename v2 indicators 2023-05-31 13:08:40 +08:00
c9s
ba0102e992
pivotshort: fix find pivot func call 2023-05-31 13:08:21 +08:00
c9s
266016a278
indicator: simplify ATR2 2023-05-30 13:53:59 +08:00
c9s
ebf9c43cd5
indicator: separate TR + RMA and ATR = TR + RMA 2023-05-30 13:51:00 +08:00
c9s
a887eaf542
indicator: fix the comment 2023-05-30 13:50:59 +08:00
c9s
811e624302
indicator: simplify and refactor atr2 2023-05-30 13:50:59 +08:00
c9s
f65d6267fc
indicator: refactor ATRStream 2023-05-30 13:50:59 +08:00
c9s
da15f47f17
indicator: refactor Float64Series and improve RMA2 2023-05-30 13:50:59 +08:00
c9s
1bf44720e2
indicator: update and clean up rma2 2023-05-30 13:50:59 +08:00
c9s
1450d193a4
indicator: refactor/add float64 series 2023-05-30 13:50:59 +08:00
c9s
e094f422fc
indicator: rename v2 indicator file 2023-05-30 13:50:59 +08:00
c9s
68570e1eeb
indicator: move EWMA2 to ewma2.go 2023-05-30 13:50:59 +08:00
c9s
8c7962f07f
indicator: move out subtract stream 2023-05-30 13:50:59 +08:00
c9s
f067c92733
floats: document LSM 2023-05-30 13:50:59 +08:00
c9s
e91142f4e9
indicator: rename func to floats.FindPivot 2023-05-30 13:15:47 +08:00
c9s
89aa63dd64
floats: add floats LSM 2023-05-30 13:15:47 +08:00
Yo-An Lin
67fe27774c
Merge pull request #1179 from c9s/c9s/refactor-indicator
FEATURE: new indicator API design
2023-05-29 17:06:16 +08:00
c9s
5ef7da8422
grid2: fix precheck 2023-05-26 16:09:07 +08:00
c9s
5bf204b890
indicator: support histrical price push 2023-05-26 15:18:43 +08:00
c9s
9fac61351d
all: rename Minus() to Sub() 2023-05-26 15:06:52 +08:00
c9s
648e99f52a
all: refactor and rename indicator.MACD to indicator.MACDLegacy 2023-05-26 15:06:52 +08:00
c9s
273659a870
grid2: update comment 2023-05-26 14:51:06 +08:00
c9s
8c09c9668a
grid2: improve base quote investment check 2023-05-26 14:49:56 +08:00
c9s
171e0678b6
indicator: remove underscore var 2023-05-25 22:19:14 +08:00
c9s
a994235300
indicator: move doc 2023-05-25 22:18:54 +08:00
c9s
bcf77141ca
all: re-design and refactor indicator api 2023-05-25 22:17:50 +08:00
Yo-An Lin
cf5d71b4bc
Merge pull request #1176 from c9s/c9s/grid2/base-quote
FIX: [grid2] fix base + quote calculation and add baseGridNumber config field
2023-05-25 14:45:45 +08:00
c9s
f7a5c84768
all: reformat code 2023-05-25 14:01:22 +08:00
c9s
8e426ca4bf
grid2: add last price == sell price case 2023-05-25 13:31:47 +08:00
zenix
508f42663d fix: some types in SeriesExtended are not supported 2023-05-24 19:47:36 +09:00
Yo-An Lin
862848721f
Fix placeSell condition 2023-05-24 17:52:14 +08:00
c9s
26cbd60a66
grid2: add one more test case for base + quote 2023-05-23 17:36:01 +08:00
c9s
1cf788c925
grid2: fix base + quote order placement and add test case 2023-05-23 17:34:03 +08:00
c9s
d5cf53ee94
grid2: fix comparison 2023-05-22 18:20:34 +08:00
c9s
ce2bd7ca7d
grid2: override placeSell if BaseGridNumber is defined 2023-05-22 18:13:51 +08:00
c9s
2046ccc791
grid2: pull out sell boolean var 2023-05-22 18:10:51 +08:00
c9s
0c6ef38ea3
grid2: apply baseGridNumber 2023-05-22 18:08:39 +08:00
c9s
f11d869d02
grid2: sub 1 only when num > 0 2023-05-22 17:26:22 +08:00
c9s
6ae5d2f33a
grid2: round down before the quantity calculation 2023-05-22 17:25:00 +08:00
c9s
a083ec8395
grid2: check numberOfSellOrders == 0 2023-05-22 17:20:16 +08:00
c9s
c93a3d14b3
grid2: round up minBaseQuantity 2023-05-19 16:46:17 +08:00
c9s
4c13171cb0
grid2: add more test for spec 2023-05-19 16:42:26 +08:00
c9s
3a2dbc934b
grid2: add TestStrategy_calculateBaseQuoteInvestmentQuantity test case 2023-05-19 16:37:44 +08:00
c9s
0c4cd7049f
grid2: rewrite the base+quote algo 2023-05-19 15:04:17 +08:00
c9s
86a99b5902
grid2: truncate max base quantity 2023-05-19 13:56:01 +08:00
c9s
c5e7a78067
types: add RoundDownQuantityByPrecision 2023-05-18 18:26:14 +08:00
c9s
0bb697bc1e
maxapi: move NewGetMarginLoanHistoryRequest method to the bottom of the file 2023-05-18 18:26:03 +08:00
c9s
2fe915f73a
types: add MarshalJSON method on strint64 2023-05-18 18:08:40 +08:00
c9s
9c6de12e19
types: add StrInt64 type for unmarshalling integer in string 2023-05-18 17:32:15 +08:00
c9s
b32d890860
bitgetapi: add GetFillsRequest 2023-05-18 15:59:16 +08:00
c9s
fce281b6a8
bitgetapi: add GetOrderHistoryRequest 2023-05-18 15:47:58 +08:00
c9s
312c8baeb3
bitget: add open orders request 2023-05-18 15:38:57 +08:00
c9s
ae1c1377ce
bitget: define OrderStatus 2023-05-18 15:37:01 +08:00
c9s
90f704bab0
bitgetapi: add get order detail request 2023-05-18 15:22:50 +08:00
c9s
51e05499b2
bitgetapi: add CancelOrderBySymbolRequest 2023-05-18 11:59:49 +08:00
c9s
0c887a6bfb
bitgetapi: add place order request api 2023-05-18 11:23:30 +08:00
c9s
a5a64fa6d4
bitgetapi: add getDepthRequest 2023-05-18 11:13:06 +08:00
c9s
cff98bc141
bitgetapi: refactor tests 2023-05-18 10:54:00 +08:00
c9s
3154961d72
bitget: add more public api tests 2023-05-17 18:04:24 +08:00
c9s
c347a2423a
bitget: update generated request files and fix account assets api data type 2023-05-17 17:53:24 +08:00
c9s
e31a6ca3c8
bitget: add GetAllTickers request 2023-05-17 16:56:39 +08:00
c9s
8932da7e3f
bitget: add get ticker request 2023-05-17 16:55:21 +08:00
c9s
b726a0e51d
bitget: add get server time request and get symbols request 2023-05-17 16:52:15 +08:00
c9s
2c88e197b6
bitget: add account api 2023-05-17 16:39:10 +08:00
c9s
feb20571e9
kucoin: split request files 2023-05-17 16:27:43 +08:00
c9s
71be12bfc3
bitget: adjust sign format 2023-05-17 16:23:39 +08:00
c9s
0886b287a4
bitget: make credential field in lower case 2023-05-17 14:45:53 +08:00
c9s
e23f4b5114
bitget: minimize api client code 2023-05-17 14:26:25 +08:00
c9s
f942f7afd8
okex: rename constant names 2023-05-17 13:45:38 +08:00
c9s
5f8bda7d72
bitget: add minimal bitget exchange 2023-05-17 13:43:21 +08:00
c9s
6bed2a31f6
all: refactor exchange factory to return the minimal implementation 2023-05-17 13:43:00 +08:00
c9s
b544d51772
types: split exchange interface 2023-05-17 13:24:04 +08:00
c9s
70ed672e6f
exchange: remove subAccount var 2023-05-16 19:26:05 +08:00