Commit Graph

2024 Commits

Author SHA1 Message Date
narumi
a0efa2769d add randtrader strategy 2023-10-07 12:36:32 +08:00
narumi
a40488b0a3 add xfixedmaker strategy 2023-10-06 12:58:47 +08:00
narumi
c5cd6bc95e fix common.Strategy.IsHalted 2023-09-29 01:51:02 +08:00
narumi
4b9c933df1 remove skew 2023-09-29 01:06:58 +08:00
c9s
2058ce808b
Merge pull request #1325 from zenixls2/fix/listenkeyexpired 2023-09-27 22:46:44 +08:00
zenix
08dad1c497 fix: replace json.Number with MillisecondTimestamp in types 2023-09-27 15:52:02 +09:00
c9s
d4330a7a32
atrpin: add minPriceRange config 2023-09-27 14:25:49 +08:00
c9s
e52e53aa42
refine atrpin strategy 2023-09-26 20:43:14 +08:00
zenix
2e4336a604 fix: listenKeyExpired event sends string timestamp 2023-09-26 18:41:15 +09:00
c9s
9fffa4a47f
add atrpin strategy 2023-09-26 15:32:55 +08:00
c9s
cf31796224
Merge pull request #1318 from c9s/narumi/common-risk
CHORE: add IsHalted method to common.Strategy for CircuitBreakRiskControl
2023-09-25 18:07:57 +08:00
c9s
94f6cefd70
grid2: improve active order recover logs 2023-09-25 17:43:38 +08:00
c9s
b6d0e3ef27
grid2: only do active order update when grid is recovered 2023-09-25 17:19:53 +08:00
narumi
4a231b10c6 pull out ishalted method 2023-09-21 15:06:09 +08:00
c9s
49e9c8bbcf
Merge pull request #1315 from c9s/narumi/fixedmaker/common
REFACTOR: use common strategy in fixedmaker
2023-09-21 14:35:53 +08:00
narumi
c8316a36a0 use common strategy in fixedmaker 2023-09-19 15:00:39 +08:00
chiahung
fdfa3639ff FEATURE: use retry query order until successful 2023-09-19 11:12:14 +08:00
chiahung
db376f8483 FEATURE: use quote quantity if there is QuoteQuantity in trade 2023-09-05 18:28:10 +08:00
bailantaotao
7461b60b6b
Merge pull request #1299 from bailantaotao/edwin/add-server-time
pkg/exchange: add time to SliceOrderBook
2023-09-05 16:36:20 +08:00
kbearXD
79d98e857d
Merge pull request #1295 from c9s/feature/grid2/amount-round-down
FEATURE: round down executed amount to avoid insufficient balance
2023-09-05 14:35:53 +08:00
なるみ
9c104f5776
Merge pull request #1297 from c9s/narumi/reset-profit-stats
FIX: reset profit stats when over given duration in circuit break risk control
2023-09-05 14:00:52 +08:00
narumi
57198cc6b0 fix: reset profit stats when over given duration in circuit break risk control 2023-09-01 18:57:40 +08:00
Edwin
412d0e0558 *: fix lint 2023-09-01 17:54:43 +08:00
c9s
e74da87e51
grid2: delay start process by 5s 2023-08-31 17:08:00 +08:00
c9s
f24bd3532c
grid2: add 5s delay and <10seconds jitter 2023-08-31 14:08:33 +08:00
c9s
7de6c3d8e4
grid2: add more update logs 2023-08-31 13:59:44 +08:00
c9s
cb0285544e
add lock to recoverActiveOrders 2023-08-31 13:48:56 +08:00
chiahung
9dc7244d8a FEATURE: round down executed amount to avoid insufficient balance 2023-08-31 12:40:01 +08:00
c9s
20bdf191c3
Merge pull request #1290 from c9s/c9s/grid-disconnect-recover
FEATURE: [grid2] update local active orders after re-connected
2023-08-21 18:16:05 +08:00
c9s
9105ebce78
deposit2transfer: fix err msg 2023-08-17 17:42:05 +08:00
c9s
c91861ca9a
bbgo: add order update time check 2023-08-17 17:31:24 +08:00
c9s
dda3f25c61
grid2,bbgo: refactor active order book and update order status when re-connected 2023-08-17 16:26:06 +08:00
c9s
5cc09dfb9a
deposit2transfer: improve log format 2023-08-16 12:26:01 +08:00
c9s
252f4fbccc
deposit2transfer: call QuerySpotAccount for getting the spot balance 2023-08-16 12:02:18 +08:00
c9s
255718a54a
deposit2transfer: apply rate limiter on checkDeposits 2023-08-11 19:11:18 +08:00
c9s
6103a9350f
deposit2transfer: add lastAssetDepositTimes for immediate success deposits 2023-08-09 15:54:28 +08:00
c9s
ece8cacd9e
deposit2transfer: use watchingDeposits instead of just deposits 2023-08-08 12:38:59 +08:00
c9s
4a28843a0a
deposit2transfer: fix mutex lock 2023-08-08 12:38:23 +08:00
c9s
073c4562fd
deposit2transfer: refactor deposit check and add more logs 2023-08-08 12:23:17 +08:00
c9s
29727c12be
add deposit2transfer config 2023-08-08 12:14:14 +08:00
c9s
423cb27288
deposit2transfer: add more log messages 2023-08-08 12:08:14 +08:00
c9s
241ce657c3
binance: remove isMargin check 2023-08-08 12:01:30 +08:00
c9s
c7845477b4
deposit2transfer: remove binance spot struct field 2023-08-08 11:58:36 +08:00
c9s
c55a6a46af
deposit2transfer: check confirmation for deposits 2023-08-08 11:20:17 +08:00
c9s
5f40dfa462
deposit2transfer: scan deposit history 2023-08-08 11:20:17 +08:00
c9s
0c6b68c4f6
add deposit2transfer strategy 2023-08-08 11:20:17 +08:00
c9s
85201d0b57
Merge pull request #1271 from c9s/c9s/strategy-convert
REFACTOR: apply market.GreaterThanMinimalOrderQuantity on both convert and xalign
2023-08-08 11:14:08 +08:00
c9s
c3cce05bdd
xalign: apply market.GreaterThanMinimalOrderQuantity on xalign 2023-08-05 16:49:25 +08:00
c9s
8b6a8aeb7b
convert: move moq check/adjustment to types.Market 2023-08-05 16:39:03 +08:00
c9s
616e9397d4
Merge pull request #1270 from c9s/c9s/strategy-convert
FEATURE: [strategy] Add convert strategy
2023-08-05 02:46:56 +08:00
c9s
4d293121d7
convert: fix pending quantity collector with trade query 2023-08-05 02:37:53 +08:00
c9s
bc8fe22e70
convert: fix collectPendingQuantity and use graceful order cancel 2023-08-05 02:15:16 +08:00
c9s
348c8a61e4
add convert strategy 2023-08-05 01:59:20 +08:00
Andy Cheng
1130417401
fix/supertrend: use strconv instead of fmt 2023-08-04 11:07:20 +08:00
c9s
cfd5884350
Merge remote-tracking branch 'origin/v1.50' 2023-08-01 13:23:04 +08:00
c9s
4560b47556
grid2: only for positive non-zero fee 2023-07-31 18:12:28 +08:00
c9s
43b8e7870d
grid2: ignore discounted trades 2023-07-31 18:06:20 +08:00
c9s
8a3c89ba91
autoborrow: fix marginAsset.Low calculation 2023-07-25 00:27:43 +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
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
afc5dbb951
Merge remote-tracking branch 'origin/v1.50' 2023-07-24 17:02:08 +08:00
c9s
3bd821261f
tri: fix lint issue 2023-07-22 18:06:53 +08:00
c9s
fad8642a59
xmaker: fix message 2023-07-22 17:34:09 +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
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
Andy Cheng
192d958adc
improve/linregmaker: use strconv 2023-07-17 12:22:09 +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
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
b1c1caa6af
tri: load test data from static file 2023-07-11 14:07:07 +08:00
Andy Cheng
1a90cd0322
improve/profitStatsTracker: rename InitOld() to InitLegacy() 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
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
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
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
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
b47da70909
Merge pull request #1223 from c9s/c9s/google-spreadsheet 2023-07-07 18:35:23 +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
631203c89e
tri: update symbol file 2023-07-05 16:46:43 +08:00
c9s
f06e37c44f
tri: ignore test in dnum mode 2023-07-05 16:02:11 +08:00
c9s
e19aa8fa10
add tri strategy 2023-07-05 15:51:16 +08:00
c9s
1ad10a9360
all: move trade collector to pkg/core 2023-07-05 15:26:36 +08:00
c9s
f1828beac8
all: move trade store and order store into pkg/core 2023-07-04 21:42:24 +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
0426c18757
scmaker: initialize order executor before we setup risk control 2023-07-03 17:39:42 +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
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
085114b244
grid2: add warning message when failed to acquire the lock 2023-06-30 11:07:02 +08:00
c9s
fc7edc5c80
grid2: call TryLock in updateGridNumOfOrdersMetricsWithLock 2023-06-30 01:05:18 +08:00
c9s
e3be2a8af6
bollmaker: replace bollinger indicator with v2 indicator 2023-06-29 18:04:39 +08:00
c9s
b6dba18f77
all: move retry functions to the retry package 2023-06-29 10:59:01 +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
de00e5fa88
scmaker: preload indicators 2023-06-19 17:03:38 +08:00