Commit Graph

5972 Commits

Author SHA1 Message Date
c9s
3ba1621590
xdepthmaker: simplify covered handler registration 2023-12-20 22:28:20 +08:00
c9s
58321e8aa5
xdepthmaker: update instance id format 2023-12-20 22:20:40 +08:00
c9s
eb36ed6926
xdepthmaker: remove the shared trade collector and order store, add mutex for covered position 2023-12-20 21:54:32 +08:00
narumi
7b121b10be rebalance on order filled 2023-12-20 20:35:43 +08:00
narumi
762a09042a graceful cancel orders 2023-12-20 20:26:34 +08:00
narumi
da02c926be fix profit stats and position 2023-12-20 20:21:34 +08:00
chiahung.lin
bfd9c8ac64 FEATURE: run state machine
FEATURE: support recover

FEATURE: add order into orderStore and recover position

recover position/budget

FEATURE: support recover budget
2023-12-20 16:02:37 +08:00
c9s
a4f996c963
Merge pull request #1393 from c9s/strategy/emacross
STRATEGY: add emacross strategy
2023-12-20 15:50:52 +08:00
c9s
311ba3b2ac
bollmaker: fix ema cross subscription 2023-12-20 12:09:19 +08:00
c9s
46329c3a24
bollmaker: add ema cross signal to bollmaker strategy 2023-12-19 22:17:33 +08:00
c9s
6a07af80d8
bollmaker: define EMACrossSetting 2023-12-19 22:04:24 +08:00
c9s
4894a59756
fixedmaker, liquiditymaker: update initialize method 2023-12-19 21:59:44 +08:00
c9s
3dd93b65db
emacross, scmaker: fix strategy initialization 2023-12-19 21:58:50 +08:00
c9s
6abb320bce
emacross: clean up and update config 2023-12-19 21:57:51 +08:00
c9s
85e87e10b6
cmd: add emacross to builtin 2023-12-19 21:57:51 +08:00
c9s
25c895bb09
add emacross strategy 2023-12-19 21:57:51 +08:00
c9s
ec4f43b100
bollmaker: support custom quantity 2023-12-19 21:55:38 +08:00
c9s
e855214073
bump version to v1.55.3 2023-12-18 22:42:20 +08:00
c9s
47b12edc4d
xdepthmaker: call bbgo.Sync on shutdown 2023-12-18 22:32:13 +08:00
c9s
84085e09b5
xdepthmaker: fix duplicated binding 2023-12-18 22:32:13 +08:00
c9s
2c9583cccb
xdepthmaker: remove redundant notification 2023-12-18 22:32:13 +08:00
c9s
882c1273b3
bbgo: pull out findPossibleMarketSymbols and add tests 2023-12-18 22:09:04 +08:00
c9s
671ce872c4
bbgo: fix and improve session UpdatePrice method 2023-12-18 22:01:11 +08:00
c9s
3ac862d122
bump version to v1.55.2 2023-12-18 18:00:40 +08:00
c9s
98468feb73
Merge pull request #1458 from c9s/feature/xdepthmaker
FIX: [xdepthmaker] final fix
2023-12-18 17:59:38 +08:00
c9s
841229518a
bitget: add more debug logs for orderEvent and tradeEvent 2023-12-18 16:31:04 +08:00
c9s
92aa7652d5
bbgo: add recordPosition log 2023-12-18 15:49:20 +08:00
chiahung.lin
eda072327c FIX: move common.Strategy to Initialize 2023-12-18 14:48:13 +08:00
c9s
038d180711
bitget: check bitget websocket trade id and order status 2023-12-18 14:44:33 +08:00
c9s
f19ed7abe0
xdepthmaker: initialize s.CrossExchangeMarketMakingStrategy in Initialize() 2023-12-18 14:31:51 +08:00
Edwin
c5decf9bf8 pkg/exchange: support v2 get asset api 2023-12-18 12:17:49 +08:00
c9s
3e6d6e10b3
all: move Initialize() call out, call it before the LoadState 2023-12-18 12:09:03 +08:00
c9s
19636ae429
bump version to v1.55.1 2023-12-15 19:20:01 +08:00
c9s
e7c3582334
fix: import tzdata package 2023-12-15 19:19:06 +08:00
c9s
8690977b5c
bump version to v1.55.0 2023-12-14 18:05:02 +08:00
c9s
2c7e42922b
Merge pull request #1429 from c9s/edwin/bybit/get-fee-rate-on-private-stream-only 2023-12-13 18:50:19 +08:00
chiahung.lin
e86b1bb90f REFACTOR: make all common.Strategy from pointer to value 2023-12-13 17:36:30 +08:00
c9s
6dd3766776
Merge pull request #1451 from c9s/feature/xdepthmaker
CHORE: [xdepthmaker] improve shutdown process
2023-12-13 16:47:01 +08:00
c9s
c870defd47
xdepthmaker: improve shutdown process 2023-12-13 16:29:07 +08:00
c9s
61fb795e37
Merge pull request #1450 from c9s/feature/xdepthmaker
IMPROVE: [strategy] xdepthmaker final fine-tune
2023-12-13 15:50:35 +08:00
c9s
c170eac991
bbgo: fix active order book graceful cancel checking logics 2023-12-13 15:25:52 +08:00
chiahung.lin
e3d51777d3 rename 2023-12-13 14:16:02 +08:00
chiahung.lin
092d5cfb07 FEATURE: cancel maker orders and open take profit order 2023-12-13 14:16:02 +08:00
c9s
115c2dc139
bbgo: refactor active orderbook 2023-12-13 14:00:53 +08:00
Edwin
29550f0013 pkg/exchange: we don't need the fee rate in the public stream 2023-12-13 13:53:58 +08:00
c9s
6cbb17fb76
all: refactor log formatter functions 2023-12-13 09:47:18 +08:00
c9s
f3ce4c2cc6
bitget: refactor debug function tool 2023-12-13 09:28:34 +08:00
c9s
b022a6119f
bitget: add bitget log prefix 2023-12-13 09:28:34 +08:00
c9s
cc3302816a
Merge pull request #1448 from c9s/c9s/fix-grid2-memory-leaks
FIX: [core] solve memory leaks
2023-12-13 09:01:56 +08:00
c9s
4e26b9d2ad
core: pull out cool trade period to a constant 2023-12-13 08:55:26 +08:00
c9s
21c8593c45
core: add exceededMaximumTradeStoreSize check 2023-12-12 18:26:51 +08:00
c9s
685f332495
core: enable trade store's trade pruning in NewTradeCollector 2023-12-12 18:26:51 +08:00
c9s
97c39921bd
core: adjust TradeExpiryTime to 3 hour 2023-12-12 18:26:51 +08:00
c9s
8025d05eac
core: log trades pruning 2023-12-12 18:18:34 +08:00
Edwin
c2724c4f62 pkg/exchange: fix price is zero when order not executed 2023-12-12 17:30:51 +08:00
c9s
c5282a8f9b
bitget: add more debug logs 2023-12-12 16:37:43 +08:00
c9s
158c48b807
bbgo: change verbose info log to debug log 2023-12-11 20:46:17 +08:00
c9s
8c6724b264
xdepthmaker: fix pricing book copy by avoiding using CopyDepth 2023-12-11 17:59:16 +08:00
c9s
9f14215ce8
bbgo: reduce logs 2023-12-11 17:59:02 +08:00
c9s
8c13092d8b
types: add slice book test for copy depth 2023-12-11 17:58:48 +08:00
c9s
98468b39c7
xdepthmaker: change priceHeartBeat alert to warning 2023-12-11 17:05:07 +08:00
c9s
cedd790066
xdepthmaker: add lastOrderReplenishTime to prevent replacing orders too frequent 2023-12-11 17:02:17 +08:00
c9s
de7eb8453b
xdepthmaker: refactor auth binding to bindAuthSignal 2023-12-11 17:00:25 +08:00
c9s
2c3ccdf030
xdepthmaker: more improvements
- place orders with balance quota calculation
- wait for authed event
- clean up open orders on start
2023-12-11 16:56:19 +08:00
c9s
3e382e00bf
Merge pull request #1443 from c9s/feature/xdepthmaker
IMPROVE: [bitget] improve order type handling
2023-12-08 15:34:54 +08:00
c9s
0a3269e38e
Merge pull request #1441 from c9s/c9s/fix-sync-since-time-override
FIX: fix since time override
2023-12-08 15:33:48 +08:00
c9s
b9c4002704
bitget: handle order type limit maker 2023-12-08 15:18:34 +08:00
c9s
c74ba4f406
Merge pull request #1440 from dydysy/fix_dot_calc
FIX: [indicator] Possibly incorrect assignment
2023-12-08 09:51:30 +08:00
c9s
33f0571511
bbgo: fix since time override 2023-12-08 09:38:43 +08:00
c9s
3048a13f0b
xdepthmaker: replace AtomicAdd with Add 2023-12-08 00:21:53 +08:00
c9s
ab3579700f
builtin: register xdepthmaker 2023-12-07 17:48:35 +08:00
c9s
cd06ffd21f
xdepthmaker: fix order call 2023-12-07 17:38:58 +08:00
c9s
214f9fe75e
bitget: improve bitget websocket depth subscription 2023-12-07 17:38:57 +08:00
c9s
e82605f658
xdepthmaker: skip test for dnum 2023-12-07 16:18:24 +08:00
c9s
35dabe8a72
xdepthmaker: fix aggregatePrice quantity issue 2023-12-07 16:18:24 +08:00
c9s
b8fb2ac478
bbgo: fix active orderbook symbol order grouping 2023-12-07 16:18:24 +08:00
c9s
f03ac52ce5
activeOrderBook: use orderMap instead of orderStore 2023-12-07 16:18:24 +08:00
c9s
d14527b5cf
xdepthmaker: apply FullReplenishInterval from config 2023-12-07 16:18:24 +08:00
c9s
25b04cb36c
xdepthmaker: add fullReplenishTicker 2023-12-07 16:18:24 +08:00
c9s
888a550c80
xdepthmaker: support partial maker order replenish 2023-12-07 16:18:24 +08:00
c9s
f21170aa5d
types: add order sorting by price 2023-12-07 16:18:23 +08:00
c9s
96f6f9e0d0
exchange/retry: add QueryOrderUntilCancelled 2023-12-07 16:18:23 +08:00
c9s
c2c1eca4c9
types: fix price heart beat alert tests 2023-12-07 16:18:23 +08:00
c9s
a82bc86455
xdepthmaker: update updateQuote method 2023-12-07 16:18:23 +08:00
c9s
2f1a700b89
remove xpuremaker 2023-12-07 16:18:23 +08:00
c9s
e0e9876902
improve price hart beat usage 2023-12-07 16:18:23 +08:00
c9s
46b3a81b07
xdepthmaker: add tests to the generateMakerOrders 2023-12-07 16:18:23 +08:00
c9s
263c0883d1
bbgo: solve the scale when unmarshalling the json 2023-12-07 16:18:23 +08:00
c9s
d123e89a1b
xdepthmaker: document covered position 2023-12-07 16:18:23 +08:00
c9s
1e27f53891
xdepthmaker: use hedge order executor 2023-12-07 16:18:23 +08:00
c9s
2c3792b290
xdepthmaker: update Validate() method 2023-12-07 16:18:23 +08:00
c9s
18968c67a1
xdepthmaker: remove disable hedge option 2023-12-07 16:18:23 +08:00
c9s
10a71d83f1
xdepthmaker: move global position profit handling 2023-12-07 16:18:23 +08:00
c9s
99723fc1f4
xdepthmaker: remove legacy s.activeMakerOrders 2023-12-07 16:18:23 +08:00
c9s
e0686d11c8
xdepthmaker: clean up duplicated code 2023-12-07 16:18:23 +08:00
c9s
6b28910139
xdepthmaker: refactor CrossSubscribe 2023-12-07 16:18:23 +08:00
c9s
ed63b23e2a
xdepthmaker: refactor CrossRun with CrossExchangeMarketMakingStrategy 2023-12-07 16:18:22 +08:00
c9s
e67fa19323
types: extend PeriodProfitStats fields 2023-12-07 16:18:22 +08:00
c9s
df2daf33a7
types: add PeriodProfitStats 2023-12-07 16:18:22 +08:00
c9s
53bf443b1d
xdepthmaker: first commit 2023-12-07 16:18:22 +08:00
chiahung.lin
6857734282 rename 2023-12-07 11:29:42 +08:00
chiahung.lin
2982be1cbc rename dca maker orders to open position orders 2023-12-07 11:27:28 +08:00
dydysy
05d446cb54 FIX: [indicator] Possibly incorrect assignment 2023-12-06 18:42:10 +08:00
chiahung.lin
c67737a6d6 use retry package 2023-12-06 16:16:17 +08:00
chiahung.lin
4aa6ea3a46 FEATURE: use notional based to crease dca maker orders 2023-12-06 11:28:45 +08:00
chiahung.lin
60003fc472 rename somme part 2023-12-06 11:28:45 +08:00
chiahung.lin
445f0f1c4c FEATURE: prepare open maker orders function 2023-12-06 11:28:45 +08:00
chiahung.lin
c906d6a74d rename variable 2023-12-06 11:27:06 +08:00
chiahung.lin
d54b7365dd FEATURE: use types.OrderMap to avoid missing and duplicated orders 2023-12-05 20:10:37 +08:00
chiahung
a1d98e25c6 FEATURE: use max v3 new open orders api 2023-12-05 19:57:00 +08:00
chiahung.lin
165e788c3d fix 2023-12-05 16:59:26 +08:00
chiahung.lin
9fab37a284 use getLaunchDate 2023-12-05 15:34:31 +08:00
chiahung.lin
21c037a877 FIX: fix list closed orders api limit 2023-12-04 20:01:54 +08:00
kbearXD
45c2ee0ed8
Merge pull request #1432 from c9s/chiahung/recover-with-origin-stats
FIX: use original status for recover
2023-11-30 15:10:52 +08:00
c9s
92b6ee0264
Merge pull request #1431 from c9s/narumi/fix-order-status-length
FIX: fix order status length
2023-11-30 14:02:29 +08:00
root
cdeb0bc908 FIX: format minimal profit to percent 2023-11-29 18:37:28 +08:00
root
a4ccad9463 FIX: deactivate exit when position in closing 2023-11-29 18:26:01 +08:00
c9s
4bf93b3bfa
Merge pull request #1430 from c9s/c9s/fix-is-newer-check
FIX: add executed quantity check when order status is partially filled
2023-11-29 17:52:39 +08:00
c9s
55cbe806d9
bbgo: fix isNewerOrderUpdate check and tests 2023-11-25 13:22:03 +08:00
c9s
326a0c6128
bbgo: replace update time check with isNewerOrderUpdate func call 2023-11-24 19:00:51 +08:00
c9s
6b27722b03
bbgo: rename func isNewerOrderUpdate 2023-11-24 19:00:51 +08:00
c9s
9e663916ed
bbgo: add test case for isNewerUpdateTime 2023-11-24 19:00:51 +08:00
c9s
8afd3c9ee1
bbgo: add test Test_isNewerUpdate 2023-11-24 19:00:51 +08:00
c9s
8f5f5dfeed
bbgo: add executed quantity check when order status is OrderStatusPartiallyFilled 2023-11-24 19:00:51 +08:00
chiahung
19be49fca8 FIX: use original status for recover 2023-11-24 14:17:19 +08:00
chiahung.lin
800148b271 remain only template part 2023-11-23 16:45:28 +08:00
chiahung.lin
aea3abae07 FEATURE: new strategy dca2 perparation 2023-11-23 16:32:34 +08:00
narumi
c30dd24550 fix order status length 2023-11-23 14:53:22 +08:00
kbearXD
75b8be5e17
Merge pull request #1405 from c9s/chiahung/grid2/use-rest-quote
FIX: [grid2] use rest quote to place the last order when opening grid
2023-11-23 12:46:53 +08:00
kbearXD
9722c3eb49
Merge pull request #1421 from c9s/feature/maxapi/get-closed-orders
FEATURE: use new max v3 api to query closed orders by timestamp
2023-11-23 12:46:30 +08:00
Edwin
dbac45aa76 pkg/util: rm retry 2023-11-21 18:01:21 +08:00
Edwin
87d763598f pkg/exchange: use backoff retry 2023-11-21 18:01:21 +08:00
Edwin
51718b6eb2 pkg/exchnage: add log rate limiter to stream event 2023-11-21 18:01:18 +08:00
chiahung
7cb8da08cd use asc as order by to query closed orders 2023-11-21 17:14:33 +08:00
chiahung
102eb61188 remove unused log 2023-11-21 17:06:20 +08:00
c9s
ae3f3e1f70
bump version to v1.54.0 2023-11-20 17:32:20 +08:00
c9s
c360c6045c
bbgo: call retry.QueryAccountUntilSuccessful in the startup time 2023-11-20 16:20:39 +08:00
c9s
7c59e3ddc4
bbgo: add setAccount for account mutex protection 2023-11-20 16:15:33 +08:00
c9s
3ea333fd52
bbgo: add DisableStartupBalanceQuery option 2023-11-20 16:14:09 +08:00
chiahung.lin
ce76ad3c03 use OrderByType 2023-11-20 15:32:04 +08:00
なるみ
08a09c2fee
Merge pull request #1408 from c9s/narumi/wise 2023-11-17 19:48:08 +08:00
c9s
eac0195815
bbgo: truncate trade buffer if it gets too large 2023-11-17 17:15:08 +08:00
c9s
c248b2a323
bbgo: remove local trade snapshot from db 2023-11-17 17:15:08 +08:00
c9s
e5033c093a
grid2: check order's original status for updating 2023-11-17 17:14:52 +08:00
c9s
5795a71111
binance,max: store original order status into the order struct 2023-11-17 17:14:52 +08:00
c9s
b307275e60
types: add order.originalStatus 2023-11-17 17:14:52 +08:00
c9s
fe9dc9a79d
bbgo: change pending update log level to info 2023-11-17 16:57:48 +08:00
c9s
3cfc810f8d
max: group the request building statement 2023-11-17 16:57:47 +08:00
c9s
d5fe13272e
service: log sync start time 2023-11-17 16:57:47 +08:00
c9s
f223703247
max: force type check on max.Exchange 2023-11-17 16:57:47 +08:00