websocket

package
v0.1.0-beta.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAuthenticationIsRequired = errors.New("authentication is required")
)

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewDeribitWsClient

func NewDeribitWsClient(cfg *deribit.Configuration) *Client

func (*Client) Auth

func (c *Client) Auth(apiKey string, secretKey string) (err error)

func (*Client) Buy

func (c *Client) Buy(params *models.BuyParams) (result models.BuyResponse, err error)

func (*Client) Call

func (c *Client) Call(method string, params interface{}, result interface{}) (err error)

Call issues JSONRPC v2 calls

func (*Client) Cancel

func (c *Client) Cancel(params *models.CancelParams) (result models2.Order, err error)

func (*Client) CancelAll

func (c *Client) CancelAll() (result string, err error)

func (*Client) CancelAllByCurrency

func (c *Client) CancelAllByCurrency(params *models.CancelAllByCurrencyParams) (result string, err error)

func (*Client) CancelAllByInstrument

func (c *Client) CancelAllByInstrument(params *models.CancelAllByInstrumentParams) (result string, err error)

func (*Client) CancelTransferByID

func (c *Client) CancelTransferByID(params *models.CancelTransferByIDParams) (result models.Transfer, err error)

func (*Client) CancelWithdrawal

func (c *Client) CancelWithdrawal(params *models.CancelWithdrawalParams) (result models.Withdrawal, err error)

func (*Client) ChangeSubaccountName

func (c *Client) ChangeSubaccountName(params *models.ChangeSubaccountNameParams) (result string, err error)

func (*Client) ClosePosition

func (c *Client) ClosePosition(params *models.ClosePositionParams) (result models.ClosePositionResponse, err error)

func (*Client) CreateDepositAddress

func (c *Client) CreateDepositAddress(params *models.CreateDepositAddressParams) (result models.DepositAddress, err error)

func (*Client) CreateSubaccount

func (c *Client) CreateSubaccount() (result models.Subaccount, err error)

func (*Client) DisableCancelOnDisconnect

func (c *Client) DisableCancelOnDisconnect() (result string, err error)

func (*Client) DisableHeartbeat

func (c *Client) DisableHeartbeat() (result string, err error)

func (*Client) DisableTfaForSubaccount

func (c *Client) DisableTfaForSubaccount(params *models.DisableTfaForSubaccountParams) (result string, err error)

func (*Client) Edit

func (c *Client) Edit(params *models.EditParams) (result models.EditResponse, err error)

func (*Client) Emit

func (c *Client) Emit(event interface{}, arguments ...interface{}) *emission.Emitter

Emit emits an event

func (*Client) EnableCancelOnDisconnect

func (c *Client) EnableCancelOnDisconnect() (result string, err error)

func (*Client) GetAccountSummary

func (c *Client) GetAccountSummary(params *models.GetAccountSummaryParams) (result models.AccountSummary, err error)

func (*Client) GetAnnouncements

func (c *Client) GetAnnouncements() (result []models.Announcement, err error)

func (*Client) GetBookSummaryByCurrency

func (c *Client) GetBookSummaryByCurrency(params *models.GetBookSummaryByCurrencyParams) (result []models.BookSummary, err error)

func (*Client) GetBookSummaryByInstrument

func (c *Client) GetBookSummaryByInstrument(params *models.GetBookSummaryByInstrumentParams) (result []models.BookSummary, err error)

func (*Client) GetContractSize

func (c *Client) GetContractSize(params *models.GetContractSizeParams) (result models.GetContractSizeResponse, err error)

func (*Client) GetCurrencies

func (c *Client) GetCurrencies() (result []models.Currency, err error)

func (*Client) GetCurrentDepositAddress

func (c *Client) GetCurrentDepositAddress(params *models.GetCurrentDepositAddressParams) (result models.DepositAddress, err error)

func (*Client) GetDeposits

func (c *Client) GetDeposits(params *models.GetDepositsParams) (result models.GetDepositsResponse, err error)

func (*Client) GetEmailLanguage

func (c *Client) GetEmailLanguage() (result string, err error)

func (*Client) GetFundingChartData

func (c *Client) GetFundingChartData(params *models.GetFundingChartDataParams) (result models.GetFundingChartDataResponse, err error)

func (*Client) GetHistoricalVolatility

func (c *Client) GetHistoricalVolatility(params *models.GetHistoricalVolatilityParams) (result models.GetHistoricalVolatilityResponse, err error)

func (*Client) GetIndex

func (c *Client) GetIndex(params *models.GetIndexParams) (result models.GetIndexResponse, err error)

