Versions in this module Expand all Collapse all v2 v2.1.1 Dec 14, 2021 Changes in this version + func CompareProperties(a, b interface{}, properties []string) (bool, error) + func Ensure(a interface{}) error + func EnsureProperties(a interface{}, properties []string) error + func NewTestWebsocketClient() (*ws.Conn, error) + func StructHasZeroValues(i interface{}) bool + type Account struct + Available string + Balance string + Currency string + Hold string + ID string + type Book struct + Asks []BookEntry + Bids []BookEntry + Sequence int64 + type BookEntry struct + NumberOfOrders int + OrderID string + Price string + Size string + func (e *BookEntry) UnmarshalJSON(data []byte) error + type CancelAllOrdersParams struct + ProductID string + type Client struct + BaseURL string + HTTPClient *http.Client + Key string + Passphrase string + RetryCount int + Secret string + func NewClient() *Client + func NewTestClient() *Client + func (c *Client) CancelAllOrders(p ...CancelAllOrdersParams) ([]string, error) + func (c *Client) CancelOrder(id string) error + func (c *Client) CreateDeposit(newDeposit *Deposit) (Deposit, error) + func (c *Client) CreateOrder(newOrder *Order) (Order, error) + func (c *Client) CreateProfileTransfer(newTransfer *ProfileTransfer) error + func (c *Client) CreateReport(newReport *Report) (Report, error) + func (c *Client) CreateTransfer(newTransfer *Transfer) (Transfer, error) + func (c *Client) CreateWithdrawalCoinbase(newWithdrawalCoinbase *WithdrawalCoinbase) (WithdrawalCoinbase, error) + func (c *Client) CreateWithdrawalCrypto(newWithdrawalCrypto *WithdrawalCrypto) (WithdrawalCrypto, error) + func (c *Client) GetAccount(id string) (Account, error) + func (c *Client) GetAccounts() ([]Account, error) + func (c *Client) GetBook(product string, level int) (Book, error) + func (c *Client) GetCurrencies() ([]Currency, error) + func (c *Client) GetFees() (Fees, error) + func (c *Client) GetHistoricRates(product string, p ...GetHistoricRatesParams) ([]HistoricRate, error) + func (c *Client) GetOrder(id string) (Order, error) + func (c *Client) GetPaymentMethods() ([]PaymentMethod, error) + func (c *Client) GetProducts() ([]Product, error) + func (c *Client) GetProfile(id string) (Profile, error) + func (c *Client) GetProfiles() ([]Profile, error) + func (c *Client) GetReportStatus(id string) (Report, error) + func (c *Client) GetStats(product string) (Stats, error) + func (c *Client) GetTicker(product string) (Ticker, error) + func (c *Client) GetTime() (ServerTime, error) + func (c *Client) Headers(method, url, timestamp, data string) (map[string]string, error) + func (c *Client) ListAccountLedger(id string, p ...GetAccountLedgerParams) *Cursor + func (c *Client) ListFills(p ListFillsParams) *Cursor + func (c *Client) ListHolds(id string, p ...ListHoldsParams) *Cursor + func (c *Client) ListOrders(p ...ListOrdersParams) *Cursor + func (c *Client) ListTrades(product string, p ...ListTradesParams) *Cursor + func (c *Client) Request(method string, url string, params, result interface{}) (res *http.Response, err error) + func (c *Client) UpdateConfig(config *ClientConfig) + type ClientConfig struct + BaseURL string + Key string + Passphrase string + Secret string + type CreateReportParams struct + End time.Time + Start time.Time + type Currency struct + ID string + MinSize string + Name string + type Cursor struct + Client *Client + HasMore bool + Method string + Pagination *PaginationParams + Params interface{} + URL string + func NewCursor(client *Client, method, url string, paginationParams *PaginationParams) *Cursor + func (c *Cursor) NextPage(i interface{}) error + func (c *Cursor) Page(i interface{}, direction string) error + func (c *Cursor) PrevPage(i interface{}) error + type Deposit struct + Amount string + Currency string + ID string + PaymentMethodID string + PayoutAt Time + type Error struct + Message string + func (e Error) Error() string + type Fees struct + MakerFeeRate string + TakerFeeRate string + USDVolume string + type Fill struct + CreatedAt Time + Fee string + FillID string + Liquidity string + Price string + ProductID string + Settled bool + Side string + Size string + TradeID int + type GetAccountLedgerParams struct + Pagination PaginationParams + type GetHistoricRatesParams struct + End time.Time + Granularity int + Start time.Time + type HistoricRate struct + Close float64 + High float64 + Low float64 + Open float64 + Time time.Time + Volume float64 + func (e *HistoricRate) UnmarshalJSON(data []byte) error + type Hold struct + AccountID string + Amount string + CreatedAt Time + Ref string + Type string + UpdatedAt Time + type LedgerDetails struct + OrderID string + ProductID string + TradeID string + type LedgerEntry struct + Amount string + Balance string + CreatedAt Time + Details LedgerDetails + ID string + Type string + type ListFillsParams struct + OrderID string + Pagination PaginationParams + ProductID string + type ListHoldsParams struct + Pagination PaginationParams + type ListOrdersParams struct + Pagination PaginationParams + ProductID string + Status string + type ListTradesParams struct + Pagination PaginationParams + type Message struct + Asks []SnapshotEntry + BestAsk string + BestBid string + Bids []SnapshotEntry + Changes []SnapshotChange + Channels []MessageChannel + ClientOID string + Currencies []Currency + Funds string + LastSize string + LastTradeID int + MakerOrderID string + Message string + NewFunds string + NewSize string + OldFunds string + OldSize string + OrderID string + OrderType string + Price string + ProductID string + ProductIds []string + Products []Product + ProfileID string + Reason string + RemainingSize string + Sequence int64 + Side string + Size string + TakerOrderID string + Time Time + TradeID int + Type string + UserID string + func (m Message) Sign(secret, key, passphrase string) (SignedMessage, error) + type MessageChannel struct + Name string + ProductIds []string + type Order struct + CancelAfter string + ClientOID string + CreatedAt Time + DoneAt Time + DoneReason string + ExecutedValue string + FillFees string + FilledSize string + Funds string + ID string + PostOnly bool + Price string + ProductID string + Settled bool + Side string + Size string + SpecifiedFunds string + Status string + Stop string + StopPrice string + Stp string + TimeInForce string + Type string + type PaginationParams struct + After string + Before string + Extra map[string]string + Limit int + func (p *PaginationParams) AddExtraParam(key, value string) + func (p *PaginationParams) Done(direction string) bool + func (p *PaginationParams) Encode(direction string) string + type PaymentMethod struct + Currency string + ID string + Type string + type Product struct + BaseCurrency string + BaseIncrement string + BaseMaxSize string + BaseMinSize string + CancelOnly bool + DisplayName string + ID string + LimitOnly bool + MarginEnabled bool + MaxMarketFunds string + MinMarketFunds string + PostOnly bool + QuoteCurrency string + QuoteIncrement string + Status string + StatusMessage string + TradingDisabled bool + type Profile struct + Active bool + CreatedAt Time + ID string + IsDefault bool + Name string + UserID string + type ProfileTransfer struct + Amount string + Currency string + From string + To string + type Report struct + CompletedAt Time + CreatedAt Time + EndDate time.Time + ExpiresAt Time + FileURL string + ID string + Params ReportParams + StartDate time.Time + Status string + Type string + type ReportParams struct + EndDate time.Time + StartDate time.Time + type ServerTime struct + Epoch float64 + ISO string + type SignedMessage struct + Key string + Passphrase string + Signature string + Timestamp string + type SnapshotChange struct + Price string + Side string + Size string + func (e *SnapshotChange) UnmarshalJSON(data []byte) error + type SnapshotEntry struct + Price string + Size string + func (e *SnapshotEntry) UnmarshalJSON(data []byte) error + type Stats struct + High string + Last string + Low string + Open string + Volume string + Volume30Day string + type StringNumber string + func (s *StringNumber) UnmarshalJSON(data []byte) error + type Ticker struct + Ask string + Bid string + Price string + Size string + Time Time + TradeID int + Volume StringNumber + type Time time.Time + func (t *Time) Scan(value interface{}) error + func (t *Time) Time() time.Time + func (t *Time) UnmarshalJSON(data []byte) error + func (t Time) MarshalJSON() ([]byte, error) + func (t Time) Value() (driver.Value, error) + type Trade struct + Price string + Side string + Size string + Time Time + TradeID int + type Transfer struct + Amount string + CoinbaseAccountID string + Type string + type WithdrawalCoinbase struct + Amount string + CoinbaseAccountID string + Currency string + type WithdrawalCrypto struct + Amount string + CryptoAddress string + Currency string + ProfileID string