Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BybitConnector ¶
type BybitConnector struct { *connector.Connector exchange.Base // contains filtered or unexported fields }
func (*BybitConnector) GetInstruments ¶
func (b *BybitConnector) GetInstruments(params *GenericRequestParams) (time.Time, []Instrument, error)
func (*BybitConnector) SendHTTPRequest ¶
func (b *BybitConnector) SendHTTPRequest(path string, params bitmex.Parameter, result interface{}) error
SendHTTPRequest sends an unauthenticated HTTP request
func (*BybitConnector) SetDefaults ¶
func (b *BybitConnector) SetDefaults() error
SetDefaults sets the basic defaults for Bitmex
func (*BybitConnector) Start ¶
func (c *BybitConnector) Start()
type Cache ¶
type Cache map[string]UpdateData
type GenericRequestParams ¶
type GenericRequestParams struct {
Symbol string
}
func (*GenericRequestParams) IsNil ¶
func (p *GenericRequestParams) IsNil() bool
IsNil checks to see if any values has been set for the paramater
func (*GenericRequestParams) ToURLVals ¶
func (p *GenericRequestParams) ToURLVals(path string) (string, error)
ToURLVals converts struct values to url.values and encodes it on the supplied path
func (*GenericRequestParams) VerifyData ¶
func (p *GenericRequestParams) VerifyData() error
VerifyData verifies outgoing data sets
type Instrument ¶
type Instrument struct { Symbol string `json:"symbol"` BidPrice string `json:"bid_price"` AskPrice string `json:"ask_price"` LastPrice string `json:"last_price"` LastTickDirection string `json:"last_tick_direction"` PrevPrice24H string `json:"prev_price_24h"` Price24HPcnt string `json:"price_24h_pcnt"` HighPrice24H string `json:"high_price_24h"` LowPrice24H string `json:"low_price_24h"` PrevPrice1H string `json:"prev_price_1h"` Price1HPcnt string `json:"price_1h_pcnt"` MarkPrice string `json:"mark_price"` IndexPrice string `json:"index_price"` OpenInterest float64 `json:"open_interest"` OpenValue string `json:"open_value"` TotalTurnover string `json:"total_turnover"` Turnover24H string `json:"turnover_24h"` TotalVolume float64 `json:"total_volume"` Volume24H float64 `json:"volume_24h"` FundingRate string `json:"funding_rate"` PredictedFundingRate string `json:"predicted_funding_rate"` NextFundingTime string `json:"next_funding_time"` CountdownHour int `json:"countdown_hour"` }
Note: WsInstrument is different
type ResultWrapper ¶
type ResultWrapper struct { RetCode int `json:"ret_code"` RetMsg string `json:"ret_msg"` ExtCode string `json:"ext_code"` ExtInfo string `json:"ext_info"` TimeNow string `json:"time_now"` RateLimitStatus int `json:"rate_limit_status"` RateLimitResetMs int64 `json:"rate_limit_reset_ms"` RateLimit int `json:"rate_limit"` }
type UpdateData ¶
Click to show internal directories.
Click to hide internal directories.