Versions in this module Expand all Collapse all v1 v1.0.1 Apr 15, 2024 Changes in this version + type GetRequestError struct + Code int + Content string + Status string + Url string + func (e *GetRequestError) Error() string + type HttpClient struct + func NewHttpClient(options ...HttpOption) *HttpClient + func (c *HttpClient) V1HourlyTicker() (response TickerResponse, err error) + func (c *HttpClient) V1OrderBook(group int) (response V1OrderBookResponse, err error) + func (c *HttpClient) V1Ticker() (response TickerResponse, err error) + func (c *HttpClient) V2Balance(currencyPairOrAll string) (response V2BalanceResponse, err error) + func (c *HttpClient) V2BuyInstantOrder(currencyPair string, amount decimal.Decimal, clOrdId string) (response V2InstantOrderResponse, err error) + func (c *HttpClient) V2BuyLimitOrder(currencyPair string, price, amount, limitPrice decimal.Decimal, ...) (response V2LimitOrderResponse, err error) + func (c *HttpClient) V2BuyMarketOrder(currencyPair string, amount decimal.Decimal, clOrdId string) (response V2MarketOrderResponse, err error) + func (c *HttpClient) V2CancelOrder(orderId int64) (response V2CancelOrderResponse, err error) + func (c *HttpClient) V2EurUsd() (response V2EurUsdResponse, err error) + func (c *HttpClient) V2HourlyTicker(currencyPair string) (response TickerResponse, err error) + func (c *HttpClient) V2Ohlc(currencyPair string, step, limit int, start, end int64) (response V2OhlcResponse, err error) + func (c *HttpClient) V2OpenOrders(currencyPairOrAll string) (response []V2OpenOrdersResponse, err error) + func (c *HttpClient) V2OrderBook(currencyPair string, group int) (response V2OrderBookResponse, err error) + func (c *HttpClient) V2OrderStatus(orderId int64, clOrdId string, omitTx bool) (response V2OrderStatusResponse, err error) + func (c *HttpClient) V2SellInstantOrder(currencyPair string, amount decimal.Decimal, clOrdId string) (response V2InstantOrderResponse, err error) + func (c *HttpClient) V2SellLimitOrder(currencyPair string, price, amount, limitPrice decimal.Decimal, ...) (response V2LimitOrderResponse, err error) + func (c *HttpClient) V2SellMarketOrder(currencyPair string, amount decimal.Decimal, clOrdId string) (response V2MarketOrderResponse, err error) + func (c *HttpClient) V2Ticker(currencyPair string) (response TickerResponse, err error) + func (c *HttpClient) V2TradingPairsInfo() (response []V2TradingPairsInfoResponse, err error) + func (c *HttpClient) V2Transactions(currencyPair string, timeParam string) (response []V2TransactionsResponse, err error) + func (c *HttpClient) V2UserTransactions(currencyPairOrAll string) (response []V2UserTransactionsResponse, err error) + func (c *HttpClient) V2WebsocketsToken() (response V2WebsocketsTokenResponse, err error) + type HttpOption func(*httpClientConfig) + func AutoRoundingEnabled() HttpOption + func Credentials(customerId string, apiKey string, apiSecret string) HttpOption + func NonceGenerator(nonceGen func() string) HttpOption + func UrlDomain(rawDomain string) HttpOption + type Ohlc struct + Close decimal.Decimal + High decimal.Decimal + Low decimal.Decimal + Open decimal.Decimal + Timestamp int64 + Volume decimal.Decimal + func (e *Ohlc) UnmarshalJSON(bytes []byte) error + type OrderBookEntry struct + Amount decimal.Decimal + Id int64 + Price decimal.Decimal + func (obe *OrderBookEntry) UnmarshalJSON(bytes []byte) error + type TickerResponse struct + Ask decimal.Decimal + Bid decimal.Decimal + High decimal.Decimal + Last decimal.Decimal + Low decimal.Decimal + Open decimal.Decimal + Timestamp int64 + Volume decimal.Decimal + Vwap decimal.Decimal + func (t *TickerResponse) UnmarshalJSON(data []byte) error + type V1OrderBookResponse struct + Asks []OrderBookEntry + Bids []OrderBookEntry + Timestamp string + type V2BalanceResponse struct + AaveAvailable decimal.Decimal + AaveBalance decimal.Decimal + AaveReserved decimal.Decimal + AaveWithdrawalFee decimal.Decimal + AavebtcFee decimal.Decimal + AaveeurFee decimal.Decimal + AaveusdFee decimal.Decimal + AlgoAvailable decimal.Decimal + AlgoBalance decimal.Decimal + AlgoReserved decimal.Decimal + AlgoWithdrawalFee decimal.Decimal + AlgobtcFee decimal.Decimal + AlgoeurFee decimal.Decimal + AlgousdFee decimal.Decimal + AudioAvailable decimal.Decimal + AudioBalance decimal.Decimal + AudioReserved decimal.Decimal + AudioWithdrawalFee decimal.Decimal + AudiobtcFee decimal.Decimal + AudioeurFee decimal.Decimal + AudiousdFee decimal.Decimal + BatAvailable decimal.Decimal + BatBalance decimal.Decimal + BatReserved decimal.Decimal + BatWithdrawalFee decimal.Decimal + BatbtcFee decimal.Decimal + BateurFee decimal.Decimal + BatusdFee decimal.Decimal + BchAvailable decimal.Decimal + BchBalance decimal.Decimal + BchReserved decimal.Decimal + BchWithdrawalFee decimal.Decimal + BchbtcFee decimal.Decimal + BcheurFee decimal.Decimal + BchgbpFee decimal.Decimal + BchusdFee decimal.Decimal + BtcAvailable decimal.Decimal + BtcBalance decimal.Decimal + BtcReserved decimal.Decimal + BtcWithdrawalFee decimal.Decimal + BtceurFee decimal.Decimal + BtcgbpFee decimal.Decimal + BtcpaxFee decimal.Decimal + BtcusdFee decimal.Decimal + BtcusdcFee decimal.Decimal + BtcusdtFee decimal.Decimal + CompAvailable decimal.Decimal + CompBalance decimal.Decimal + CompReserved decimal.Decimal + CompWithdrawalFee decimal.Decimal + CompbtcFee decimal.Decimal + CompeurFee decimal.Decimal + CompusdFee decimal.Decimal + CrvAvailable decimal.Decimal + CrvBalance decimal.Decimal + CrvReserved decimal.Decimal + CrvWithdrawalFee decimal.Decimal + CrvbtcFee decimal.Decimal + CrveurFee decimal.Decimal + CrvusdFee decimal.Decimal + DaiAvailable decimal.Decimal + DaiBalance decimal.Decimal + DaiReserved decimal.Decimal + DaiWithdrawalFee decimal.Decimal + DaiusdFee decimal.Decimal + Eth2Available decimal.Decimal + Eth2Balance decimal.Decimal + Eth2Reserved decimal.Decimal + Eth2ethFee decimal.Decimal + Eth2rAvailable decimal.Decimal + Eth2rBalance decimal.Decimal + Eth2rReserved decimal.Decimal + EthAvailable decimal.Decimal + EthBalance decimal.Decimal + EthReserved decimal.Decimal + EthWithdrawalFee decimal.Decimal + EthbtcFee decimal.Decimal + EtheurFee decimal.Decimal + EthgbpFee decimal.Decimal + EthpaxFee decimal.Decimal + EthusdFee decimal.Decimal + EthusdcFee decimal.Decimal + EthusdtFee decimal.Decimal + EurAvailable decimal.Decimal + EurBalance decimal.Decimal + EurReserved decimal.Decimal + EurWithdrawalFee decimal.Decimal + EurusdFee decimal.Decimal + Fee decimal.Decimal + GbpAvailable decimal.Decimal + GbpBalance decimal.Decimal + GbpReserved decimal.Decimal + GbpWithdrawalFee decimal.Decimal + GbpeurFee decimal.Decimal + GbpusdFee decimal.Decimal + GrtAvailable decimal.Decimal + GrtBalance decimal.Decimal + GrtReserved decimal.Decimal + GrtWithdrawalFee decimal.Decimal + GusdAvailable decimal.Decimal + GusdBalance decimal.Decimal + GusdReserved decimal.Decimal + GusdWithdrawalFee decimal.Decimal + GusdusdFee decimal.Decimal + KncAvailable decimal.Decimal + KncBalance decimal.Decimal + KncReserved decimal.Decimal + KncWithdrawalFee decimal.Decimal + KncbtcFee decimal.Decimal + KnceurFee decimal.Decimal + KncusdFee decimal.Decimal + LinkAvailable decimal.Decimal + LinkBalance decimal.Decimal + LinkReserved decimal.Decimal + LinkWithdrawalFee decimal.Decimal + LinkbtcFee decimal.Decimal + LinkethFee decimal.Decimal + LinkeurFee decimal.Decimal + LinkgbpFee decimal.Decimal + LinkusdFee decimal.Decimal + LtcAvailable decimal.Decimal + LtcBalance decimal.Decimal + LtcReserved decimal.Decimal + LtcWithdrawalFee decimal.Decimal + LtcbtcFee decimal.Decimal + LtceurFee decimal.Decimal + LtcgbpFee decimal.Decimal + LtcusdFee decimal.Decimal + MkrAvailable decimal.Decimal + MkrBalance decimal.Decimal + MkrReserved decimal.Decimal + MkrWithdrawalFee decimal.Decimal + MkrbtcFee decimal.Decimal + MkreurFee decimal.Decimal + MkrusdFee decimal.Decimal + OmgAvailable decimal.Decimal + OmgBalance decimal.Decimal + OmgReserved decimal.Decimal + OmgWithdrawalFee decimal.Decimal + OmgbtcFee decimal.Decimal + OmgeurFee decimal.Decimal + OmggbpFee decimal.Decimal + OmgusdFee decimal.Decimal + PaxAvailable decimal.Decimal + PaxBalance decimal.Decimal + PaxReserved decimal.Decimal + PaxWithdrawalFee decimal.Decimal + PaxeurFee decimal.Decimal + PaxgbpFee decimal.Decimal + PaxusdFee decimal.Decimal + SnxAvailable decimal.Decimal + SnxBalance decimal.Decimal + SnxReserved decimal.Decimal + SnxWithdrawalFee decimal.Decimal + SnxbtcFee decimal.Decimal + SnxeurFee decimal.Decimal + SnxusdFee decimal.Decimal + UmaAvailable decimal.Decimal + UmaBalance decimal.Decimal + UmaReserved decimal.Decimal + UmaWithdrawalFee decimal.Decimal + UmabtcFee decimal.Decimal + UmaeurFee decimal.Decimal + UmausdFee decimal.Decimal + UniAvailable decimal.Decimal + UniBalance decimal.Decimal + UniReserved decimal.Decimal + UniWithdrawalFee decimal.Decimal + UnibtcFee decimal.Decimal + UnieurFee decimal.Decimal + UniusdFee decimal.Decimal + UsdAvailable decimal.Decimal + UsdBalance decimal.Decimal + UsdReserved decimal.Decimal + UsdWithdrawalFee decimal.Decimal + UsdcAvailable decimal.Decimal + UsdcBalance decimal.Decimal + UsdcReserved decimal.Decimal + UsdcWithdrawalFee decimal.Decimal + UsdceurFee decimal.Decimal + UsdcusdFee decimal.Decimal + UsdcusdtFee decimal.Decimal + UsdtAvailable decimal.Decimal + UsdtBalance decimal.Decimal + UsdtReserved decimal.Decimal + UsdtWithdrawalFee decimal.Decimal + UsdteurFee decimal.Decimal + UsdtusdFee decimal.Decimal + XlmAvailable decimal.Decimal + XlmBalance decimal.Decimal + XlmReserved decimal.Decimal + XlmWithdrawalFee decimal.Decimal + XlmbtcFee decimal.Decimal + XlmeurFee decimal.Decimal + XlmgbpFee decimal.Decimal + XlmusdFee decimal.Decimal + XrpAvailable decimal.Decimal + XrpBalance decimal.Decimal + XrpReserved decimal.Decimal + XrpWithdrawalFee decimal.Decimal + XrpbtcFee decimal.Decimal + XrpeurFee decimal.Decimal + XrpgbpFee decimal.Decimal + XrppaxFee decimal.Decimal + XrpusdFee decimal.Decimal + XrpusdtFee decimal.Decimal + YfiAvailable decimal.Decimal + YfiBalance decimal.Decimal + YfiReserved decimal.Decimal + YfiWithdrawalFee decimal.Decimal + YfibtcFee decimal.Decimal + YfieurFee decimal.Decimal + YfiusdFee decimal.Decimal + ZrxAvailable decimal.Decimal + ZrxBalance decimal.Decimal + ZrxReserved decimal.Decimal + ZrxWithdrawalFee decimal.Decimal + ZrxbtcFee decimal.Decimal + ZrxeurFee decimal.Decimal + ZrxusdFee decimal.Decimal + type V2CancelOrderResponse struct + Amount decimal.Decimal + Error string + Id uint64 + Price decimal.Decimal + Type uint8 + type V2EurUsdResponse struct + Buy decimal.Decimal + Sell decimal.Decimal + type V2InstantOrderResponse struct + Amount decimal.Decimal + Datetime string + Error string + Id string + Price decimal.Decimal + Reason interface{} + Status string + Type string + type V2LimitOrderResponse struct + Amount decimal.Decimal + Datetime string + Id string + Price decimal.Decimal + Reason interface{} + Status string + Type string + type V2MarketOrderResponse struct + Amount decimal.Decimal + Datetime string + Error string + Id string + Price decimal.Decimal + Reason interface{} + Status string + Type string + type V2OhlcResponse struct + Data struct{ ... } + type V2OpenOrdersResponse struct + Amount decimal.Decimal + CurrencyPair string + Datetime string + Id string + Price decimal.Decimal + Reason interface{} + Status string + Type string + type V2OrderBookResponse struct + Microtimestamp string + type V2OrderStatusResponse struct + AmountRemaining decimal.Decimal + ClientOrderId string + Id int64 + Reason interface{} + Status string + Transactions []V2OrderStatusTransaction + type V2OrderStatusTransaction struct + Btc decimal.Decimal + Datetime string + Fee decimal.Decimal + Price decimal.Decimal + Tid int64 + Type int + Usd decimal.Decimal + type V2TradingPairsInfoResponse struct + BaseDecimals int + CounterDecimals int + Description string + InstantAndMarketOrders string + MinimumOrder string + Name string + Trading string + UrlSymbol string + type V2TransactionsResponse struct + Amount decimal.Decimal + Date int64 + Price decimal.Decimal + Tid int64 + Type int8 + func (tx *V2TransactionsResponse) UnmarshalJSON(bytes []byte) error + type V2UserTransactionsResponse struct + Aave decimal.Decimal + Algo decimal.Decimal + Audio decimal.Decimal + Bat decimal.Decimal + Bch decimal.Decimal + Btc decimal.Decimal + BtcUsd decimal.Decimal + Comp decimal.Decimal + Crv decimal.Decimal + Dai decimal.Decimal + Datetime string + Eth decimal.Decimal + Eth2 decimal.Decimal + Eth2r decimal.Decimal + Eur decimal.Decimal + Fee decimal.Decimal + Gbp decimal.Decimal + Grt decimal.Decimal + Gusd decimal.Decimal + Id int64 + Knc decimal.Decimal + Link decimal.Decimal + Ltc decimal.Decimal + Mkr decimal.Decimal + Omg decimal.Decimal + OrderId int64 + Pax decimal.Decimal + Reason interface{} + Snx decimal.Decimal + Status string + Type string + Uma decimal.Decimal + Uni decimal.Decimal + Usd decimal.Decimal + Usdc decimal.Decimal + Usdt decimal.Decimal + Xlm decimal.Decimal + Xrp decimal.Decimal + Yfi decimal.Decimal + Zrx decimal.Decimal + type V2WebsocketsTokenResponse struct + Token string + UserId uint32 + ValidSec uint32