Documentation
¶
Index ¶
- type Client
- func (c *Client) GetBrokerService() *broker.BrokerAccountClient
- func (c *Client) GetMixAccountService() *mix.MixAccountClient
- func (c *Client) GetMixMarketService() *mix.MixMarketClient
- func (c *Client) GetMixOrderService() *mix.MixOrderClient
- func (c *Client) GetMixPlanService() *mix.MixPlanClient
- func (c *Client) GetMixPositionService() *mix.MixPositionClient
- func (c *Client) GetMixTraceService() *mix.MixTraceClient
- func (c *Client) GetSpotAccountService() *spot.SpotAccountClient
- func (c *Client) GetSpotMarketService() *spot.SpotMarketClient
- func (c *Client) GetSpotOrderService() *spot.SpotOrderClient
- func (c *Client) GetSpotPublicService() *spot.SpotPublicClient
- func (c *Client) SetHttpClient(client *http.Client) *Client
- type InterClient
- type InterRest
- type InterRestPublic
- type Rest
- func (r *Rest) AgentCustomerList() (*v1.AgentCustomerList, error)
- func (r *Rest) AgentCustomerTradeVolumeList() (*v1.AgentCustomerTradeVolumeList, error)
- func (r *Rest) CancelOrder(productType, symbol string) (*v2.CancelOrder, error)
- func (r *Rest) ChangeMarginMode(productType, symbol, marginCoin, marginMode string) (*v2.ChangeMarginMode, error)
- func (r *Rest) ChangePositionMode(productType, posMode string) (*v2.ChangePositionMode, error)
- func (r *Rest) ClosePositions(productType string) (*v2.ClosePositions, error)
- func (r *Rest) GetAccountInfo() (*v2.GetAccountInfo, error)
- func (r *Rest) GetAccountList(productType string) (*v2.GetAccountList, error)
- func (r *Rest) GetAllAccountBalance() (*v2.GetAllAccountBalance, error)
- func (r *Rest) GetApiKeyList(subAccountUid string) (*v2.GetApiKeyList, error)
- func (r *Rest) GetContractConfig(productType string) (*v2.GetContractConfig, error)
- func (r *Rest) GetPendingOrders(productType string) (*v2.GetPendingOrders, error)
- func (r *Rest) ModifyOrder(productType, symbol, newClientOid string) (*v2.ModifyOrder, error)
- func (r *Rest) PlaceOrder(productType, symbol, side, size, marginMode, marginCoin, orderType string) (*v2.PlaceOrder, error)
- type UnscribeFunc
- type WsClient
- func (ws *WsClient) Close()
- func (ws *WsClient) Init(listener common.OnReceive, errorListener common.OnReceive, secure bool, ...) *ws.BitgetWsClient
- func (ws *WsClient) SubscribeForContracts(channel string, contracts ...string) UnscribeFunc
- func (ws *WsClient) SubscribeFutures(listener common.OnReceive, channel string, symbols ...string) UnscribeFunc
- func (ws *WsClient) SubscribeFuturesOrder(listener common.OnReceive) UnscribeFunc
- func (ws *WsClient) SubscribeSpot(channel string, symbols ...string) UnscribeFunc
- func (ws *WsClient) SubscribeSpotAccount() UnscribeFunc
- func (ws *WsClient) SubscribeSpotOrder(symbols ...string) UnscribeFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
client
func NewClient ¶
func NewClient(creds config.InterApiCreds) *Client
func (*Client) GetBrokerService ¶
func (c *Client) GetBrokerService() *broker.BrokerAccountClient
broker
func (*Client) GetMixAccountService ¶
func (c *Client) GetMixAccountService() *mix.MixAccountClient
mix
func (*Client) GetMixMarketService ¶
func (c *Client) GetMixMarketService() *mix.MixMarketClient
func (*Client) GetMixOrderService ¶
func (c *Client) GetMixOrderService() *mix.MixOrderClient
func (*Client) GetMixPlanService ¶
func (c *Client) GetMixPlanService() *mix.MixPlanClient
func (*Client) GetMixPositionService ¶
func (c *Client) GetMixPositionService() *mix.MixPositionClient
func (*Client) GetMixTraceService ¶
func (c *Client) GetMixTraceService() *mix.MixTraceClient
func (*Client) GetSpotAccountService ¶
func (c *Client) GetSpotAccountService() *spot.SpotAccountClient
spot
func (*Client) GetSpotMarketService ¶
func (c *Client) GetSpotMarketService() *spot.SpotMarketClient
func (*Client) GetSpotOrderService ¶
func (c *Client) GetSpotOrderService() *spot.SpotOrderClient
func (*Client) GetSpotPublicService ¶
func (c *Client) GetSpotPublicService() *spot.SpotPublicClient
type InterClient ¶
type InterClient interface { GetBrokerService() *broker.BrokerAccountClient GetMixAccountService() *mix.MixAccountClient GetMixMarketService() *mix.MixMarketClient GetMixOrderService() *mix.MixOrderClient GetMixPlanService() *mix.MixPlanClient GetMixPositionService() *mix.MixPositionClient GetMixTraceService() *mix.MixTraceClient GetSpotAccountService() *spot.SpotAccountClient GetSpotMarketService() *spot.SpotMarketClient GetSpotOrderService() *spot.SpotOrderClient GetSpotPublicService() *spot.SpotPublicClient }
type InterRest ¶
type InterRest interface { InterRestPublic GetApiKeyList(subAccountUid string) (*v2.GetApiKeyList, error) GetAccountInfo() (*v2.GetAccountInfo, error) GetAccountList(productType string) (*v2.GetAccountList, error) GetAllAccountBalance() (*v2.GetAllAccountBalance, error) ChangeMarginMode(productType, symbol, marginCoin, marginMode string) (*v2.ChangeMarginMode, error) ChangePositionMode(productType, posMode string) (*v2.ChangePositionMode, error) GetPendingOrders(productType string) (*v2.GetPendingOrders, error) PlaceOrder(productType, symbol, side, size, marginMode, marginCoin, orderType string) (*v2.PlaceOrder, error) ModifyOrder(productType, symbol, newClientOid string) (*v2.ModifyOrder, error) CancelOrder(productType, symbol string) (*v2.CancelOrder, error) ClosePositions(productType string) (*v2.ClosePositions, error) AgentCustomerList() (*v1.AgentCustomerList, error) AgentCustomerTradeVolumeList() (*v1.AgentCustomerTradeVolumeList, error) }
type InterRestPublic ¶
type InterRestPublic interface {
GetContractConfig(productType string) (*v2.GetContractConfig, error)
}
type Rest ¶
type Rest struct {
// contains filtered or unexported fields
}
func NewRest ¶
func NewRest(creds config.InterApiCreds) *Rest
func (*Rest) AgentCustomerList ¶
func (r *Rest) AgentCustomerList() (*v1.AgentCustomerList, error)
func (*Rest) AgentCustomerTradeVolumeList ¶
func (r *Rest) AgentCustomerTradeVolumeList() (*v1.AgentCustomerTradeVolumeList, error)
func (*Rest) CancelOrder ¶
func (r *Rest) CancelOrder(productType, symbol string) (*v2.CancelOrder, error)
func (*Rest) ChangeMarginMode ¶
func (r *Rest) ChangeMarginMode(productType, symbol, marginCoin, marginMode string) (*v2.ChangeMarginMode, error)
func (*Rest) ChangePositionMode ¶
func (r *Rest) ChangePositionMode(productType, posMode string) (*v2.ChangePositionMode, error)
func (*Rest) ClosePositions ¶
func (r *Rest) ClosePositions(productType string) (*v2.ClosePositions, error)
func (*Rest) GetAccountInfo ¶
func (r *Rest) GetAccountInfo() (*v2.GetAccountInfo, error)
func (*Rest) GetAccountList ¶
func (r *Rest) GetAccountList(productType string) (*v2.GetAccountList, error)
func (*Rest) GetAllAccountBalance ¶
func (r *Rest) GetAllAccountBalance() (*v2.GetAllAccountBalance, error)
func (*Rest) GetApiKeyList ¶
func (r *Rest) GetApiKeyList(subAccountUid string) (*v2.GetApiKeyList, error)
func (*Rest) GetContractConfig ¶
func (r *Rest) GetContractConfig(productType string) (*v2.GetContractConfig, error)
func (*Rest) GetPendingOrders ¶
func (r *Rest) GetPendingOrders(productType string) (*v2.GetPendingOrders, error)
order
func (*Rest) ModifyOrder ¶
func (r *Rest) ModifyOrder(productType, symbol, newClientOid string) (*v2.ModifyOrder, error)
func (*Rest) PlaceOrder ¶
func (r *Rest) PlaceOrder(productType, symbol, side, size, marginMode, marginCoin, orderType string) (*v2.PlaceOrder, error)
type UnscribeFunc ¶
type UnscribeFunc func()
type WsClient ¶
type WsClient struct {
// contains filtered or unexported fields
}
ws
func NewWsClient ¶
func NewWsClient() *WsClient
func (*WsClient) Init ¶
func (ws *WsClient) Init(listener common.OnReceive, errorListener common.OnReceive, secure bool, creds config.InterApiCreds) *ws.BitgetWsClient
func (*WsClient) SubscribeForContracts ¶
func (ws *WsClient) SubscribeForContracts(channel string, contracts ...string) UnscribeFunc
func (*WsClient) SubscribeFutures ¶
func (ws *WsClient) SubscribeFutures(listener common.OnReceive, channel string, symbols ...string) UnscribeFunc
futures
func (*WsClient) SubscribeFuturesOrder ¶
func (ws *WsClient) SubscribeFuturesOrder(listener common.OnReceive) UnscribeFunc
func (*WsClient) SubscribeSpot ¶
func (ws *WsClient) SubscribeSpot(channel string, symbols ...string) UnscribeFunc
spot
func (*WsClient) SubscribeSpotAccount ¶
func (ws *WsClient) SubscribeSpotAccount() UnscribeFunc
func (*WsClient) SubscribeSpotOrder ¶
func (ws *WsClient) SubscribeSpotOrder(symbols ...string) UnscribeFunc
Click to show internal directories.
Click to hide internal directories.