Documentation
¶
Index ¶
- Constants
- Variables
- func ChannelBookGroup(instrumentname, group string, depth int, interval string) string
- func ChannelDeribitVolatilityIndex(idxname string) string
- func ChannelUserMMPTrigger(idxname string) string
- type AccountBehavior
- type Behavior
- type DeribitWSClient
- func (c *DeribitWSClient) Auth(apiKey string, secretKey string) (err error)
- func (c *DeribitWSClient) Buy(params *models.BuyParams) (result models.BuyResponse, err error)
- func (c *DeribitWSClient) Call(method string, params interface{}, result interface{}) (err error)
- func (c *DeribitWSClient) Cancel(params *models.CancelParams) (result models2.Order, err error)
- func (c *DeribitWSClient) CancelAll() (result string, err error)
- func (c *DeribitWSClient) CancelAllByCurrency(params *models.CancelAllByCurrencyParams) (result string, err error)
- func (c *DeribitWSClient) CancelAllByInstrument(params *models.CancelAllByInstrumentParams) (result string, err error)
- func (c *DeribitWSClient) CancelTransferByID(params *models.CancelTransferByIDParams) (result models.Transfer, err error)
- func (c *DeribitWSClient) CancelWithdrawal(params *models.CancelWithdrawalParams) (result models.Withdrawal, err error)
- func (c *DeribitWSClient) CancellByLabel(params *models.CancelByLabelParams) (result int, err error)
- func (c *DeribitWSClient) ChangeSubaccountName(params *models.ChangeSubaccountNameParams) (result string, err error)
- func (c *DeribitWSClient) ClosePosition(params *models.ClosePositionParams) (result models.ClosePositionResponse, err error)
- func (c *DeribitWSClient) CreateDepositAddress(params *models.CreateDepositAddressParams) (result models.DepositAddress, err error)
- func (c *DeribitWSClient) CreateSubaccount() (result models.Subaccount, err error)
- func (c *DeribitWSClient) DisableCancelOnDisconnect() (result string, err error)
- func (c *DeribitWSClient) DisableHeartbeat() (result string, err error)
- func (c *DeribitWSClient) DisableTfaForSubaccount(params *models.DisableTfaForSubaccountParams) (result string, err error)
- func (c *DeribitWSClient) Edit(params *models.EditParams) (result models.EditResponse, err error)
- func (c *DeribitWSClient) Emit(event interface{}, arguments ...interface{}) *emission.Emitter
- func (c *DeribitWSClient) EnableCancelOnDisconnect() (result string, err error)
- func (c *DeribitWSClient) GetAccountSummary(params *models.GetAccountSummaryParams) (result models.AccountSummary, err error)
- func (c *DeribitWSClient) GetAnnouncements() (result []models.Announcement, err error)
- func (c *DeribitWSClient) GetBookSummaryByCurrency(params *models.GetBookSummaryByCurrencyParams) (result []models.BookSummary, err error)
- func (c *DeribitWSClient) GetBookSummaryByInstrument(params *models.GetBookSummaryByInstrumentParams) (result []models.BookSummary, err error)
- func (c *DeribitWSClient) GetContractSize(params *models.GetContractSizeParams) (result models.GetContractSizeResponse, err error)
- func (c *DeribitWSClient) GetCurrencies() (result []models.Currency, err error)
- func (c *DeribitWSClient) GetCurrentDepositAddress(params *models.GetCurrentDepositAddressParams) (result models.DepositAddress, err error)
- func (c *DeribitWSClient) GetDeposits(params *models.GetDepositsParams) (result models.GetDepositsResponse, err error)
- func (c *DeribitWSClient) GetEmailLanguage() (result string, err error)
- func (c *DeribitWSClient) GetFundingChartData(params *models.GetFundingChartDataParams) (result models.GetFundingChartDataResponse, err error)
- func (c *DeribitWSClient) GetHistoricalVolatility(params *models.GetHistoricalVolatilityParams) (result models.GetHistoricalVolatilityResponse, err error)
- func (c *DeribitWSClient) GetIndex(params *models.GetIndexParams) (result models.GetIndexResponse, err error)
- func (c *DeribitWSClient) GetInstruments(params *models.GetInstrumentsParams) (result []models.Instrument, err error)
- func (c *DeribitWSClient) GetLastSettlementsByCurrency(params *models.GetLastSettlementsByCurrencyParams) (result models.GetLastSettlementsResponse, err error)
- func (c *DeribitWSClient) GetLastSettlementsByInstrument(params *models.GetLastSettlementsByInstrumentParams) (result models.GetLastSettlementsResponse, err error)
- func (c *DeribitWSClient) GetLastTradesByCurrency(params *models.GetLastTradesByCurrencyParams) (result models.GetLastTradesResponse, err error)
- func (c *DeribitWSClient) GetLastTradesByCurrencyAndTime(params *models.GetLastTradesByCurrencyAndTimeParams) (result models.GetLastTradesResponse, err error)
- func (c *DeribitWSClient) GetLastTradesByInstrument(params *models.GetLastTradesByInstrumentParams) (result models.GetLastTradesResponse, err error)
- func (c *DeribitWSClient) GetLastTradesByInstrumentAndTime(params *models.GetLastTradesByInstrumentAndTimeParams) (result models.GetLastTradesResponse, err error)
- func (c *DeribitWSClient) GetMargins(params *models.GetMarginsParams) (result models.GetMarginsResponse, err error)
- func (c *DeribitWSClient) GetMarkPriceHistory(params *models.GetMarkPriceHistoryParams) (resut models.MarkPriceHistory, err error)
- func (c *DeribitWSClient) GetNewAnnouncements() (result []models.Announcement, err error)
- func (c *DeribitWSClient) GetOpenOrdersByCurrency(params *models.GetOpenOrdersByCurrencyParams) (result []models2.Order, err error)
- func (c *DeribitWSClient) GetOpenOrdersByInstrument(params *models.GetOpenOrdersByInstrumentParams) (result []models2.Order, err error)
- func (c *DeribitWSClient) GetOrderBook(params *models.GetOrderBookParams) (result models.GetOrderBookResponse, err error)
- func (c *DeribitWSClient) GetOrderHistoryByCurrency(params *models.GetOrderHistoryByCurrencyParams) (result []models2.Order, err error)
- func (c *DeribitWSClient) GetOrderHistoryByInstrument(params *models.GetOrderHistoryByInstrumentParams) (result []models2.Order, err error)
- func (c *DeribitWSClient) GetOrderMarginByIDs(params *models.GetOrderMarginByIDsParams) (result models.GetOrderMarginByIDsResponse, err error)
- func (c *DeribitWSClient) GetOrderState(params *models.GetOrderStateParams) (result models2.Order, err error)
- func (c *DeribitWSClient) GetPosition(params *models.GetPositionParams) (result models.Position, err error)
- func (c *DeribitWSClient) GetPositions(params *models.GetPositionsParams) (result []models.Position, err error)
- func (c *DeribitWSClient) GetSettlementHistoryByCurrency(params *models.GetSettlementHistoryByCurrencyParams) (result models.GetSettlementHistoryResponse, err error)
- func (c *DeribitWSClient) GetSettlementHistoryByInstrument(params *models.GetSettlementHistoryByInstrumentParams) (result models.GetSettlementHistoryResponse, err error)
- func (c *DeribitWSClient) GetStopOrderHistory(params *models.GetStopOrderHistoryParams) (result models.GetStopOrderHistoryResponse, err error)
- func (c *DeribitWSClient) GetSubaccounts(params *models.GetSubaccountsParams) (result []models.Subaccount, err error)
- func (c *DeribitWSClient) GetSubaccountsDetails(params *models.GetSubaccountsDetailsParams) (result []models.SubaccountsDetails, err error)
- func (c *DeribitWSClient) GetTime() (result int64, err error)
- func (c *DeribitWSClient) GetTradeVolumes() (result models.GetTradeVolumesResponse, err error)
- func (c *DeribitWSClient) GetTradingviewChartData(params *models.GetTradingviewChartDataParams) (result models.GetTradingviewChartDataResponse, err error)
- func (c *DeribitWSClient) GetTransfers(params *models.GetTransfersParams) (result models.GetTransfersResponse, err error)
- func (c *DeribitWSClient) GetUserTradesByCurrency(params *models.GetUserTradesByCurrencyParams) (result models.GetUserTradesResponse, err error)
- func (c *DeribitWSClient) GetUserTradesByCurrencyAndTime(params *models.GetUserTradesByCurrencyAndTimeParams) (result models.GetUserTradesResponse, err error)
- func (c *DeribitWSClient) GetUserTradesByInstrument(params *models.GetUserTradesByInstrumentParams) (result models.GetUserTradesResponse, err error)
- func (c *DeribitWSClient) GetUserTradesByInstrumentAndTime(params *models.GetUserTradesByInstrumentAndTimeParams) (result models.GetUserTradesResponse, err error)
- func (c *DeribitWSClient) GetUserTradesByOrder(params *models.GetUserTradesByOrderParams) (result models.GetUserTradesResponse, err error)
- func (c *DeribitWSClient) GetWithdrawals(params *models.GetWithdrawalsParams) (result []models.Withdrawal, err error)
- func (c *DeribitWSClient) Handle(ctx context.Context, conn *jsonrpc2.Conn, req *jsonrpc2.Request)
- func (c *DeribitWSClient) Hello(params *models.HelloParams) (result models.HelloResponse, err error)
- func (c *DeribitWSClient) IsConnected() bool
- func (c *DeribitWSClient) Logout() (err error)
- func (c *DeribitWSClient) Off(event interface{}, listener interface{}) *emission.Emitter
- func (c *DeribitWSClient) On(event interface{}, listener interface{}) *emission.Emitter
- func (c *DeribitWSClient) PrivateSubscribe(params *models.SubscribeParams) (result models.SubscribeResponse, err error)
- func (c *DeribitWSClient) PrivateUnsubscribe(params *models.UnsubscribeParams) (result models.UnsubscribeResponse, err error)
- func (c *DeribitWSClient) PublicSubscribe(params *models.SubscribeParams) (result models.SubscribeResponse, err error)
- func (c *DeribitWSClient) PublicUnsubscribe(params *models.UnsubscribeParams) (result models.UnsubscribeResponse, err error)
- func (c *DeribitWSClient) Sell(params *models.SellParams) (result models.SellResponse, err error)
- func (c *DeribitWSClient) SetAnnouncementAsRead(params *models.SetAnnouncementAsReadParams) (result string, err error)
- func (c *DeribitWSClient) SetEmailForSubaccount(params *models.SetEmailForSubaccountParams) (result string, err error)
- func (c *DeribitWSClient) SetEmailLanguage(params *models.SetEmailLanguageParams) (result string, err error)
- func (c *DeribitWSClient) SetHeartbeat(params *models.SetHeartbeatParams) (result string, err error)
- func (c *DeribitWSClient) SetPasswordForSubaccount(params *models.SetPasswordForSubaccountParams) (result string, err error)
- func (c *DeribitWSClient) Start(ctx context.Context) error
- func (c *DeribitWSClient) Subscribe(channels []string)
- func (c *DeribitWSClient) Test() (result models.TestResponse, err error)
- func (c *DeribitWSClient) Ticker(params *models.TickerParams) (result models.TickerResponse, err error)
- func (c *DeribitWSClient) ToggleNotificationsFromSubaccount(params *models.ToggleNotificationsFromSubaccountParams) (result string, err error)
- func (c *DeribitWSClient) ToggleSubaccountLogin(params *models.ToggleSubaccountLoginParams) (result string, err error)
- func (c *DeribitWSClient) Withdraw(params *models.WithdrawParams) (result models.Withdrawal, err error)
- type MarketBehavior
- type TradingBehavior
Constants ¶
View Source
const ( CHANNEL_USER_ACCESS_LOG = "user.access_log" CHANNEL_USER_MMP_TRIGGER_PATTERN = "user.mmp_trigger.%s" //user.mmp_trigger.{index_name} CHANNEL_BOOK_GROUP_PATTERN = "book.%s.%s.%d.%s" // book.{instrument_name}.{group}.{depth}.{interval} CHANNEL_DERIBIT_VOLATILITY_INDEX_PATTERN = "deribit_volatility_index.%s" // deribit_volatility_index.{index_name} )
View Source
const ( DERIBIT_VOLATILITY_INDEX_NAME_BTC = "btc_usd" DERIBIT_VOLATILITY_INDEX_NAME_ETH = "eth_usd" )
Variables ¶
View Source
var ( ErrUnAuthorized = errors.New("websocket unauthorized") ErrWebsocketNotConnected = errors.New("websocket not connected") )
Functions ¶
func ChannelBookGroup ¶
func ChannelUserMMPTrigger ¶
Types ¶
type AccountBehavior ¶
type AccountBehavior interface {
GetPositions(*models.GetPositionsParams) ([]models.Position, error)
}
type Behavior ¶
type Behavior interface { AccountBehavior MarketBehavior TradingBehavior }
type DeribitWSClient ¶
type DeribitWSClient struct {
// contains filtered or unexported fields
}
func NewDeribitWsClient ¶
func NewDeribitWsClient(cfg *deribit.Configuration) *DeribitWSClient
func (*DeribitWSClient) Auth ¶
func (c *DeribitWSClient) Auth(apiKey string, secretKey string) (err error)
func (*DeribitWSClient) Buy ¶
func (c *DeribitWSClient) Buy(params *models.BuyParams) (result models.BuyResponse, err error)
func (*DeribitWSClient) Call ¶
func (c *DeribitWSClient) Call(method string, params interface{}, result interface{}) (err error)
Call issues JSONRPC v2 calls
func (*DeribitWSClient) Cancel ¶
func (c *DeribitWSClient) Cancel(params *models.CancelParams) (result models2.Order, err error)
func (*DeribitWSClient) CancelAll ¶
func (c *DeribitWSClient) CancelAll() (result string, err error)
func (*DeribitWSClient) CancelAllByCurrency ¶
func (c *DeribitWSClient) CancelAllByCurrency(params *models.CancelAllByCurrencyParams) (result string, err error)
func (*DeribitWSClient) CancelAllByInstrument ¶
func (c *DeribitWSClient) CancelAllByInstrument(params *models.CancelAllByInstrumentParams) (result string, err error)
func (*DeribitWSClient) CancelTransferByID ¶
func (c *DeribitWSClient) CancelTransferByID(params *models.CancelTransferByIDParams) (result models.Transfer, err error)
func (*DeribitWSClient) CancelWithdrawal ¶
func (c *DeribitWSClient) CancelWithdrawal(params *models.CancelWithdrawalParams) (result models.Withdrawal, err error)
func (*DeribitWSClient) CancellByLabel ¶
func (c *DeribitWSClient) CancellByLabel(params *models.CancelByLabelParams) (result int, err error)
func (*DeribitWSClient) ChangeSubaccountName ¶
func (c *DeribitWSClient) ChangeSubaccountName(params *models.ChangeSubaccountNameParams) (result string, err error)
func (*DeribitWSClient) ClosePosition ¶
func (c *DeribitWSClient) ClosePosition(params *models.ClosePositionParams) (result models.ClosePositionResponse, err error)
func (*DeribitWSClient) CreateDepositAddress ¶
func (c *DeribitWSClient) CreateDepositAddress(params *models.CreateDepositAddressParams) (result models.DepositAddress, err error)
func (*DeribitWSClient) CreateSubaccount ¶
func (c *DeribitWSClient) CreateSubaccount() (result models.Subaccount, err error)
func (*DeribitWSClient) DisableCancelOnDisconnect ¶
func (c *DeribitWSClient) DisableCancelOnDisconnect() (result string, err error)
func (*DeribitWSClient) DisableHeartbeat ¶
func (c *DeribitWSClient) DisableHeartbeat() (result string, err error)
func (*DeribitWSClient) DisableTfaForSubaccount ¶
func (c *DeribitWSClient) DisableTfaForSubaccount(params *models.DisableTfaForSubaccountParams) (result string, err error)
func (*DeribitWSClient) Edit ¶
func (c *DeribitWSClient) Edit(params *models.EditParams) (result models.EditResponse, err error)
func (*DeribitWSClient) Emit ¶
func (c *DeribitWSClient) Emit(event interface{}, arguments ...interface{}) *emission.Emitter
Emit emits an event
func (*DeribitWSClient) EnableCancelOnDisconnect ¶
func (c *DeribitWSClient) EnableCancelOnDisconnect() (result string, err error)
func (*DeribitWSClient) GetAccountSummary ¶
func (c *DeribitWSClient) GetAccountSummary(params *models.GetAccountSummaryParams) (result models.AccountSummary, err error)
func (*DeribitWSClient) GetAnnouncements ¶
func (c *DeribitWSClient) GetAnnouncements() (result []models.Announcement, err error)
func (*DeribitWSClient) GetBookSummaryByCurrency ¶
func (c *DeribitWSClient) GetBookSummaryByCurrency(params *models.GetBookSummaryByCurrencyParams) (result []models.BookSummary, err error)
func (*DeribitWSClient) GetBookSummaryByInstrument ¶
func (c *DeribitWSClient) GetBookSummaryByInstrument(params *models.GetBookSummaryByInstrumentParams) (result []models.BookSummary, err error)
func (*DeribitWSClient) GetContractSize ¶
func (c *DeribitWSClient) GetContractSize(params *models.GetContractSizeParams) (result models.GetContractSizeResponse, err error)
func (*DeribitWSClient) GetCurrencies ¶
func (c *DeribitWSClient) GetCurrencies() (result []models.Currency, err error)
func (*DeribitWSClient) GetCurrentDepositAddress ¶
func (c *DeribitWSClient) GetCurrentDepositAddress(params *models.GetCurrentDepositAddressParams) (result models.DepositAddress, err error)
func (*DeribitWSClient) GetDeposits ¶
func (c *DeribitWSClient) GetDeposits(params *models.GetDepositsParams) (result models.GetDepositsResponse, err error)
func (*DeribitWSClient) GetEmailLanguage ¶
func (c *DeribitWSClient) GetEmailLanguage() (result string, err error)
func (*DeribitWSClient) GetFundingChartData ¶
func (c *DeribitWSClient) GetFundingChartData(params *models.GetFundingChartDataParams) (result models.GetFundingChartDataResponse, err error)
func (*DeribitWSClient) GetHistoricalVolatility ¶
func (c *DeribitWSClient) GetHistoricalVolatility(params *models.GetHistoricalVolatilityParams) (result models.GetHistoricalVolatilityResponse, err error)
func (*DeribitWSClient) GetIndex ¶
func (c *DeribitWSClient) GetIndex(params *models.GetIndexParams) (result models.GetIndexResponse, err error)
func (*DeribitWSClient) GetInstruments ¶
func (c *DeribitWSClient) GetInstruments(params *models.GetInstrumentsParams) (result []models.Instrument, err error)
func (*DeribitWSClient) GetLastSettlementsByCurrency ¶
func (c *DeribitWSClient) GetLastSettlementsByCurrency(params *models.GetLastSettlementsByCurrencyParams) (result models.GetLastSettlementsResponse, err error)
func (*DeribitWSClient) GetLastSettlementsByInstrument ¶
func (c *DeribitWSClient) GetLastSettlementsByInstrument(params *models.GetLastSettlementsByInstrumentParams) (result models.GetLastSettlementsResponse, err error)
func (*DeribitWSClient) GetLastTradesByCurrency ¶
func (c *DeribitWSClient) GetLastTradesByCurrency(params *models.GetLastTradesByCurrencyParams) (result models.GetLastTradesResponse, err error)
func (*DeribitWSClient) GetLastTradesByCurrencyAndTime ¶
func (c *DeribitWSClient) GetLastTradesByCurrencyAndTime(params *models.GetLastTradesByCurrencyAndTimeParams) (result models.GetLastTradesResponse, err error)
func (*DeribitWSClient) GetLastTradesByInstrument ¶
func (c *DeribitWSClient) GetLastTradesByInstrument(params *models.GetLastTradesByInstrumentParams) (result models.GetLastTradesResponse, err error)
func (*DeribitWSClient) GetLastTradesByInstrumentAndTime ¶
func (c *DeribitWSClient) GetLastTradesByInstrumentAndTime(params *models.GetLastTradesByInstrumentAndTimeParams) (result models.GetLastTradesResponse, err error)
func (*DeribitWSClient) GetMargins ¶
func (c *DeribitWSClient) GetMargins(params *models.GetMarginsParams) (result models.GetMarginsResponse, err error)
func (*DeribitWSClient) GetMarkPriceHistory ¶
func (c *DeribitWSClient) GetMarkPriceHistory(params *models.GetMarkPriceHistoryParams) (resut models.MarkPriceHistory, err error)
func (*DeribitWSClient) GetNewAnnouncements ¶
func (c *DeribitWSClient) GetNewAnnouncements() (result []models.Announcement, err error)
func (*DeribitWSClient) GetOpenOrdersByCurrency ¶
func (c *DeribitWSClient) GetOpenOrdersByCurrency(params *models.GetOpenOrdersByCurrencyParams) (result []models2.Order, err error)
func (*DeribitWSClient) GetOpenOrdersByInstrument ¶
func (c *DeribitWSClient) GetOpenOrdersByInstrument(params *models.GetOpenOrdersByInstrumentParams) (result []models2.Order, err error)
func (*DeribitWSClient) GetOrderBook ¶
func (c *DeribitWSClient) GetOrderBook(params *models.GetOrderBookParams) (result models.GetOrderBookResponse, err error)
func (*DeribitWSClient) GetOrderHistoryByCurrency ¶
func (c *DeribitWSClient) GetOrderHistoryByCurrency(params *models.GetOrderHistoryByCurrencyParams) (result []models2.Order, err error)
func (*DeribitWSClient) GetOrderHistoryByInstrument ¶
func (c *DeribitWSClient) GetOrderHistoryByInstrument(params *models.GetOrderHistoryByInstrumentParams) (result []models2.Order, err error)
func (*DeribitWSClient) GetOrderMarginByIDs ¶
func (c *DeribitWSClient) GetOrderMarginByIDs(params *models.GetOrderMarginByIDsParams) (result models.GetOrderMarginByIDsResponse, err error)
func (*DeribitWSClient) GetOrderState ¶
func (c *DeribitWSClient) GetOrderState(params *models.GetOrderStateParams) (result models2.Order, err error)
func (*DeribitWSClient) GetPosition ¶
func (c *DeribitWSClient) GetPosition(params *models.GetPositionParams) (result models.Position, err error)
func (*DeribitWSClient) GetPositions ¶
func (c *DeribitWSClient) GetPositions(params *models.GetPositionsParams) (result []models.Position, err error)
func (*DeribitWSClient) GetSettlementHistoryByCurrency ¶
func (c *DeribitWSClient) GetSettlementHistoryByCurrency(params *models.GetSettlementHistoryByCurrencyParams) (result models.GetSettlementHistoryResponse, err error)
func (*DeribitWSClient) GetSettlementHistoryByInstrument ¶
func (c *DeribitWSClient) GetSettlementHistoryByInstrument(params *models.GetSettlementHistoryByInstrumentParams) (result models.GetSettlementHistoryResponse, err error)
func (*DeribitWSClient) GetStopOrderHistory ¶
func (c *DeribitWSClient) GetStopOrderHistory(params *models.GetStopOrderHistoryParams) (result models.GetStopOrderHistoryResponse, err error)
func (*DeribitWSClient) GetSubaccounts ¶
func (c *DeribitWSClient) GetSubaccounts(params *models.GetSubaccountsParams) (result []models.Subaccount, err error)
func (*DeribitWSClient) GetSubaccountsDetails ¶
func (c *DeribitWSClient) GetSubaccountsDetails(params *models.GetSubaccountsDetailsParams) (result []models.SubaccountsDetails, err error)
func (*DeribitWSClient) GetTime ¶
func (c *DeribitWSClient) GetTime() (result int64, err error)
func (*DeribitWSClient) GetTradeVolumes ¶
func (c *DeribitWSClient) GetTradeVolumes() (result models.GetTradeVolumesResponse, err error)
func (*DeribitWSClient) GetTradingviewChartData ¶
func (c *DeribitWSClient) GetTradingviewChartData(params *models.GetTradingviewChartDataParams) (result models.GetTradingviewChartDataResponse, err error)
func (*DeribitWSClient) GetTransfers ¶
func (c *DeribitWSClient) GetTransfers(params *models.GetTransfersParams) (result models.GetTransfersResponse, err error)
func (*DeribitWSClient) GetUserTradesByCurrency ¶
func (c *DeribitWSClient) GetUserTradesByCurrency(params *models.GetUserTradesByCurrencyParams) (result models.GetUserTradesResponse, err error)
func (*DeribitWSClient) GetUserTradesByCurrencyAndTime ¶
func (c *DeribitWSClient) GetUserTradesByCurrencyAndTime(params *models.GetUserTradesByCurrencyAndTimeParams) (result models.GetUserTradesResponse, err error)
func (*DeribitWSClient) GetUserTradesByInstrument ¶
func (c *DeribitWSClient) GetUserTradesByInstrument(params *models.GetUserTradesByInstrumentParams) (result models.GetUserTradesResponse, err error)
func (*DeribitWSClient) GetUserTradesByInstrumentAndTime ¶
func (c *DeribitWSClient) GetUserTradesByInstrumentAndTime(params *models.GetUserTradesByInstrumentAndTimeParams) (result models.GetUserTradesResponse, err error)
func (*DeribitWSClient) GetUserTradesByOrder ¶
func (c *DeribitWSClient) GetUserTradesByOrder(params *models.GetUserTradesByOrderParams) (result models.GetUserTradesResponse, err error)
func (*DeribitWSClient) GetWithdrawals ¶
func (c *DeribitWSClient) GetWithdrawals(params *models.GetWithdrawalsParams) (result []models.Withdrawal, err error)
func (*DeribitWSClient) Hello ¶
func (c *DeribitWSClient) Hello(params *models.HelloParams) (result models.HelloResponse, err error)
func (*DeribitWSClient) IsConnected ¶
func (c *DeribitWSClient) IsConnected() bool
IsConnected returns the WebSocket connection state
func (*DeribitWSClient) Logout ¶
func (c *DeribitWSClient) Logout() (err error)
func (*DeribitWSClient) Off ¶
func (c *DeribitWSClient) Off(event interface{}, listener interface{}) *emission.Emitter
Off removes a listener for an event
func (*DeribitWSClient) On ¶
func (c *DeribitWSClient) On(event interface{}, listener interface{}) *emission.Emitter
On adds a listener to a specific event
func (*DeribitWSClient) PrivateSubscribe ¶
func (c *DeribitWSClient) PrivateSubscribe(params *models.SubscribeParams) (result models.SubscribeResponse, err error)
func (*DeribitWSClient) PrivateUnsubscribe ¶
func (c *DeribitWSClient) PrivateUnsubscribe(params *models.UnsubscribeParams) (result models.UnsubscribeResponse, err error)
func (*DeribitWSClient) PublicSubscribe ¶
func (c *DeribitWSClient) PublicSubscribe(params *models.SubscribeParams) (result models.SubscribeResponse, err error)
func (*DeribitWSClient) PublicUnsubscribe ¶
func (c *DeribitWSClient) PublicUnsubscribe(params *models.UnsubscribeParams) (result models.UnsubscribeResponse, err error)
func (*DeribitWSClient) Sell ¶
func (c *DeribitWSClient) Sell(params *models.SellParams) (result models.SellResponse, err error)
func (*DeribitWSClient) SetAnnouncementAsRead ¶
func (c *DeribitWSClient) SetAnnouncementAsRead(params *models.SetAnnouncementAsReadParams) (result string, err error)
func (*DeribitWSClient) SetEmailForSubaccount ¶
func (c *DeribitWSClient) SetEmailForSubaccount(params *models.SetEmailForSubaccountParams) (result string, err error)
func (*DeribitWSClient) SetEmailLanguage ¶
func (c *DeribitWSClient) SetEmailLanguage(params *models.SetEmailLanguageParams) (result string, err error)
func (*DeribitWSClient) SetHeartbeat ¶
func (c *DeribitWSClient) SetHeartbeat(params *models.SetHeartbeatParams) (result string, err error)
func (*DeribitWSClient) SetPasswordForSubaccount ¶
func (c *DeribitWSClient) SetPasswordForSubaccount(params *models.SetPasswordForSubaccountParams) (result string, err error)
func (*DeribitWSClient) Subscribe ¶
func (c *DeribitWSClient) Subscribe(channels []string)
func (*DeribitWSClient) Test ¶
func (c *DeribitWSClient) Test() (result models.TestResponse, err error)
func (*DeribitWSClient) Ticker ¶
func (c *DeribitWSClient) Ticker(params *models.TickerParams) (result models.TickerResponse, err error)
func (*DeribitWSClient) ToggleNotificationsFromSubaccount ¶
func (c *DeribitWSClient) ToggleNotificationsFromSubaccount(params *models.ToggleNotificationsFromSubaccountParams) (result string, err error)
func (*DeribitWSClient) ToggleSubaccountLogin ¶
func (c *DeribitWSClient) ToggleSubaccountLogin(params *models.ToggleSubaccountLoginParams) (result string, err error)
func (*DeribitWSClient) Withdraw ¶
func (c *DeribitWSClient) Withdraw(params *models.WithdrawParams) (result models.Withdrawal, err error)
type MarketBehavior ¶
type MarketBehavior interface { GetOrderBook(*models.GetOrderBookParams) (models.GetOrderBookResponse, error) GetMarkPriceHistory(*models.GetMarkPriceHistoryParams) (models.MarkPriceHistory, error) }
type TradingBehavior ¶
type TradingBehavior interface { Buy(*models.BuyParams) (models.BuyResponse, error) Sell(*models.SellParams) (models.SellResponse, error) GetOrderHistoryByInstrument(*models.GetOrderHistoryByInstrumentParams) ([]models2.Order, error) CancellByLabel(*models.CancelByLabelParams) (int, error) }
Source Files
¶
Click to show internal directories.
Click to hide internal directories.