Versions in this module Expand all Collapse all v1 v1.3.0 Nov 30, 2020 Changes in this version + var TimeZero = time.Date(1970, 1, 1, 0, 0, 0, 0, time.FixedZone("utc", 0)) type Client + func (c *Client) GetHistoricalVolatility(currency string) (vols [][]float64, err error) + func (c *Client) GetUserTradesByInstrumentAndTimeExt(instrument string, start, end time.Time) (trades []inout.UserTrade, err error) v1.2.0 Oct 26, 2020 Changes in this version + const OrdrStateTriggered + const OrdrStateUntriggered type Client + func (c *Client) GetStopOrderHistory(params *inout.StopOrderHistoryIn, result *inout.StopOrderHistoryOut) (err error) v1.1.0 Sep 30, 2020 Changes in this version + const BIG + const BP + const BTC + const BTCSWAP + const Bit + const BookDepth + const DrctnBuy + const DrctnSell + const ETH + const Edp + const HUGE + const MaxTries + const OneMillion + const OneThousand + const OrdrStateCancelled + const OrdrStateFilled + const OrdrStateOpen + const OrdrStateRejected + const OrdrStateUntriggerd + const OrdrTypeLmt + const OrdrTypeMkt + const OrdrTypeStopLmt + const OrdrTypeStopMkt + const PCT + const ProdBaseURL + const SMALL + const Satoshi + const SecondsInDay + const SecondsInYear + const TINY + const TestBaseURL + const TmInFrcIOC + const TriggerTypeIdxPrc + const TriggerTypeLstPrc + const TriggerTypeMrkPrc + var ErrAuthRequired = errors.New("AUTHENTICATION IS REQUIRED") + func ConvertSymbol(s string) string + func Float32Pointer(value float32) *float32 + func Float64Pointer(value float64) *float64 + func InitBook(ob *Book) + func Int32Pointer(value int32) *int32 + func Int64Pointer(value int64) *int64 + func IntPointer(value int) *int + func Inverse(x float64) float64 + func PruneUsrOrdrsFromQuts(quotes []float64, orders *[]inout.Order, maxdiff float64) + func StringPointer(value string) *string + type AccountBalance struct + Crnt struct{ ... } + Init struct{ ... } + type Balance struct + Ccy float64 + USD float64 + type Book struct + Asks []Quote + BestAsk Quote + BestBid Quote + Bids []Quote + Time time.Time + type Client struct + Acct inout.AcctSummaryOut + Config *Configuration + Logger *log.Logger + SG *syncgrp.SyncGrp + StartTime time.Time + Sub *Subordinate + func New(cfg *Configuration) (*Client, error) + func NewMinimal(cfg *Configuration) (*Client, error) + func (c *Client) Auth(key string, secret string) (err error) + func (c *Client) AutoRefillRqsts() + func (c *Client) Buy(params *inout.OrderIn, result *inout.OrderOut) error + func (c *Client) Call(method string, params interface{}, result interface{}) (err error) + func (c *Client) Cancel(oid string, result *inout.Order) error + func (c *Client) CancelAll() (result int, err error) + func (c *Client) CancelAllByCurrency(params *inout.CancelAllByCcyIn) (result int, err error) + func (c *Client) CancelAllByInstrument(params *inout.CancelAllByInstrmtIn) (result int, err error) + func (c *Client) Connect() (*websocket.Conn, *http.Response, error) + func (c *Client) ConvertExchStmp(ts int64) time.Time + func (c *Client) CreateLogger() error + func (c *Client) DebugPrintf(format string, a ...interface{}) + func (c *Client) DebugPrintln(a ...interface{}) + func (c *Client) DisableCancelOnDisconnect() (result string, err error) + func (c *Client) DisableHeartbeat() (result string, err error) + func (c *Client) Done() chan bool + func (c *Client) Edit(params *inout.EditIn, result *inout.OrderOut) error + func (c *Client) Emit(event interface{}, arguments ...interface{}) *emission.Emitter + func (c *Client) EnableCancelOnDisconnect() (result string, err error) + func (c *Client) Error() chan error + func (c *Client) ExchangeTime() (time.Time, error) + func (c *Client) GetAccountSummary(ccy string, extended bool, result *inout.AcctSummaryOut) error + func (c *Client) GetBook(contract string, depth int, result *inout.BookOut) error + func (c *Client) GetBookSummaryByCurrency(params *inout.BkSummaryByCcyIn) (result []inout.BkSummaryOut, err error) + func (c *Client) GetBookSummaryByInstrument(params *inout.BkSummaryByInstrmtIn) (result []inout.BkSummaryOut, err error) + func (c *Client) GetContractSize(contract string) (float64, error) + func (c *Client) GetCurrencies() (result []inout.Currency, err error) + func (c *Client) GetIndex(currency string) (float64, error) + func (c *Client) GetInstruments(params *inout.InstrumentIn) (result []inout.InstrumentOut, err error) + func (c *Client) GetLastTradesByCurrency(params *inout.TradesByCcyIn) (result *inout.LastTradesOut, err error) + func (c *Client) GetLastTradesByCurrencyAndTime(params *inout.TradesByCcyAndTmIn) (result *inout.LastTradesOut, err error) + func (c *Client) GetLastTradesByInstrument(params *inout.TradesByInstrmtIn) (result *inout.LastTradesOut, err error) + func (c *Client) GetLastTradesByInstrumentAndTime(params *inout.TradesByInstrmtAndTmIn) (result *inout.LastTradesOut, err error) + func (c *Client) GetOpenOrdersByCurrency(params *inout.OpnOrdrsByCcyIn) (result []inout.Order, err error) + func (c *Client) GetOpenOrdersByInstrument(params *inout.OpnOrdrsByInstrmtIn) (result []inout.Order, err error) + func (c *Client) GetPositionCurrency(params *inout.PosnCcyIn) (result []inout.PosnOut, err error) + func (c *Client) GetPositionInstrument(contract string, result *inout.PosnOut) error + func (c *Client) GetTckr(contract string, result *inout.TckrOut) error + func (c *Client) GetTime() (result int64, err error) + func (c *Client) GetUserTradesByCurrency(params *inout.TradesByCcyIn, result *inout.UserTradesOut) error + func (c *Client) GetUserTradesByCurrencyAndTime(params *inout.TradesByCcyAndTmIn, result *inout.UserTradesOut) error + func (c *Client) GetUserTradesByInstrument(params *inout.TradesByInstrmtIn, result *inout.UserTradesOut) error + func (c *Client) GetUserTradesByInstrumentAndTime(params *inout.TradesByInstrmtAndTmIn, result *inout.UserTradesOut) error + func (c *Client) Handle(ctx context.Context, conn *jsonrpc2.Conn, req *jsonrpc2.Request) + func (c *Client) IsConnected() bool + func (c *Client) IsProduction() bool + func (c *Client) Logout() (err error) + func (c *Client) New(cfg *Configuration) (err error) + func (c *Client) NewMinimal(cfg *Configuration) (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 *inout.SubscribeIn) (result inout.SubscribeOut, err error) + func (c *Client) PrivateUnsubscribe(params *inout.SubscribeIn) (result inout.SubscribeOut, err error) + func (c *Client) PublicSubscribe(params *inout.SubscribeIn) (result inout.SubscribeOut, err error) + func (c *Client) PublicUnsubscribe(params *inout.SubscribeIn) (result inout.SubscribeOut, err error) + func (c *Client) Reconnect() + func (c *Client) RefillRqsts() + func (c *Client) RefillRqstsCndtnl(match int, nonmatch int) + func (c *Client) RqstCnts() (cntMch, cntNon int) + func (c *Client) Sell(params *inout.OrderIn, result *inout.OrderOut) error + func (c *Client) SetHeartbeat(params *inout.Heartbeat) (result string, err error) + func (c *Client) Start() (err error) + func (c *Client) SubPblc(channels []string) ([]string, error) + func (c *Client) SubPrvt(channels []string) ([]string, error) + func (c *Client) SubmitTransfer(amt string, ccy string, dst int, result *inout.XferSubAcctOut) error + func (c *Client) Subscribe(channels []string, mode SubscribeMode) ([]string, error) + func (c *Client) SubscribeToChannels(channels []string) (e error) + func (c *Client) Test() (result inout.TestOut, err error) + func (c *Client) Trade(params *inout.OrderIn, result *inout.OrderOut) (e error) + func (c *Client) UnsubPblc(channels []string) ([]string, error) + func (c *Client) UnsubPrvt(channels []string) ([]string, error) + func (c *Client) Unsubscribe(channels []string, mode SubscribeMode) ([]string, error) + func (c *Client) UnsubscribeFromChannels(channels []string) + func (c *Client) WaitTime() time.Duration + type ClientExtended struct + BkSummary map[string]inout.BkSummaryOut + Blnc AccountBalance + Buffer *bytes.Buffer + ConSz map[string]float64 + Contracts []string + Deltas map[string]float64 + Filepath struct{ ... } + Futures map[string]FuturesData + Instruments []inout.InstrumentOut + IsSwap map[string]bool + ObAdj map[string]Book + ObRaw map[string]inout.BookOut + OpnOrdrs map[string][]inout.Order + PctDelta float64 + Posn map[string]inout.PosnOut + Spot float64 + SymbolMap struct{ ... } + Symbols []string + TckSz map[string]float64 + Tckr map[string]inout.TckrOut + TmClnt time.Time + TmExch time.Time + UserTrades map[string][]inout.UserTrade + func NewClientExtended(cfg *Configuration) (*ClientExtended, error) + func NewClientMin(cfg *Configuration) (*ClientExtended, error) + func (c *ClientExtended) CreateSymbols() + func (c *ClientExtended) MakeSubscriptions() []string + func (c *ClientExtended) UpdtAcct() error + func (c *ClientExtended) UpdtBalance() error + func (c *ClientExtended) UpdtBkSummary(contract string) error + func (c *ClientExtended) UpdtBookRaw(contract string) (e error) + func (c *ClientExtended) UpdtFutures() (err error) + func (c *ClientExtended) UpdtOpnOrdrs(contract string) error + func (c *ClientExtended) UpdtOrdrBkAdj(contract string) error + func (c *ClientExtended) UpdtPctDelta() error + func (c *ClientExtended) UpdtPosition(contract string) (e error) + func (c *ClientExtended) UpdtSpot() (e error) + func (c *ClientExtended) UpdtStatus() (e error) + func (c *ClientExtended) UpdtTckr(contract string) (e error) + func (c *ClientExtended) UpdtUserTrades(contract string, count int) error + type Configuration struct + Address string + AutoReconnect bool + AutoRefillMatch float64 + AutoRefillNonmatch float64 + Ctx context.Context + Currency string + DebugMode bool + Key string + Production bool + Secret string + UseLogFile bool + func DfltCnfg() *Configuration + type Event struct + Channel string + Data json.RawMessage + type FuturesData struct + IsSwap bool + TimeToExpiry time.Duration + 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 Quote struct + Amt float64 + Drctn string + Prc float64 + type Subordinate struct + ChDone chan bool + ChError chan error + Wait time.Duration + func NewSubordinate() *Subordinate + type SubscribeMode bool + const SubPblc + const SubPrvt + type Token struct + AccessToken string