Commit Graph

234 Commits

Author SHA1 Message Date
c9s
fa2eb87268
fix: sync can be nil 2022-05-02 11:55:40 +08:00
c9s
2bdcf2266d
fix default sync logic 2022-05-02 10:39:59 +08:00
c9s
044470377b
avoid using the iterator variable 2022-04-27 17:13:58 +08:00
c9s
1c1fbb1633
bbgo: document strategy id and pnl field 2022-04-27 13:30:07 +08:00
c9s
5edaa9708c
bbgo: fix margin order/trade sync 2022-04-27 13:25:42 +08:00
c9s
2732fb413f
bbgo: remove slack debug option 2022-04-25 18:56:19 +08:00
c9s
a57a238e09
bbgo: add more sync options 2022-04-25 17:18:42 +08:00
c9s
ad373b95a7 add FLUSH_OTP_KEY env for flushing otp key 2022-04-17 00:35:16 +08:00
c9s
63f525970f auth: store otp key url instead of just secret 2022-04-17 00:18:48 +08:00
c9s
5db4e11167 rewrite trade profit handling 2022-03-14 21:21:58 +08:00
c9s
6fec30d79c call record position on trade 2022-03-14 21:21:58 +08:00
c9s
322f31a56a bbgo: improve RecordPosition method 2022-03-14 21:21:58 +08:00
c9s
5732555c2c doc: update sync configuration doc 2022-03-14 21:21:58 +08:00
c9s
08ae53ba16 bbgo: assign strategy instance id fields automatically 2022-03-14 21:21:58 +08:00
c9s
6088f7b542 bbgo: add RecordPosition method 2022-03-14 21:21:58 +08:00
c9s
9faaed6892 bbgo: initialize position service 2022-03-14 21:21:58 +08:00
c9s
f6ec2e78e6 record profits 2022-03-06 15:37:41 +08:00
c9s
35b0d8dc0d bbgo: add profit service to environment 2022-03-05 13:40:20 +08:00
c9s
c1ac738ca0 bbgo: add doc comment for parseStructAndInject 2022-03-05 12:59:47 +08:00
zenix
d9450e823e fix all the fixedpoint use other than strategy 2022-02-15 12:01:39 +09:00
c9s
3b630c0bca bbgo: pull out writer closure 2022-01-27 18:13:15 +08:00
c9s
cb507edf44 bbgo: add BindSync method on environment 2022-01-27 18:12:15 +08:00
c9s
70f02a1c19 cmd: handle user config sync options in the run command 2022-01-27 08:21:19 +08:00
c9s
01afe9c14e interact: fix telegram session restore 2022-01-23 02:21:26 +08:00
c9s
ad3f038dc6 bbgo: improve otp key layout 2022-01-23 02:21:26 +08:00
c9s
c7f15efb23 interact: add Slack interaction 2022-01-23 02:21:26 +08:00
c9s
0b8e5852eb check persistence error 2022-01-19 18:29:24 +08:00
c9s
b80f481e7d interact: fix interact tests for session 2022-01-16 00:50:43 +08:00
c9s
b49fc182dc fix telegram session persistence 2022-01-16 00:39:24 +08:00
c9s
2088234b44 interact: separate telegram user sessions 2022-01-16 00:25:11 +08:00
c9s
93722e6db3 implement position closer interaction 2022-01-15 02:52:46 +08:00
c9s
255ee40c98 bbgo: when calling order cancel we should use background context 2022-01-15 00:49:27 +08:00
c9s
77e92d544a bbgo: pull out interaction setup 2022-01-15 00:32:21 +08:00
c9s
e385d96709 bbgo: move authToken loader 2022-01-15 00:29:35 +08:00
c9s
3a13025d58 bbgo: change default notification rule -- silent order updates 2022-01-15 00:25:16 +08:00
c9s
d5f3946ada bbgo: refactor the current auth with interact 2022-01-15 00:18:07 +08:00
c9s
41b94c5c7e interact: refactor telegram interaction 2022-01-14 15:03:19 +08:00
c9s
fdf7ad9648 bbgo: rename auth function for general case 2022-01-14 13:41:43 +08:00
c9s
5bef7d8a1e interact: use interaction singleton 2022-01-14 13:31:31 +08:00
c9s
dd93ee4fd3 move methods to telegramnotifier 2022-01-14 13:31:31 +08:00
c9s
a2931da92c move math rand 2021-12-30 16:18:32 +08:00
c9s
05a0745d08 fix InitExchange for publicOnly session 2021-12-26 15:29:42 +08:00
c9s
ba8ebfe3a7 refactor and add doc comment for InitExchangeSession 2021-12-25 23:42:29 +08:00
c9s
57bc65a729 avoid calling EmitConnect and EmitStart outside of the kline feeding goroutine
this causes 2 goroutine running in the same time hence cause the
concurrent map read / write

