Commit Graph

1772 Commits

Author SHA1 Message Date
c9s
cec4b3dd1e add websocket message parser 2021-12-23 02:50:56 +08:00
c9s
3fb2e12c24 kucoin: add websocket types 2021-12-23 02:50:56 +08:00
c9s
1a3f9ed4b2 kucoin: use returned ping interval instead of default 2021-12-23 02:50:56 +08:00
c9s
730ce31e67 kucoin: implement NewStream 2021-12-23 02:50:56 +08:00
c9s
0a9575aaca kucoin: pull out ping worker 2021-12-23 02:50:56 +08:00
c9s
92076878cd kucoin: refactor ping worker 2021-12-23 02:50:56 +08:00
c9s
b0d4688528 kucoin: implement getEndpoint method 2021-12-23 02:50:56 +08:00
c9s
a4c9aea6c6 kucoin: refactor bullet url code 2021-12-23 02:50:56 +08:00
c9s
6cbccc9a3f kucoin: add websocket command 2021-12-23 02:50:56 +08:00
c9s
4303342841 kucoin: export ApiClient interface methods 2021-12-23 02:50:56 +08:00
c9s
c390bbc31d add generated files 2021-12-23 02:50:56 +08:00
c9s
2230b484a8 kucoin: add bullet service 2021-12-23 02:50:56 +08:00
c9s
7f92588883 kucoinapi: refactor api client 2021-12-23 02:50:56 +08:00
c9s
c8dd02335b kucoin: refactor and clean up 2021-12-23 02:50:56 +08:00
TonyQ
5645161403 exchange/okex: update QueryTickers behaviour 2021-12-23 01:29:43 +08:00
TonyQ
d7ac645253 exchange: update maskkey handling 2021-12-23 01:18:36 +08:00
Yo-An Lin
bcbf7c3f3b
Merge pull request #389 from tony1223/feature/388-bookticker
exchange/stream : implement booktickerupdate event for ftx and binance
2021-12-22 22:35:52 +08:00
TonyQ
16862e7208 exchange/stream : implement booktickerupdate event for ftx and
binance
2021-12-22 21:01:11 +08:00
Yo-An Lin
b2ffcb7993
Merge pull request #387 from narumiruna/narumi/rebalance/validate
strategy: rebalance: validate parameters
2021-12-22 10:52:37 +08:00
なるみ
4a8be9cc1a Fix log 2021-12-22 02:04:44 +08:00
なるみ
2999e41ef0 Validate config 2021-12-22 01:59:38 +08:00
なるみ
41d4001872 Add log 2021-12-22 01:59:25 +08:00
c9s
388cfe0854 kucoin: fix go 1.17 compatibility issue 2021-12-22 01:45:07 +08:00
c9s
3b5015e1ca kucoin: integrate list tickers 2021-12-22 01:34:24 +08:00
c9s
0b6e66348e kucoin: implement query tickers 2021-12-22 01:28:16 +08:00
c9s
c32f3ab2f3 add generate_symbol_map.go generator 2021-12-22 01:28:16 +08:00
c9s
bd5e956892 add kucoin to the exchange factory 2021-12-22 01:28:16 +08:00
c9s
58212290ad types: update market structure for doc comment 2021-12-22 01:28:16 +08:00
c9s
fce71cb37e implement QueryAccounts and QueryMarkets 2021-12-22 01:28:16 +08:00
c9s
62fa6dd274 implement get fills request 2021-12-22 01:28:16 +08:00
c9s
bace225470 binance: fix, call set time service only when key and secret is given 2021-12-22 01:27:25 +08:00
c9s
8b93aeeeb2 fix ewma truncation 2021-12-22 00:54:13 +08:00
Yo-An Lin
53f6ea6490
Merge pull request #384 from tony1223/feature/record-account
types: update account struct
2021-12-22 00:04:30 +08:00
TonyQ
06fc821b3d types: update account struct 2021-12-21 23:59:02 +08:00
Yo-An Lin
e0844459b9
Merge pull request #380 from tony1223/bug/kline-scan
backtest : finetune for kline scan logic to prevent hanging for
2021-12-21 22:47:50 +08:00
TonyQ
740989ca64 exchange/ftx: add more guard condition 2021-12-21 20:46:40 +08:00
TonyQ
f62235b94e backtest : finetune for kline scan logic to prevent hanging for
query
2021-12-21 20:44:20 +08:00
Yo-An Lin
1ab20e6397
Merge pull request #381 from narumiruna/maxamount
strategy: rebalance: adjust quantity by max amount
2021-12-21 20:20:44 +08:00
なるみ
531805a449 Adjust quantity by max amount 2021-12-20 23:46:22 +08:00
Andy Cheng
e4bdb1de06
strategy: allow setting the interval and the window for trigger MA 2021-12-19 18:28:47 +08:00
Andy Cheng
d281182432
strategy: fix support strategy criteria 2021-12-19 17:53:34 +08:00
Yo-An Lin
97f9285449
Merge pull request #376 from tony1223/bug/backtest-fix-auto-sync
backtest : fix auto sync missing the part from last db kiline to
2021-12-19 14:59:35 +08:00
austin362667
f9cf71cef3 indicator: add kline close volatility
indicator: add kline close volatility
2021-12-19 14:20:09 +08:00
TonyQ
711575c6d0 backtest : fix auto sync missing the part from last db kiline to
end time
2021-12-19 12:14:18 +08:00
なるみ
b144d8e107 feature: add volume weighted moving average indicator 2021-12-17 14:36:39 +08:00
TonyQ
3e45035ab1 database: sqlite3 issue fix
database: upgrade gosqllite3 version for increasing variable amount limit
	types: update kline starttime/endtime field to prevent sqlite3
	time parsing issue.

	fix #215
