Commit Graph

114 Commits

Author SHA1 Message Date
c9s
b77618f9d8
xfunding: add PositionReady case 2024-03-06 22:39:44 +08:00
c9s
256e09a863
xfunding: adjust quote investment variable only when position is not opening 2024-03-06 22:39:44 +08:00
c9s
dc0f07d42f
xfunding: add notification for the fixed positions 2024-03-06 22:39:43 +08:00
c9s
f609b1cdc4
simplify profitFixer and apply it to xfunding 2024-03-06 22:39:43 +08:00
c9s
b20b306818
xfunding: add dustQuantity check 2024-03-06 22:39:43 +08:00
c9s
4a4f91e7f9
xfunding: improve transfer logics 2024-03-06 22:39:43 +08:00
c9s
4242f052d8
xfunding: pull out queryAvailableTransfer and improve pending transfer things 2024-03-06 22:39:43 +08:00
c9s
b2c6dce350
xfunding: rewrite transferIn method 2024-03-06 22:39:43 +08:00
c9s
8c517179dd
xfunding: fix state notification 2024-03-06 22:39:43 +08:00
zenix
08dad1c497 fix: replace json.Number with MillisecondTimestamp in types 2023-09-27 15:52:02 +09:00
zenix
2e4336a604 fix: listenKeyExpired event sends string timestamp 2023-09-26 18:41:15 +09:00
c9s
b47da70909
Merge pull request #1223 from c9s/c9s/google-spreadsheet 2023-07-07 18:35:23 +08:00
c9s
f9eba64816
xfunding: always sync funding fee 2023-07-06 16:02:37 +08:00
c9s
dc16e0c299
xfunding: reset LastFundingFeeTime 2023-07-06 15:58:42 +08:00
c9s
e8922a4c3a
xfunding: support transferIn with zero quantity 2023-07-05 17:18:28 +08:00
c9s
f505dda80f
xfunding: handle reset transfer when starting up 2023-07-05 16:59:10 +08:00
c9s
f6a3be6ff5
xfunding: improve checkAndRestorePositionRisks 2023-07-05 16:48:19 +08:00
c9s
bd347d5aa5
xfunding: log positionRisks 2023-07-05 16:48:19 +08:00
c9s
e4ababd39e
xfunding: fix spot order parameters 2023-07-05 16:48:19 +08:00
c9s
12aad7b292
xfunding: log spot balance 2023-07-05 16:48:19 +08:00
c9s
a766d88d60
xfunding: fix balance check 2023-07-05 16:48:19 +08:00
c9s
017278826b
xfunding: log failed order 2023-07-05 16:48:19 +08:00
c9s
34d42afbec
xfunding: fix syncSpotPosition cancel order issue 2023-07-05 16:48:18 +08:00
c9s
2813ede7ed
xfunding: fix transferOut, and de-leverage the trade amount from the caller 2023-07-05 16:48:18 +08:00
c9s
e82341b2bd
xfunding: add more transfer logs 2023-07-05 16:48:18 +08:00
c9s
5d0bdd19e3
xfunding: always transfer balance out when reducing the futures position 2023-07-05 16:48:18 +08:00
c9s
c818f79932
fix 2023-07-05 16:48:18 +08:00
c9s
84e9b03be7
xfunding: show balance 2023-07-05 16:48:18 +08:00
c9s
7904c73c53
xfunding: use closePosition option when only dust left in the futures position 2023-07-05 16:48:18 +08:00
c9s
d730340b7a
remove diff quantity check 2023-07-05 16:48:18 +08:00
c9s
dc3901cc7f
xfunding: add more notificiation 2023-06-16 13:03:37 +08:00
c9s
4b9e3f2302
xfunding: send positions to slack when start up 2023-03-30 00:46:41 +08:00
c9s
69af9e03ea
xfunding: fix funding fee notification 2023-03-30 00:13:02 +08:00
c9s
6c550c55fa
xfunding: fix spot transfer 2023-03-29 23:09:37 +08:00
c9s
7c975da575
xfunding: fix position sync bug 2023-03-29 23:05:31 +08:00
c9s
0efb56c43e
xfunding: also reset the quote balance transfer 2023-03-29 22:55:40 +08:00
c9s
7e2688b8c7
xfunding: cancel open orders before closing the futures position 2023-03-29 22:54:54 +08:00
c9s
0c9e0649c6
xfunding: use b.MaxWithdrawAmount instead of b.Available 2023-03-29 22:49:34 +08:00
c9s
866443d89f
xfunding: only do transfer when the available balance is not zero 2023-03-29 21:48:10 +08:00
c9s
d0566e23ec
xfunding: log submit failed orders 2023-03-29 21:46:15 +08:00
c9s
1383eb0401
xfunding: resetTransfer should also reset the transfer stats 2023-03-29 21:44:48 +08:00
c9s
117b5198ec
xfunding: introduce resetTransfer method to reset the futures transfer 2023-03-29 21:43:36 +08:00
c9s
a2fdc99741
xfunding: notify position ready 2023-03-29 21:40:18 +08:00
c9s
bc6ee59add
xfunding: refactor transferOut with trade quantity 2023-03-29 21:40:18 +08:00
c9s
088a36a169
xfunding: refactor transferIn 2023-03-29 21:40:18 +08:00
c9s
ce0b73b6e4
xfunding: calculate max minQuantity from spot market and future market 2023-03-29 21:40:18 +08:00
c9s
16cb68ac3e
xfunding: change dust quantity info log to warn log 2023-03-29 21:40:18 +08:00
c9s
0f88309d9e
xfunding: add notifications 2023-03-29 21:40:18 +08:00
c9s
eeda500a90
xfunding: pull out handleAccountUpdate handler 2023-03-29 21:40:17 +08:00
c9s
1e7afbc0c8
xfunding: fix position ready set call 2023-03-29 21:40:16 +08:00