mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
use &PublicDataService{} to create it as a pointer object and rename ser to srv
This commit is contained in:
parent
cba5663fac
commit
b0ccc7e51b
|
@ -31,8 +31,8 @@ func TestClient_GetInstrumentsRequest(t *testing.T) {
|
|||
client := NewClient()
|
||||
ctx := context.Background()
|
||||
|
||||
ser := PublicDataService{client: client}
|
||||
req := ser.NewGetInstrumentsRequest()
|
||||
srv := &PublicDataService{client: client}
|
||||
req := srv.NewGetInstrumentsRequest()
|
||||
|
||||
instruments, err := req.
|
||||
InstrumentType(InstrumentTypeSpot).
|
||||
|
@ -45,8 +45,8 @@ func TestClient_GetInstrumentsRequest(t *testing.T) {
|
|||
func TestClient_GetFundingRateRequest(t *testing.T) {
|
||||
client := NewClient()
|
||||
ctx := context.Background()
|
||||
ser := PublicDataService{client: client}
|
||||
req := ser.NewGetFundingRate()
|
||||
srv := &PublicDataService{client: client}
|
||||
req := srv.NewGetFundingRate()
|
||||
|
||||
instrument, err := req.
|
||||
InstrumentID("BTC-USDT-SWAP").
|
||||
|
@ -59,8 +59,8 @@ func TestClient_GetFundingRateRequest(t *testing.T) {
|
|||
func TestClient_PlaceOrderRequest(t *testing.T) {
|
||||
client := getTestClientOrSkip(t)
|
||||
ctx := context.Background()
|
||||
ser := TradeService{client: client}
|
||||
req := ser.NewPlaceOrderRequest()
|
||||
srv := &TradeService{client: client}
|
||||
req := srv.NewPlaceOrderRequest()
|
||||
|
||||
order, err := req.
|
||||
InstrumentID("XTZ-BTC").
|
||||
|
|
Loading…
Reference in New Issue
Block a user