func (*Client) GetInstruments

func (c *Client) GetInstruments(params *models.GetInstrumentsParams) (result []models.Instrument, err error)

func (*Client) GetLastSettlementsByCurrency

func (c *Client) GetLastSettlementsByCurrency(params *models.GetLastSettlementsByCurrencyParams) (result models.GetLastSettlementsResponse, err error)

func (*Client) GetLastSettlementsByInstrument

func (c *Client) GetLastSettlementsByInstrument(params *models.GetLastSettlementsByInstrumentParams) (result models.GetLastSettlementsResponse, err error)

func (*Client) GetLastTradesByCurrency

func (c *Client) GetLastTradesByCurrency(params *models.GetLastTradesByCurrencyParams) (result models.GetLastTradesResponse, err error)

func (*Client) GetLastTradesByCurrencyAndTime

func (c *Client) GetLastTradesByCurrencyAndTime(params *models.GetLastTradesByCurrencyAndTimeParams) (result models.GetLastTradesResponse, err error)

func (*Client) GetLastTradesByInstrument

func (c *Client) GetLastTradesByInstrument(params *models.GetLastTradesByInstrumentParams) (result models.GetLastTradesResponse, err error)

func (*Client) GetLastTradesByInstrumentAndTime

func (c *Client) GetLastTradesByInstrumentAndTime(params *models.GetLastTradesByInstrumentAndTimeParams) (result models.GetLastTradesResponse, err error)

func (*Client) GetMargins

func (c *Client) GetMargins(params *models.GetMarginsParams) (result models.GetMarginsResponse, err error)

func (*Client) GetNewAnnouncements

func (c *Client) GetNewAnnouncements() (result []models.Announcement, err error)

func (*Client) GetOpenOrdersByCurrency

func (c *Client) GetOpenOrdersByCurrency(params *models.GetOpenOrdersByCurrencyParams) (result []models2.Order, err error)

func (*Client) GetOpenOrdersByInstrument

func (c *Client) GetOpenOrdersByInstrument(params *models.GetOpenOrdersByInstrumentParams) (result []models2.Order, err error)

func (*Client) GetOrderBook

func (c *Client) GetOrderBook(params *models.GetOrderBookParams) (result models.GetOrderBookResponse, err error)

func (*Client) GetOrderHistoryByCurrency

func (c *Client) GetOrderHistoryByCurrency(params *models.GetOrderHistoryByCurrencyParams) (result []models2.Order, err error)

func (*Client) GetOrderHistoryByInstrument

func (c *Client) GetOrderHistoryByInstrument(params *models.GetOrderHistoryByInstrumentParams) (result []models2.Order, err error)

func (*Client) GetOrderMarginByIDs

func (c *Client) GetOrderMarginByIDs(params *models.GetOrderMarginByIDsParams) (result models.GetOrderMarginByIDsResponse, err error)

func (*Client) GetOrderState

func (c *Client) GetOrderState(params *models.GetOrderStateParams) (result models2.Order, err error)

func (*Client) GetPosition

func (c *Client) GetPosition(params *models.GetPositionParams) (result models.Position, err error)

func (*Client) GetPositions

func (c *Client) GetPositions(params *models.GetPositionsParams) (result []models.Position, err error)

func (*Client) GetSettlementHistoryByCurrency

func (c *Client) GetSettlementHistoryByCurrency(params *models.GetSettlementHistoryByCurrencyParams) (result models.GetSettlementHistoryResponse, err error)

func (*Client) GetSettlementHistoryByInstrument

func (c *Client) GetSettlementHistoryByInstrument(params *models.GetSettlementHistoryByInstrumentParams) (result models.GetSettlementHistoryResponse, err error)

func (*Client) GetStopOrderHistory

func (c *Client) GetStopOrderHistory(params *models.GetStopOrderHistoryParams) (result models.GetStopOrderHistoryResponse, err error)

func (*Client) GetSubaccounts

func (c *Client) GetSubaccounts(params *models.GetSubaccountsParams) (result []models.Subaccount, err error)

func (*Client) GetSubaccountsDetails

func (c *Client) GetSubaccountsDetails(params *models.GetSubaccountsDetailsParams) (result []models.SubaccountsDetails, err error)

func (*Client) GetTime

func (c *Client) GetTime() (result int64, err error)

func (*Client) GetTradeVolumes

func (c *Client) GetTradeVolumes() (result models.GetTradeVolumesResponse, err error)

func (*Client) GetTradingviewChartData

