Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: prepare v5 template to implement #75

Merged
merged 1 commit into from
Feb 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions client_web_socket.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,21 +80,6 @@ func (c *WebSocketClient) buildAuthParam() ([]byte, error) {
return buf, nil
}

// SpotWebsocketService :
type SpotWebsocketService struct {
client *WebSocketClient
}

// V1 :
func (s *SpotWebsocketService) V1() *SpotWebsocketV1Service {
return &SpotWebsocketV1Service{s.client}
}

// Spot :
func (c *WebSocketClient) Spot() *SpotWebsocketService {
return &SpotWebsocketService{c}
}

// WebsocketExecutor :
type WebsocketExecutor interface {
Run() error
Expand Down
16 changes: 16 additions & 0 deletions client_web_socket_service.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package bybit

// SpotWebsocketService :
type SpotWebsocketService struct {
client *WebSocketClient
}

// V1 :
func (s *SpotWebsocketService) V1() *SpotWebsocketV1Service {
return &SpotWebsocketV1Service{s.client}
}

// Spot :
func (c *WebSocketClient) Spot() *SpotWebsocketService {
return &SpotWebsocketService{c}
}
10 changes: 10 additions & 0 deletions v5_account_service.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package bybit

// V5AccountServiceI :
type V5AccountServiceI interface {
}

// V5AccountService :
type V5AccountService struct {
client *Client
}
10 changes: 10 additions & 0 deletions v5_asset_service.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package bybit

// V5AssetServiceI :
type V5AssetServiceI interface {
}

// V5AssetService :
type V5AssetService struct {
client *Client
}
63 changes: 63 additions & 0 deletions v5_client_service.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
package bybit

// V5ServiceI :
type V5ServiceI interface {
Market() V5MarketServiceI
Order() V5OrderServiceI
Position() V5PositionServiceI
Execution() V5ExecutionServiceI
Account() V5AccountServiceI
SpotLeverageToken() V5SpotLeverageTokenServiceI
SpotMarginTrade() V5SpotMarginTradeServiceI
Asset() V5AssetServiceI
}

// V5Service :
type V5Service struct {
client *Client
}

// Market :
func (s *V5Service) Market() V5MarketServiceI {
return &V5MarketService{s.client}
}

// Order :
func (s *V5Service) Order() V5OrderServiceI {
return &V5OrderService{s.client}
}

// Position :
func (s *V5Service) Position() V5PositionServiceI {
return &V5PositionService{s.client}
}

// Execution :
func (s *V5Service) Execution() V5ExecutionServiceI {
return &V5ExecutionService{s.client}
}

// Account :
func (s *V5Service) Account() V5AccountServiceI {
return &V5AccountService{s.client}
}

// SpotLeverageToken :
func (s *V5Service) SpotLeverageToken() V5SpotLeverageTokenServiceI {
return &V5SpotLeverageTokenService{s.client}
}

// SpotMarginTrade :
func (s *V5Service) SpotMarginTrade() V5SpotMarginTradeServiceI {
return &V5SpotMarginTradeService{s.client}
}

// Asset :
func (s *V5Service) Asset() V5AssetServiceI {
return &V5AssetService{s.client}
}

// V5 :
func (c *Client) V5() V5ServiceI {
return &V5Service{c}
}
45 changes: 45 additions & 0 deletions v5_client_web_socket_service.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
package bybit

// V5WebsocketServiceI :
type V5WebsocketServiceI interface {
Spot() V5WebsocketSpotServiceI
Linear() V5WebsocketLinearServiceI
Inverse() V5WebsocketInverseServiceI
Option() V5WebsocketOptionServiceI
Private() V5WebsocketPrivateServiceI
}

// V5WebsocketService :
type V5WebsocketService struct {
client *WebSocketClient
}

// Spot :
func (s *V5WebsocketService) Spot() V5WebsocketSpotServiceI {
return &V5WebsocketSpotService{s.client}
}

// Linear :
func (s *V5WebsocketService) Linear() V5WebsocketLinearServiceI {
return &V5WebsocketLinearService{s.client}
}

// Inverse :
func (s *V5WebsocketService) Inverse() V5WebsocketInverseServiceI {
return &V5WebsocketInverseService{s.client}
}

// Option :
func (s *V5WebsocketService) Option() V5WebsocketOptionServiceI {
return &V5WebsocketOptionService{s.client}
}

// Private :
func (s *V5WebsocketService) Private() V5WebsocketPrivateServiceI {
return &V5WebsocketPrivateService{s.client}
}

// V5 :
func (c *WebSocketClient) V5() V5WebsocketServiceI {
return &V5WebsocketService{c}
}
10 changes: 10 additions & 0 deletions v5_execution_service.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package bybit

// V5ExecutionServiceI :
type V5ExecutionServiceI interface {
}

// V5ExecutionService :
type V5ExecutionService struct {
client *Client
}
10 changes: 10 additions & 0 deletions v5_market_service.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package bybit

// V5MarketServiceI :
type V5MarketServiceI interface {
}

// V5MarketService :
type V5MarketService struct {
client *Client
}
10 changes: 10 additions & 0 deletions v5_order_service.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package bybit

// V5OrderServiceI :
type V5OrderServiceI interface {
}

// V5OrderService :
type V5OrderService struct {
client *Client
}
10 changes: 10 additions & 0 deletions v5_position_service.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package bybit

// V5PositionServiceI :
type V5PositionServiceI interface {
}

// V5PositionService :
type V5PositionService struct {
client *Client
}
10 changes: 10 additions & 0 deletions v5_spot_leverage_token_service.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package bybit

// V5SpotLeverageTokenServiceI :
type V5SpotLeverageTokenServiceI interface {
}

// V5SpotLeverageTokenService :
type V5SpotLeverageTokenService struct {
client *Client
}
10 changes: 10 additions & 0 deletions v5_spot_margin_trade_service.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package bybit

// V5SpotMarginTradeServiceI :
type V5SpotMarginTradeServiceI interface {
}

// V5SpotMarginTradeService :
type V5SpotMarginTradeService struct {
client *Client
}
10 changes: 10 additions & 0 deletions v5_ws_inverse.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package bybit

// V5WebsocketInverseServiceI :
type V5WebsocketInverseServiceI interface {
}

// V5WebsocketInverseService :
type V5WebsocketInverseService struct {
client *WebSocketClient
}
10 changes: 10 additions & 0 deletions v5_ws_linear.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package bybit

// V5WebsocketLinearServiceI :
type V5WebsocketLinearServiceI interface {
}

// V5WebsocketLinearService :
type V5WebsocketLinearService struct {
client *WebSocketClient
}
10 changes: 10 additions & 0 deletions v5_ws_option.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package bybit

// V5WebsocketOptionServiceI :
type V5WebsocketOptionServiceI interface {
}

// V5WebsocketOptionService :
type V5WebsocketOptionService struct {
client *WebSocketClient
}
10 changes: 10 additions & 0 deletions v5_ws_private.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package bybit

// V5WebsocketPrivateServiceI :
type V5WebsocketPrivateServiceI interface {
}

// V5WebsocketPrivateService :
type V5WebsocketPrivateService struct {
client *WebSocketClient
}
10 changes: 10 additions & 0 deletions v5_ws_spot.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package bybit

// V5WebsocketSpotServiceI :
type V5WebsocketSpotServiceI interface {
}

// V5WebsocketSpotService :
type V5WebsocketSpotService struct {
client *WebSocketClient
}