Commit Graph

1374 Commits

Author SHA1 Message Date
c9s
15ed802a54 util: add TimeProfile 2021-06-16 13:04:23 +08:00
c9s
e276ddd38a bbgo: add shared local time zone 2021-06-16 13:04:23 +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
2614b25de3 types: move fiat currency list to types 2021-06-16 13:04:23 +08:00
c9s
fd2928fc82 types: add maker/taker fee rate fields to the account struct 2021-06-16 13:04:23 +08:00
c9s
657e1dc9bf maxapi: pre-parse relative url and cache them 2021-06-16 13:04:05 +08:00
c9s
cbd0180939 maxapi: remove extra user agent header 2021-06-16 13:04:05 +08:00
c9s
16e5e08d58 maxapi: fix dump request error check 2021-06-16 13:04:05 +08:00
c9s
48c84824cf maxapi: volume, side, market is always required for creating orders 2021-06-16 13:04:05 +08:00
c9s
2da633c221 maxapi: add HTTP_TRANSPORT_IDLE_CONN_TIMEOUT env var for override 2021-06-16 13:04:05 +08:00
c9s
7c5b676366 maxapi: create an isolated http transport rather than the default one 2021-06-16 13:04:05 +08:00
c9s
684232041c maxapi: load http transport settings from env vars 2021-06-16 13:04:05 +08:00
c9s
b31b830b2b max: add request dump for debugging request 2021-06-16 13:03:45 +08:00
c9s
8c3992d514 max: no need to check order volume separately 2021-06-16 13:02:21 +08:00
c9s
fdf1ee9258 max: use precision -1 to trim zeros 2021-06-16 13:02:21 +08:00
c9s
a8eda62a8d max: set debug vars from env vars 2021-06-16 13:02:21 +08:00
c9s
990da5ad3b xbalance: add foreign fee for withdrawal 2021-06-09 01:37:33 +08:00
c9s
18f72a9118 fixedpoint: add more multiplication benchmarks 2021-06-09 01:37:29 +08:00
c9s
3d1d659c81 fixedpoint: add math/big version multiplication support 2021-06-09 01:37:24 +08:00
c9s
0df26e0570 binance: adjust listen key keep alive to 20 minutes 2021-06-09 01:37:19 +08:00
c9s
457ca79517 binance: for network error, we should retry the request 2021-06-09 01:37:14 +08:00
c9s
3c4eb5aec7 telegram: add more emojis 2021-06-09 01:37:09 +08:00
c9s
89c3df730b telegram: add emoji for greetings 2021-06-09 01:37:04 +08:00
c9s
ac71a392c6 fixedpoint: fix fixedpoint value int64 cast 2021-06-09 01:36:32 +08:00
c9s
ecf888dfd6 util: add env var util functions 2021-06-09 01:36:16 +08:00
c9s
ec6c10a96a binance: adjust read timeout and increase read buffer size 2021-06-09 01:36:06 +08:00
c9s
3fd170a4ff xmaker: check book before copying 2021-06-09 01:35:56 +08:00
c9s
f5a241a1a8 xmaker: improve warn message 2021-06-09 01:35:50 +08:00
c9s
a0d8a3718a xmaker: fix bid/ask price check 2021-06-07 02:50:11 +08:00
c9s
d5617d44aa xmaker: pass source market and maker market for formatting 2021-06-07 02:49:54 +08:00
c9s
0a74cc7171 xmaker: add useDepthPrice option 2021-06-07 02:49:44 +08:00
c9s
2486d04332 rbt: fix copyNode 2021-06-07 02:44:30 +08:00
c9s
5a5cb71a5e rbt: add more rbtorderbook test 2021-06-07 02:44:25 +08:00
c9s
062443a29c rbt: check if returned node is neel 2021-06-07 02:44:21 +08:00
c9s
3b0ed4e3dc rbt: add more test cases 2021-06-07 02:44:14 +08:00
c9s
9622956c71 rbt: fix rbtree search for neel 2021-06-07 02:44:09 +08:00
c9s
5d8f7b3ea6 rbt: fix preorder 2021-06-07 02:44:04 +08:00
c9s
7805dcd72e rbt: fix pointer check of iteration 2021-06-07 02:44:00 +08:00
c9s
9bc55def44 rbt: fix deleting, copy value to the deleting node's memory 2021-06-07 02:43:54 +08:00
c9s
f34631c7ae rbt: add pointer check 2021-06-07 02:43:50 +08:00
c9s
6d2771aca9 rbt: fix rightmost and leftmost 2021-06-07 02:43:43 +08:00
c9s
06bf0d0f2b rbt: fix rbtree deletion 2021-06-07 02:43:39 +08:00
c9s
103b1ea560 rbt: add rbt insert test 2021-06-07 02:43:34 +08:00
c9s
7512f56b84 rbt: avoid sharing rbtree neel pointer 2021-06-07 02:43:22 +08:00
c9s
f487b53d9e binance: fix client order id checking 2021-06-07 01:07:00 +08:00
c9s
5fd0ab4cd3 skip client order id when no client order is given 2021-06-07 01:03:21 +08:00
c9s
291fdbaf25 optimize max submit order api priority 2021-06-07 01:03:09 +08:00
c9s
f20e809940 types: add bestBidAndAsk method 2021-06-07 01:02:43 +08:00
c9s
e8205556ff show bbgo version name 2021-06-07 00:57:47 +08:00
c9s
b60fd9e356 support: fix quantity formatting 2021-06-07 00:57:47 +08:00
c9s
b9584117d6 add QueryLastFundingRate api to binance exchange 2021-06-01 03:15:19 +08:00
c9s
b5c4fc3e4e fix kline record insert fields 2021-06-01 01:39:23 +08:00
c9s
4bec8984c0 add klines columns 2021-06-01 01:39:23 +08:00
c9s
507ae934c0 compile and update migration package 2021-06-01 01:39:23 +08:00
c9s
f66095eff9 support: add target orders to the orders 2021-06-01 01:39:22 +08:00
c9s
e5db780be8 notify trades and update position 2021-06-01 01:39:22 +08:00
c9s
40c3a5870f support strategy improvements:
- add taker buy base volume ratio option
- add max base asset balance config
- add min quote asset balance config
- record orders and trades
2021-06-01 01:39:22 +08:00
c9s
6a999b2906 kline: show taker buy base volume and taker buy quote volume 2021-06-01 01:39:22 +08:00
c9s
4da7d3b50b fix side effect order type 2021-06-01 01:39:22 +08:00
c9s
bf73def701 binance: embed fixedpoint.Value into binance Balance struct 2021-06-01 01:39:22 +08:00
c9s
e3473572e9 types: add TakerBuyBaseAssetVolume and TakerBuyQuoteAssetVolume fields to kline 2021-06-01 01:39:22 +08:00
c9s
2925a77815 binance: use fixedpoint.Value for parsing floating number string 2021-06-01 01:39:22 +08:00
Jui-Nan Lin
7abd7225e1 fix(ftx): klines should not be empty 2021-05-31 22:56:26 +08:00
c9s
7ff4051c61 binance: fix websocket handshake 2021-05-30 18:20:14 +08:00
c9s
0b935eff4f fix connection lock call 2021-05-30 18:14:22 +08:00
c9s
69e76485c5 xbalance: fix ticker usage 2021-05-30 18:06:31 +08:00
Yo-An Lin
406f592963 Merge pull request #258 from c9s/feature/okex
feature: add okex exchange user data stream and public stream
2021-05-30 16:21:12 +08:00
c9s
8d12c9262f okex: move connection context cancel calls 2021-05-30 15:54:31 +08:00
c9s
d6bd33a682 okex: remove unused code 2021-05-30 15:53:43 +08:00
c9s
d112dbb1a4 binance: check connCancel only when new context is allocated 2021-05-30 15:53:01 +08:00
c9s
f9d4068145 binance: pull out listen key from stream and reduce critical section 2021-05-30 15:51:25 +08:00
c9s
d863766e00 fix quote quantity alignment 2021-05-30 15:51:00 +08:00
c9s
c84d59734c clear all trades before running backtests 2021-05-30 15:25:00 +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
38fd5422ab xmaker: use uncovered position 2021-05-30 14:46:48 +08:00
c9s
1a05f6fbd4 okex: pull read timeout and adjust to 30 seconds 2021-05-30 00:32:06 +08:00
c9s
9a68cfd288 xmaker: fix trade checking 2021-05-30 00:11:35 +08:00
c9s
d962dbe542 adjust read timeout 2021-05-29 20:40:47 +08:00
c9s
70284a8c0f xmaker: move notify trade 2021-05-29 01:41:29 +08:00
c9s
3789315214 show accumulated net profit 2021-05-29 01:38:44 +08:00
c9s
df10e175f9 xmaker: fix wording 2021-05-29 01:32:33 +08:00
c9s
e2561bde96 xmaker: add NotifyTrade option 2021-05-29 01:31:13 +08:00
c9s
65a38e56b8 slacknotifier: spawn notify worker as a go routine 2021-05-29 01:30:57 +08:00
c9s
6e0bc7c1e2 xmaker: use trade channel to buffer trades 2021-05-29 01:03:43 +08:00
c9s
33db0b5c6f xmaker: add trade stores for trade buffering 2021-05-29 00:28:13 +08:00
c9s
426a6157af okex: fix ping connection lock 2021-05-29 00:27:28 +08:00
c9s
64b9c78a5b okex: fix order detail segmentation 2021-05-29 00:27:05 +08:00
c9s
2a5ef30135 add ping worker to max 2021-05-29 00:26:53 +08:00
c9s
e11553139e binance: make convert functions private 2021-05-29 00:26:39 +08:00
c9s
8d31435ded add trade store 2021-05-29 00:25:23 +08:00
c9s
f49490f986 fix websocket ping/pong issue 2021-05-28 23:34:21 +08:00
c9s
002b28f75a okex: implement candlestick api and improve kline console format 2021-05-28 20:51:10 +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
d932a686a0 fix strategy market data stream usage 2021-05-28 03:15:29 +08:00
c9s
4f16f6b1f8 fix market data stream usage 2021-05-28 03:13:50 +08:00
c9s
b430128ba1 okex: fix okex order cancellation 2021-05-28 03:05:59 +08:00
c9s
29304d14ba okex: implement submit orders and cancel order api 2021-05-28 02:45:09 +08:00
c9s
6407eab9c1 okex: convert order details into trades and orders 2021-05-28 02:21:35 +08:00
c9s
19b700dfba okex: parse and convert account information 2021-05-28 01:14:11 +08:00