Versions in this module Expand all Collapse all v1 v1.1.2 Sep 30, 2021 Changes in this version type Client + func (c *Client) Stop() v1.1.1 Jul 29, 2021 Changes in this version type Client + func (c *Client) ResetConnection() + func (c *Client) Start() error v1.1.0 Jul 28, 2021 Changes in this version + const MaxTryTimes + const RealBaseURL + const TestBaseURL + var ErrAuthenticationIsRequired = errors.New("authentication is required") + var ErrNotConnected = errors.New("not connected") + func Float32Pointer(value float32) *float32 + func Float64Pointer(value float64) *float64 + func Int32Pointer(value int32) *int32 + func Int64Pointer(value int64) *int64 + func IntPointer(value int) *int + func StringPointer(value string) *string + type Client struct + func New(cfg *Configuration) (*Client, error) + func (c *Client) Auth(ctx context.Context) (result models.AuthResponse, err error) + func (c *Client) Buy(ctx context.Context, params *models.BuyParams) (result models.BuyResponse, err error) + func (c *Client) Call(ctx context.Context, method string, params interface{}, result interface{}) (err error) + func (c *Client) Cancel(ctx context.Context, params *models.CancelParams) (result models.Order, err error) + func (c *Client) CancelAll(ctx context.Context) (result string, err error) + func (c *Client) CancelAllByCurrency(ctx context.Context, params *models.CancelAllByCurrencyParams) (result uint, err error) + func (c *Client) CancelAllByInstrument(ctx context.Context, params *models.CancelAllByInstrumentParams) (result uint, err error) + func (c *Client) CancelAllByLabel(ctx context.Context, params *models.CancelAllByInstrumentParams) (result uint, err error) + func (c *Client) CancelTransferByID(ctx context.Context, params *models.CancelTransferByIDParams) (result models.Transfer, err error) + func (c *Client) CancelWithdrawal(ctx context.Context, params *models.CancelWithdrawalParams) (result models.Withdrawal, err error) + func (c *Client) ChangeSubaccountName(ctx context.Context, params *models.ChangeSubaccountNameParams) (result string, err error) + func (c *Client) ClosePosition(ctx context.Context, params *models.ClosePositionParams) (result models.ClosePositionResponse, err error) + func (c *Client) CreateDepositAddress(ctx context.Context, params *models.CreateDepositAddressParams) (result models.DepositAddress, err error) + func (c *Client) CreateSubaccount(ctx context.Context) (result models.Subaccount, err error) + func (c *Client) DisableCancelOnDisconnect(ctx context.Context, params *models.SessionParams) (result string, err error) + func (c *Client) DisableHeartbeat(ctx context.Context) (result string, err error) + func (c *Client) DisableTfaForSubaccount(ctx context.Context, params *models.DisableTfaForSubaccountParams) (result string, err error) + func (c *Client) Edit(ctx context.Context, params *models.EditParams) (result models.EditResponse, err error) + func (c *Client) EditByLabel(ctx context.Context, params *models.EditParams) (result models.EditResponse, err error) + func (c *Client) Emit(event interface{}, arguments ...interface{}) *emission.Emitter + func (c *Client) EnableCancelOnDisconnect(ctx context.Context, params *models.SessionParams) (result string, err error) + func (c *Client) GetAccountSummary(ctx context.Context, params *models.GetAccountSummaryParams) (result models.AccountSummary, err error) + func (c *Client) GetAnnouncements(ctx context.Context) (result []models.Announcement, err error) + func (c *Client) GetBookSummaryByCurrency(ctx context.Context, params *models.GetBookSummaryByCurrencyParams) (result []models.BookSummary, err error) + func (c *Client) GetBookSummaryByInstrument(ctx context.Context, params *models.GetBookSummaryByInstrumentParams) (result []models.BookSummary, err error) + func (c *Client) GetContractSize(ctx context.Context, params *models.GetContractSizeParams) (result models.GetContractSizeResponse, err error) + func (c *Client) GetCurrencies(ctx context.Context) (result []models.Currency, err error) + func (c *Client) GetCurrentDepositAddress(ctx context.Context, params *models.GetCurrentDepositAddressParams) (result models.DepositAddress, err error) + func (c *Client) GetDeposits(ctx context.Context, params *models.GetDepositsParams) (result models.GetDepositsResponse, err error) + func (c *Client) GetEmailLanguage(ctx context.Context) (result string, err error) + func (c *Client) GetFundingChartData(ctx context.Context, params *models.GetFundingChartDataParams) (result models.GetFundingChartDataResponse, err error) + func (c *Client) GetHistoricalVolatility(ctx context.Context, params *models.GetHistoricalVolatilityParams) (result models.GetHistoricalVolatilityResponse, err error) + func (c *Client) GetIndex(ctx context.Context, params *models.GetIndexParams) (result models.GetIndexResponse, err error) + func (c *Client) GetInstruments(ctx context.Context, params *models.GetInstrumentsParams) (result []models.Instrument, err error) + func (c *Client) GetLastSettlementsByCurrency(ctx context.Context, params *models.GetLastSettlementsByCurrencyParams) (result models.GetLastSettlementsResponse, err error) + func (c *Client) GetLastSettlementsByInstrument(ctx context.Context, params *models.GetLastSettlementsByInstrumentParams) (result models.GetLastSettlementsResponse, err error) + func (c *Client) GetLastTradesByCurrency(ctx context.Context, params *models.GetLastTradesByCurrencyParams) (result models.GetLastTradesResponse, err error) + func (c *Client) GetLastTradesByCurrencyAndTime(ctx context.Context, params *models.GetLastTradesByCurrencyAndTimeParams) (result models.GetLastTradesResponse, err error) + func (c *Client) GetLastTradesByInstrument(ctx context.Context, params *models.GetLastTradesByInstrumentParams) (result models.GetLastTradesResponse, err error) + func (c *Client) GetLastTradesByInstrumentAndTime(ctx context.Context, params *models.GetLastTradesByInstrumentAndTimeParams) (result models.GetLastTradesResponse, err error) + func (c *Client) GetMargins(ctx context.Context, params *models.GetMarginsParams) (result models.GetMarginsResponse, err error) + func (c *Client) GetNewAnnouncements(ctx context.Context) (result []models.Announcement, err error) + func (c *Client) GetOpenOrdersByCurrency(ctx context.Context, params *models.GetOpenOrdersByCurrencyParams) (result []models.Order, err error) + func (c *Client) GetOpenOrdersByInstrument(ctx context.Context, params *models.GetOpenOrdersByInstrumentParams) (result []models.Order, err error) + func (c *Client) GetOrderBook(ctx context.Context, params *models.GetOrderBookParams) (result models.GetOrderBookResponse, err error) + func (c *Client) GetOrderHistoryByCurrency(ctx context.Context, params *models.GetOrderHistoryByCurrencyParams) (result []models.Order, err error) + func (c *Client) GetOrderHistoryByInstrument(ctx context.Context, params *models.GetOrderHistoryByInstrumentParams) (result []models.Order, err error) + func (c *Client) GetOrderMarginByIDs(ctx context.Context, params *models.GetOrderMarginByIDsParams) (result models.GetOrderMarginByIDsResponse, err error) + func (c *Client) GetOrderState(ctx context.Context, params *models.GetOrderStateParams) (result models.Order, err error) + func (c *Client) GetPosition(ctx context.Context, params *models.GetPositionParams) (result models.Position, err error) + func (c *Client) GetPositions(ctx context.Context, params *models.GetPositionsParams) (result []models.Position, err error) + func (c *Client) GetSettlementHistoryByCurrency(ctx context.Context, params *models.GetSettlementHistoryByCurrencyParams) (result models.GetSettlementHistoryResponse, err error) + func (c *Client) GetSettlementHistoryByInstrument(ctx context.Context, params *models.GetSettlementHistoryByInstrumentParams) (result models.GetSettlementHistoryResponse, err error) + func (c *Client) GetSubaccounts(ctx context.Context, params *models.GetSubaccountsParams) (result []models.Subaccount, err error) + func (c *Client) GetTime(ctx context.Context) (result int64, err error) + func (c *Client) GetTradeVolumes(ctx context.Context, params *models.GetTradeVolumesParams) (result models.GetTradeVolumesResponse, err error) + func (c *Client) GetTradingviewChartData(ctx context.Context, params *models.GetTradingviewChartDataParams) (result models.GetTradingviewChartDataResponse, err error) + func (c *Client) GetTransfers(ctx context.Context, params *models.GetTransfersParams) (result models.GetTransfersResponse, err error) + func (c *Client) GetUserTradesByCurrency(ctx context.Context, params *models.GetUserTradesByCurrencyParams) (result models.GetUserTradesResponse, err error) + func (c *Client) GetUserTradesByCurrencyAndTime(ctx context.Context, params *models.GetUserTradesByCurrencyAndTimeParams) (result models.GetUserTradesResponse, err error) + func (c *Client) GetUserTradesByInstrument(ctx context.Context, params *models.GetUserTradesByInstrumentParams) (result models.GetUserTradesResponse, err error) + func (c *Client) GetUserTradesByInstrumentAndTime(ctx context.Context, params *models.GetUserTradesByInstrumentAndTimeParams) (result models.GetUserTradesResponse, err error) + func (c *Client) GetUserTradesByOrder(ctx context.Context, params *models.GetUserTradesByOrderParams) (result models.GetUserTradesResponse, err error) + func (c *Client) GetWithdrawals(ctx context.Context, params *models.GetWithdrawalsParams) (result []models.Withdrawal, err error) + func (c *Client) Handle(ctx context.Context, conn *jsonrpc2.Conn, req *jsonrpc2.Request) + func (c *Client) Hello(ctx context.Context, params *models.HelloParams) (result models.HelloResponse, err error) + func (c *Client) IsConnected() bool + func (c *Client) Logout(ctx context.Context) (err error) + func (c *Client) Off(event interface{}, listener interface{}) *emission.Emitter + func (c *Client) On(event interface{}, listener interface{}) *emission.Emitter + func (c *Client) PrivateSubscribe(ctx context.Context, params *models.SubscribeParams) (result models.SubscribeResponse, err error) + func (c *Client) PrivateUnsubscribe(ctx context.Context, params *models.UnsubscribeParams) (result models.UnsubscribeResponse, err error) + func (c *Client) PublicSubscribe(ctx context.Context, params *models.SubscribeParams) (result models.SubscribeResponse, err error) + func (c *Client) PublicUnsubscribe(ctx context.Context, params *models.UnsubscribeParams) (result models.UnsubscribeResponse, err error) + func (c *Client) Sell(ctx context.Context, params *models.SellParams) (result models.SellResponse, err error) + func (c *Client) SetAnnouncementAsRead(ctx context.Context, params *models.SetAnnouncementAsReadParams) (result string, err error) + func (c *Client) SetEmailForSubaccount(ctx context.Context, params *models.SetEmailForSubaccountParams) (result string, err error) + func (c *Client) SetEmailLanguage(ctx context.Context, params *models.SetEmailLanguageParams) (result string, err error) + func (c *Client) SetHeartbeat(ctx context.Context, params *models.SetHeartbeatParams) (result string, err error) + func (c *Client) SetPasswordForSubaccount(ctx context.Context, params *models.SetPasswordForSubaccountParams) (result string, err error) + func (c *Client) Subscribe(channels []string) + func (c *Client) Test(ctx context.Context) (result models.TestResponse, err error) + func (c *Client) Ticker(ctx context.Context, params *models.TickerParams) (result models.TickerResponse, err error) + func (c *Client) ToggleNotificationsFromSubaccount(ctx context.Context, params *models.ToggleNotificationsFromSubaccountParams) (result string, err error) + func (c *Client) ToggleSubaccountLogin(ctx context.Context, params *models.ToggleSubaccountLoginParams) (result string, err error) + func (c *Client) Withdraw(ctx context.Context, params *models.WithdrawParams) (result models.Withdrawal, err error) + type Configuration struct + Addr string + ApiKey string + AutoReconnect bool + DebugMode bool + SecretKey string + type Event struct + Channel string + Data json.RawMessage