2021-12-15 14:34:31 +08:00
TonyQ
c0b9cc0f0b exchange: make ftx kline event more reliable 2021-12-15 11:23:07 +08:00
Yo-An Lin
05323f211f Merge pull request #368 from tony1223/feature/355-update-sync
backtest : auto sync
2021-12-15 01:39:19 +08:00
TonyQ
16933555b8 backtest : auto sync missing range 2021-12-15 01:26:05 +08:00
austin362667
ccd607ba28 binance: remove unsupported comments 2021-12-15 01:01:05 +08:00
austin362667
7f96fa8dde binance: add multierr 2021-12-15 01:01:05 +08:00
austin362667
bb592663ab binance: removed unsupport isolated futures trade 2021-12-15 01:01:05 +08:00
austin362667
a0130affe4 binance: add query orders & trades 2021-12-15 01:01:05 +08:00
TonyQ
20b03fe4a5 exchange: fix ftx for wrong last kline issue 2021-12-15 00:07:54 +08:00
austin362667
839bb6d0e8 binance: remove comments cuz not support isolated futures 2021-12-14 20:41:55 +08:00
Yo-An Lin
6c6eb252cc Merge pull request #363 from tony1223/feature/355-ftx-backtest 2021-12-14 16:09:16 +08:00
TonyQ
8eb3eede82 fix backtest (with review) 2021-12-14 16:02:54 +08:00
Yo-An Lin
d531e041dd Merge pull request #357 from narumiruna/rebalance
feature: add portfolio rebalancing strategy
2021-12-14 12:01:07 +08:00
TonyQ
51e23b6a0c Merge branch 'main' of github.com:c9s/bbgo into feature/302-record-assets-review 2021-12-14 10:39:51 +08:00
TonyQ
4eb5a099ae account: add nav_history_details and account_service for #302 2021-12-14 08:09:18 +08:00
なるみ
f320d78f2f Refactor 2021-12-14 02:18:08 +08:00
austin362667
d3526b2c71 binance: add SubmitFuturesOrder and related conversions 2021-12-13 23:19:14 +08:00
austin362667
36c6d39612 bbgo: add session Futures & types: add FuturesExchange 2021-12-13 23:16:58 +08:00
c9s
74811abb36 okex: rewrite okex api request with requestgen 2021-12-13 14:55:44 +08:00
c9s
e2937acb28 apply requestgen for CancelOrderRequest and CancelAllOrderRequest 2021-12-13 14:55:44 +08:00
なるみ
f494a0f514 Initial commit of rebalance strategy 2021-12-13 05:19:44 +08:00
Yo-An Lin
d847d223e3 Merge pull request #356 from c9s/feature/kucoin
refactor: apply requestgen
2021-12-13 02:14:05 +08:00
Yo-An Lin
a3215d6f31 Merge pull request #354 from austin362667/order-trade
binance: parse OrderTrade event stream & add futures client connection
2021-12-13 02:12:19 +08:00
c9s
34c2b342ba apply requestgen for CancelOrderRequest and CancelAllOrderRequest 2021-12-13 02:08:18 +08:00
c9s
c28833fba0 kucoinapi: use requestgen for list orders request 2021-12-13 01:53:00 +08:00
c9s
97b63f45d5 kucoin: rename receiver to r 2021-12-13 01:14:52 +08:00
c9s
22972953d0 use requestgen to generate the accessor methods 2021-12-13 01:11:15 +08:00
austin362667
04919e0fa4 binance: add futures exchange stream connection 2021-12-12 15:40:03 +08:00
austin362667
8ca60cec10 binance: add user stream event parser & toGlobalType converter 2021-12-12 15:39:06 +08:00
TonyQ
6915a0e573 ftx: update kline event handling for #318 2021-12-12 14:29:48 +08:00
austin362667
a21f3b11ba types: add PositionMap in std Stream & callbacks 2021-12-12 05:24:39 +08:00
Yo-An Lin
2e7b69320b Merge pull request #349 from c9s/feature/kucoin
feature: integrate kucoin api
2021-12-11 23:17:07 +08:00
c9s
de80a14715 kucoin: add cancel order command 2021-12-11 20:07:32 +08:00
c9s
95ecaa7a66 rename orderResponse to apiResponse 2021-12-11 20:02:35 +08:00
c9s
8a00509987 kucoin: check data pointer and return error 2021-12-11 19:44:07 +08:00
c9s
0c854a8a85 kucoin: add place order and list orders command 2021-12-11 19:40:53 +08:00
austin362667
1703fff8b2 types: refactor Position and related files 2021-12-11 19:16:16 +08:00
c9s
a9bc02ef3d kucoin: implement order placement and cancel api 2021-12-11 18:33:30 +08:00
c9s
4d57967664 kucoin: add orderbook api 2021-12-11 18:33:30 +08:00
c9s
18653aca7e kucoin: implement all ticker and get ticker api 2021-12-11 18:33:30 +08:00
c9s
50b79cb742 implement ListSymbols api 2021-12-11 18:33:30 +08:00
c9s
be7e9f551a add GetAccount api 2021-12-11 18:33:30 +08:00
c9s
c8ba3f7c1b kucoin: add query accounts api 2021-12-11 18:33:30 +08:00
c9s
cd69994647 kucoin: implement api client 2021-12-11 18:33:30 +08:00
Yo-An Lin
0c7bbba675 Merge pull request #346 from tony1223/bug/343-fee_currency_length 2021-12-11 10:57:17 +08:00
Yo-An Lin
3952acaf55 Merge pull request #342 from tony1223/bug/341-windows-issue 2021-12-11 10:47:41 +08:00
TonyQ
25d4b9a0b3 order: add is_futures field for #344 2021-12-11 10:45:21 +08:00
TonyQ
c38564dcc7 compile and update migration package 2021-12-11 10:40:11 +08:00
TonyQ
e5450492bb telegram: find USERNAME when USER env not found for windows. 2021-12-11 10:30:57 +08:00
Yo-An Lin
9f14d00f3c Merge pull request #340 from tony1223/feature/336-kline-table
backtest: add ftx kline table
2021-12-11 02:30:06 +08:00
Yo-An Lin
edcb8a3327 Merge pull request #339 from tony1223/bug/338-refine_client_order_id
orders: update client_order_id (client_id) column length
2021-12-11 02:29:31 +08:00
TonyQ Wang
776f82fcd5 Merge branch 'main' into feature/336-kline-table 2021-12-11 02:26:01 +08:00
TonyQ
8bb702223a orders: update client_order_id (client_id) column length for
#338
2021-12-11 02:23:39 +08:00
TonyQ
0fcc5e5edc compile and update migration package 2021-12-11 02:19:53 +08:00
Yo-An Lin
0cf72de21d Merge pull request #335 from tony1223/bug/334-ftx-ratelimit
ftx : fix #334 rate limit
2021-12-10 23:24:42 +08:00
TonyQ
5259bba5fe ftx : fix #334 rate limit 2021-12-10 23:08:26 +08:00
c9s
4665ae0e31 remove unused error return value 2021-12-10 15:03:43 +08:00
c9s
fe9b604d79 update ftx market mapping 2021-12-09 15:57:44 +08:00
c9s
06262f0172 check sync from time with start time instead of end time 2021-12-09 15:57:12 +08:00
c9s
61817e1e83 add startPrice and lastPrice in the backtest report
closes #321
2021-12-09 11:58:19 +08:00
c9s
ca85aa69e6 pull out global premium index type and funding rate type 2021-12-09 00:10:18 +08:00
c9s
71e043e4b2 move convertPremiumIndex to convert.go 2021-12-09 00:08:25 +08:00
c9s
fbae368e6c make getLaunchDate as a simple function 2021-12-09 00:06:46 +08:00
c9s
078c79d73f binance: refactor QueryMarkets 2021-12-09 00:05:36 +08:00
c9s
48612e2b13 reformat import lines and add fixme note 2021-12-09 00:01:33 +08:00
c9s
a0f46bf9b8 improve error checking, avoid using panic inside the constructor 2021-12-08 23:30:58 +08:00
c9s
2223ef088c add ftx, okex to the public exchange factory for backtest 2021-12-08 23:27:01 +08:00
c9s
7b290afc2a compile and update migration package 2021-12-08 19:57:55 +08:00
c9s
9413e0017d bump version to v1.20.0 2021-12-08 19:57:55 +08:00
Yo-An Lin
cf0cdf5b83 Merge pull request #320 from c9s/minor/integrate-binance-future-types
feature: integrate binance future types
2021-12-08 19:55:31 +08:00
c9s
874c7b39fa service: add is_futures fields to trade service 2021-12-08 19:38:16 +08:00
c9s
9b56e9e32b service: add is_futures fields to order service 2021-12-08 19:38:10 +08:00
c9s
5aa027f883 types: add is_futures field to the global trade 2021-12-08 19:37:27 +08:00
c9s
20e61d5b5c types: extend order fields for futures 2021-12-08 19:36:57 +08:00
TonyQ
3dff1acd79 finetune ftx for #318 2021-12-08 19:36:37 +08:00
c9s
b71d0f5b6e bump version to v1.19.4 2021-12-08 17:27:08 +08:00
c9s
d52edce40b fix markets info cache 2021-12-08 17:26:43 +08:00
c9s
08a264d4eb add futures exchange check in the markets cache 2021-12-07 21:29:40 +08:00
c9s
245905a25a remove unnecessary parent node assignment 2021-12-07 21:23:43 +08:00
c9s
f716dd12c0 re-arrange rb node fields for alignment 2021-12-07 21:22:11 +08:00
c9s
fb2204a86d share one neel object for all rbtree 2021-12-07 21:21:30 +08:00
c9s
aa21ea874a make rbtree properties in lower case 2021-12-07 21:16:40 +08:00
Yo-An Lin
3fb6d204aa Fix pointer check 2021-12-07 18:52:24 +08:00
c9s
da8b15d817 bump version to v1.19.3 2021-12-07 16:16:25 +08:00
c9s
5c23dfb14f bump version to v1.19.3 2021-12-07 16:16:02 +08:00
c9s
a6604174d9 bump version to v1.19.3 2021-12-07 16:15:12 +08:00
c9s
f61f89da65 bump version to v1.19.3 2021-12-07 16:15:00 +08:00
c9s
85b5c760ea bump version to v1.19.3 2021-12-07 16:14:32 +08:00
c9s
ecd67cf23e bump version to v1.19.3 2021-12-07 16:14:23 +08:00
c9s
70017101bb bump version to v1.19.3 2021-12-07 16:12:41 +08:00
c9s
1ff02b08ce add release note 2021-12-07 16:12:35 +08:00
c9s
ccd9d8c466 improve makefile for version target 2021-12-07 16:10:49 +08:00
c9s
522d1bd8bf bump version to 1.19.3 2021-12-07 16:03:32 +08:00
c9s
1de4e5ee4c grid: fix parameter checking for fixed amount 2021-12-07 15:37:37 +08:00
c9s
5ef1ee927b improve the error message 2021-12-07 15:23:09 +08:00
c9s
f1e3cc6049 add strict start time, sync time checking for preventing back-test failure
related to #311
2021-12-07 15:21:37 +08:00
c9s
132fe893e1 use stderr for verbose log 2021-12-07 14:45:20 +08:00
c9s
ca3f438288 show symbol name in the error message 2021-12-07 14:35:00 +08:00
c9s
ac08e9d3c2 bump version to v1.19.2 2021-12-06 18:34:27 +08:00
c9s
af837ea237 do not omit empty for field feeInUSD 2021-12-06 13:36:38 +08:00
c9s
5d6bd5a964 not to omit empty all fields 2021-12-06 13:34:39 +08:00
c9s
634ce6180b avoid using panic when order cancel failed 2021-12-06 13:32:08 +08:00
c9s
744af85a94 bump version to v1.19.1 2021-12-06 13:32:08 +08:00
c9s
93761ba5d9 bump version to v1.19.0 2021-12-06 01:51:34 +08:00
c9s
aeeecba8dc support different time format for backtesting 2021-12-06 01:50:50 +08:00