func (c *Client) GetTradingviewChartData(params *models.GetTradingviewChartDataParams) (result models.GetTradingviewChartDataResponse, err error)

func (*Client) GetTransfers

func (c *Client) GetTransfers(params *models.GetTransfersParams) (result models.GetTransfersResponse, err error)

func (*Client) GetUserTradesByCurrency

func (c *Client) GetUserTradesByCurrency(params *models.GetUserTradesByCurrencyParams) (result models.GetUserTradesResponse, err error)

func (*Client) GetUserTradesByCurrencyAndTime

func (c *Client) GetUserTradesByCurrencyAndTime(params *models.GetUserTradesByCurrencyAndTimeParams) (result models.GetUserTradesResponse, err error)

func (*Client) GetUserTradesByInstrument

func (c *Client) GetUserTradesByInstrument(params *models.GetUserTradesByInstrumentParams) (result models.GetUserTradesResponse, err error)

func (*Client) GetUserTradesByInstrumentAndTime

func (c *Client) GetUserTradesByInstrumentAndTime(params *models.GetUserTradesByInstrumentAndTimeParams) (result models.GetUserTradesResponse, err error)

func (*Client) GetUserTradesByOrder

func (c *Client) GetUserTradesByOrder(params *models.GetUserTradesByOrderParams) (result models.GetUserTradesResponse, err error)

func (*Client) GetWithdrawals

func (c *Client) GetWithdrawals(params *models.GetWithdrawalsParams) (result []models.Withdrawal, err error)

func (*Client) Handle

func (c *Client) Handle(ctx context.Context, conn *jsonrpc2.Conn, req *jsonrpc2.Request)

Handle implements jsonrpc2.Handler

func (*Client) Hello

func (c *Client) Hello(params *models.HelloParams) (result models.HelloResponse, err error)

func (*Client) IsConnected

func (c *Client) IsConnected() bool

IsConnected returns the WebSocket connection state

func (*Client) Logout

func (c *Client) Logout() (err error)

func (*Client) Off

func (c *Client) Off(event interface{}, listener interface{}) *emission.Emitter

Off removes a listener for an event

func (*Client) On

func (c *Client) On(event interface{}, listener interface{}) *emission.Emitter

On adds a listener to a specific event

func (*Client) PrivateSubscribe

func (c *Client) PrivateSubscribe(params *models.SubscribeParams) (result models.SubscribeResponse, err error)

func (*Client) PrivateUnsubscribe

func (c *Client) PrivateUnsubscribe(params *models.UnsubscribeParams) (result models.UnsubscribeResponse, err error)

func (*Client) PublicSubscribe

func (c *Client) PublicSubscribe(params *models.SubscribeParams) (result models.SubscribeResponse, err error)

func (*Client) PublicUnsubscribe

func (c *Client) PublicUnsubscribe(params *models.UnsubscribeParams) (result models.UnsubscribeResponse, err error)

func (*Client) Sell

func (c *Client) Sell(params *models.SellParams) (result models.SellResponse, err error)

func (*Client) SetAnnouncementAsRead

func (c *Client) SetAnnouncementAsRead(params *models.SetAnnouncementAsReadParams) (result string, err error)

func (*Client) SetEmailForSubaccount

func (c *Client) SetEmailForSubaccount(params *models.SetEmailForSubaccountParams) (result string, err error)

func (*Client) SetEmailLanguage

func (c *Client) SetEmailLanguage(params *models.SetEmailLanguageParams) (result string, err error)

func (*Client) SetHeartbeat

func (c *Client) SetHeartbeat(params *models.SetHeartbeatParams) (result string, err error)

func (*Client) SetPasswordForSubaccount

func (c *Client) SetPasswordForSubaccount(params *models.SetPasswordForSubaccountParams) (result string, err error)

func (*Client) Subscribe

func (c *Client) Subscribe(channels []string)

func (*Client) Test

func (c *Client) Test() (result models.TestResponse, err error)

func (*Client) Ticker

func (c *Client) Ticker(params *models.TickerParams) (result models.TickerResponse, err error)

func (*Client) ToggleNotificationsFromSubaccount

func (c *Client) ToggleNotificationsFromSubaccount(params *models.ToggleNotificationsFromSubaccountParams) (result string, err error)

func (*Client) ToggleSubaccountLogin

func (c *Client) ToggleSubaccountLogin(params *models.ToggleSubaccountLoginParams) (result string, err error)

func (*Client) Withdraw

func (c *Client) Withdraw(params *models.WithdrawParams) (result models.Withdrawal, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL