mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
Compare commits
9 Commits
7d034d1ba8
...
f6865f664c
Author | SHA1 | Date | |
---|---|---|---|
|
f6865f664c | ||
|
24de49860f | ||
|
83dc981c92 | ||
|
ec68e3c5f6 | ||
|
699164484b | ||
|
f27afac77b | ||
|
d404b20bd1 | ||
|
1b8d7bd805 | ||
|
ba913ce4de |
|
@ -58,4 +58,4 @@ bbgo [flags]
|
|||
* [bbgo userdatastream](bbgo_userdatastream.md) - Listen to session events (orderUpdate, tradeUpdate, balanceUpdate, balanceSnapshot)
|
||||
* [bbgo version](bbgo_version.md) - show version name
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Aug-2024
|
||||
###### Auto generated by spf13/cobra on 4-Sep-2024
|
||||
|
|
|
@ -41,4 +41,4 @@ bbgo account [--session SESSION] [flags]
|
|||
|
||||
* [bbgo](bbgo.md) - bbgo is a crypto trading bot
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Aug-2024
|
||||
###### Auto generated by spf13/cobra on 4-Sep-2024
|
||||
|
|
|
@ -50,4 +50,4 @@ bbgo backtest [flags]
|
|||
|
||||
* [bbgo](bbgo.md) - bbgo is a crypto trading bot
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Aug-2024
|
||||
###### Auto generated by spf13/cobra on 4-Sep-2024
|
||||
|
|
|
@ -40,4 +40,4 @@ bbgo balances [--session SESSION] [flags]
|
|||
|
||||
* [bbgo](bbgo.md) - bbgo is a crypto trading bot
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Aug-2024
|
||||
###### Auto generated by spf13/cobra on 4-Sep-2024
|
||||
|
|
|
@ -39,4 +39,4 @@ bbgo build [flags]
|
|||
|
||||
* [bbgo](bbgo.md) - bbgo is a crypto trading bot
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Aug-2024
|
||||
###### Auto generated by spf13/cobra on 4-Sep-2024
|
||||
|
|
|
@ -49,4 +49,4 @@ bbgo cancel-order [flags]
|
|||
|
||||
* [bbgo](bbgo.md) - bbgo is a crypto trading bot
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Aug-2024
|
||||
###### Auto generated by spf13/cobra on 4-Sep-2024
|
||||
|
|
|
@ -41,4 +41,4 @@ bbgo deposits [flags]
|
|||
|
||||
* [bbgo](bbgo.md) - bbgo is a crypto trading bot
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Aug-2024
|
||||
###### Auto generated by spf13/cobra on 4-Sep-2024
|
||||
|
|
|
@ -9,16 +9,18 @@ bbgo execute-order --session SESSION --symbol SYMBOL --side SIDE --target-quanti
|
|||
### Options
|
||||
|
||||
```
|
||||
--deadline duration deadline of the order execution
|
||||
-h, --help help for execute-order
|
||||
--price-ticks int the number of price tick for the jump spread, default to 0
|
||||
--session string the exchange session name for sync
|
||||
--side string the trading side: buy or sell
|
||||
--slice-quantity string slice quantity
|
||||
--stop-price string stop price (default "0")
|
||||
--symbol string the trading pair, like btcusdt
|
||||
--target-quantity string target quantity
|
||||
--update-interval duration order update time (default 10s)
|
||||
--deadline duration deadline duration of the order execution, e.g. 1h
|
||||
--delay-interval duration order delay time after filled (default 3s)
|
||||
-h, --help help for execute-order
|
||||
--order-update-rate-limit string order update rate limit, syntax: 1+1/1m (default "1s")
|
||||
--price-ticks int the number of price tick for the jump spread, default to 0
|
||||
--session string the exchange session name for sync
|
||||
--side string the trading side: buy or sell
|
||||
--slice-quantity string slice quantity
|
||||
--stop-price string stop price (default "0")
|
||||
--symbol string the trading pair, like btcusdt
|
||||
--target-quantity string target quantity
|
||||
--update-interval duration order update time (default 10s)
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
@ -48,4 +50,4 @@ bbgo execute-order --session SESSION --symbol SYMBOL --side SIDE --target-quanti
|
|||
|
||||
* [bbgo](bbgo.md) - bbgo is a crypto trading bot
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Aug-2024
|
||||
###### Auto generated by spf13/cobra on 4-Sep-2024
|
||||
|
|
|
@ -42,4 +42,4 @@ bbgo get-order --session SESSION --order-id ORDER_ID [flags]
|
|||
|
||||
* [bbgo](bbgo.md) - bbgo is a crypto trading bot
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Aug-2024
|
||||
###### Auto generated by spf13/cobra on 4-Sep-2024
|
||||
|
|
|
@ -45,4 +45,4 @@ bbgo hoptimize [flags]
|
|||
|
||||
* [bbgo](bbgo.md) - bbgo is a crypto trading bot
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Aug-2024
|
||||
###### Auto generated by spf13/cobra on 4-Sep-2024
|
||||
|
|
|
@ -42,4 +42,4 @@ bbgo kline [flags]
|
|||
|
||||
* [bbgo](bbgo.md) - bbgo is a crypto trading bot
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Aug-2024
|
||||
###### Auto generated by spf13/cobra on 4-Sep-2024
|
||||
|
|
|
@ -41,4 +41,4 @@ bbgo list-orders open|closed --session SESSION --symbol SYMBOL [flags]
|
|||
|
||||
* [bbgo](bbgo.md) - bbgo is a crypto trading bot
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Aug-2024
|
||||
###### Auto generated by spf13/cobra on 4-Sep-2024
|
||||
|
|
|
@ -38,4 +38,4 @@ margin related history
|
|||
* [bbgo margin loans](bbgo_margin_loans.md) - query loans history
|
||||
* [bbgo margin repays](bbgo_margin_repays.md) - query repay history
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Aug-2024
|
||||
###### Auto generated by spf13/cobra on 4-Sep-2024
|
||||
|
|
|
@ -41,4 +41,4 @@ bbgo margin interests --session=SESSION_NAME --asset=ASSET [flags]
|
|||
|
||||
* [bbgo margin](bbgo_margin.md) - margin related history
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Aug-2024
|
||||
###### Auto generated by spf13/cobra on 4-Sep-2024
|
||||
|
|
|
@ -41,4 +41,4 @@ bbgo margin loans --session=SESSION_NAME --asset=ASSET [flags]
|
|||
|
||||
* [bbgo margin](bbgo_margin.md) - margin related history
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Aug-2024
|
||||
###### Auto generated by spf13/cobra on 4-Sep-2024
|
||||
|
|
|
@ -41,4 +41,4 @@ bbgo margin repays --session=SESSION_NAME --asset=ASSET [flags]
|
|||
|
||||
* [bbgo margin](bbgo_margin.md) - margin related history
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Aug-2024
|
||||
###### Auto generated by spf13/cobra on 4-Sep-2024
|
||||
|
|
|
@ -40,4 +40,4 @@ bbgo market [flags]
|
|||
|
||||
* [bbgo](bbgo.md) - bbgo is a crypto trading bot
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Aug-2024
|
||||
###### Auto generated by spf13/cobra on 4-Sep-2024
|
||||
|
|
|
@ -44,4 +44,4 @@ bbgo optimize [flags]
|
|||
|
||||
* [bbgo](bbgo.md) - bbgo is a crypto trading bot
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Aug-2024
|
||||
###### Auto generated by spf13/cobra on 4-Sep-2024
|
||||
|
|
|
@ -42,4 +42,4 @@ bbgo orderbook --session=[exchange_name] --symbol=[pair_name] [flags]
|
|||
|
||||
* [bbgo](bbgo.md) - bbgo is a crypto trading bot
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Aug-2024
|
||||
###### Auto generated by spf13/cobra on 4-Sep-2024
|
||||
|
|
|
@ -40,4 +40,4 @@ bbgo orderupdate [flags]
|
|||
|
||||
* [bbgo](bbgo.md) - bbgo is a crypto trading bot
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Aug-2024
|
||||
###### Auto generated by spf13/cobra on 4-Sep-2024
|
||||
|
|
|
@ -49,4 +49,4 @@ bbgo pnl [flags]
|
|||
|
||||
* [bbgo](bbgo.md) - bbgo is a crypto trading bot
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Aug-2024
|
||||
###### Auto generated by spf13/cobra on 4-Sep-2024
|
||||
|
|
|
@ -51,4 +51,4 @@ bbgo run [flags]
|
|||
|
||||
* [bbgo](bbgo.md) - bbgo is a crypto trading bot
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Aug-2024
|
||||
###### Auto generated by spf13/cobra on 4-Sep-2024
|
||||
|
|
|
@ -46,4 +46,4 @@ bbgo submit-order --session SESSION --symbol SYMBOL --side SIDE --quantity QUANT
|
|||
|
||||
* [bbgo](bbgo.md) - bbgo is a crypto trading bot
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Aug-2024
|
||||
###### Auto generated by spf13/cobra on 4-Sep-2024
|
||||
|
|
|
@ -42,4 +42,4 @@ bbgo sync [--session=[exchange_name]] [--symbol=[pair_name]] [[--since=yyyy/mm/d
|
|||
|
||||
* [bbgo](bbgo.md) - bbgo is a crypto trading bot
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Aug-2024
|
||||
###### Auto generated by spf13/cobra on 4-Sep-2024
|
||||
|
|
|
@ -42,4 +42,4 @@ bbgo trades --session=[exchange_name] --symbol=[pair_name] [flags]
|
|||
|
||||
* [bbgo](bbgo.md) - bbgo is a crypto trading bot
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Aug-2024
|
||||
###### Auto generated by spf13/cobra on 4-Sep-2024
|
||||
|
|
|
@ -40,4 +40,4 @@ bbgo tradeupdate --session=[exchange_name] [flags]
|
|||
|
||||
* [bbgo](bbgo.md) - bbgo is a crypto trading bot
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Aug-2024
|
||||
###### Auto generated by spf13/cobra on 4-Sep-2024
|
||||
|
|
|
@ -42,4 +42,4 @@ bbgo transfer-history [flags]
|
|||
|
||||
* [bbgo](bbgo.md) - bbgo is a crypto trading bot
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Aug-2024
|
||||
###### Auto generated by spf13/cobra on 4-Sep-2024
|
||||
|
|
|
@ -40,4 +40,4 @@ bbgo userdatastream [flags]
|
|||
|
||||
* [bbgo](bbgo.md) - bbgo is a crypto trading bot
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Aug-2024
|
||||
###### Auto generated by spf13/cobra on 4-Sep-2024
|
||||
|
|
|
@ -39,4 +39,4 @@ bbgo version [flags]
|
|||
|
||||
* [bbgo](bbgo.md) - bbgo is a crypto trading bot
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Aug-2024
|
||||
###### Auto generated by spf13/cobra on 4-Sep-2024
|
||||
|
|
35
doc/release/v1.60.1.md
Normal file
35
doc/release/v1.60.1.md
Normal file
|
@ -0,0 +1,35 @@
|
|||
## Fixes
|
||||
|
||||
- fixed xmaker bugs
|
||||
- updated helm chart for sync cronjob
|
||||
- fixed max deposits api
|
||||
|
||||
[Full Changelog](https://github.com/c9s/bbgo/compare/v1.60.0...main)
|
||||
|
||||
- [#1727](https://github.com/c9s/bbgo/pull/1727): FIX: update timeInForce for binance margin order
|
||||
- [#1729](https://github.com/c9s/bbgo/pull/1729): FIX: [max] fix v3 deposit state conversion
|
||||
- [#1723](https://github.com/c9s/bbgo/pull/1723): FIX: [xmaker] avoid calculate margin from 0.0 signal
|
||||
- [#1721](https://github.com/c9s/bbgo/pull/1721): FIX: [xmaker] fix aggregatePrice method
|
||||
- [#1725](https://github.com/c9s/bbgo/pull/1725): IMPROVE: [xmaker] improve hedge margin account leverage calculation
|
||||
- [#1722](https://github.com/c9s/bbgo/pull/1722): FEATURE: [xmaker] add signals
|
||||
- [#1720](https://github.com/c9s/bbgo/pull/1720): FEATURE: [xmaker] margin credit improvement
|
||||
- [#1718](https://github.com/c9s/bbgo/pull/1718): FEATURE: [xmaker] add more config metrics
|
||||
- [#1719](https://github.com/c9s/bbgo/pull/1719): IMPROVE: [xmaker] fix bollinger band price calculation
|
||||
- [#1709](https://github.com/c9s/bbgo/pull/1709): IMPROVE: [xmaker] improve profit stats ticker and integrate rate limiter
|
||||
- [#1708](https://github.com/c9s/bbgo/pull/1708): FEATURE: [xmaker] integrate circuit breaker
|
||||
- [#1712](https://github.com/c9s/bbgo/pull/1712): FEATURE: [xmaker] add profit fixer
|
||||
- [#1710](https://github.com/c9s/bbgo/pull/1710): IMPROVE: [xmaker] improve stability
|
||||
- [#1717](https://github.com/c9s/bbgo/pull/1717): REFACTOR: [xmaker] refactor hedge worker and quote worker
|
||||
- [#1716](https://github.com/c9s/bbgo/pull/1716): FIX: [xmaker] profit object can be nil
|
||||
- [#1707](https://github.com/c9s/bbgo/pull/1707): FIX: [xmaker] position metrics missing label
|
||||
- [#1715](https://github.com/c9s/bbgo/pull/1715): UPGRADE: [go] upgrade packages that are too old
|
||||
- [#1713](https://github.com/c9s/bbgo/pull/1713): FEATURE: [chart] add env vars section
|
||||
- [#1711](https://github.com/c9s/bbgo/pull/1711): FEATURE: [binance] add new margin order side effect AUTO_BORROW_REPAY
|
||||
- [#1705](https://github.com/c9s/bbgo/pull/1705): FIX: [k8s] fix sync.enabled option
|
||||
- [#1704](https://github.com/c9s/bbgo/pull/1704): FEATURE: [k8s] add cronjob for sync
|
||||
- [#1700](https://github.com/c9s/bbgo/pull/1700): Fix: [autobuy] fix error when bollinger settings is not set
|
||||
- [#1703](https://github.com/c9s/bbgo/pull/1703): FEATURE: [core] add position metrics
|
||||
- [#1702](https://github.com/c9s/bbgo/pull/1702): IMPROVE: improve balance related metrics
|
||||
- [#1699](https://github.com/c9s/bbgo/pull/1699): REFACTOR: [twap] upgrade twap command and add optional order update rate limiter
|
||||
- [#1701](https://github.com/c9s/bbgo/pull/1701): RELEASE: v1.60.0
|
||||
- [#1714](https://github.com/c9s/bbgo/pull/1714): dep: bump actions/setup-node from 2 to 4
|
|
@ -1005,16 +1005,13 @@ func (e *Exchange) submitMarginOrder(ctx context.Context, order types.SubmitOrde
|
|||
}
|
||||
}
|
||||
|
||||
// could be IOC or FOK
|
||||
switch order.Type {
|
||||
case types.OrderTypeLimit, types.OrderTypeStopLimit:
|
||||
req.TimeInForce(binance.TimeInForceTypeGTC)
|
||||
case types.OrderTypeLimitMaker:
|
||||
// do not set TimeInForce for LimitMaker
|
||||
default:
|
||||
if len(order.TimeInForce) > 0 {
|
||||
// TODO: check the TimeInForce value
|
||||
req.TimeInForce(binance.TimeInForceType(order.TimeInForce))
|
||||
if len(order.TimeInForce) > 0 {
|
||||
// TODO: check the TimeInForce value
|
||||
req.TimeInForce(binance.TimeInForceType(order.TimeInForce))
|
||||
} else {
|
||||
switch order.Type {
|
||||
case types.OrderTypeLimit, types.OrderTypeStopLimit:
|
||||
req.TimeInForce(binance.TimeInForceTypeGTC)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -284,11 +284,18 @@ func toGlobalDepositStatus(a max.DepositState) types.DepositStatus {
|
|||
|
||||
case max.DepositStateAccepted:
|
||||
return types.DepositSuccess
|
||||
|
||||
case max.DepositStateProcessing: // v3 states
|
||||
return types.DepositPending
|
||||
|
||||
case max.DepositStateDone: // v3 states
|
||||
return types.DepositSuccess
|
||||
|
||||
}
|
||||
|
||||
// other states goes to this
|
||||
// max.DepositStateSuspect, max.DepositStateSuspended
|
||||
log.Warnf("unsupported deposit state %q from max exchange", a)
|
||||
log.Errorf("unsupported deposit state %q from max exchange", a)
|
||||
return types.DepositStatus(a)
|
||||
}
|
||||
|
||||
|
|
|
@ -116,6 +116,10 @@ const (
|
|||
DepositStateSuspended DepositState = "suspended"
|
||||
DepositStateAccepted DepositState = "accepted"
|
||||
DepositStateChecking DepositState = "checking"
|
||||
|
||||
// v3 states
|
||||
DepositStateProcessing DepositState = "processing"
|
||||
DepositStateDone DepositState = "done"
|
||||
)
|
||||
|
||||
type Deposit struct {
|
||||
|
|
|
@ -236,7 +236,7 @@ func (s *Strategy) scanDepositHistory(ctx context.Context, asset string, duratio
|
|||
s.watchingDeposits[deposit.TransactionID] = deposit
|
||||
}
|
||||
} else {
|
||||
// ignore all initial deposit history that are already success
|
||||
// ignore all initial deposits that are already in success status
|
||||
logger.Infof("ignored succeess deposit: %s %+v", deposit.TransactionID, deposit)
|
||||
}
|
||||
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
|
||||
package version
|
||||
|
||||
const Version = "v1.60.0-3a2e4dfd2-dev"
|
||||
const Version = "v1.60.1-ec68e3c5f-dev"
|
||||
|
||||
const VersionGitRef = "3a2e4dfd2"
|
||||
const VersionGitRef = "ec68e3c5f"
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
|
||||
package version
|
||||
|
||||
const Version = "v1.60.0-3a2e4dfd2"
|
||||
const Version = "v1.60.1-ec68e3c5f"
|
||||
|
||||
const VersionGitRef = "3a2e4dfd2"
|
||||
const VersionGitRef = "ec68e3c5f"
|
||||
|
|
Loading…
Reference in New Issue
Block a user