Commit Graph

873 Commits

Author SHA1 Message Date
Yo-An Lin
f37e407f99
Merge pull request #614 from jessy1092/ftx-support-interval
ftx: Let FTX support 4hr interval
2022-05-16 01:43:17 +08:00
Lee
8797e18959 ftx: Let FTX support 4hr interval 2022-05-16 01:23:38 +08:00
zenix
71fe6c2d26 feature: SLTP from bookticker. fix: bookTicker typename, depth buffer error message 2022-05-12 19:43:04 +09:00
zenix
c81af9ce91 fix: binance futures sync issue 2022-05-09 15:04:51 +09:00
c9s
3af08abef2
ftx: fix ftx api get markets request 2022-05-08 18:36:25 +08:00
Yo-An Lin
c3c35c2240
Merge pull request #575 from c9s/feature/binance-margin-load-api
feature: binance: add get deposit address request
2022-05-06 11:53:50 +08:00
c9s
019e6a2a88
improve legacy state handling and move fnv 2022-05-05 14:39:29 +08:00
c9s
f65ecbdbb5
max: add net asset field to max's balance 2022-05-04 21:43:59 +08:00
c9s
c4e1cd9480
binanceapi: add GetForceLiquidationRecordRequest api 2022-05-04 16:27:28 +08:00
c9s
2008f179a2
binance: add GetDepositHistoryRequest 2022-05-04 16:27:28 +08:00
c9s
ed8ff89f34
binance: add type alias from github.com/adshao/go-binance/v2 2022-05-04 16:27:28 +08:00
c9s
434434c8d9
binanceapi: add withdraw request 2022-05-04 16:27:28 +08:00
c9s
0fd560d699
binance: add NewGetDepositAddressRequest api 2022-05-04 16:27:28 +08:00
c9s
c3c1666154
binance: add get deposit address request 2022-05-04 16:27:28 +08:00
Yo-An Lin
81ce9218b5
Merge pull request #580 from c9s/fix/okex-rate-limit
fix: fix okex rate limit
2022-05-03 12:40:46 +08:00
c9s
eb10889d35
okex: fix okex rate limit 2022-05-03 12:11:50 +08:00
c9s
b611a42bd9
kucoin: fix kucoin rate limit 2022-05-03 12:11:02 +08:00
c9s
d742aea633
okex: fix kline query 2022-05-03 11:14:53 +08:00
Yo-An Lin
a954f0e595
use time.UTC instead of time.Local 2022-04-29 14:06:22 +08:00
c9s
1f736d1f5e
binance: update stream order fields 2022-04-27 14:43:39 +08:00
c9s
ce6fd387be
remove unused ConvertTrades 2022-04-27 14:29:58 +08:00
c9s
23dd60728e
binance: fix error check 2022-04-26 16:51:41 +08:00
c9s
6c29e10caf
binance: improve binary error check 2022-04-26 16:43:40 +08:00
c9s
cbec4ac199
binance: improve query trades conditions for start time and end time 2022-04-26 15:58:12 +08:00
c9s
a57a238e09
bbgo: add more sync options 2022-04-25 17:18:42 +08:00
c9s
76012f0b71
max: deposit request currency field is optional 2022-04-25 16:27:07 +08:00
c9s
c70317af2b add autoborrow strategy 2022-04-23 15:00:04 +08:00
c9s
a1c9bd7ec8 all: add AccountTypeIsolatedMargin 2022-04-23 12:51:07 +08:00
c9s
98a696a7d0 all: calculate MarginTolerance 2022-04-23 12:51:07 +08:00
c9s
76733898db binance: add QueryMarginAssetMaxBorrowable api 2022-04-23 12:51:07 +08:00
c9s
37b5d80f6f add margin repay and borrow api 2022-04-23 12:51:07 +08:00
c9s
c2d1ef0fc8 add margin borrow endpoint 2022-04-23 12:51:07 +08:00
c9s
a8fdd8006c binance: add transferCrossMarginAccount method 2022-04-23 12:51:07 +08:00
c9s
ecc19e1efd binance: assign more margin fields to account 2022-04-23 12:51:07 +08:00
c9s
cf2e8c9f0a all: extend balance field for margin 2022-04-23 12:51:07 +08:00
c9s
fbe1906e70 binance: add more fields to the balance struct 2022-04-23 12:51:07 +08:00
c9s
304cc89f68 binance: always sort trades back 2022-04-23 12:51:07 +08:00
c9s
2f5f02523f fix typpo 2022-04-23 00:10:27 +08:00
c9s
9e06053c3b max: rewrite and rename private trade request 2022-04-21 14:56:20 +08:00
c9s
f9908f2931 rewrite private trade request 2022-04-21 14:52:44 +08:00
c9s
8e2a993370 max: improve max closed orders syncing 2022-04-21 14:11:49 +08:00
c9s
93b10f20ac maxapi: fix fromID to uint64 2022-04-21 13:18:00 +08:00
c9s
e754b68cdf maxapi: fix http timeout 2022-04-21 13:17:43 +08:00
c9s
0410ef1305 maxapi: refactor rewards api 2022-04-21 00:18:34 +08:00
c9s
8b9383ecfa maxapi: refactor withdrawal request 2022-04-20 16:38:08 +08:00
c9s
72ea9f7e24 maxapi: add deposit request tests and withdrawal request tests 2022-04-20 14:01:18 +08:00
c9s
f3eafd5cd8 remove unused get trades method 2022-04-20 13:49:06 +08:00
c9s
387c0bfb8b maxapi: rewrite vip level request 2022-04-20 13:35:17 +08:00
c9s
68abeb826b maxapi: add account service tests 2022-04-20 13:28:39 +08:00
c9s
f9df65a2f8 maxapi: add generated files 2022-04-20 13:20:54 +08:00
c9s
ff7f1a8bc8 maxapi: always merge params into the payload for signing 2022-04-20 12:18:35 +08:00
c9s
4d8997a8d5 max: pass context background to the request 2022-04-20 12:18:35 +08:00
c9s
5cba6a6133 maxapi: use requestgen to query and submit orders 2022-04-20 12:18:35 +08:00
c9s
93b19faa3a refactor newAuthenticatedRequest 2022-04-20 12:18:35 +08:00
c9s
bf4a0169bd max: update client api 2022-04-20 12:18:35 +08:00
kfrico
bd4a932571 fix ftx pollKines bug 2022-04-19 21:29:45 +08:00
c9s
897dc55dcf binance: fix margin balance convert 2022-04-13 15:38:13 +08:00
c9s
ea47e54318 kucoin: fix query parameter issues 2022-04-12 23:45:11 +08:00
c9s
6972838c34 add query attribute 2022-04-12 23:26:48 +08:00
c9s
a34dbf12e2 kucoin: fix trades sync 2022-04-12 23:25:56 +08:00
c9s
680261527c binance: fix closed order query 2022-04-11 15:39:03 +08:00
austin362667
3f3fb1fe35 binance: fix futures limit maker order type 2022-03-28 21:12:45 +08:00
c9s
0511a0fde3 kucoin: convert limit maker to limit order type with postOnly 2022-03-28 17:09:00 +08:00
zenix
cb66f18b54 feature: add ftx market trade implementation 2022-03-23 19:12:49 +09:00
Yo-An Lin
ae4a3d81fb
Merge pull request #489 from zenixls2/feature/market_trade
feature: add market trade subscription in binance
2022-03-22 20:18:39 +08:00
zenix
abbe04fae9 fix: parse market trade as taker trade 2022-03-22 11:02:14 +09:00
austin362667
eca112e201 binance: add submit futures order ReduceOnly 2022-03-21 17:56:11 +08:00
Yo-An Lin
53b1eef4fc
kucoin: adjust rate limiter 2022-03-21 15:36:31 +08:00
c9s
6c201d1868 kucoin: adjust rate limit to req/3sec 2022-03-18 17:43:14 +08:00
c9s
9757ca290b kucoin: add trades, orders rate limiter 2022-03-18 17:33:10 +08:00
zenix
efec21ca4b feature: add market trade subscription in binance 2022-03-18 18:30:39 +09:00
zenix
84dbae1592 add readme content about testnet, fix code syntax 2022-03-18 14:17:06 +09:00
zenix
36a746d415 add binance paper trade endpoint 2022-03-18 14:04:56 +09:00
c9s
d1f4c0a225 max: fix kline parse 2022-03-15 16:07:19 +08:00
Yo-An Lin
bfdf4c245f
Merge pull request #460 from zenixls2/feature/backtest_multiple_exchange
feature: add multiple exchange support in backtest
2022-03-07 14:28:20 +08:00
c9s
fcbdf8162a max: add env var MAX_QUERY_CLOSED_ORDERS_LIMIT 2022-03-07 13:56:20 +08:00
zenix
39572c5fe0 fix: remove maker/buyer/taker/sellerCommission 2022-03-07 14:32:00 +09:00
c9s
e23232c3e7 max: fix timeInForce conversion 2022-03-06 18:37:34 +08:00
c9s
586013d9f2 max: fix order update message 2022-03-06 18:33:21 +08:00
c9s
af2070b908 binance: add updated time field 2022-03-06 18:32:33 +08:00
c9s
b8f54ed4b9 ftx: print result directly 2022-03-03 15:04:53 +08:00
c9s
86af4d2b40 ftx: rewrite order cancel handling 2022-03-03 14:52:24 +08:00
c9s
dd76cfafa4 ftx: remove legacy orderRequest from the legacy rest 2022-03-03 12:33:44 +08:00
c9s
c9f2027a38 ftx: remove the legacy orderRequest 2022-03-03 11:55:00 +08:00
c9s
5ea01c8d80 regenerate symbol map 2022-03-03 11:44:01 +08:00
c9s
eaa81f1313 ftx: remove legacy balances method 2022-03-03 11:43:15 +08:00
c9s
270ae51c9b ftx: remove legacy PlaceOrderPayload 2022-03-03 11:42:57 +08:00
c9s
2510f14d53 ftx: remove legacy place order request method 2022-03-03 11:42:40 +08:00
c9s
5bbb796e94 ftx: clean up imports 2022-03-03 11:42:25 +08:00
c9s
37db477ece ftx: remove legacy method CancelOrderByClientID 2022-03-03 11:42:13 +08:00
c9s
60ad6bc901 ftx: remove legacy CancelOrderByOrderID method 2022-03-03 11:41:51 +08:00
c9s
064da7f938 ftx: remove legacy open orders method 2022-03-03 11:40:23 +08:00
c9s
a47924d1c9 ftx: remove legacy order history method 2022-03-03 11:40:03 +08:00
c9s
6ae588575a ftx: remove legacy market api method 2022-03-03 11:39:11 +08:00
c9s
2845e03100 ftx: fix ftx test cases 2022-03-03 01:47:19 +08:00
c9s
3f8f17b1de ftx: reimplement submit order api 2022-03-03 00:30:52 +08:00
c9s
3b601d73ce ftx: remove legacy fills requests 2022-03-03 00:30:52 +08:00
c9s
4321cab557 ftx: drop the legacy unused account request 2022-03-03 00:30:52 +08:00
c9s
688445d7e7 cmd: add get-order cmd 2022-03-03 00:30:52 +08:00
c9s
95daa004aa ftx: implement get order status api 2022-03-03 00:30:52 +08:00
c9s
14bcc780a4 ftxapi: add cancel order by client order id 2022-03-03 00:30:52 +08:00
c9s
07dd2e8d9c ftx: improve order cancel by client order id 2022-03-03 00:30:52 +08:00
c9s
5cfc266d7a ftx: simplify and replace the order history query 2022-03-03 00:30:52 +08:00
c9s
5c8997e293 ftx: fix ftx order status isWorking 2022-03-03 00:30:52 +08:00
c9s
66700016e4 ftx: add toGlobalOrderNew to convert new order structure 2022-03-03 00:30:52 +08:00
c9s
e9e1127d3e ftx: replace query markets api 2022-03-03 00:30:52 +08:00
c9s
883f0ed83a ftxapi: replace fill implementation 2022-03-03 00:30:52 +08:00
c9s
833354e553 ftx: replace QueryTrades implementation 2022-03-03 00:30:52 +08:00
c9s
9c371425f6 ftx: replace QueryAccount implementation 2022-03-03 00:30:52 +08:00
c9s
84bc170a2e ftxapi: use order types 2022-03-03 00:30:52 +08:00
c9s
03f0305b3d ftxapi: add fills request 2022-03-03 00:30:52 +08:00
c9s
14a49989fe ftxapi: define types 2022-03-03 00:30:52 +08:00
c9s
cd0ac71b99 ftxapi: separate request files 2022-03-03 00:30:52 +08:00
c9s
abc425d820 ftx: fix ftx api client 2022-03-03 00:30:52 +08:00
c9s
93992801f9 ftxapi: add order history request 2022-03-03 00:30:52 +08:00
c9s
9e350afed5 ftxapi: add get coins api 2022-03-03 00:30:52 +08:00
c9s
3601edab84 ftxapi: add get single market api 2022-03-03 00:30:52 +08:00
c9s
2a6310c5f5 ftxapi: add get markets api 2022-03-03 00:30:52 +08:00
c9s
94ee46787e ftxapi: add generated files 2022-03-03 00:30:52 +08:00
c9s
7ed2e352d9 ftx: rewrite ftxapi 2022-03-03 00:30:52 +08:00
c9s
208a9bcb7d fix: fix context error handling 2022-02-18 18:21:51 +08:00
c9s
849f2a248e ftx: check context error 2022-02-18 15:35:58 +08:00
c9s
3a488a4c0f ftx: add ioc order test 2022-02-18 14:50:54 +08:00
c9s
17034b2467 ftx: fix ioc convert 2022-02-18 14:10:21 +08:00
c9s
f6ebeeafc5 ftx: cast time in force from the order result 2022-02-18 14:07:29 +08:00
c9s
d0f1e2db04 ftx: fix ftx ioc conversion 2022-02-18 14:01:47 +08:00
c9s
fb9f8b484c max: remove ioc limit type 2022-02-18 13:57:47 +08:00
c9s
0c09e6b32a use global timeInForce type 2022-02-18 13:52:13 +08:00
zenix
cdba7924b4 fix backtest panic when cancel fail on the last order 2022-02-15 12:01:39 +09:00
zenix
05521a98b6 add skeleton strategy. fix most of the tests. fix final asset value 2022-02-15 12:01:39 +09:00
zenix
2ccc449657 fix xpuremaker,xnav,techsignal,support,etf and add methods in fixedpoint 2022-02-15 12:01:39 +09:00
zenix
b8bf2af14d fixedpoint for exchange and indicators, some fixes in types 2022-02-15 12:01:38 +09:00
zenix
e221f54397 add dnum as the fixedpoint implementation. change types float64 to fixedpoint.Value
change pnl report to use fixedpoint

