mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
pkg, types: add bybit to factor and update readme
This commit is contained in:
parent
b45fdea99a
commit
ac5e2cf712
|
@ -128,7 +128,8 @@ the implementation.
|
|||
- OKEx Spot Exchange
|
||||
- Kucoin Spot Exchange
|
||||
- MAX Spot Exchange (located in Taiwan)
|
||||
- Bitget (In Progress)
|
||||
- Bitget Exchange (In Progress)
|
||||
- Bybit Exchange (In Progress)
|
||||
|
||||
## Documentation and General Topics
|
||||
|
||||
|
@ -219,6 +220,10 @@ KUCOIN_API_KEY=
|
|||
KUCOIN_API_SECRET=
|
||||
KUCOIN_API_PASSPHRASE=
|
||||
KUCOIN_API_KEY_VERSION=2
|
||||
|
||||
# for Bybit exchange, if you have one
|
||||
BYBIT_API_KEY=
|
||||
BYBIT_API_SECRET=
|
||||
```
|
||||
|
||||
Prepare your dotenv file `.env.local` and BBGO yaml config file `bbgo.yaml`.
|
||||
|
|
|
@ -7,6 +7,7 @@ import (
|
|||
|
||||
"github.com/c9s/bbgo/pkg/exchange/binance"
|
||||
"github.com/c9s/bbgo/pkg/exchange/bitget"
|
||||
"github.com/c9s/bbgo/pkg/exchange/bybit"
|
||||
"github.com/c9s/bbgo/pkg/exchange/kucoin"
|
||||
"github.com/c9s/bbgo/pkg/exchange/max"
|
||||
"github.com/c9s/bbgo/pkg/exchange/okex"
|
||||
|
@ -44,6 +45,9 @@ func New(n types.ExchangeName, key, secret, passphrase string) (types.ExchangeMi
|
|||
case types.ExchangeBitget:
|
||||
return bitget.New(key, secret, passphrase), nil
|
||||
|
||||
case types.ExchangeBybit:
|
||||
return bybit.New(key, secret)
|
||||
|
||||
default:
|
||||
return nil, fmt.Errorf("unsupported exchange: %v", n)
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@ const (
|
|||
ExchangeKucoin ExchangeName = "kucoin"
|
||||
ExchangeBitget ExchangeName = "bitget"
|
||||
ExchangeBacktest ExchangeName = "backtest"
|
||||
ExchangeBybit ExchangeName = "bybit"
|
||||
)
|
||||
|
||||
var SupportedExchanges = []ExchangeName{
|
||||
|
@ -54,6 +55,7 @@ var SupportedExchanges = []ExchangeName{
|
|||
ExchangeOKEx,
|
||||
ExchangeKucoin,
|
||||
ExchangeBitget,
|
||||
ExchangeBybit,
|
||||
// note: we are not using "backtest"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user