Versions in this module Expand all Collapse all v0 v0.1.4 Sep 22, 2020 v0.1.3 Sep 22, 2020 v0.1.2 Sep 21, 2020 v0.1.1 Sep 21, 2020 v0.1.0 Sep 21, 2020 v0.0.9 Sep 21, 2020 v0.0.8 Sep 21, 2020 v0.0.7 Sep 21, 2020 v0.0.6 Sep 21, 2020 v0.0.5 Sep 21, 2020 Changes in this version + const LeaderboardUnrealisedProfitInception + const LeaderboardUnrealisedProfitPeriodDelta + const LeaderboardVolume + const LeaderbookRealisedProfit + var AcceptableMethods = make(map[string]string) + var AcceptedOrderType = []string + var AcceptedWalletNames = []string + type AccountFees struct + Withdraw map[string]interface{} + type AccountInfo struct + Fees []AccountInfoFees + MakerFees float64 + Message string + TakerFees float64 + type AccountInfoFees struct + MakerFees float64 + Pairs string + TakerFees float64 + type AccountInfoFull struct + Info []AccountInfo + Message string + type AccountSummary struct + FundingProfit30D []Currency + MakerFee float64 + TakerFee float64 + TradeVolumePer30D []Currency + type Balance struct + Amount float64 + Available float64 + Currency string + Type string + type BalanceHistory struct + Amount float64 + Balance float64 + Currency string + Description string + Timestamp string + type Bitfinex struct + WebsocketSubdChannels map[int]WebsocketChanInfo + func (b *Bitfinex) AuthenticateWebsocket() error + func (b *Bitfinex) CalculateTradingFee(i []AccountInfo, purchasePrice, amount float64, c currency.Code, isMaker bool) (fee float64, err error) + func (b *Bitfinex) CancelAllExistingOrders() (string, error) + func (b *Bitfinex) CancelAllOrders(_ *order.Cancel) (order.CancelAllResponse, error) + func (b *Bitfinex) CancelExistingOrder(orderID int64) (Order, error) + func (b *Bitfinex) CancelMultipleOrders(orderIDs []int64) (string, error) + func (b *Bitfinex) CancelOffer(offerID int64) (Offer, error) + func (b *Bitfinex) CancelOrder(order *order.Cancel) error + func (b *Bitfinex) ClaimPosition(positionID int) (Position, error) + func (b *Bitfinex) CloseMarginFunding(swapID int64) (Offer, error) + func (b *Bitfinex) ConvertSymbolToDepositMethod(c currency.Code) (string, error) + func (b *Bitfinex) ConvertSymbolToWithdrawalType(c currency.Code) string + func (b *Bitfinex) FetchAccountInfo() (account.Holdings, error) + func (b *Bitfinex) FetchOrderbook(p currency.Pair, assetType asset.Item) (*orderbook.Base, error) + func (b *Bitfinex) FetchTicker(p currency.Pair, assetType asset.Item) (*ticker.Price, error) + func (b *Bitfinex) FetchTradablePairs(a asset.Item) ([]string, error) + func (b *Bitfinex) FormatExchangeKlineInterval(in kline.Interval) string + func (b *Bitfinex) GenerateDefaultSubscriptions() ([]stream.ChannelSubscription, error) + func (b *Bitfinex) GetAccountBalance() ([]Balance, error) + func (b *Bitfinex) GetAccountFees() ([]AccountInfo, error) + func (b *Bitfinex) GetAccountSummary() (AccountSummary, error) + func (b *Bitfinex) GetActiveCredits() ([]Offer, error) + func (b *Bitfinex) GetActiveMarginFunding() ([]MarginFunds, error) + func (b *Bitfinex) GetActiveOffers() ([]Offer, error) + func (b *Bitfinex) GetActiveOrders(req *order.GetOrdersRequest) ([]order.Detail, error) + func (b *Bitfinex) GetActivePositions() ([]Position, error) + func (b *Bitfinex) GetBalanceHistory(symbol string, timeSince, timeUntil time.Time, limit int, wallet string) ([]BalanceHistory, error) + func (b *Bitfinex) GetCandles(symbol, timeFrame string, start, end int64, limit uint32, historic bool) ([]Candle, error) + func (b *Bitfinex) GetConfigurations() error + func (b *Bitfinex) GetCryptocurrencyWithdrawalFee(c currency.Code, accountFees AccountFees) (fee float64, err error) + func (b *Bitfinex) GetDefaultConfig() (*config.ExchangeConfig, error) + func (b *Bitfinex) GetDepositAddress(c currency.Code, accountID string) (string, error) + func (b *Bitfinex) GetExchangeHistory(p currency.Pair, assetType asset.Item, timestampStart, timestampEnd time.Time) ([]exchange.TradeHistory, error) + func (b *Bitfinex) GetFee(feeBuilder *exchange.FeeBuilder) (float64, error) + func (b *Bitfinex) GetFeeByType(feeBuilder *exchange.FeeBuilder) (float64, error) + func (b *Bitfinex) GetForeignExchangeRate() error + func (b *Bitfinex) GetFundingBook(symbol string) (FundingBook, error) + func (b *Bitfinex) GetFundingHistory() ([]exchange.FundHistory, error) + func (b *Bitfinex) GetHistoricCandles(pair currency.Pair, a asset.Item, start, end time.Time, ...) (kline.Item, error) + func (b *Bitfinex) GetHistoricCandlesExtended(pair currency.Pair, a asset.Item, start, end time.Time, ...) (kline.Item, error) + func (b *Bitfinex) GetInactiveOrders() ([]Order, error) + func (b *Bitfinex) GetKeyPermissions() (KeyPermissions, error) + func (b *Bitfinex) GetLeaderboard(key, timeframe, symbol string, sort, limit int, start, end string) ([]LeaderboardEntry, error) + func (b *Bitfinex) GetLends(symbol string, values url.Values) ([]Lends, error) + func (b *Bitfinex) GetLiquidationFeed() error + func (b *Bitfinex) GetMarginInfo() ([]MarginInfo, error) + func (b *Bitfinex) GetMarginTotalTakenFunds() ([]MarginTotalTakenFunds, error) + func (b *Bitfinex) GetMarketAveragePrice() error + func (b *Bitfinex) GetMovementHistory(symbol, method string, timeSince, timeUntil time.Time, limit int) ([]MovementHistory, error) + func (b *Bitfinex) GetOfferStatus(offerID int64) (Offer, error) + func (b *Bitfinex) GetOpenOrders() ([]Order, error) + func (b *Bitfinex) GetOrderHistory(req *order.GetOrdersRequest) ([]order.Detail, error) + func (b *Bitfinex) GetOrderHistoryById(getOrdersRequest string) ([]order.Detail, error) + func (b *Bitfinex) GetOrderInfo(orderID string) (order.Detail, error) + func (b *Bitfinex) GetOrderStatus(orderID int64) (Order, error) + func (b *Bitfinex) GetOrderbook(symbol, precision string, limit int64) (Orderbook, error) + func (b *Bitfinex) GetPlatformStatus() (int, error) + func (b *Bitfinex) GetStats(symbol string) ([]Stat, error) + func (b *Bitfinex) GetStatus() error + func (b *Bitfinex) GetTicker(symbol string) (Ticker, error) + func (b *Bitfinex) GetTickerBatch() (map[string]Ticker, error) + func (b *Bitfinex) GetTradeHistory(currencyPair string, timestamp, until time.Time, limit, reverse int) ([]TradeHistory, error) + func (b *Bitfinex) GetTrades(currencyPair string, limit, timestampStart, timestampEnd int64, ...) ([]Trade, error) + func (b *Bitfinex) GetUnusedMarginFunds() ([]MarginFunds, error) + func (b *Bitfinex) GetWithdrawalFees() (AccountFees, error) + func (b *Bitfinex) ModifyOrder(action *order.Modify) (string, error) + func (b *Bitfinex) NewDeposit(method, walletName string, renew int) (DepositResponse, error) + func (b *Bitfinex) NewOffer(symbol string, amount, rate float64, period int64, direction string) (Offer, error) + func (b *Bitfinex) NewOrder(currencyPair, orderType string, amount, price float64, buy, hidden bool) (Order, error) + func (b *Bitfinex) NewOrderMulti(orders []PlaceOrder) (OrderMultiResponse, error) + func (b *Bitfinex) PopulateAcceptableMethods() error + func (b *Bitfinex) ReplaceOrder(orderID int64, symbol string, amount, price float64, buy bool, ...) (Order, error) + func (b *Bitfinex) Run() + func (b *Bitfinex) SendAuthenticatedHTTPRequest(method, path string, params map[string]interface{}, result interface{}, ...) error + func (b *Bitfinex) SendHTTPRequest(path string, result interface{}, e request.EndpointLimit) error + func (b *Bitfinex) SetDefaults() + func (b *Bitfinex) Setup(exch *config.ExchangeConfig) error + func (b *Bitfinex) Start(wg *sync.WaitGroup) + func (b *Bitfinex) SubmitOrder(o *order.Submit) (order.SubmitResponse, error) + func (b *Bitfinex) Subscribe(channelsToSubscribe []stream.ChannelSubscription) error + func (b *Bitfinex) Unsubscribe(channelsToUnsubscribe []stream.ChannelSubscription) error + func (b *Bitfinex) UpdateAccountInfo() (account.Holdings, error) + func (b *Bitfinex) UpdateOrderbook(p currency.Pair, assetType asset.Item) (*orderbook.Base, error) + func (b *Bitfinex) UpdateTicker(p currency.Pair, assetType asset.Item) (*ticker.Price, error) + func (b *Bitfinex) UpdateTradablePairs(forceUpdate bool) error + func (b *Bitfinex) ValidateCredentials() error + func (b *Bitfinex) WalletTransfer(amount float64, currency, walletFrom, walletTo string) (WalletTransfer, error) + func (b *Bitfinex) WithdrawCryptocurrency(wallet, address, paymentID string, amount float64, c currency.Code) (Withdrawal, error) + func (b *Bitfinex) WithdrawCryptocurrencyFunds(withdrawRequest *withdraw.Request) (*withdraw.ExchangeResponse, error) + func (b *Bitfinex) WithdrawFIAT(withdrawalType, walletType string, withdrawRequest *withdraw.Request) (Withdrawal, error) + func (b *Bitfinex) WithdrawFiatFunds(withdrawRequest *withdraw.Request) (*withdraw.ExchangeResponse, error) + func (b *Bitfinex) WithdrawFiatFundsToInternationalBank(withdrawRequest *withdraw.Request) (*withdraw.ExchangeResponse, error) + func (b *Bitfinex) WsAddSubscriptionChannel(chanID int, channel, pair string) + func (b *Bitfinex) WsCancelAllOrders() error + func (b *Bitfinex) WsCancelMultiOrders(orderIDs []int64) error + func (b *Bitfinex) WsCancelOffer(orderID int64) error + func (b *Bitfinex) WsCancelOrder(orderID int64) error + func (b *Bitfinex) WsConnect() error + func (b *Bitfinex) WsDataHandler() + func (b *Bitfinex) WsInsertSnapshot(p currency.Pair, assetType asset.Item, books []WebsocketBook) error + func (b *Bitfinex) WsModifyOrder(data *WsUpdateOrderRequest) error + func (b *Bitfinex) WsNewOffer(data *WsNewOfferRequest) error + func (b *Bitfinex) WsNewOrder(data *WsNewOrderRequest) (string, error) + func (b *Bitfinex) WsSendAuth() error + func (b *Bitfinex) WsUpdateOrderbook(p currency.Pair, assetType asset.Item, book []WebsocketBook) error + type Book struct + Amount float64 + Count int64 + OrderID int64 + Period float64 + Price float64 + Rate float64 + type Candle struct + Close float64 + High float64 + Low float64 + Open float64 + Timestamp time.Time + Volume float64 + type Currency struct + Amount float64 + Currency string + Volume float64 + type DepositResponse struct + Address string + Currency string + Method string + Result string + type ErrorCapture struct + Message string + type Fee struct + Currency string + MakerFees float64 + TakerFees float64 + type FundingBook struct + Asks []FundingBookItem + Bids []FundingBookItem + type FundingBookItem struct + Amount float64 + FlashReturnRate string + Period int + Rate float64 + Timestamp string + type GenericResponse struct + Result string + type KeyPermissions struct + Account Permission + Funding Permission + History Permission + Orders Permission + Positions Permission + Wallets Permission + Withdraw Permission + type LeaderboardEntry struct + Ranking int + Timestamp time.Time + TwitterHandle string + Username string + Value float64 + type Lendbook struct + Asks []Book + Bids []Book + type Lends struct + AmountLent float64 + AmountUsed float64 + Rate float64 + Timestamp int64 + type MarginData struct + Leverage float64 + MarginBalance float64 + MarginLimits []MarginLimits + MarginRequirement float64 + NetValue float64 + RequiredMargin int64 + TradableBalance float64 + UnrealizedPL int64 + UnrealizedSwap int64 + type MarginFunds struct + Amount float64 + AutoClose bool + Currency string + ID int64 + Period int + PositionID int64 + Rate float64 + Timestamp string + type MarginInfo struct + Info MarginData + Message string + type MarginLimits struct + InitialMargin float64 + MarginRequirement float64 + OnPair string + TradableBalance float64 + type MarginTotalTakenFunds struct + PositionPair string + TotalSwaps float64 + type MovementHistory struct + Address string + Amount float64 + Currency string + Description string + Fee float64 + ID int64 + Method string + Status string + Timestamp string + TimestampCreated string + TxID int64 + Type string + type Offer struct + Currency string + Direction string + ExecutedAmount float64 + ID int64 + IsCancelled bool + IsLive bool + OriginalAmount float64 + Period int64 + Rate float64 + RemainingAmount float64 + Timestamp string + Type string + type Order struct + AverageExecutionPrice float64 + Exchange string + ExecutedAmount float64 + ID int64 + IsCancelled bool + IsHidden bool + IsLive bool + OrderID int64 + OriginalAmount float64 + Price float64 + RemainingAmount float64 + Side string + Symbol string + Timestamp string + Type string + WasForced bool + type OrderMultiResponse struct + Orders []Order + Status string + type Orderbook struct + Asks []Book + Bids []Book + type Permission struct + Read bool + Write bool + type PlaceOrder struct + Amount float64 + Exchange string + Price float64 + Side string + Symbol string + Type string + type Position struct + Amount float64 + Base float64 + ID int64 + PL float64 + Status string + Swap float64 + Symbol string + Timestamp string + type RateLimit struct + AccountWalletBalance *rate.Limiter + AccountWalletHistory *rate.Limiter + CancelAllFundingOffer *rate.Limiter + CancelBatch *rate.Limiter + CancelFundingOffer *rate.Limiter + CancelOrder *rate.Limiter + Candle *rate.Limiter + ClaimPosition *rate.Limiter + CloseFunding *rate.Limiter + Configs *rate.Limiter + DeletePriceAlert *rate.Limiter + FundingAutoRenew *rate.Limiter + Fundingbook *rate.Limiter + Fx *rate.Limiter + GetAccountBalance *rate.Limiter + GetAccountFees *rate.Limiter + GetAccountMarginInfo *rate.Limiter + GetAccountSummary *rate.Limiter + GetActiveFundingOffers *rate.Limiter + GetActivePositions *rate.Limiter + GetAlertList *rate.Limiter + GetBalanceForOrdersOffers *rate.Limiter + GetDepositAddress *rate.Limiter + GetFundingCredits *rate.Limiter + GetFundingCreditsHistory *rate.Limiter + GetFundingInfo *rate.Limiter + GetFundingLoanHistory *rate.Limiter + GetFundingLoans *rate.Limiter + GetFundingTrades *rate.Limiter + GetKeyPermissions *rate.Limiter + GetLedgers *rate.Limiter + GetMarginInfo *rate.Limiter + GetMovements *rate.Limiter + GetOffersHistory *rate.Limiter + GetOrderTrades *rate.Limiter + GetPositionAudit *rate.Limiter + GetPositionHistory *rate.Limiter + GetTrades *rate.Limiter + GetUserInfo *rate.Limiter + GetWithdrawalFees *rate.Limiter + KeepFunding *rate.Limiter + LeaderBoard *rate.Limiter + Lends *rate.Limiter + Liquid *rate.Limiter + MarketAveragePrice *rate.Limiter + NewDepositAddress *rate.Limiter + OrderBatch *rate.Limiter + OrderHistory *rate.Limiter + OrderMulti *rate.Limiter + OrderV1 *rate.Limiter + Orderbook *rate.Limiter + PlatformStatus *rate.Limiter + RetrieveOrder *rate.Limiter + SetPriceAlert *rate.Limiter + Stats *rate.Limiter + StatsV1 *rate.Limiter + Status *rate.Limiter + SubmitFundingOffer *rate.Limiter + SubmitOrder *rate.Limiter + Ticker *rate.Limiter + TickerBatch *rate.Limiter + Trade *rate.Limiter + TransferBetweenWallets *rate.Limiter + UpdateCollateralOnPosition *rate.Limiter + UpdateOrder *rate.Limiter + UserSettingsDelete *rate.Limiter + UserSettingsRead *rate.Limiter + UserSettingsWrite *rate.Limiter + WalletTransfer *rate.Limiter + WithdrawV1 *rate.Limiter + Withdrawal *rate.Limiter + func SetRateLimit() *RateLimit + func (r *RateLimit) Limit(f request.EndpointLimit) error + type Stat struct + Period int64 + Volume float64 + type SymbolDetails struct + Expiration string + InitialMargin float64 + MaximumOrderSize float64 + MinimumMargin float64 + MinimumOrderSize float64 + Pair string + PricePrecision int + type Ticker struct + Ask float64 + AskPeriod int64 + AskSize float64 + Bid float64 + BidPeriod int64 + BidSize float64 + DailyChange float64 + DailyChangePerc float64 + FFRAmountAvailable float64 + FlashReturnRate float64 + High float64 + Last float64 + Low float64 + Volume float64 + type Trade struct + Amount float64 + Exchange string + Period int64 + Price float64 + Rate float64 + Side order.Side + TID int64 + Timestamp int64 + Type string + type TradeHistory struct + Amount float64 + Exchange string + FeeAmount float64 + FeeCurrency string + OrderID int64 + Price float64 + TID int64 + Timestamp string + Type string + type WalletTransfer struct + Message string + Status string + type WebsocketBook struct + Amount float64 + ID int64 + Period int64 + Price float64 + Rate float64 + type WebsocketChanInfo struct + Channel string + Pair string + type WebsocketHandshake struct + Code int64 + Event string + Version float64 + type WebsocketOrder struct + Amount float64 + Notify int + OrderID int64 + OrderType string + OrigAmount float64 + Pair string + Price float64 + PriceAvg float64 + Status string + Timestamp int64 + type WebsocketPosition struct + Amount float64 + Leverage float64 + LiquidationPrice float64 + MarginFunding float64 + MarginFundingType int64 + Pair string + Price float64 + ProfitLoss float64 + ProfitLossPercent float64 + Status string + type WebsocketTicker struct + Ask float64 + AskSize float64 + Bid float64 + BidSize float64 + DailyChange float64 + DialyChangePerc float64 + LastPrice float64 + Volume float64 + type WebsocketTrade struct + Amount float64 + ID int64 + Period int64 + Price float64 + Rate float64 + Timestamp int64 + type WebsocketTradeData struct + AmountExecuted float64 + Fee float64 + FeeCurrency string + Maker bool + OrderID int64 + OrderPrice float64 + OrderType string + Pair string + PriceExecuted float64 + Timestamp int64 + TradeID int64 + type WebsocketTradeExecuted struct + AmountExecuted float64 + OrderID int64 + Pair string + PriceExecuted float64 + Timestamp int64 + TradeID int64 + type WebsocketWallet struct + Balance float64 + Currency string + Name string + UnsettledInterest float64 + type Withdrawal struct + Address string + Amount float64 + Fees string + Invoice string + Message string + Method string + PaymentID string + Status string + WalletType string + WithdrawalID int64 + type WsAuthRequest struct + APIKey string + AuthNonce string + AuthPayload string + AuthSig string + DeadManSwitch int64 + Event string + type WsBalanceInfo struct + NetAssetsUnderManagement float64 + TotalAssetsUnderManagement float64 + type WsCancelAllOrdersRequest struct + All int64 + type WsCancelGroupOrdersRequest struct + CustomID [][]int64 + GroupOrderID []int64 + OrderID []int64 + type WsCancelOfferRequest struct + OrderID int64 + type WsCancelOrderRequest struct + CustomID int64 + CustomIDDate string + OrderID int64 + type WsCredit struct + Amount float64 + Created int64 + Flags interface{} + Hidden bool + ID int64 + Insure bool + LastPayout int64 + NoClose bool + Notify bool + Opened int64 + Period int64 + PositionPair string + Rate float64 + RateReal float64 + Renew bool + Side string + Status string + Symbol string + Updated int64 + type WsFundingInfo struct + DurationLend float64 + DurationLoan float64 + Symbol string + YieldLend float64 + YieldLoan float64 + type WsFundingOffer struct + Amount float64 + Created int64 + Flags interface{} + Hidden bool + ID int64 + Insure bool + Notify bool + OriginalAmount float64 + Period int64 + Rate float64 + RateReal float64 + Renew bool + Status string + Symbol string + Type string + Updated int64 + type WsFundingTrade struct + Amount float64 + ID int64 + MTSCreated int64 + Maker bool + OfferID int64 + Period int64 + Rate float64 + Symbol string + type WsMarginInfoBase struct + MarginBalance float64 + MarginNet float64 + UserProfitLoss float64 + UserSwaps float64 + type WsNewOfferRequest struct + Amount float64 + Flags int64 + Period float64 + Rate float64 + Symbol string + Type string + type WsNewOrderRequest struct + Amount float64 + AuxiliaryLimitPrice float64 + CustomID int64 + Flags int64 + GroupID int64 + Leverage int64 + Price float64 + StopPrice float64 + Symbol string + TimeInForce string + TrailingPrice float64 + Type string + type WsUpdateOrderRequest struct + Amount float64 + AuxiliaryLimitPrice float64 + CustomID int64 + CustomIDDate string + Delta float64 + Flags int64 + GroupID int64 + Leverage int64 + OrderID int64 + Price float64 + TimeInForce string + TrailingPrice float64 + type WsWallet struct + Balance float64 + BalanceAvailable float64 + Currency string + Type string + UnsettledInterest float64