Commit Graph

82 Commits

Author SHA1 Message Date
c9s
e29d9af9c8 fix persistence config unmarshalling 2021-05-02 18:16:34 +08:00
c9s
8c08cfebb7 rename MarkStrategyID to just Mark 2021-03-16 14:07:47 +08:00
c9s
60aa7df69a adjust withdraw/deposit query limit since there are no many in most cases 2021-03-16 02:14:24 +08:00
c9s
afb8105694 add reward service todo 2021-03-14 11:18:23 +08:00
c9s
38b9baf340 connect sync with deposit and withdraw services 2021-03-14 11:18:23 +08:00
c9s
54ba240317 implement deposit sync 2021-03-14 11:18:22 +08:00
c9s
8e85274876 fix used time field for withdraw 2021-03-14 11:18:22 +08:00
c9s
4d3b1ec938 fix QueryWithdrawHistory and QueryDepositHistory 2021-03-14 11:18:22 +08:00
c9s
4b49fda463 refactor sync service 2021-03-14 11:18:22 +08:00
c9s
3c90aa515d add deposit service and withdraw service 2021-03-14 11:18:22 +08:00
c9s
f22a6ee697 implement sync method on the trade service 2021-03-14 11:18:22 +08:00
c9s
8fc7c4798e implement sync method on reward service 2021-03-14 11:18:22 +08:00
c9s
5a02cdbda3 implement sync method on the order service 2021-03-14 11:18:22 +08:00
ycdesu
2a0bd5f962 ws: make Reconnect() public 2021-02-27 18:42:45 +08:00
ycdesu
bf97af34f3 ws: implement base websocket client 2021-02-27 16:48:50 +08:00
c9s
03d7290e03 pull out time range group by clause generator 2021-02-26 17:22:08 +08:00
c9s
28a8ab34a2 pull out time range column name 2021-02-26 16:16:41 +08:00
c9s
1d29009133 fix max trade query ordering and sql query ordering for query last 2021-02-25 13:55:04 +08:00
c9s
854014f49a add currency position aggregation and tests 2021-02-24 10:46:42 +08:00
c9s
14830c442c refactor and implement reward sync and query 2021-02-23 22:53:00 +08:00
c9s
5a7cf05701 integrate reward service into the sync service 2021-02-23 16:39:48 +08:00
c9s
fb62af05a4 add global Reward type 2021-02-23 10:08:01 +08:00
c9s
eaad414706 adjust max api call rate limiting 2021-02-22 15:01:05 +08:00
c9s
a8516edb98 add Get method to the persistence service facade 2021-02-21 16:55:45 +08:00
c9s
fa4e813729 resolve cyclic imports 2021-02-21 01:01:39 +08:00
c9s
12ed5a1efe move persistence service into the service package 2021-02-21 00:45:56 +08:00
c9s
dd13b9a8bf remove start time query condition for trade sync since starting from trade id = 1 works 2021-02-19 14:18:50 +08:00
c9s
44fa74a4c9 refactor session sync 2021-02-19 10:42:24 +08:00
c9s
390c9b1a4b move Sync method into the sync service 2021-02-19 10:26:13 +08:00
c9s
3a89b0a714 improve trade sync 2021-02-18 18:20:18 +08:00
c9s
0ba595bd55 Fix trade sync for self trades
MAX uses one single trade for presenting self trade.

BINANCE uses two trade records for presenting self trade. the trade
creation time are the same.
2021-02-18 17:37:49 +08:00
c9s
c3dbb1b204 avoid using last trade id for syncing data 2021-02-18 16:40:47 +08:00
c9s
b9564690b5 fix go migration loader 2021-02-17 19:06:55 +08:00
c9s
bc3754d989 check if limit is set 2021-02-16 16:39:56 +08:00
c9s
bf0ba89aee convert StrategyID field to NullString 2021-02-16 16:00:14 +08:00
c9s
67a3c49081 add more trade service tests 2021-02-16 15:34:01 +08:00
c9s
ebe065332c allocate sqlx db from rockhopper db 2021-02-15 21:07:55 +08:00
c9s
c219dc7be0 add test code for testing migration scripts 2021-02-15 21:04:44 +08:00
c9s
786f37e675 add MarkStrategyID for marking trade with the source strategy 2021-02-15 20:53:19 +08:00
c9s
f3d65b1281 add UpdatePnL method for updating trade pnl field 2021-02-15 20:51:34 +08:00
c9s
72044a63fd remove query trades default limit 200 2021-02-08 13:40:47 +08:00
Yo-An Lin
b81eb33cad Merge pull request #117 from c9s/wizard/sqlite3
add sqlite3 driver option to the wizard user interface
2021-02-06 17:41:45 +08:00
c9s
8e0778a095 fix trading volume query for sqlite3 2021-02-06 16:05:21 +08:00
Yo-An Lin
597dd21865 Merge pull request #116 from c9s/feature/sqlite3
convert time struct for sqlite driver
2021-02-06 15:05:49 +08:00
c9s
26f9e5488d apply datatype.Time to order time fields 2021-02-06 14:30:00 +08:00
c9s
3abdb3dd7b convert time struct for sqlite driver 2021-02-06 12:32:21 +08:00
Yo-An Lin
5a5e64cc8d Merge pull request #111 from c9s/feature/sqlite3
add sqlite3 migration support
2021-02-06 11:52:03 +08:00
c9s
32117af4b0 service: remove the ignore keyword to make the sql compatible with sqlite3 2021-02-06 11:44:49 +08:00
c9s
dd9dbee903 refactor database configuration with env vars 2021-02-06 11:33:49 +08:00
c9s
de51eb29e4 refactor db stuff with database service 2021-02-06 11:22:04 +08:00