mirror of
https://github.com/c9s/bbgo.git
synced 2024-09-20 08:11:08 +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
|
- OKEx Spot Exchange
|
||||||
- Kucoin Spot Exchange
|
- Kucoin Spot Exchange
|
||||||
- MAX Spot Exchange (located in Taiwan)
|
- MAX Spot Exchange (located in Taiwan)
|
||||||
- Bitget (In Progress)
|
- Bitget Exchange (In Progress)
|
||||||
|
- Bybit Exchange (In Progress)
|
||||||
|
|
||||||
## Documentation and General Topics
|
## Documentation and General Topics
|
||||||
|
|
||||||
|
@ -219,6 +220,10 @@ KUCOIN_API_KEY=
|
||||||
KUCOIN_API_SECRET=
|
KUCOIN_API_SECRET=
|
||||||
KUCOIN_API_PASSPHRASE=
|
KUCOIN_API_PASSPHRASE=
|
||||||
KUCOIN_API_KEY_VERSION=2
|
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`.
|
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/binance"
|
||||||
"github.com/c9s/bbgo/pkg/exchange/bitget"
|
"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/kucoin"
|
||||||
"github.com/c9s/bbgo/pkg/exchange/max"
|
"github.com/c9s/bbgo/pkg/exchange/max"
|
||||||
"github.com/c9s/bbgo/pkg/exchange/okex"
|
"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:
|
case types.ExchangeBitget:
|
||||||
return bitget.New(key, secret, passphrase), nil
|
return bitget.New(key, secret, passphrase), nil
|
||||||
|
|
||||||
|
case types.ExchangeBybit:
|
||||||
|
return bybit.New(key, secret)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return nil, fmt.Errorf("unsupported exchange: %v", n)
|
return nil, fmt.Errorf("unsupported exchange: %v", n)
|
||||||
|
|
||||||
|
|
|
@ -46,6 +46,7 @@ const (
|
||||||
ExchangeKucoin ExchangeName = "kucoin"
|
ExchangeKucoin ExchangeName = "kucoin"
|
||||||
ExchangeBitget ExchangeName = "bitget"
|
ExchangeBitget ExchangeName = "bitget"
|
||||||
ExchangeBacktest ExchangeName = "backtest"
|
ExchangeBacktest ExchangeName = "backtest"
|
||||||
|
ExchangeBybit ExchangeName = "bybit"
|
||||||
)
|
)
|
||||||
|
|
||||||
var SupportedExchanges = []ExchangeName{
|
var SupportedExchanges = []ExchangeName{
|
||||||
|
@ -54,6 +55,7 @@ var SupportedExchanges = []ExchangeName{
|
||||||
ExchangeOKEx,
|
ExchangeOKEx,
|
||||||
ExchangeKucoin,
|
ExchangeKucoin,
|
||||||
ExchangeBitget,
|
ExchangeBitget,
|
||||||
|
ExchangeBybit,
|
||||||
// note: we are not using "backtest"
|
// note: we are not using "backtest"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user