Documentation
¶
Index ¶
- Constants
- type Bitfinex
- func (b *Bitfinex) CancelAllOrders() (string, error)
- func (b *Bitfinex) CancelMultipleOrders(OrderIDs []int64) (string, error)
- func (b *Bitfinex) CancelOffer(OfferID int64) (BitfinexOffer, error)
- func (b *Bitfinex) CancelOrder(OrderID int64) (BitfinexOrder, error)
- func (b *Bitfinex) ClaimPosition(PositionID int) (BitfinexPosition, error)
- func (b *Bitfinex) CloseMarginFunding(SwapID int64) (BitfinexOffer, error)
- func (b *Bitfinex) GetAccountBalance() ([]BitfinexBalance, error)
- func (b *Bitfinex) GetAccountInfo() ([]BitfinexAccountInfo, error)
- func (b *Bitfinex) GetActiveMarginFunding() ([]BitfinexMarginFunds, error)
- func (b *Bitfinex) GetActiveOffers() ([]BitfinexOffer, error)
- func (b *Bitfinex) GetActiveOrders() ([]BitfinexOrder, error)
- func (b *Bitfinex) GetActivePositions() ([]BitfinexPosition, error)
- func (b *Bitfinex) GetBalanceHistory(symbol string, timeSince time.Time, timeUntil time.Time, limit int, ...) ([]BitfinexBalanceHistory, error)
- func (e *Bitfinex) GetExchangeAccountInfo() (exchange.ExchangeAccountInfo, error)
- func (b *Bitfinex) GetLendbook(symbol string, values url.Values) (BitfinexLendbook, error)
- func (b *Bitfinex) GetLends(symbol string, values url.Values) ([]BitfinexLends, error)
- func (b *Bitfinex) GetMarginInfo() ([]BitfinexMarginInfo, error)
- func (b *Bitfinex) GetMarginTotalTakenFunds() ([]BitfinexMarginTotalTakenFunds, error)
- func (b *Bitfinex) GetMovementHistory(symbol, method string, timeSince, timeUntil time.Time, limit int) ([]BitfinexMovementHistory, error)
- func (b *Bitfinex) GetOfferStatus(OfferID int64) (BitfinexOffer, error)
- func (b *Bitfinex) GetOrderStatus(OrderID int64) (BitfinexOrder, error)
- func (b *Bitfinex) GetOrderbook(symbol string, values url.Values) (BitfinexOrderbook, error)
- func (b *Bitfinex) GetOrderbookEx(p pair.CurrencyPair) (orderbook.OrderbookBase, error)
- func (b *Bitfinex) GetStats(symbol string) ([]BitfinexStats, error)
- func (b *Bitfinex) GetSymbols() ([]string, error)
- func (b *Bitfinex) GetSymbolsDetails() ([]BitfinexSymbolDetails, error)
- func (b *Bitfinex) GetTicker(symbol string, values url.Values) (BitfinexTicker, error)
- func (b *Bitfinex) GetTickerPrice(p pair.CurrencyPair) (ticker.TickerPrice, error)
- func (b *Bitfinex) GetTradeHistory(symbol string, timestamp, until time.Time, limit, reverse int) ([]BitfinexTradeHistory, error)
- func (b *Bitfinex) GetTrades(symbol string, values url.Values) ([]BitfinexTradeStructure, error)
- func (b *Bitfinex) NewDeposit(method, walletName string, renew int) (BitfinexDepositResponse, error)
- func (b *Bitfinex) NewOffer(symbol string, amount, rate float64, period int64, direction string) int64
- func (b *Bitfinex) NewOrder(Symbol string, Amount float64, Price float64, Buy bool, Type string, ...) (BitfinexOrder, error)
- func (b *Bitfinex) NewOrderMulti(orders []BitfinexPlaceOrder) (BitfinexOrderMultiResponse, error)
- func (b *Bitfinex) ReplaceOrder(OrderID int64, Symbol string, Amount float64, Price float64, Buy bool, ...) (BitfinexOrder, error)
- func (b *Bitfinex) Run()
- func (b *Bitfinex) SendAuthenticatedHTTPRequest(method, path string, params map[string]interface{}, result interface{}) error
- func (b *Bitfinex) SetDefaults()
- func (b *Bitfinex) Setup(exch config.ExchangeConfig)
- func (b *Bitfinex) Start()
- func (b *Bitfinex) WalletTransfer(amount float64, currency, walletFrom, walletTo string) ([]BitfinexWalletTransfer, error)
- func (b *Bitfinex) WebsocketAddSubscriptionChannel(chanID int, channel, pair string)
- func (b *Bitfinex) WebsocketClient()
- func (b *Bitfinex) WebsocketPingHandler() error
- func (b *Bitfinex) WebsocketSend(data interface{}) error
- func (b *Bitfinex) WebsocketSendAuth() error
- func (b *Bitfinex) WebsocketSendUnauth() error
- func (b *Bitfinex) WebsocketSubscribe(channel string, params map[string]string) error
- func (b *Bitfinex) Withdrawal(withdrawType, wallet, address string, amount float64) ([]BitfinexWithdrawal, error)
- type BitfinexAccountInfo
- type BitfinexBalance
- type BitfinexBalanceHistory
- type BitfinexBookStructure
- type BitfinexDepositResponse
- type BitfinexFee
- type BitfinexGenericResponse
- type BitfinexLendbook
- type BitfinexLendbookBidAsk
- type BitfinexLends
- type BitfinexMarginFunds
- type BitfinexMarginInfo
- type BitfinexMarginLimits
- type BitfinexMarginTotalTakenFunds
- type BitfinexMovementHistory
- type BitfinexOffer
- type BitfinexOrder
- type BitfinexOrderMultiResponse
- type BitfinexOrderbook
- type BitfinexPlaceOrder
- type BitfinexPosition
- type BitfinexStats
- type BitfinexSymbolDetails
- type BitfinexTicker
- type BitfinexTradeHistory
- type BitfinexTradeStructure
- type BitfinexWalletTransfer
- type BitfinexWebsocketBook
- type BitfinexWebsocketChanInfo
- type BitfinexWebsocketOrder
- type BitfinexWebsocketPosition
- type BitfinexWebsocketTicker
- type BitfinexWebsocketTrade
- type BitfinexWebsocketTradeExecuted
- type BitfinexWebsocketWallet
- type BitfinexWithdrawal
Constants ¶
View Source
const ( BITFINEX_API_URL = "https://api.bitfinex.com/v1/" BITFINEX_API_VERSION = "1" BITFINEX_TICKER = "pubticker/" BITFINEX_STATS = "stats/" BITFINEX_LENDBOOK = "lendbook/" BITFINEX_ORDERBOOK = "book/" BITFINEX_TRADES = "trades/" BITFINEX_LENDS = "lends/" BITFINEX_SYMBOLS = "symbols/" BITFINEX_SYMBOLS_DETAILS = "symbols_details/" BITFINEX_ACCOUNT_INFO = "account_infos" BITFINEX_DEPOSIT = "deposit/new" BITFINEX_ORDER_NEW = "order/new" BITFINEX_ORDER_NEW_MULTI = "order/new/multi" BITFINEX_ORDER_CANCEL = "order/cancel" BITFINEX_ORDER_CANCEL_MULTI = "order/cancel/multi" BITFINEX_ORDER_CANCEL_ALL = "order/cancel/all" BITFINEX_ORDER_CANCEL_REPLACE = "order/cancel/replace" BITFINEX_ORDER_STATUS = "order/status" BITFINEX_ORDERS = "orders" BITFINEX_POSITIONS = "positions" BITFINEX_CLAIM_POSITION = "position/claim" BITFINEX_HISTORY = "history" BITFINEX_HISTORY_MOVEMENTS = "history/movements" BITFINEX_TRADE_HISTORY = "mytrades" BITFINEX_OFFER_NEW = "offer/new" BITFINEX_OFFER_CANCEL = "offer/cancel" BITFINEX_OFFER_STATUS = "offer/status" BITFINEX_OFFERS = "offers" BITFINEX_MARGIN_ACTIVE_FUNDS = "taken_funds" BITFINEX_MARGIN_TOTAL_FUNDS = "total_taken_funds" BITFINEX_MARGIN_CLOSE = "funding/close" BITFINEX_BALANCES = "balances" BITFINEX_MARGIN_INFO = "margin_infos" BITFINEX_TRANSFER = "transfer" BITFINEX_WITHDRAWAL = "withdrawal" )
View Source
const ( BITFINEX_WEBSOCKET = "wss://api.bitfinex.com/ws" BITFINEX_WEBSOCKET_VERSION = "1.1" BITFINEX_WEBSOCKET_POSITION_SNAPSHOT = "ps" BITFINEX_WEBSOCKET_POSITION_NEW = "pn" BITFINEX_WEBSOCKET_POSITION_UPDATE = "pu" BITFINEX_WEBSOCKET_POSITION_CLOSE = "pc" BITFINEX_WEBSOCKET_WALLET_SNAPSHOT = "ws" BITFINEX_WEBSOCKET_WALLET_UPDATE = "wu" BITFINEX_WEBSOCKET_ORDER_SNAPSHOT = "os" BITFINEX_WEBSOCKET_ORDER_NEW = "on" BITFINEX_WEBSOCKET_ORDER_UPDATE = "ou" BITFINEX_WEBSOCKET_ORDER_CANCEL = "oc" BITFINEX_WEBSOCKET_TRADE_EXECUTED = "te" BITFINEX_WEBSOCKET_HEARTBEAT = "hb" BITFINEX_WEBSOCKET_ALERT_RESTARTING = "20051" BITFINEX_WEBSOCKET_ALERT_REFRESHING = "20060" BITFINEX_WEBSOCKET_ALERT_RESUME = "20061" BITFINEX_WEBSOCKET_UNKNOWN_EVENT = "10000" BITFINEX_WEBSOCKET_UNKNOWN_PAIR = "10001" BITFINEX_WEBSOCKET_SUBSCRIPTION_FAILED = "10300" BITFINEX_WEBSOCKET_ALREADY_SUBSCRIBED = "10301" BITFINEX_WEBSOCKET_UNKNOWN_CHANNEL = "10302" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bitfinex ¶
type Bitfinex struct { exchange.ExchangeBase WebsocketConn *websocket.Conn WebsocketSubdChannels map[int]BitfinexWebsocketChanInfo }
func (*Bitfinex) CancelAllOrders ¶
func (*Bitfinex) CancelMultipleOrders ¶
func (*Bitfinex) CancelOffer ¶
func (b *Bitfinex) CancelOffer(OfferID int64) (BitfinexOffer, error)
func (*Bitfinex) CancelOrder ¶
func (b *Bitfinex) CancelOrder(OrderID int64) (BitfinexOrder, error)
func (*Bitfinex) ClaimPosition ¶
func (b *Bitfinex) ClaimPosition(PositionID int) (BitfinexPosition, error)
func (*Bitfinex) CloseMarginFunding ¶
func (b *Bitfinex) CloseMarginFunding(SwapID int64) (BitfinexOffer, error)
func (*Bitfinex) GetAccountBalance ¶
func (b *Bitfinex) GetAccountBalance() ([]BitfinexBalance, error)
func (*Bitfinex) GetAccountInfo ¶
func (b *Bitfinex) GetAccountInfo() ([]BitfinexAccountInfo, error)
func (*Bitfinex) GetActiveMarginFunding ¶
func (b *Bitfinex) GetActiveMarginFunding() ([]BitfinexMarginFunds, error)
func (*Bitfinex) GetActiveOffers ¶
func (b *Bitfinex) GetActiveOffers() ([]BitfinexOffer, error)
func (*Bitfinex) GetActiveOrders ¶
func (b *Bitfinex) GetActiveOrders() ([]BitfinexOrder, error)
func (*Bitfinex) GetActivePositions ¶
func (b *Bitfinex) GetActivePositions() ([]BitfinexPosition, error)
func (*Bitfinex) GetBalanceHistory ¶
func (*Bitfinex) GetExchangeAccountInfo ¶
GetExchangeAccountInfo : Retrieves balances for all enabled currencies for the Bitfinex exchange
func (*Bitfinex) GetLendbook ¶
func (*Bitfinex) GetMarginInfo ¶
func (b *Bitfinex) GetMarginInfo() ([]BitfinexMarginInfo, error)
func (*Bitfinex) GetMarginTotalTakenFunds ¶
func (b *Bitfinex) GetMarginTotalTakenFunds() ([]BitfinexMarginTotalTakenFunds, error)
func (*Bitfinex) GetMovementHistory ¶
func (*Bitfinex) GetOfferStatus ¶
func (b *Bitfinex) GetOfferStatus(OfferID int64) (BitfinexOffer, error)
func (*Bitfinex) GetOrderStatus ¶
func (b *Bitfinex) GetOrderStatus(OrderID int64) (BitfinexOrder, error)
func (*Bitfinex) GetOrderbook ¶
func (*Bitfinex) GetOrderbookEx ¶
func (b *Bitfinex) GetOrderbookEx(p pair.CurrencyPair) (orderbook.OrderbookBase, error)
func (*Bitfinex) GetSymbols ¶
func (*Bitfinex) GetSymbolsDetails ¶
func (b *Bitfinex) GetSymbolsDetails() ([]BitfinexSymbolDetails, error)
func (*Bitfinex) GetTickerPrice ¶
func (b *Bitfinex) GetTickerPrice(p pair.CurrencyPair) (ticker.TickerPrice, error)
func (*Bitfinex) GetTradeHistory ¶
func (*Bitfinex) NewDeposit ¶
func (b *Bitfinex) NewDeposit(method, walletName string, renew int) (BitfinexDepositResponse, error)
func (*Bitfinex) NewOrderMulti ¶
func (b *Bitfinex) NewOrderMulti(orders []BitfinexPlaceOrder) (BitfinexOrderMultiResponse, error)
func (*Bitfinex) ReplaceOrder ¶
func (*Bitfinex) SendAuthenticatedHTTPRequest ¶
func (*Bitfinex) SetDefaults ¶
func (b *Bitfinex) SetDefaults()
func (*Bitfinex) Setup ¶
func (b *Bitfinex) Setup(exch config.ExchangeConfig)
func (*Bitfinex) WalletTransfer ¶
func (b *Bitfinex) WalletTransfer(amount float64, currency, walletFrom, walletTo string) ([]BitfinexWalletTransfer, error)
func (*Bitfinex) WebsocketAddSubscriptionChannel ¶
func (*Bitfinex) WebsocketClient ¶
func (b *Bitfinex) WebsocketClient()
func (*Bitfinex) WebsocketPingHandler ¶
func (*Bitfinex) WebsocketSend ¶
func (*Bitfinex) WebsocketSendAuth ¶
func (*Bitfinex) WebsocketSendUnauth ¶
func (*Bitfinex) WebsocketSubscribe ¶
func (*Bitfinex) Withdrawal ¶
func (b *Bitfinex) Withdrawal(withdrawType, wallet, address string, amount float64) ([]BitfinexWithdrawal, error)
type BitfinexAccountInfo ¶
type BitfinexBalance ¶
type BitfinexBalanceHistory ¶
type BitfinexBookStructure ¶
type BitfinexBookStructure struct {
Price, Amount, Timestamp string
}
type BitfinexDepositResponse ¶
type BitfinexFee ¶
type BitfinexGenericResponse ¶
type BitfinexGenericResponse struct {
Result string `json:"result"`
}
type BitfinexLendbook ¶
type BitfinexLendbook struct { Bids []BitfinexLendbookBidAsk `json:"bids"` Asks []BitfinexLendbookBidAsk `json:"asks"` }
type BitfinexLendbookBidAsk ¶
type BitfinexLends ¶
type BitfinexMarginFunds ¶
type BitfinexMarginInfo ¶
type BitfinexMarginInfo struct { MarginBalance float64 `json:"margin_balance,string"` TradableBalance float64 `json:"tradable_balance,string"` UnrealizedPL int64 `json:"unrealized_pl"` UnrealizedSwap int64 `json:"unrealized_swap"` NetValue float64 `json:"net_value,string"` RequiredMargin int64 `json:"required_margin"` Leverage float64 `json:"leverage,string"` MarginRequirement float64 `json:"margin_requirement,string"` MarginLimits []BitfinexMarginLimits `json:"margin_limits"` Message string }
type BitfinexMarginLimits ¶
type BitfinexMovementHistory ¶
type BitfinexMovementHistory struct { ID int64 `json:"id"` Currency string `json:"currency"` Method string `json:"method"` Type string `json:"withdrawal"` Amount float64 `json:"amount,string"` Description string `json:"description"` Status string `json:"status"` Timestamp string `json:"timestamp"` }
type BitfinexOffer ¶
type BitfinexOffer struct { ID int64 Currency string Rate float64 `json:"rate,string"` Period int64 Direction string Timestamp string Type string IsLive bool `json:"is_live"` IsCancelled bool `json:"is_cancelled"` OriginalAmount float64 `json:"original_amount,string"` RemainingAmount float64 `json:"remaining_amount,string"` ExecutedAmount float64 `json:"executed_amount,string"` }
type BitfinexOrder ¶
type BitfinexOrder struct { ID int64 Symbol string Exchange string Price float64 `json:"price,string"` AverageExecutionPrice float64 `json:"avg_execution_price,string"` Side string Type string Timestamp string IsLive bool `json:"is_live"` IsCancelled bool `json:"is_cancelled"` IsHidden bool `json:"is_hidden"` WasForced bool `json:"was_forced"` OriginalAmount float64 `json:"original_amount,string"` RemainingAmount float64 `json:"remaining_amount,string"` ExecutedAmount float64 `json:"executed_amount,string"` OrderID int64 `json:"order_id"` }
type BitfinexOrderMultiResponse ¶
type BitfinexOrderMultiResponse struct { Orders []BitfinexOrder `json:"order_ids"` Status string `json:"status"` }
type BitfinexOrderbook ¶
type BitfinexOrderbook struct { Bids []BitfinexBookStructure Asks []BitfinexBookStructure }
type BitfinexPlaceOrder ¶
type BitfinexPosition ¶
type BitfinexStats ¶
type BitfinexSymbolDetails ¶
type BitfinexSymbolDetails struct { Pair string `json:"pair"` PricePrecision int `json:"price_precision"` InitialMargin float64 `json:"initial_margin,string"` MinimumMargin float64 `json:"minimum_margin,string"` MaximumOrderSize float64 `json:"maximum_order_size,string"` MinimumOrderSize float64 `json:"minimum_order_size,string"` Expiration string `json:"expiration"` }
type BitfinexTicker ¶
type BitfinexTradeHistory ¶
type BitfinexTradeHistory struct { Price float64 `json:"price,string"` Amount float64 `json:"amount,string"` Timestamp string `json:"timestamp"` Exchange string `json:"exchange"` Type string `json:"type"` FeeCurrency string `json:"fee_currency"` FeeAmount float64 `json:"fee_amount,string"` TID int64 `json:"tid"` OrderID int64 `json:"order_id"` }
type BitfinexTradeStructure ¶
type BitfinexWalletTransfer ¶
type BitfinexWebsocketBook ¶
type BitfinexWebsocketOrder ¶
type BitfinexWebsocketTicker ¶
type BitfinexWebsocketTrade ¶
type BitfinexWebsocketWallet ¶
type BitfinexWithdrawal ¶
Click to show internal directories.
Click to hide internal directories.