c9s
a29198f733
bbgo: fix LooseFormatTime.UnmarshalYAML
2022-01-25 01:18:56 +08:00
c9s
007207e24f
all: use types.LooseFormatTime to parse loose format date time string
2022-01-25 00:24:12 +08:00
c9s
5f7676f0c1
bbgo: add sync config
2022-01-25 00:06:25 +08:00
c9s
407a533659
use the standard generated comment
...
https://github.com/golang/go/issues/13560
Generated files are marked by a line of text that matches the regular
expression, in Go syntax:
^// Code generated .* DO NOT EDIT\.$ The .*
means the tool can put whatever folderol it wants in there, but the
comment must be a single line and must start with Code generated and end
with DO NOT EDIT., with a period.
2022-01-23 14:57:45 +08:00
c9s
1f18c36870
cmd: improve build command
2022-01-23 14:44:17 +08:00
c9s
7b572120a1
interact: use RemoveKeyboard from interact.KeyboardController
2022-01-23 14:13:47 +08:00
c9s
01afe9c14e
interact: fix telegram session restore
2022-01-23 02:21:26 +08:00
c9s
0af5fc0530
interact: add RequireTextInput method to Reply interface
2022-01-23 02:21:26 +08:00
c9s
f5f8f15670
slack: add reply and session struct
2022-01-23 02:21:26 +08:00
c9s
ad3f038dc6
bbgo: improve otp key layout
2022-01-23 02:21:26 +08:00
c9s
c7f15efb23
interact: add Slack interaction
2022-01-23 02:21:26 +08:00
Kakashi Liu
cd85edd64d
Fix: fallback to memory persistence if redis not found
...
resolve #438
Fix bollmaker backtest error
2022-01-22 00:55:03 +08:00
c9s
0b8e5852eb
check persistence error
2022-01-19 18:29:24 +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
c9s
5c0e3a1254
bollmaker: add shadow protection config
2022-01-16 04:40:50 +08:00
c9s
71e660571d
bbgo: optimize LocalActiveOrderBook for back-testing speed
2022-01-16 01:34:28 +08:00
c9s
5d54e6fded
interact: skip total == 0 balance
2022-01-16 01:06:47 +08:00
c9s
b80f481e7d
interact: fix interact tests for session
2022-01-16 00:50:43 +08:00
c9s
b49fc182dc
fix telegram session persistence
2022-01-16 00:39:24 +08:00
c9s
2088234b44
interact: separate telegram user sessions
2022-01-16 00:25:11 +08:00
austin362667
91d2312c5c
cache: refactor moving from bbgo to pkg/cache
2022-01-15 08:28:02 +08:00
Lee
266400d925
indicator: Support difference bandwidth on boll indicator and can dynamic create BOLL
2022-01-15 05:30:06 +08:00
c9s
5f942e85ed
bbgo: show position with plaintext mode instead of string format
2022-01-15 03:13:30 +08:00
c9s
1c7d4d09cf
interact: add Cycle state builder
2022-01-15 03:06:36 +08:00
c9s
2a6b821908
bbgo: implement /position command
2022-01-15 02:58:55 +08:00
c9s
93722e6db3
implement position closer interaction
2022-01-15 02:52:46 +08:00
c9s
255ee40c98
bbgo: when calling order cancel we should use background context
2022-01-15 00:49:27 +08:00
c9s
77e92d544a
bbgo: pull out interaction setup
2022-01-15 00:32:21 +08:00
c9s
e385d96709
bbgo: move authToken loader
2022-01-15 00:29:35 +08:00
c9s
3a13025d58
bbgo: change default notification rule -- silent order updates
2022-01-15 00:25:16 +08:00
c9s
d5f3946ada
bbgo: refactor the current auth with interact
2022-01-15 00:18:07 +08:00
c9s
51ecac54e7
bbgo: fix local active book graceful cancel
2022-01-15 00:17:52 +08:00
c9s
41b94c5c7e
interact: refactor telegram interaction
2022-01-14 15:03:19 +08:00
c9s
fdf7ad9648
bbgo: rename auth function for general case
2022-01-14 13:41:43 +08:00
c9s
5bef7d8a1e
interact: use interaction singleton
2022-01-14 13:31:31 +08:00
c9s
dd93ee4fd3
move methods to telegramnotifier
2022-01-14 13:31:31 +08:00
c9s
43317bb647
add state and telegram example
2022-01-13 11:43:33 +08:00
c9s
ccaa8c5c86
bbgo: implement parseCommand
2022-01-13 11:43:33 +08:00
c9s
7053802041
basic interaction parser
2022-01-13 11:43:33 +08:00
c9s
6ee831e678
add trade logger
2022-01-12 11:19:41 +08:00
c9s
e5b4af53e6
all: clean up SubmitOrder fields
2022-01-11 01:36:19 +08:00
c9s
48cbb7fff6
bbgo: check order side and log error
2022-01-10 17:26:14 +08:00
c9s
d57f8fedfe
bbgo: fix active book order removal
2022-01-10 12:29:19 +08:00
c9s
d94cc2df31
bbgo: add recover callbacks to trace collector
2022-01-09 15:39:59 +08:00
c9s
0cec652f38
bollmaker: skip submitOrder calls if submitOrders is empty
2022-01-09 02:35:12 +08:00
c9s
7e2acdc416
all: add lock protected GetBase method for Position
2022-01-09 00:35:45 +08:00
c9s
d1420e66be
fix TestTradeCollector_ShouldNotCountDuplicatedTrade
2022-01-08 02:20:30 +08:00
c9s
e0b906a88b
bbgo: fix processTrade
2022-01-07 16:53:11 +08:00
c9s
a5fb408a16
twap: refactor and call activeMakerOrders.GracefulCancel
2022-01-07 01:34:23 +08:00
c9s
e312ec953c
bbgo: rename test case
2022-01-07 01:23:54 +08:00
c9s
d63cc42867
bbgo: add trade collector test
2022-01-07 01:17:07 +08:00
c9s
a49d001c29
xmaker: add trade scanner
2022-01-07 01:03:12 +08:00
c9s
69ae3259ff
bbgo: mark trade as done in the trade collector for preventing duplicated trade
2022-01-07 00:28:12 +08:00
c9s
259771b0b0
all: pull out the graceful cancel process to the local active book
2022-01-07 00:10:40 +08:00
c9s
47e23fda90
bbgo: add cache expiry
2022-01-06 23:57:42 +08:00
c9s
1116fc1de1
session: print klines only when debug-kline is enabled
2021-12-31 15:13:26 +08:00
c9s
63ccc2d3d0
bbgo: remove order if ExecutedQuantity is zero
2021-12-31 01:55:22 +08:00
c9s
ba73d5a09a
fix kucoin orderTime parsing and order id conversion
2021-12-30 22:02:50 +08:00
c9s
31070c3950
pull out connection status binder
2021-12-30 17:25:47 +08:00
c9s
26ff576727
fix connection status callbacks
2021-12-30 17:23:27 +08:00
c9s
cfc66dc13e
bbgo: add session connection notification
2021-12-30 17:18:04 +08:00
c9s
a2931da92c
move math rand
2021-12-30 16:18:32 +08:00
c9s
22e4da3775
fix pendingRemoval lock
2021-12-29 23:53:46 +08:00
c9s
090d60b44e
fix session connection status metrics
2021-12-28 01:58:36 +08:00
c9s
a0e41650be
add metricsLastUpdateTimeBalance metrics
2021-12-28 01:39:17 +08:00
c9s
bb9ef72028
update metricsConnectionStatus metrics
2021-12-28 00:49:56 +08:00
c9s
bb7b33e532
bbgo: bind and update balance metrics updater
2021-12-27 17:27:16 +08:00
c9s
7b629c9d30
bbgo: update balances metrics and trade metrics
2021-12-27 17:16:30 +08:00
c9s
0f24eec715
bbgo: fix: filter trades by symbol
2021-12-27 16:32:30 +08:00
c9s
42f22e0ef3
add prometheus metrics server
2021-12-27 16:27:14 +08:00
c9s
a31e2743ee
fix kline log space
2021-12-27 00:54:10 +08:00
c9s
f7c39290a0
call tradeCollector process to check trades
2021-12-27 00:51:57 +08:00
c9s
770c1067fc
bbgo: fix order store RemoveCancelled
2021-12-26 15:47:39 +08:00
c9s
05a0745d08
fix InitExchange for publicOnly session
2021-12-26 15:29:42 +08:00
c9s
ba8ebfe3a7
refactor and add doc comment for InitExchangeSession
2021-12-25 23:42:29 +08:00
c9s
307d0b8e1f
bbgo: add passphrase field to session struct
2021-12-25 23:28:00 +08:00
c9s
57bc65a729
avoid calling EmitConnect and EmitStart outside of the kline feeding goroutine
...
this causes 2 goroutine running in the same time hence cause the
concurrent map read / write
should fix #399 , #401
2021-12-25 21:05:50 +08:00
c9s
49e516b80e
backtest: allocate public exchange (with empty key secret) for backtesting
2021-12-24 00:24:19 +08:00
c9s
a3e3e1d177
bbgo: do not sync trades when running backtest
2021-12-23 23:20:35 +08:00
c9s
f5bbe29ac6
cmd: fix debug flag loading and add debug log to cache function
2021-12-23 23:02:07 +08:00
c9s
cfd68fdd1d
all: change trade id to uint64
2021-12-23 17:49:18 +08:00
TonyQ
d7ac645253
exchange: update maskkey handling
2021-12-23 01:18:36 +08:00
austin362667
f9cf71cef3
indicator: add kline close volatility
...
indicator: add kline close volatility
2021-12-19 14:20:09 +08:00
TonyQ
c0b9cc0f0b
exchange: make ftx kline event more reliable
2021-12-15 11:23:07 +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
51e23b6a0c
Merge branch 'main' of github.com:c9s/bbgo into feature/302-record-assets-review
2021-12-14 10:39:51 +08:00
TonyQ
4eb5a099ae
account: add nav_history_details and account_service for #302
2021-12-14 08:09:18 +08:00
austin362667
36c6d39612
bbgo: add session Futures & types: add FuturesExchange
2021-12-13 23:16:58 +08:00
austin362667
1703fff8b2
types: refactor Position and related files
2021-12-11 19:16:16 +08:00
c9s
d52edce40b
fix markets info cache
2021-12-08 17:26:43 +08:00
c9s
08a264d4eb
add futures exchange check in the markets cache
2021-12-07 21:29:40 +08:00
c9s
ca3f438288
show symbol name in the error message
2021-12-07 14:35:00 +08:00
c9s
aeeecba8dc
support different time format for backtesting
2021-12-06 01:50:50 +08:00
c9s
0472b7f21e
avoid recording trades in backtest by default
...
introducing a RecordTrades option
2021-12-06 01:42:53 +08:00
c9s
f692ef2c31
realign account fields
2021-12-05 12:23:27 +08:00
c9s
df683bdf56
use position to calculate the pnl
2021-12-05 02:17:15 +08:00
TonyQ
30c14a6828
fix #261 provide default config for notification setting
2021-12-04 02:37:21 +00:00
c9s
9a589bf71c
show broadcast enabled
2021-11-25 18:49:29 +08:00
c9s
513a799ced
fix ewma calculation
2021-11-22 02:14:44 +08:00
c9s
20f0e8dbd5
preallocate kline window with capacity
2021-11-22 01:17:08 +08:00
c9s
540722e430
adjust ewma truncate size
2021-11-22 01:17:08 +08:00
c9s
7787edffa0
refactor grid strategy state loading/saving
2021-11-05 00:22:44 +08:00
c9s
d763a3c415
bbgo: add debug ewma and sma
2021-10-18 17:26:03 +08:00
c9s
30b82390b7
bbgo: add EMA and SMA debug var
2021-10-18 15:23:22 +08:00
c9s
c36bbd6c35
bbgo: show pnl in the slack fields
2021-10-18 08:45:27 +08:00
c9s
15cfd735a0
bbgo: add doc comment for ExchangeSessionSubscriber
2021-10-17 22:23:21 +08:00
c9s
39b7a956e0
Add market field to position
2021-10-17 22:23:09 +08:00
c9s
30c7c34826
bbgo: fix kline backward query for backtest
2021-10-16 13:49:00 +08:00
c9s
4bcea5a388
bbgo: add AllFilled method on OrderStore
2021-10-16 13:39:18 +08:00
c9s
f5f96b585a
apply broadcast option from config file
2021-10-15 16:10:39 +08:00
c9s
2b0793ee49
bbgo: add telegram config
2021-10-15 16:10:09 +08:00
c9s
47e4847034
fix kline query endtime
2021-10-14 14:21:38 +08:00
c9s
b3661f5d32
bbgo: improve profit stat PlainText format
2021-10-14 10:16:11 +08:00
c9s
7d416c3467
bbgo: fix profit json tag
2021-10-14 10:14:11 +08:00
c9s
7874471828
bbgo: improve pnlEmojiMargin function
2021-10-14 10:13:21 +08:00
c9s
c8554f09a0
bbgo: refactor the pnl functions
2021-10-14 10:07:27 +08:00
c9s
2116efc42e
bbgo: fix profit title
2021-10-14 08:59:45 +08:00
c9s
49a78c0c88
bbgo: fix profit stat title
2021-10-14 08:58:19 +08:00
c9s
c12ff57e57
bbgo: improve profit stats plaintext format
2021-10-14 08:55:55 +08:00
c9s
77f11f4515
bbgo: add ticker for collecting trades
2021-10-14 07:56:40 +08:00
c9s
b154e3baea
bbgo: add pnl emoji with margin
2021-10-14 07:48:32 +08:00
c9s
7e8897f1d0
bbgo: fix profit field check condition
2021-10-14 07:33:34 +08:00
c9s
5c3f305060
bbgo: implement SlackAttachment interface for profitstats
2021-10-14 01:27:58 +08:00
c9s
d3fa0a964b
bbgo: add slack attachment support for profit
2021-10-14 01:27:50 +08:00
c9s
b6b2e33cc0
extend profit stats fields for quote,base currency and symbol
2021-10-14 01:26:36 +08:00
c9s
5039a43413
bbgo: move pnl formating to the bbgo package
2021-10-14 01:26:11 +08:00
c9s
e1e6d1de12
bbgo: add net profit margin field to profit stats
2021-10-14 01:26:04 +08:00
c9s
44a0b10240
bbgo: load last price from 1m interval kline only
2021-10-14 00:37:40 +08:00
c9s
37ac907c0f
profitstats: add accumulated volume
2021-10-12 11:24:28 +08:00
c9s
d9dc7e31df
extend more fields
2021-10-12 11:24:24 +08:00
c9s
45645d0a3d
use the profit struct to pass profit info
2021-10-08 19:16:40 +08:00
c9s
fac14a8c7f
profitstats: add netProfit field
2021-10-08 15:09:55 +08:00
c9s
aadb1ed389
remove MakerExchange from the core profit stats field
2021-10-08 15:00:53 +08:00
c9s
d058125f78
bbgo: refactor profit stats
2021-10-08 14:57:44 +08:00
c9s
9e1d28f3b3
do not remove order if it's partially filled
2021-10-08 14:17:47 +08:00
c9s
ded740107f
bbgo: refactor TradeCollector bind stream for background and foreground
2021-10-08 13:24:07 +08:00
c9s
8ada9eef02
bbgo: optimize AdjustQuantityByMaxAmount, early return
2021-10-08 12:09:05 +08:00
c9s
7fb4d2f78d
return positionChanged for Process method
2021-10-05 21:44:39 +08:00
c9s
5dd2f568fe
add doc comment for trade collector
2021-10-05 21:39:10 +08:00
c9s
45c875fe7c
bbgo: improve trade collect process
2021-10-05 21:30:06 +08:00
c9s
8d01c97240
fix cyclic import issue
2021-08-26 11:46:02 +08:00
c9s
1f94ae1c19
bbgo: move moving average settings struct into bbgo
2021-08-26 11:32:39 +08:00
c9s
3ab4a570fb
bbgo: limit max kline slice
2021-06-28 14:33:32 +08:00
c9s
06a1f018c2
bbgo: push to the buffer first
2021-06-26 20:26:47 +08:00
c9s
7d853a9c74
bbgo: add emit position update
2021-06-26 20:26:47 +08:00
c9s
ecd2d9ea68
bbgo: improve trade collector callbacks
2021-06-26 20:26:47 +08:00
c9s
db4fbbc30c
bbgo: add trade collector
2021-06-26 20:26:47 +08:00
c9s
65629a77f4
bbgo: add two new position constructor
2021-06-26 20:26:47 +08:00
c9s
3d12a7df59
support: add sensitivity settings
2021-06-16 13:14:10 +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
e5db780be8
notify trades and update position
2021-06-01 01:39:22 +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
8d31435ded
add trade store
2021-05-29 00:25:23 +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
7d62a7634b
set market data stream to public
2021-05-27 15:11:44 +08:00
c9s
b7c87c7744
core: move market data subscription to market data stream
2021-05-27 15:09:18 +08:00
c9s
45f1a13870
rename Stream field to UserDataStream and add MarketDataStream
2021-05-27 14:45:06 +08:00
c9s
2381df5009
add okex to the exchange factory
2021-05-27 00:35:51 +08:00
zenix
3d2a27fc10
Fix: nil pointer exception in indicator creation, add stoch util func
2021-05-26 00:20:31 +00:00
c9s
9c70e36e1b
save average cost with feeInQuote in the ApproximateAverageCost
2021-05-23 01:05:11 +08:00
c9s
d2e299a68a
improve position comment
2021-05-23 00:42:57 +08:00
c9s
9efb45b133
reduce side book copy
2021-05-23 00:42:44 +08:00
c9s
9b9643e1f9
improve order cancellation mechanisim
2021-05-22 17:44:20 +08:00
c9s
289227e5f3
add exists method for active book
2021-05-22 17:44:07 +08:00
c9s
0a908e5dda
fix position test for net profit
2021-05-22 17:43:53 +08:00
c9s
cca3284140
separate net profit and profit
2021-05-22 17:17:37 +08:00
c9s
8acada76a9
replace sliceorderbook with orderbook interface
2021-05-22 16:32:29 +08:00
c9s
fd710d533f
implement tree copy method
2021-05-22 12:18:08 +08:00
c9s
56b2c8845b
fix preorder, postorder and inorder
2021-05-22 11:36:58 +08:00
c9s
4fde442722
Add position Reset function
2021-05-21 00:08:04 +08:00
c9s
d737ab678f
support removing filled orders from the order store
2021-05-21 00:07:43 +08:00
c9s
422e85e3a3
twap: fix stop price check
2021-05-18 13:53:51 +08:00
c9s
896518f5c2
check if restQuantity is less than 0
2021-05-18 13:44:57 +08:00
c9s
21f7fa7846
twap: fix tick spread calculation
2021-05-18 13:38:23 +08:00
c9s
f6f1226bd0
integrate bollband indicator into xmaker
2021-05-17 20:04:13 +08:00
c9s
e7c718ee15
assign fee rate to position
2021-05-16 17:58:51 +08:00
c9s
187a9c795b
use exchange fee rate as a reference for profit
2021-05-16 17:50:08 +08:00
c9s
d0e4a5e65c
move addTrade lock section
2021-05-16 17:05:12 +08:00
c9s
e636a5008d
replace Exchange field type with ExchangeName
2021-05-16 17:02:23 +08:00
c9s
0a016cba75
split maker fee and taker fee
2021-05-16 16:50:26 +08:00
c9s
a4381a54a3
add fee rate field
2021-05-16 15:03:36 +08:00
c9s
c9cdf31df1
add pnl emoji
2021-05-16 01:16:03 +08:00
c9s
942eaac659
improve message formatting
2021-05-16 00:45:08 +08:00
c9s
1f449eca7f
implement SlackAttachment interface on Position
2021-05-15 23:50:03 +08:00
c9s
c85456b8e8
lock position for fetching base quantity
2021-05-15 10:06:48 +08:00
c9s
531799bdfb
use mutex composition since we may lock from out side
2021-05-15 10:05:39 +08:00
c9s
8071559f99
position: use pointer receiver
2021-05-15 10:02:04 +08:00
c9s
a636cdaec9
add mutex to Position since position could be changed from 2 goroutine
2021-05-15 10:01:41 +08:00
c9s
aa340f0db3
always check restQuantity
2021-05-15 10:00:32 +08:00
c9s
236df245a2
adjust quantity bases on the balances
2021-05-15 09:46:07 +08:00
c9s
f9cb414832
twap: add update-interval option
2021-05-15 09:29:44 +08:00
c9s
ae256ce9d3
add more quantity adjustment fix
2021-05-15 09:23:41 +08:00
c9s
356a8b77ac
adjust updateLimiter to 3 seconds one time
2021-05-15 09:20:46 +08:00
c9s
445feb016a
support price ticks option
2021-05-14 15:35:11 +08:00
c9s
bb34b1002a
improve order execution graceful shutdown
2021-05-14 14:53:26 +08:00
c9s
dc040bb82b
improving logs
2021-05-14 14:53:26 +08:00
c9s
f69cbe9c31
add basic TwapExecution
2021-05-14 14:53:26 +08:00
c9s
c8b97629e0
add NumOfOrders method on active book
2021-05-14 14:53:26 +08:00
c9s
a49cf531b5
fix cross exchange order executor for the basic risk control
2021-05-12 19:02:09 +08:00
c9s
98e0390c1d
improve slack notification
2021-05-12 12:43:03 +08:00
c9s
807c049d63
refactor notifiers and add liquidity field to the trade
2021-05-12 12:37:48 +08:00
c9s
85e1b6b1c7
move field assignment
2021-05-12 12:05:54 +08:00
c9s
df11112d64
refactor exchange session initialization
2021-05-12 12:05:54 +08:00
c9s
8d63647104
assign session.Withdrawal
2021-05-12 12:05:54 +08:00
c9s
29b7326f19
add withdrawal property to the exchange session
2021-05-12 12:05:54 +08:00
zenix
ba091dccf6
Fix: binance's cancel update is sent through New status with 0 quantity
2021-05-11 06:57:09 +00:00
c9s
95d58e9385
adjust hedge quantity according to the hedge account balances
2021-05-10 20:13:23 +08:00
c9s
ddab6083d4
xmaker: support quantity scale
2021-05-10 02:52:41 +08:00
c9s
ce63641d70
print otp auth guide when session is loaded
2021-05-10 01:38:19 +08:00
c9s
3f8f5616d7
add more order info the local order book printing
2021-05-09 20:03:16 +08:00
c9s
e06310da26
print unhandled order status
2021-05-09 19:44:43 +08:00
c9s
d01abffde3
add todo for the backtest trades
2021-05-08 01:09:06 +08:00
c9s
6bbd66a4f9
split environment start and init
2021-05-08 00:45:24 +08:00
c9s
494a270c54
insert trades to db only when backtest service is nil
2021-05-07 01:50:38 +08:00
c9s
584a4c2ef8
move fiat currency definition out
2021-05-07 01:30:09 +08:00
c9s
1ad8b0b641
remove unused SourceDir func
2021-05-04 01:06:20 +08:00
c9s
50db944053
fix initSymbol stages
2021-05-02 23:58:34 +08:00
c9s
2230c56e56
fix comment warning
2021-05-02 23:48:53 +08:00
c9s
2ef13293e9
fix IDE warnings
2021-05-02 23:47:57 +08:00
c9s
5ec0566888
add more injection checks
2021-05-02 23:46:16 +08:00
c9s
822a010932
add moving average configuration to the schedule strategy
2021-05-02 20:58:32 +08:00
c9s
e29d9af9c8
fix persistence config unmarshalling
2021-05-02 18:16:34 +08:00
c9s
9f77236999
fix and improve position accessor
2021-04-28 19:32:49 +08:00
c9s
70a53ed286
make config compatible with key 'strategies'
2021-04-28 17:58:50 +08:00
c9s
2ec4617694
add SyncService check
2021-04-09 12:44:30 +08:00
c9s
34fe915a9f
fix sync issue for pnl command
2021-04-09 12:43:13 +08:00
Larry850806
dbf5d27f30
Add a validator interface to validate strategy before run
2021-04-02 10:12:55 +08:00
c9s
6c8babfb27
allow public session
2021-03-22 17:40:17 +08:00
c9s
088b22f338
support bbgo-no-cache option
2021-03-22 17:32:21 +08:00
c9s
814a77ea39
xmaker: improve balance checking
2021-03-21 12:55:33 +08:00
ycdesu
c8447663db
refactor: use fixedpoint to store fee
2021-03-19 08:49:24 +08:00
ycdesu
83ae943a4f
ftx: calculate commission
2021-03-18 23:58:28 +08:00
c9s
a95c3b94a0
core: set default store ID
2021-03-18 17:20:07 +08:00
Yo-An Lin
40b376802e
Merge pull request #168 from c9s/feature/mark-trade-strategy
2021-03-18 10:31:59 +08:00
c9s
85b6cb81a2
make local active orderbook json marshallable
2021-03-18 01:15:06 +08:00
Yo-An Lin
7ecb17dbe2
Merge pull request #163 from c9s/feature/mark-trade-strategy
2021-03-16 22:34:09 +08:00
c9s
714d61a829
add grid restore behavior
2021-03-16 20:04:06 +08:00
Yo-An Lin
f5b65e795e
Merge pull request #160 from c9s/feature/grid-options
2021-03-16 12:59:14 +08:00
c9s
40fded70b2
reformat scale.go
2021-03-16 02:14:10 +08:00
c9s
2f7c7d344b
move emitStart method call into the stream Connect method
2021-03-16 01:32:27 +08:00
c9s
7951c38edc
skip connection if there is no subscription
2021-03-16 01:31:56 +08:00
ycdesu
c08899f7fb
ftx: add ftx to supported exchange
2021-03-15 20:40:04 +08:00
c9s
c3996aee2b
add Backup method to the local active order book
2021-03-15 18:25:36 +08:00
c9s
e311a182fa
add onStart callbacks
2021-03-15 18:04:03 +08:00
c9s
9f7af3ce82
assign SubAccount name to the new exchange session
2021-03-15 17:51:17 +08:00
c9s
e8ccc5eabf
pass SubAccount field to the factory
2021-03-15 10:23:00 +08:00
c9s
2eda012f43
add SubAccount field to the exchange session config
2021-03-15 10:13:41 +08:00
c9s
4b49fda463
refactor sync service
2021-03-14 11:18:22 +08:00
ben
40eadfeaca
add yaml tag for mapping basic risk control order executor.
2021-03-01 13:44:58 +08:00
Yo-An Lin
592a8d87ae
Merge pull request #137 from c9s/feature/scale
...
feature: add exp scale and log scale formula
2021-02-28 16:13:38 +08:00
c9s
b71ea867c5
ignore sync if sync service is nil
2021-02-28 15:05:49 +08:00
c9s
da79920ca9
rename scale struct name to PriceVolumeScale
2021-02-28 14:51:24 +08:00
c9s
83111c9eb9
test exponential scale with reverse range
2021-02-28 12:12:03 +08:00
c9s
99f236d2e0
integrate quantity scale into support strategy and grid strategy
2021-02-28 11:57:25 +08:00
c9s
bf87fbbf55
add LinearScale
2021-02-28 02:20:47 +08:00
c9s
8572df2cb3
add link to TestQuadraticScale
2021-02-28 02:07:48 +08:00
c9s
83af52c53b
add QuadraticScale
2021-02-28 02:06:33 +08:00
c9s
52395fd460
add log scale graph link
2021-02-28 01:55:35 +08:00
c9s
fbb8837c5c
add exp scale and log scale formula
2021-02-28 01:53:45 +08:00
c9s
5a7cf05701
integrate reward service into the sync service
2021-02-23 16:39:48 +08:00
c9s
73cb80ee96
improve logging
2021-02-22 17:06:43 +08:00
c9s
eaad414706
adjust max api call rate limiting
2021-02-22 15:01:05 +08:00
c9s
724dad70bb
remove trade sync from environ init
2021-02-22 14:14:39 +08:00
c9s
84775652fe
remove defer wrapper func
2021-02-22 13:49:26 +08:00
c9s
63ebbc0e73
fix frontend sync status checking
2021-02-21 19:36:03 +08:00
c9s
3629a1f5a2
pre-save syncing var for return
2021-02-21 18:54:48 +08:00
c9s
a8516edb98
add Get method to the persistence service facade
2021-02-21 16:55:45 +08:00
c9s
21b092037e
refactor notification configuration
2021-02-21 16:52:47 +08:00
c9s
fa4e813729
resolve cyclic imports
2021-02-21 01:01:39 +08:00
c9s
6845db6dd3
refactor database configure method
2021-02-21 00:58:34 +08:00
c9s
12ed5a1efe
move persistence service into the service package
2021-02-21 00:45:56 +08:00
c9s
be00aae81e
move trade configuration to the trader struct method
2021-02-20 12:23:31 +08:00
c9s
7684099f01
add /api/environment/syncing api
2021-02-20 11:54:48 +08:00
c9s
4ce6e85624
add sync status to the environment
2021-02-20 11:29:33 +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
eaa8c647b5
refactor session sync
2021-02-18 22:40:46 +08:00
c9s
b2bcd3528c
use sqlx for testing connection
2021-02-17 17:35:54 +08:00
c9s
a1cb3859c3
fix db driver setup
2021-02-17 14:57:29 +08:00
c9s
3867fdde91
add stringer interface to Position
2021-02-16 16:40:11 +08:00
c9s
e3d3eacb78
fix trade service injection
2021-02-16 16:30:01 +08:00
c9s
8ae4cab550
inject TradeService field if we found it
2021-02-16 16:14:49 +08:00
c9s
c75eb6b5ba
pull out Persistence injection to the common injection
2021-02-16 16:13:52 +08:00
c9s
5c1630f000
refactor strategy executor
2021-02-16 16:12:00 +08:00
c9s
fc4419b49b
refactor injection
2021-02-16 15:58:21 +08:00
c9s
1c2646b0af
add Test_injectField
2021-02-16 15:49:57 +08:00
c9s
c219dc7be0
add test code for testing migration scripts
2021-02-15 21:04:44 +08:00
c9s
f8378957ee
add more checks for bollgrid
...
related to #93
2021-02-13 16:03:31 +08:00
c9s
ffa001fc29
fix quantity format
2021-02-11 00:21:56 +08:00
c9s
57435419b4
add marketData label
2021-02-10 22:40:36 +08:00
ycchen
6655e16889
minor tweaks
2021-02-08 22:41:44 +01:00
ycchen
61c98432f2
feat: tickers for asset calculation
2021-02-08 22:41:44 +01:00
c9s
99b56003eb
clean up legacy db connection handling with the new database service
2021-02-06 11:22:04 +08:00
c9s
276b6c1e48
drop the legacy upgradeDB
2021-02-06 11:22:04 +08:00
c9s
de51eb29e4
refactor db stuff with database service
2021-02-06 11:22:04 +08:00
c9s
d8d1249293
fix env var prefix by using os.Getenv directly
2021-02-04 15:14:54 +08:00
c9s
c35cef5b09
implement config saving api
2021-02-03 17:27:18 +08:00
c9s
f7a4f7d415
add strategies endpoint and strategy review page
2021-02-03 15:00:01 +08:00
c9s
705edc38c0
implement config yaml dummper
2021-02-03 09:58:31 +08:00
c9s
098a966813
add test case for config.Map method
2021-02-03 09:34:53 +08:00
c9s
1a2c3556a8
add ID method to the TestStrategy
2021-02-03 09:09:19 +08:00
c9s
7904c6f4d0
add ID() to Strategy interface
2021-02-03 09:08:05 +08:00
c9s
8aa96c4546
integrate strateg adding api
2021-02-03 02:26:41 +08:00
c9s
578451bb51
add setup flag to run server
2021-02-02 18:17:58 +08:00
c9s
17d5e301dc
refine setup steps
2021-02-02 17:26:35 +08:00
c9s
73762d9888
support exchange session test from the setup wizard
2021-02-02 11:44:07 +08:00
c9s
a60aeb4771
pull out .Subscribe from trader.Run
2021-02-01 20:44:15 +08:00
c9s
ddcc8ae4ee
move ExchangeOrderExecutor into exchange session
2021-02-01 20:44:15 +08:00
c9s
de8e717a41
refactor session initialization function
2021-02-01 20:44:15 +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
32645f228b
add order query api
2021-01-29 13:15:44 +08:00
c9s
be750b94df
fix layout and margin
2021-01-29 12:55:11 +08:00
c9s
8031c6066e
mount static files to routes
2021-01-29 11:19:37 +08:00
c9s
78890834b5
support symbol segment
2021-01-28 18:51:35 +08:00
c9s
9ee49ea3f1
Add TradingVolumeBar
2021-01-26 18:10:08 +08:00
c9s
95129e94d7
add lastPrcieUpdatedAt timestamp for checking last price cache
2021-01-26 17:23:40 +08:00
c9s
df17c4b1b6
add trading volume query api
2021-01-26 17:21:18 +08:00
c9s
9717fddfbd
add total asset pie chart
2021-01-25 16:56:02 +08:00
c9s
e47357d1ed
add assets api and price loading
2021-01-25 15:32:17 +08:00
c9s
09b3046feb
lower case fields are not exported to json
2021-01-25 14:32:46 +08:00
c9s
7310700540
add account and account balances
2021-01-24 20:18:04 +08:00
c9s
eab915abc7
rename loaded-symbols to just symbols
2021-01-24 20:14:43 +08:00
c9s
3a52a4bff8
add and set AddOrderUpdate flag for session order store
2021-01-24 20:13:05 +08:00
c9s
42b66d6898
add OrderStore accessor on ExchangeSession
2021-01-24 19:08:12 +08:00
c9s
447057086c
add Orders method on OrderStore
2021-01-24 19:07:32 +08:00
c9s
eccc2c6e0f
implement session config api and server
2021-01-24 18:42:36 +08:00
c9s
51e5deee47
add frontend files
2021-01-24 14:14:25 +08:00
c9s
1892d03326
make session trades map thread safe
2021-01-24 14:14:25 +08:00
c9s
1c80d30ce2
add TradeSlice with sync
2021-01-24 14:14:25 +08:00
c9s
84b6982033
add order store to exchange session
2021-01-24 14:14:25 +08:00
c9s
d0fc161ae7
fix define build config checking
2021-01-23 01:06:56 +08:00
c9s
2da5fa2e92
pre-define build config
2021-01-23 01:03:56 +08:00
c9s
5eaa8f0778
add IsWrapperBinary flag and fix persistence error
2021-01-21 12:27:21 +08:00
c9s
45876968d9
let build config and legacy imports co-exists
2021-01-21 12:08:06 +08:00
c9s
5329ef8f25
refactor build config
2021-01-21 12:06:03 +08:00
c9s
ad4f339b27
fix test case name
2021-01-21 00:54:59 +08:00
c9s
38bac10050
consider fee calculation
2021-01-21 00:49:01 +08:00
c9s
bfc8e511d0
simplify average cost calculation
2021-01-20 23:46:22 +08:00
c9s
16aa070120
assign base/quote currency to the position struct
2021-01-20 23:08:57 +08:00
c9s
8a08c406c3
check symbol for the position update
2021-01-20 17:37:23 +08:00
c9s
48dd697ce3
handling short-to-long and long-to-short position
2021-01-20 17:35:58 +08:00
c9s
c2a27b031e
init position with loaded symbols
2021-01-20 16:30:44 +08:00