Documentation ¶
Index ¶
- Constants
- type Bitfinex
- func (bfx *Bitfinex) ActiveCredits() (error, []LendOrder)
- func (bfx *Bitfinex) ActiveLendOrders() (error, []LendOrder)
- func (bfx *Bitfinex) CancelLendOrder(id int) (error, *LendOrder)
- func (bfx *Bitfinex) CancelOrder(orderId string, currencyPair CurrencyPair) (bool, error)
- func (bfx *Bitfinex) GetAccount() (*Account, error)
- func (bfx *Bitfinex) GetDepositWalletBalance() (*Account, error)
- func (bfx *Bitfinex) GetDepth(size int, currencyPair CurrencyPair) (*Depth, error)
- func (bfx *Bitfinex) GetExchangeName() string
- func (bfx *Bitfinex) GetKlineRecords(currencyPair CurrencyPair, period, size, since int) ([]Kline, error)
- func (bfx *Bitfinex) GetLendBook(currency Currency) (error, *LendBook)
- func (bfx *Bitfinex) GetLendOrderStatus(id int) (error, *LendOrder)
- func (bfx *Bitfinex) GetLendTickers() ([]LendTicker, error)
- func (bfx *Bitfinex) GetMarginInfos() ([]MarginInfo, error)
- func (bfx *Bitfinex) GetMarginTradingWalletBalance() (*Account, error)
- func (bfx *Bitfinex) GetOneOrder(orderId string, currencyPair CurrencyPair) (*Order, error)
- func (bfx *Bitfinex) GetOrderHistorys(currencyPair CurrencyPair, currentPage, pageSize int) ([]Order, error)
- func (bfx *Bitfinex) GetTicker(currencyPair CurrencyPair) (*Ticker, error)
- func (bfx *Bitfinex) GetTrades(currencyPair CurrencyPair, since int64) ([]Trade, error)
- func (bfx *Bitfinex) GetUnfinishOrders(currencyPair CurrencyPair) ([]Order, error)
- func (bfx *Bitfinex) GetWalletBalances() (map[string]*Account, error)
- func (bfx *Bitfinex) LimitBuy(amount, price string, currencyPair CurrencyPair) (*Order, error)
- func (bfx *Bitfinex) LimitSell(amount, price string, currencyPair CurrencyPair) (*Order, error)
- func (bfx *Bitfinex) MarginLimitBuy(amount, price string, currencyPair CurrencyPair) (*Order, error)
- func (bfx *Bitfinex) MarginLimitSell(amount, price string, currencyPair CurrencyPair) (*Order, error)
- func (bfx *Bitfinex) MarginMarketBuy(amount, price string, currencyPair CurrencyPair) (*Order, error)
- func (bfx *Bitfinex) MarginMarketSell(amount, price string, currencyPair CurrencyPair) (*Order, error)
- func (bfx *Bitfinex) MarketBuy(amount, price string, currencyPair CurrencyPair) (*Order, error)
- func (bfx *Bitfinex) MarketSell(amount, price string, currencyPair CurrencyPair) (*Order, error)
- func (bfx *Bitfinex) MytradesFunding(currency Currency, limit int) (error, []TradeFunding)
- func (bfx *Bitfinex) NewLendOrder(currency Currency, amount, rate string, period int) (error, *LendOrder)
- func (bfx *Bitfinex) NewLoanOrder(currency Currency, amount, rate string, period int) (error, *LendOrder)
- func (bfx *Bitfinex) OffersHistory(limit int) (error, []LendOrder)
- func (bfx *Bitfinex) Transfer(amount float64, currency Currency, fromWallet, toWallet string) error
- type LendBook
- type LendBookItem
- type LendOrder
- type LendTicker
- type MarginInfo
- type MarginLimits
- type TradeFunding
Constants ¶
View Source
const (
BASE_URL = "https://api.bitfinex.com/v1"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bitfinex ¶
type Bitfinex struct {
// contains filtered or unexported fields
}
func (*Bitfinex) ActiveCredits ¶
func (*Bitfinex) ActiveLendOrders ¶
func (*Bitfinex) CancelOrder ¶
func (*Bitfinex) GetAccount ¶
defalut only return exchange wallet balance
func (*Bitfinex) GetDepositWalletBalance ¶
func (*Bitfinex) GetExchangeName ¶
func (*Bitfinex) GetKlineRecords ¶
func (*Bitfinex) GetLendBook ¶
func (*Bitfinex) GetLendOrderStatus ¶
func (*Bitfinex) GetLendTickers ¶
func (bfx *Bitfinex) GetLendTickers() ([]LendTicker, error)
func (*Bitfinex) GetMarginInfos ¶
func (bfx *Bitfinex) GetMarginInfos() ([]MarginInfo, error)
func (*Bitfinex) GetMarginTradingWalletBalance ¶
func (*Bitfinex) GetOneOrder ¶
func (*Bitfinex) GetOrderHistorys ¶
func (*Bitfinex) GetUnfinishOrders ¶
func (*Bitfinex) GetWalletBalances ¶
func (*Bitfinex) MarginLimitBuy ¶
func (*Bitfinex) MarginLimitSell ¶
func (*Bitfinex) MarginMarketBuy ¶
func (*Bitfinex) MarginMarketSell ¶
func (*Bitfinex) MarketSell ¶
func (*Bitfinex) MytradesFunding ¶
func (bfx *Bitfinex) MytradesFunding(currency Currency, limit int) (error, []TradeFunding)
func (*Bitfinex) NewLendOrder ¶
func (*Bitfinex) NewLoanOrder ¶
type LendBook ¶
type LendBook struct { Bids []LendBookItem `json:"bids"` Asks []LendBookItem `json:"asks"` }
type LendBookItem ¶
type LendOrder ¶
type LendOrder struct { Id int `json:"id"` Currency string `json:"currency"` Rate float64 `json:"rate,string"` Period int `json:"period"` Direction string `json:"direction"` IsLive bool `json:"is_live"` IsCancelled bool `json:"is_cancelled"` Amount float64 `json:"amount,string"` ExecutedAmount float64 `json:"executed_amount,string"` RemainingAmount float64 `json:"remaining_amount,string"` OriginalAmount float64 `json:"original_amount,string"` Timestamp string `json:"timestamp"` }
type LendTicker ¶
type LendTicker struct { Ticker Coin Currency DailyChangePerc float64 }
type MarginInfo ¶
type MarginInfo struct { MarginBalance float64 `json:"margin_balance,string"` TradableBalance float64 `json:"tradable_balance,string"` UnrealizedPl float64 `json:"unrealized_pl,string"` UnrealizedSwap float64 `json:"unrealized_swap,string"` NetValue float64 `json:"net_value,string"` RequiredMargin float64 `json:"required_margin,string"` Leverage float64 `json:"leverage,string"` MarginRequirement float64 `json:"margin_requirement,string"` MarginLimits []MarginLimits `json:"margin_limits"` }
type MarginLimits ¶
Click to show internal directories.
Click to hide internal directories.