Versions in this module Expand all Collapse all v1 v1.0.1 Apr 12, 2023 Changes in this version + type BalanceRequest struct + Direction int + Leverage string + Rate string + Symbol string + Type string + type BalanceService struct + func (bs *BalanceService) GetAvailableBalanceForOrders(br *BalanceRequest) (float64, error) type Client + Balances BalanceService v1.0.0 Apr 12, 2023 Changes in this version + const DERIV_TYPE + type AveragePriceRequest struct + Amount string + Period int + RateLimit string + Symbol string + type BookService struct + func (b *BookService) All(symbol string, precision common.BookPrecision, priceLevels int) (*book.Snapshot, error) + type CancelOrderMultiRequest struct + All int + ClientOrderIDs ClientOrderIDs + GroupOrderIDs GroupOrderIDs + OrderIDs OrderIDs + type CandleService struct + func (c *CandleService) History(symbol string, resolution common.CandleResolution) (*candle.Snapshot, error) + func (c *CandleService) HistoryWithQuery(symbol string, resolution common.CandleResolution, start common.Mts, ...) (*candle.Snapshot, error) + func (c *CandleService) Last(symbol string, resolution common.CandleResolution) (*candle.Candle, error) + type Client struct + Book BookService + Candles CandleService + Currencies CurrenciesService + Derivatives DerivativesService + Funding FundingService + Invoice InvoiceService + Ledgers LedgerService + Market MarketService + Orders OrderService + Platform PlatformService + Positions PositionService + Pulse PulseService + Stats StatsService + Status StatusService + Tickers TickerService + TickersHistory TickerHistoryService + Trades TradeService + Wallet WalletService + func NewClient() *Client + func NewClientWithHttpDo(httpDo func(c *http.Client, r *http.Request) (*http.Response, error)) *Client + func NewClientWithSynchronousNonce(sync Synchronous, nonce utils.NonceGenerator) *Client + func NewClientWithSynchronousURLNonce(sync Synchronous, nonce utils.NonceGenerator) *Client + func NewClientWithURL(url string) *Client + func NewClientWithURLHttpDo(base string, ...) *Client + func NewClientWithURLHttpDoNonce(base string, ...) *Client + func NewClientWithURLNonce(url string, nonce utils.NonceGenerator) *Client + func (c *Client) Credentials(key string, secret string) *Client + func (c *Client) NewAuthenticatedRequest(permissionType common.PermissionType, refURL string) (Request, error) + func (c *Client) NewAuthenticatedRequestWithBytes(permissionType common.PermissionType, refURL string, data []byte) (Request, error) + func (c *Client) NewAuthenticatedRequestWithData(permissionType common.PermissionType, refURL string, ...) (Request, error) + type ClientOrderIDs [][]interface + type CurrenciesService struct + func (cs *CurrenciesService) Conf(label, symbol, unit, explorer, pairs bool) ([]currency.Conf, error) + type DepositInvoiceRequest struct + Amount string + Currency string + Wallet string + type DerivativesService struct + type ErrorResponse struct + Code int + Message string + Response *Response + func (r *ErrorResponse) Error() string + type ForeignExchangeRateRequest struct + FirstCurrency string + SecondCurrency string + type FundingService struct + func (fs *FundingService) CancelOffer(fc *fundingoffer.CancelRequest) (*notification.Notification, error) + func (fs *FundingService) Credits(symbol string) (*fundingcredit.Snapshot, error) + func (fs *FundingService) CreditsHistory(symbol string) (*fundingcredit.Snapshot, error) + func (fs *FundingService) KeepFunding(args KeepFundingRequest) (*notification.Notification, error) + func (fs *FundingService) Loans(symbol string) (*fundingloan.Snapshot, error) + func (fs *FundingService) LoansHistory(symbol string) (*fundingloan.Snapshot, error) + func (fs *FundingService) OfferHistory(symbol string) (*fundingoffer.Snapshot, error) + func (fs *FundingService) Offers(symbol string) (*fundingoffer.Snapshot, error) + func (fs *FundingService) SubmitOffer(fo *fundingoffer.SubmitRequest) (*notification.Notification, error) + func (fs *FundingService) Trades(symbol string) (*fundingtrade.Snapshot, error) + type GetTickerHistPayload struct + End int64 + Limit uint32 + Start int64 + Symbols []string + type GroupOrderIDs []int + type HttpTransport struct + BaseURL *url.URL + HTTPClient *http.Client + func (h HttpTransport) Request(req Request) ([]interface{}, error) + type InvoiceService struct + func (is *InvoiceService) GenerateInvoice(payload DepositInvoiceRequest) (*invoice.Invoice, error) + type KeepFundingRequest struct + ID int + Type string + type LedgerService struct + func (s *LedgerService) Ledgers(currency string, start int64, end int64, max int32) (*ledger.Snapshot, error) + type MarketService struct + func (ms *MarketService) AveragePrice(pld AveragePriceRequest) ([]float64, error) + func (ms *MarketService) ForeignExchangeRate(pld ForeignExchangeRateRequest) ([]float64, error) + type Nickname string + type OrderIDs []int + type OrderMultiOpsRequest struct + Ops OrderOps + type OrderOps [][]interface + type OrderService struct + func (s *OrderService) All() (*order.Snapshot, error) + func (s *OrderService) AllHistory() (*order.Snapshot, error) + func (s *OrderService) CancelOrderMulti(args CancelOrderMultiRequest) (*notification.Notification, error) + func (s *OrderService) CancelOrderMultiOp(orderID int) (*notification.Notification, error) + func (s *OrderService) CancelOrdersMultiOp(ids OrderIDs) (*notification.Notification, error) + func (s *OrderService) GetByOrderId(orderID int64) (o *order.Order, err error) + func (s *OrderService) GetBySymbol(symbol string) (*order.Snapshot, error) + func (s *OrderService) GetHistoryByOrderId(orderID int64) (o *order.Order, err error) + func (s *OrderService) GetHistoryBySymbol(symbol string) (*order.Snapshot, error) + func (s *OrderService) OrderMultiOp(ops OrderOps) (*notification.Notification, error) + func (s *OrderService) OrderNewMultiOp(onr order.NewRequest) (*notification.Notification, error) + func (s *OrderService) OrderTrades(symbol string, orderID int64) (*tradeexecutionupdate.Snapshot, error) + func (s *OrderService) OrderUpdateMultiOp(our order.UpdateRequest) (*notification.Notification, error) + func (s *OrderService) SubmitCancelOrder(oc *order.CancelRequest) error + func (s *OrderService) SubmitOrder(onr *order.NewRequest) (*notification.Notification, error) + func (s *OrderService) SubmitUpdateOrder(our *order.UpdateRequest) (*notification.Notification, error) + type PlatformService struct + func (p *PlatformService) Status() (bool, error) + type PositionService struct + func (s *PositionService) All() (*position.Snapshot, error) + func (s *PositionService) Claim(cp *position.ClaimRequest) (*notification.Notification, error) + type PulseService struct + func (ps *PulseService) AddComment(p *pulse.Pulse) (*pulse.Pulse, error) + func (ps *PulseService) AddPulse(p *pulse.Pulse) (*pulse.Pulse, error) + func (ps *PulseService) DeletePulse(pid string) (int, error) + func (ps *PulseService) PublicPulseHistory(limit int, end common.Mts) ([]*pulse.Pulse, error) + func (ps *PulseService) PublicPulseProfile(nickname Nickname) (*pulseprofile.PulseProfile, error) + func (ps *PulseService) PulseHistory() ([]*pulse.Pulse, error) + type Request struct + Data []byte + Headers map[string]string + Method string + Params url.Values + RefURL string + func NewRequest(refURL string) Request + func NewRequestWithBytes(refURL string, data []byte) Request + func NewRequestWithData(refURL string, data map[string]interface{}) (Request, error) + func NewRequestWithDataMethod(refURL string, data []byte, method string) Request + func NewRequestWithMethod(refURL string, method string) Request + type Response struct + Body []byte + Response *http.Response + func (r *Response) String() string + type StatsService struct + func (ss *StatsService) CreditSizeHistory(symbol string, side common.OrderSide) ([]*stats.Stat, error) + func (ss *StatsService) CreditSizeLast(symbol string, side common.OrderSide) (*stats.Stat, error) + func (ss *StatsService) FundingHistory(symbol string) ([]*stats.Stat, error) + func (ss *StatsService) FundingLast(symbol string) (*stats.Stat, error) + func (ss *StatsService) PositionHistory(symbol string, side common.OrderSide) ([]*stats.Stat, error) + func (ss *StatsService) PositionLast(symbol string, side common.OrderSide) (*stats.Stat, error) + func (ss *StatsService) SymbolCreditSizeHistory(fundingSymbol string, tradingSymbol string) ([]*stats.Stat, error) + func (ss *StatsService) SymbolCreditSizeLast(fundingSymbol string, tradingSymbol string) (*stats.Stat, error) + type StatusService struct + func (ss *StatusService) DerivativeStatus(symbol string) (*derivatives.DerivativeStatus, error) + func (ss *StatusService) DerivativeStatusAll() ([]*derivatives.DerivativeStatus, error) + func (ss *StatusService) DerivativeStatusMulti(symbols []string) ([]*derivatives.DerivativeStatus, error) + type Synchronous interface + Request func(request Request) ([]interface{}, error) + type TickerHistoryService struct + func (s *TickerHistoryService) Get(pld GetTickerHistPayload) ([]tickerhist.TickerHist, error) + type TickerService struct + func (s *TickerService) All() ([]*ticker.Ticker, error) + func (s *TickerService) Get(symbol string) (*ticker.Ticker, error) + func (s *TickerService) GetMulti(symbols []string) ([]*ticker.Ticker, error) + type TradeService struct + func (s *TradeService) AccountAll() (*tradeexecutionupdate.Snapshot, error) + func (s *TradeService) AccountAllWithSymbol(symbol string) (*tradeexecutionupdate.Snapshot, error) + func (s *TradeService) AccountHistoryWithQuery(symbol string, start common.Mts, end common.Mts, limit common.QueryLimit, ...) (*tradeexecutionupdate.Snapshot, error) + func (s *TradeService) PublicHistoryWithQuery(symbol string, start common.Mts, end common.Mts, limit common.QueryLimit, ...) (*trade.Snapshot, error) + type WalletService struct + func (s *WalletService) SetCollateral(symbol string, amount float64) (bool, error) + func (s *WalletService) Wallet() (*wallet.Snapshot, error) + func (ws *WalletService) CreateDepositAddress(wallet, method string) (*notification.Notification, error) + func (ws *WalletService) DepositAddress(wallet, method string) (*notification.Notification, error) + func (ws *WalletService) Transfer(from, to, currency, currencyTo string, amount float64) (*notification.Notification, error) + func (ws *WalletService) Withdraw(wallet, method string, amount float64, address string) (*notification.Notification, error)