Versions in this module Expand all Collapse all v0 v0.1.0 May 1, 2021 Changes in this version + const HeaderKey + const HeaderSign + const HeaderSubaccount + const HeaderTS + const Leverage100X + const Leverage101X + const Leverage10X + const Leverage1X + const Leverage20X + const Leverage3X + const Leverage50X + const Leverage5X + const Resolution15m + const Resolution15s + const Resolution1d + const Resolution1h + const Resolution1m + const Resolution4h + const Resolution5m + type Account struct + BackstopProvider bool + Collateral float64 + FreeCollateral float64 + InitialMarginRequirement float64 + Leverage float64 + Liquidating bool + MaintenanceMarginRequirement float64 + MakerFee float64 + MarginFraction float64 + OpenMarginFraction float64 + Positions []Position + TakerFee float64 + TotalAccountValue float64 + TotalPositionSize float64 + Username string + type AccountService service + func (s *AccountService) GetInformation() (*Account, error) + func (s *AccountService) GetPositions() ([]Position, error) + func (s *AccountService) SetLeverage(x int) error + type Candle struct + Close float64 + High float64 + Low float64 + Open float64 + StartTime time.Time + Volume float64 + type Client struct + Accounts *AccountService + Markets *MarketService + func New(opts ...Option) *Client + func (c *Client) Connect() (*stream.Conn, error) + func (c *Client) DoPrivate(uri string, method string, in, out interface{}) error + func (c *Client) DoPublic(uri string, method string, in, out interface{}) error + type GetHistoricalPrices struct + EndTime int64 + Limit int + Resolution int + StartTime int64 + type GetOrderBookOptions struct + Depth int + type GetTradesOptions struct + EndTime int64 + Limit int + StartTime int64 + type Market struct + Ask float64 + BaseCurrency string + Bid float64 + Enabled bool + Last float64 + Name string + PostOnly bool + PriceIncrement float64 + QuoteCurrency string + Restricted bool + SizeIncrement float64 + Type string + Underlying string + type MarketService service + func (s *MarketService) All() ([]Market, error) + func (s *MarketService) Get(name string) (*Market, error) + func (s *MarketService) GetHistoricalPrices(name string, opts *GetHistoricalPrices) ([]Candle, error) + func (s *MarketService) GetOrderBook(name string, opts *GetOrderBookOptions) (*OrderBook, error) + func (s *MarketService) GetTrades(name string, opts *GetTradesOptions) ([]Trade, error) + type Option func(*Client) + func WithAuth(key, secret string) Option + func WithSubaccount(account string) Option + type OrderBook struct + Asks [][]float64 + Bids [][]float64 + type Position struct + CollateralUsed float64 + Cost float64 + EntryPrice float64 + EstimatedLiquidationPrice float64 + Future string + InitialMarginRequirement float64 + LongOrderSize float64 + MaintenanceMarginRequirement float64 + NetSize float64 + OpenSize float64 + RealizedPnl float64 + ShortOrderSize float64 + Side string + Size float64 + UnrealizedPnl float64 + type RequestLeverage struct + Leverage int + type Response struct + Error string + Result interface{} + Success bool + type Trade struct + ID int + Liquidation bool + Price float64 + Side string + Size float64 + Time time.Time