should fix #399, #401
2021-12-25 21:05:50 +08:00
c9s
49e516b80e backtest: allocate public exchange (with empty key secret) for backtesting 2021-12-24 00:24:19 +08:00
TonyQ
4eb5a099ae account: add nav_history_details and account_service for #302 2021-12-14 08:09:18 +08:00
c9s
df683bdf56 use position to calculate the pnl 2021-12-05 02:17:15 +08:00
TonyQ
30c14a6828 fix #261 provide default config for notification setting 2021-12-04 02:37:21 +00:00
c9s
9a589bf71c show broadcast enabled 2021-11-25 18:49:29 +08:00
c9s
f5f96b585a apply broadcast option from config file 2021-10-15 16:10:39 +08:00
c9s
e23c459697 bbgo: move orderbook to the session level so that we can access it eaiser 2021-06-16 13:04:23 +08:00
c9s
3aa36b5989 refactor and fix backtest for user data stream and market data stream 2021-05-30 15:08:11 +08:00
c9s
5f18b89dfa if publicOnly is set, we should not connect user data stream 2021-05-28 19:01:55 +08:00
c9s
f190b1e66a fix market data stream initialization 2021-05-28 03:17:46 +08:00
c9s
b7c87c7744 core: move market data subscription to market data stream 2021-05-27 15:09:18 +08:00
c9s
45f1a13870 rename Stream field to UserDataStream and add MarketDataStream 2021-05-27 14:45:06 +08:00
c9s
2381df5009 add okex to the exchange factory 2021-05-27 00:35:51 +08:00
c9s
f6f1226bd0 integrate bollband indicator into xmaker 2021-05-17 20:04:13 +08:00
c9s
a49cf531b5 fix cross exchange order executor for the basic risk control 2021-05-12 19:02:09 +08:00
c9s
98e0390c1d improve slack notification 2021-05-12 12:43:03 +08:00
c9s
85e1b6b1c7 move field assignment 2021-05-12 12:05:54 +08:00
c9s
df11112d64 refactor exchange session initialization 2021-05-12 12:05:54 +08:00
c9s
8d63647104 assign session.Withdrawal 2021-05-12 12:05:54 +08:00
c9s
ce63641d70 print otp auth guide when session is loaded 2021-05-10 01:38:19 +08:00
c9s
6bbd66a4f9 split environment start and init 2021-05-08 00:45:24 +08:00
c9s
494a270c54 insert trades to db only when backtest service is nil 2021-05-07 01:50:38 +08:00
c9s
50db944053 fix initSymbol stages 2021-05-02 23:58:34 +08:00
c9s
2ec4617694 add SyncService check 2021-04-09 12:44:30 +08:00
c9s
34fe915a9f fix sync issue for pnl command 2021-04-09 12:43:13 +08:00
c9s
6c8babfb27 allow public session 2021-03-22 17:40:17 +08:00
c9s
2f7c7d344b move emitStart method call into the stream Connect method 2021-03-16 01:32:27 +08:00
c9s
7951c38edc skip connection if there is no subscription 2021-03-16 01:31:56 +08:00
c9s
e311a182fa add onStart callbacks 2021-03-15 18:04:03 +08:00
c9s
9f7af3ce82 assign SubAccount name to the new exchange session 2021-03-15 17:51:17 +08:00
c9s
e8ccc5eabf pass SubAccount field to the factory 2021-03-15 10:23:00 +08:00
c9s
4b49fda463 refactor sync service 2021-03-14 11:18:22 +08:00
c9s
b71ea867c5 ignore sync if sync service is nil 2021-02-28 15:05:49 +08:00
c9s
5a7cf05701 integrate reward service into the sync service 2021-02-23 16:39:48 +08:00
c9s
73cb80ee96 improve logging 2021-02-22 17:06:43 +08:00
c9s
eaad414706 adjust max api call rate limiting 2021-02-22 15:01:05 +08:00
c9s
724dad70bb remove trade sync from environ init 2021-02-22 14:14:39 +08:00
c9s
84775652fe remove defer wrapper func 2021-02-22 13:49:26 +08:00
c9s
63ebbc0e73 fix frontend sync status checking 2021-02-21 19:36:03 +08:00
c9s
3629a1f5a2 pre-save syncing var for return 2021-02-21 18:54:48 +08:00
c9s
a8516edb98 add Get method to the persistence service facade 2021-02-21 16:55:45 +08:00
c9s
21b092037e refactor notification configuration 2021-02-21 16:52:47 +08:00
c9s
6845db6dd3 refactor database configure method 2021-02-21 00:58:34 +08:00
c9s
12ed5a1efe move persistence service into the service package 2021-02-21 00:45:56 +08:00
c9s
7684099f01 add /api/environment/syncing api 2021-02-20 11:54:48 +08:00
c9s
4ce6e85624 add sync status to the environment 2021-02-20 11:29:33 +08:00
c9s
44fa74a4c9 refactor session sync 2021-02-19 10:42:24 +08:00
c9s
eaa8c647b5 refactor session sync 2021-02-18 22:40:46 +08:00
c9s
e3d3eacb78 fix trade service injection 2021-02-16 16:30:01 +08:00
c9s
de51eb29e4 refactor db stuff with database service 2021-02-06 11:22:04 +08:00
c9s
c35cef5b09 implement config saving api 2021-02-03 17:27:18 +08:00
c9s
8aa96c4546 integrate strateg adding api 2021-02-03 02:26:41 +08:00
c9s
17d5e301dc refine setup steps 2021-02-02 17:26:35 +08:00
c9s
73762d9888 support exchange session test from the setup wizard 2021-02-02 11:44:07 +08:00
c9s
ddcc8ae4ee move ExchangeOrderExecutor into exchange session 2021-02-01 20:44:15 +08:00
c9s
de8e717a41 refactor session initialization function 2021-02-01 20:44:15 +08:00