c9s
197d750cb4
all: update profit struct fields
2022-03-05 01:39:53 +08:00
c9s
82e5520ee4
service: update profit service tests
2022-03-05 00:28:13 +08:00
c9s
a642aa1a5a
service: add more columns
2022-03-05 00:27:44 +08:00
c9s
09dea3938d
implement profit insert
2022-03-04 19:24:40 +08:00
c9s
9e0df77a36
move profit struct into the types package
2022-03-04 16:39:48 +08:00
zenix
05521a98b6
add skeleton strategy. fix most of the tests. fix final asset value
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
c9s
106239e808
service: fix sync process
2022-01-23 15:14:29 +08:00
austin362667
91d2312c5c
cache: refactor moving from bbgo to pkg/cache
2022-01-15 08:28:02 +08:00
austin362667
f661db56bd
service: handle error
2022-01-15 08:28:02 +08:00
austin362667
5404bfe7f8
binance: fix futures symbol not found from syncSession
...
binance: fix query trades, closed orders futures symbol not found
binance: fix futures symbol not found
2022-01-15 08:28:02 +08:00
c9s
e44a2c1cac
service: check redis client and show proper error
2022-01-12 12:42:39 +08:00
c9s
3c57ce788e
add startTime to the trade sync query
2022-01-01 02:51:58 +08:00
c9s
129f44bbcb
fix empty start time sync issue
2022-01-01 02:43:08 +08:00
c9s
6d5ab33d17
kucoin: fix kucoin order query
2022-01-01 01:28:29 +08:00
c9s
e05da17f4f
sync: skip rejected withdraw record
2021-12-31 14:20:36 +08:00
c9s
eba33329d1
always sort orders and trades in the batch query
2021-12-31 14:12:41 +08:00
c9s
20c6c7eb9a
all: fix trade, order sync for kucoin
2021-12-31 13:52:16 +08:00
c9s
cf6da76ef0
service: add kucoin_klines to backtest insert table mapping
2021-12-26 02:40:13 +08:00
c9s
cfd68fdd1d
all: change trade id to uint64
2021-12-23 17:49:18 +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
TonyQ
f62235b94e
backtest : finetune for kline scan logic to prevent hanging for
...
query
2021-12-21 20:44:20 +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
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
16933555b8
backtest : auto sync missing range
2021-12-15 01:26:05 +08:00
TonyQ
20b03fe4a5
exchange: fix ftx for wrong last kline issue
2021-12-15 00:07:54 +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
TonyQ
4eb5a099ae
account: add nav_history_details and account_service for #302
2021-12-14 08:09:18 +08:00
TonyQ
e5450492bb
telegram: find USERNAME when USER env not found for windows.
2021-12-11 10:30:57 +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
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
30c7c34826
bbgo: fix kline backward query for backtest
2021-10-16 13:49:00 +08:00
c9s
b5c4fc3e4e
fix kline record insert fields
2021-06-01 01:39:23 +08:00
c9s
c84d59734c
clear all trades before running backtests
2021-05-30 15:25:00 +08:00
c9s
002b28f75a
okex: implement candlestick api and improve kline console format
2021-05-28 20:51:10 +08:00
c9s
57a78777df
move Time type to types.Time
2021-05-21 00:10:53 +08:00
c9s
807c049d63
refactor notifiers and add liquidity field to the trade
2021-05-12 12:37:48 +08:00
c9s
ee68deb114
apply limit param to the queries
2021-05-08 00:57:25 +08:00
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
Jui-Nan Lin
8eb8fb105d
test: fix query trading test
2021-02-05 12:42:59 +08:00
Jui-Nan Lin
893b513605
feat: add limit option for pnl command
2021-02-05 10:12:10 +08:00
YC
d821d2ef95
Merge pull request #103 from ycdesu/minor/order/tests
2021-02-03 18:52:11 +08:00
ycdesu
72b1877e4a
order: extract query order sql generator
2021-02-03 18:31:32 +08:00
ycdesu
220da92f48
trade: extract sql generator function and test it
2021-02-03 16:51:02 +08:00
ycdesu
1522c3d7a6
trade: create a separate sql gen function
2021-02-03 15:44:02 +08:00
c9s
fbbe304dfb
add trades query api
2021-01-29 18:48:00 +08:00
c9s
cc8133a90e
print order query sql
2021-01-29 18:34:03 +08:00
c9s
b8d7ae7687
add AggOrder for market orders
2021-01-29 17:52:13 +08:00