Commit Graph

1983 Commits

Author SHA1 Message Date
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
c9s
55b8413472
scmaker: when user data stream is ready, place liquidity orders 2023-06-19 15:38:55 +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
2448fa6f83
scmaker: add MaxExposure option 2023-06-19 13:46:45 +08:00
c9s
dc3901cc7f
xfunding: add more notificiation 2023-06-16 13:03:37 +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
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
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
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
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
0a7c0632c4
xalign: use %+v format for submit order 2023-06-13 17:08:37 +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
f6f3293191
xalign: round up requiredQuoteAmount 2023-06-09 11:04:31 +08:00