Versions in this module Expand all Collapse all v1 v1.0.2 May 30, 2025 Changes in this version + const MaxTryTimes + const RealBaseURL + const TestBaseURL + var ErrAuthenticationIsRequired = errors.New("authentication is required") + 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 + func (c *Client) Auth(apiKey string, secretKey string) (err error) + func (c *Client) Buy(params *models.BuyParams) (result models.BuyResponse, err error) + func (c *Client) Call(method string, params interface{}, result interface{}) (err error) + func (c *Client) Cancel(params *models.CancelParams) (result models.Order, err error) + func (c *Client) CancelAll() (result string, err error) + func (c *Client) CancelAllByCurrency(params *models.CancelAllByCurrencyParams) (result string, err error) + func (c *Client) CancelAllByInstrument(params *models.CancelAllByInstrumentParams) (result string, err error) + func (c *Client) CancelTransferByID(params *models.CancelTransferByIDParams) (result models.Transfer, err error) + func (c *Client) CancelWithdrawal(params *models.CancelWithdrawalParams) (result models.Withdrawal, err error) + func (c *Client) ChangeSubaccountName(params *models.ChangeSubaccountNameParams) (result string, err error) + func (c *Client) ClosePosition(params *models.ClosePositionParams) (result models.ClosePositionResponse, err error) + func (c *Client) CreateDepositAddress(params *models.CreateDepositAddressParams) (result models.DepositAddress, err error) + func (c *Client) CreateSubaccount() (result models.Subaccount, err error) + func (c *Client) DisableCancelOnDisconnect() (result string, err error) + func (c *Client) DisableHeartbeat() (result string, err error) + func (c *Client) DisableTfaForSubaccount(params *models.DisableTfaForSubaccountParams) (result string, err error) + func (c *Client) Edit(params *models.EditParams) (result models.EditResponse, err error) + func (c *Client) Emit(event interface{}, arguments ...interface{}) *emission.Emitter + func (c *Client) EnableCancelOnDisconnect() (result string, err error) + func (c *Client) GetAccountSummary(params *models.GetAccountSummaryParams) (result models.AccountSummary, err error) + func (c *Client) GetAnnouncements() (result []models.Announcement, err error) + func (c *Client) GetBookSummaryByCurrency(params *models.GetBookSummaryByCurrencyParams) (result []models.BookSummary, err error) + func (c *Client) GetBookSummaryByInstrument(params *models.GetBookSummaryByInstrumentParams) (result []models.BookSummary, err error) + func (c *Client) GetContractSize(params *models.GetContractSizeParams) (result models.GetContractSizeResponse, err error) + func (c *Client) GetCurrencies() (result []models.Currency, err error) + func (c *Client) GetCurrentDepositAddress(params *models.GetCurrentDepositAddressParams) (result models.DepositAddress, err error) + func (c *Client) GetDeposits(params *models.GetDepositsParams) (result models.GetDepositsResponse, err error) + func (c *Client) GetEmailLanguage() (result string, err error) + func (c *Client) GetFundingChartData(params *models.GetFundingChartDataParams) (result models.GetFundingChartDataResponse, err error) + func (c *Client) GetHistoricalVolatility(params *models.GetHistoricalVolatilityParams) (result models.GetHistoricalVolatilityResponse, err error) + func (c *Client) GetIndex(params *models.GetIndexParams) (result models.GetIndexResponse, err error) + func (c *Client) GetInstruments(params *models.GetInstrumentsParams) (result []models.Instrument, err error) + func (c *Client) GetLastSettlementsByCurrency(params *models.GetLastSettlementsByCurrencyParams) (result models.GetLastSettlementsResponse, err error) + func (c *Client) GetLastSettlementsByInstrument(params *models.GetLastSettlementsByInstrumentParams) (result models.GetLastSettlementsResponse, err error) + func (c *Client) GetLastTradesByCurrency(params *models.GetLastTradesByCurrencyParams) (result models.GetLastTradesResponse, err error) + func (c *Client) GetLastTradesByCurrencyAndTime(params *models.GetLastTradesByCurrencyAndTimeParams) (result models.GetLastTradesResponse, err error) + func (c *Client) GetLastTradesByInstrument(params *models.GetLastTradesByInstrumentParams) (result models.GetLastTradesResponse, err error) + func (c *Client) GetLastTradesByInstrumentAndTime(params *models.GetLastTradesByInstrumentAndTimeParams) (result models.GetLastTradesResponse, err error) + func (c *Client) GetMargins(params *models.GetMarginsParams) (result models.GetMarginsResponse, err error) + func (c *Client) GetNewAnnouncements() (result []models.Announcement, err error) + func (c *Client) GetOpenOrdersByCurrency(params *models.GetOpenOrdersByCurrencyParams) (result []models.Order, err error) + func (c *Client) GetOpenOrdersByInstrument(params *models.GetOpenOrdersByInstrumentParams) (result []models.Order, err error) + func (c *Client) GetOrderBook(params *models.GetOrderBookParams) (result models.GetOrderBookResponse, err error) + func (c *Client) GetOrderHistoryByCurrency(params *models.GetOrderHistoryByCurrencyParams) (result []models.Order, err error) + func (c *Client) GetOrderHistoryByInstrument(params *models.GetOrderHistoryByInstrumentParams) (result []models.Order, err error) + func (c *Client) GetOrderMarginByIDs(params *models.GetOrderMarginByIDsParams) (result models.GetOrderMarginByIDsResponse, err error) + func (c *Client) GetOrderState(params *models.GetOrderStateParams) (result models.Order, err error) + func (c *Client) GetPosition(params *models.GetPositionParams) (result models.Position, err error) + func (c *Client) GetPositions(params *models.GetPositionsParams) (result []models.Position, err error) + func (c *Client) GetSettlementHistoryByCurrency(params *models.GetSettlementHistoryByCurrencyParams) (result models.GetSettlementHistoryResponse, err error) + func (c *Client) GetSettlementHistoryByInstrument(params *models.GetSettlementHistoryByInstrumentParams) (result models.GetSettlementHistoryResponse, err error) + func (c *Client) GetStopOrderHistory(params *models.GetStopOrderHistoryParams) (result models.GetStopOrderHistoryResponse, err error) + func (c *Client) GetSubaccounts(params *models.GetSubaccountsParams) (result []models.Subaccount, err error) + func (c *Client) GetSubaccountsDetails(params *models.GetSubaccountsDetailsParams) (result []models.SubaccountsDetails, err error) + func (c *Client) GetTime() (result int64, err error) + func (c *Client) GetTradeVolumes() (result models.GetTradeVolumesResponse, err error) + func (c *Client) GetTradingviewChartData(params *models.GetTradingviewChartDataParams) (result models.GetTradingviewChartDataResponse, err error) + func (c *Client) GetTransfers(params *models.GetTransfersParams) (result models.GetTransfersResponse, err error) + func (c *Client) GetUserTradesByCurrency(params *models.GetUserTradesByCurrencyParams) (result models.GetUserTradesResponse, err error) + func (c *Client) GetUserTradesByCurrencyAndTime(params *models.GetUserTradesByCurrencyAndTimeParams) (result models.GetUserTradesResponse, err error) + func (c *Client) GetUserTradesByInstrument(params *models.GetUserTradesByInstrumentParams) (result models.GetUserTradesResponse, err error) + func (c *Client) GetUserTradesByInstrumentAndTime(params *models.GetUserTradesByInstrumentAndTimeParams) (result models.GetUserTradesResponse, err error) + func (c *Client) GetUserTradesByOrder(params *models.GetUserTradesByOrderParams) (result models.GetUserTradesResponse, err error) + func (c *Client) GetWithdrawals(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(params *models.HelloParams) (result models.HelloResponse, err error) + func (c *Client) IsConnected() bool + func (c *Client) Logout() (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(params *models.SubscribeParams) (result models.SubscribeResponse, err error) + func (c *Client) PrivateUnsubscribe(params *models.UnsubscribeParams) (result models.UnsubscribeResponse, err error) + func (c *Client) PublicSubscribe(params *models.SubscribeParams) (result models.SubscribeResponse, err error) + func (c *Client) PublicUnsubscribe(params *models.UnsubscribeParams) (result models.UnsubscribeResponse, err error) + func (c *Client) Sell(params *models.SellParams) (result models.SellResponse, err error) + func (c *Client) SetAnnouncementAsRead(params *models.SetAnnouncementAsReadParams) (result string, err error) + func (c *Client) SetEmailForSubaccount(params *models.SetEmailForSubaccountParams) (result string, err error) + func (c *Client) SetEmailLanguage(params *models.SetEmailLanguageParams) (result string, err error) + func (c *Client) SetHeartbeat(params *models.SetHeartbeatParams) (result string, err error) + func (c *Client) SetPasswordForSubaccount(params *models.SetPasswordForSubaccountParams) (result string, err error) + func (c *Client) Subscribe(channels []string) + func (c *Client) Test() (result models.TestResponse, err error) + func (c *Client) Ticker(params *models.TickerParams) (result models.TickerResponse, err error) + func (c *Client) ToggleNotificationsFromSubaccount(params *models.ToggleNotificationsFromSubaccountParams) (result string, err error) + func (c *Client) ToggleSubaccountLogin(params *models.ToggleSubaccountLoginParams) (result string, err error) + func (c *Client) Withdraw(params *models.WithdrawParams) (result models.Withdrawal, err error) + type Configuration struct + Addr string + ApiKey string + AutoReconnect bool + Ctx context.Context + DebugMode bool + SecretKey string + type Event struct + Channel string + Data json.RawMessage + type ObjectStream struct + func NewObjectStream(conn *websocket.Conn) ObjectStream + func (t ObjectStream) Close() error + func (t ObjectStream) ReadObject(v interface{}) error + func (t ObjectStream) WriteObject(obj interface{}) error + type Token struct + AccessToken string