fix: migrate kline to use fixedpoint
2022-02-15 12:00:39 +09:00
ankion
98b4495d1f Fix: precision of futures trade data is incorrect. 2022-02-14 10:32:13 +08:00
c9s
a2a7ef4f7a exchange: implement ExchangeOrderQueryService on max and binance 2022-02-10 17:48:53 +08:00
c9s
59cc4d7243 max: improve max closed order query 2022-01-27 00:02:35 +08:00
Yo-An Lin
d79cce30e3
Merge pull request #443 from austin362667/refactor/futures-account
binance: add futures broker
2022-01-26 14:11:48 +08:00
c9s
6286c50f7a max: always sort trades 2022-01-24 23:59:10 +08:00
c9s
0bf6e533e0 kucoin: fix closed orders query 2022-01-24 23:56:48 +08:00
c9s
f284c35b81 max: ensure orders are sorted ascendingly 2022-01-24 23:54:58 +08:00
c9s
04a15340bc max: add warning for the uneffected conditions 2022-01-24 23:51:53 +08:00
c9s
50871c1b61 max: fix order query limiter call and order state for query 2022-01-24 23:45:56 +08:00
c9s
0c0a12781a max: fix max exchange closed order sync 2022-01-24 23:18:52 +08:00
c9s
e8fd1486b1 binance: fix binance closed order sync 2022-01-23 16:19:13 +08:00
austin362667
5a4adf4d72 binance: add futures broker 2022-01-23 15:26:15 +08:00
c9s
4d921b0b36 kucoin: fix klines ordering 2022-01-19 18:33:54 +08:00
Yo-An Lin
0e0525be99
Merge pull request #418 from austin362667/refactor/futures-account
binance: add futures exchange api queries
2022-01-17 20:54:49 +08:00
austin362667
0ab94e0884 binance: fix err handler 2022-01-15 08:28:02 +08:00
austin362667
734221028b binance: fix parse type 2022-01-15 08:28:02 +08:00
austin362667
9a1d2cba31 binance: add account info in query account 2022-01-15 08:28:02 +08:00