Commit Graph

491 Commits

Author SHA1 Message Date
c9s
93ae65535d remove os and arch flags 2021-01-21 12:27:55 +08:00
c9s
5eaa8f0778 add IsWrapperBinary flag and fix persistence error 2021-01-21 12:27:21 +08:00
c9s
503df57e72 remove legacy cmd flags 2021-01-21 12:10:06 +08:00
c9s
45876968d9 let build config and legacy imports co-exists 2021-01-21 12:08:06 +08:00
c9s
5329ef8f25 refactor build config 2021-01-21 12:06:03 +08:00
c9s
26c128b3ab adjust rate limiter 2021-01-21 01:21:30 +08:00
c9s
e869e04092 use rate limiter for batch query 2021-01-21 01:02:43 +08:00
c9s
a73729fb17 split files for batch processor and margin settings 2021-01-21 00:58:02 +08:00
c9s
ad4f339b27 fix test case name 2021-01-21 00:54:59 +08:00
c9s
38bac10050 consider fee calculation 2021-01-21 00:49:01 +08:00
c9s
bfc8e511d0 simplify average cost calculation 2021-01-20 23:46:22 +08:00
c9s
16aa070120 assign base/quote currency to the position struct 2021-01-20 23:08:57 +08:00
c9s
8a08c406c3 check symbol for the position update 2021-01-20 17:37:23 +08:00
c9s
48dd697ce3 handling short-to-long and long-to-short position 2021-01-20 17:35:58 +08:00
c9s
c2a27b031e init position with loaded symbols 2021-01-20 16:30:44 +08:00
c9s
0051dbc78a add Position accessor 2021-01-20 16:29:15 +08:00
c9s
079fcf08e3 initialize position map 2021-01-20 16:28:27 +08:00
c9s
09d712416f add json struct tags 2021-01-20 16:15:34 +08:00
c9s
617f5119fd test trade profit calculation 2021-01-20 16:14:02 +08:00
c9s
169af63846 add more position tests 2021-01-20 16:10:20 +08:00
c9s
34148948ab add position and its tests 2021-01-20 16:08:14 +08:00
c9s
42811e8157 alias logrus as log 2021-01-20 02:45:50 +08:00
c9s
9280ec348f clean up pnl command
we should use environment to load the sessions
2021-01-20 02:45:13 +08:00
c9s
0e99d9bdcb move time.Sleep to batch processor to avoid rate limit 2021-01-20 02:32:55 +08:00
c9s
c79c7d1b11 fix margin order/trade sync 2021-01-20 02:09:12 +08:00
c9s
d3f6841a27 improve sync command for margin trades and orders 2021-01-20 01:46:17 +08:00
c9s
7520430b52 support margin api for query trades 2021-01-20 01:27:27 +08:00
c9s
1d8b7dc657 handle trade and order margin field 2021-01-20 01:24:29 +08:00
c9s
334eff4682 update sync service for margin fields 2021-01-19 23:33:06 +08:00
c9s
62f6d857b3 update compiled migrations package for margin columns 2021-01-19 23:31:13 +08:00
c9s
a6015fb3e2 add isMargin, isIsolated columns 2021-01-19 23:31:04 +08:00
c9s
2c1c9a046b tmp 2021-01-19 23:31:04 +08:00
c9s
677f4b93e6 add margin mode support to QueryOpenOrders 2021-01-19 23:31:04 +08:00
c9s
ad4226f35b support margin order creation 2021-01-19 23:31:04 +08:00
c9s
3eda64641e use exchange's margin option 2021-01-19 23:31:04 +08:00
c9s
7235100140 integrate submitMarginOrder api 2021-01-19 23:31:04 +08:00
c9s
f35e90a4f1 document marginSideEffect 2021-01-19 23:31:04 +08:00
c9s
5cab37488b move MarginSettings struct to a file 2021-01-19 23:31:04 +08:00
c9s
1c77de031a add extended margin fields to the order struct 2021-01-19 23:31:04 +08:00
c9s
f8a9610222 pass isolated margin symbol 2021-01-19 23:31:04 +08:00
c9s
f505c0e2c6 split go routine for keep alive and ping tickers 2021-01-19 23:31:04 +08:00
c9s
d4774f5f0e add IsolatedMargin option 2021-01-19 23:31:04 +08:00
c9s
310943d010 add isolated margin symbol option 2021-01-19 23:31:04 +08:00
c9s
48083151aa turning margin mode 2021-01-19 23:31:04 +08:00
c9s
e8fec434b5 cast exchange instance to margin exchange interface 2021-01-19 23:31:04 +08:00
c9s
3199c63d62 add margin mode 2021-01-19 23:31:04 +08:00
c9s
4002ec80d6 add public only field to the session config struct 2021-01-19 23:31:04 +08:00
c9s
c3db6db590 add margin option 2021-01-19 23:31:04 +08:00
c9s
1233035780 fix migration script 2021-01-19 23:11:07 +08:00
c9s
0bdfd0f04b check if err is nil 2021-01-18 21:59:02 +08:00
c9s
ddc33f633f check if err is nil 2021-01-18 21:57:57 +08:00
c9s
ad78f81b10 fix unique index for binance self trade 2021-01-18 16:48:47 +08:00
c9s
3db5c26416 improve transfer history layout 2021-01-15 14:24:24 +08:00
c9s
d96e6e8ccc use environment to configure database 2021-01-15 10:47:49 +08:00
c9s
1ce3244c17 drop the legacy migration command 2021-01-15 10:33:23 +08:00
c9s
293d889276 fix built-in migrations 2021-01-15 10:31:37 +08:00
c9s
d04e1e7816 refactory sync command and upgrade db automatically 2021-01-14 15:10:11 +08:00
c9s
ad567dc360 use mysql reformat dsn function to add parseTime parameters 2021-01-14 14:56:13 +08:00
c9s
cd9f2ba0e8 add compile migration files 2021-01-14 00:33:28 +08:00
c9s
6491166459 drop legacy pkg/migration 2021-01-14 00:00:05 +08:00
c9s
2699c32b38 add rockhopper 2021-01-13 23:53:36 +08:00
c9s
50cd6f7d68 change go-binance to github.com/adshao/go-binance/v2 2021-01-11 13:36:49 +08:00
c9s
653eba73c5 improve session error message 2021-01-09 19:47:21 +08:00
c9s
4a1af6f362 add check for PersistenceServiceFacade 2021-01-09 19:44:45 +08:00
c9s
93d71b5300 bbgo: session log error 2021-01-09 19:40:31 +08:00
c9s
995f9a9ea0 grid: add order amount field 2021-01-06 13:31:17 +08:00
c9s
92ab7e125a improve RegisterStrategy method to register strategy between cross and single 2020-12-31 17:14:47 +08:00
c9s
208c88cbd5 support single exchange trailingstop 2020-12-31 17:12:35 +08:00
c9s
87568ede70 reformat 2020-12-31 14:29:53 +08:00
c9s
395d3f17df grid: add long mode support 2020-12-31 13:54:32 +08:00
c9s
45e4d8c558 rename movingstop to trailingstop 2020-12-31 13:07:39 +08:00
c9s
25eab8e95f adjust log 2020-12-29 18:32:51 +08:00
c9s
f485c1ba7f fix grid strategy order placing 2020-12-29 18:18:32 +08:00
c9s
70479bfd16 binance: assign Isolated field 2020-12-29 17:26:22 +08:00
c9s
275aa9494a support canceling orders on max 2020-12-29 16:00:03 +08:00
c9s
9568b04328 fix log message 2020-12-28 16:24:57 +08:00
c9s
2932230fdb print out websocket error 2020-12-28 16:24:35 +08:00
c9s
d9e5ad4365 add event authenticated 2020-12-28 16:24:17 +08:00
c9s
f12e38b70e call cancelTrading defer 2020-12-21 15:47:20 +08:00
c9s
9db1c78171 add public only mode to backtest 2020-12-21 15:45:40 +08:00
c9s
f56318c9b6 add public only mode to stream 2020-12-21 15:43:54 +08:00
c9s
ce0e28708a add public only mode to binance stream 2020-12-21 15:26:05 +08:00
c9s
d4b99f41a4 reformat 2020-12-21 14:55:14 +08:00
c9s
39f5290634 shorten the log messages 2020-12-21 14:53:34 +08:00
c9s
a60529ee37 reload depth snapshot periodically 2020-12-21 14:43:40 +08:00
c9s
9223b2ba47 move FormatOrder to ExchangeSession since it depends on Market 2020-12-21 13:47:40 +08:00
c9s
3eae58322a add trade update callbacks and order update callbacks to order executor 2020-12-21 13:40:23 +08:00
c9s
e282a8a917 improve order submit loop 2020-12-17 17:54:48 +08:00
c9s
64dea71249 grid: use the default active order book order handler 2020-12-17 16:29:00 +08:00
c9s
6962582236 grid: add orders to the order store 2020-12-17 16:22:43 +08:00
c9s
9e1476dcb1 grid: improve position management by fixedpoint 2020-12-17 15:52:53 +08:00
c9s
1c7d3d5481 support max staging url orverride 2020-12-17 14:44:30 +08:00
c9s
728bf5fc81 bbgo: move some logs to debug level 2020-12-15 14:14:44 +08:00
c9s
63a5881d16 use golang.org/x/time for rate limiting 2020-12-15 14:04:27 +08:00
c9s
572f7a0e12 buyandhold: remove kline event debug log 2020-12-14 14:59:46 +08:00
c9s
6d15c629a7 fix buyandhold strategy 2020-12-14 14:40:31 +08:00
c9s
81c7d3c668 fix fmt import 2020-12-14 14:34:55 +08:00
c9s
cabd8f8dcb improve buyandhold strategy 2020-12-14 14:21:02 +08:00
c9s
321b4812ca supporting otp key restore from key url 2020-12-11 17:12:16 +08:00
c9s
fbb9d0d3ba show key URL 2020-12-11 17:08:06 +08:00