Documentation ¶
Index ¶
- Constants
- func ComputeHmac512_384NoDecode(strMessage string, strSecret string) string
- type AccountBalances
- type Bitfinex
- func (e *Bitfinex) ApiKeyPost(mapParams map[string]interface{}, strRequestPath string) string
- func (e *Bitfinex) CanDeposit(coin *coin.Coin) bool
- func (e *Bitfinex) CanWithdraw(coin *coin.Coin) bool
- func (e *Bitfinex) CancelAllOrder() error
- func (e *Bitfinex) CancelOrder(order *exchange.Order) error
- func (e *Bitfinex) DeleteCoin(coin *coin.Coin)
- func (e *Bitfinex) DeletePair(pair *pair.Pair)
- func (e *Bitfinex) DoAccountOperation(operation *exchange.AccountOperation) error
- func (e *Bitfinex) GetBalance(coin *coin.Coin) float64
- func (e *Bitfinex) GetCoinBySymbol(symbol string) *coin.Coin
- func (e *Bitfinex) GetCoinConstraint(coin *coin.Coin) *exchange.CoinConstraint
- func (e *Bitfinex) GetCoins() []*coin.Coin
- func (e *Bitfinex) GetCoinsData() error
- func (e *Bitfinex) GetConfirmation(coin *coin.Coin) int
- func (e *Bitfinex) GetConstraintFetchMethod(pair *pair.Pair) *exchange.ConstrainFetchMethod
- func (e *Bitfinex) GetFee(pair *pair.Pair) float64
- func (e *Bitfinex) GetID() int
- func (e *Bitfinex) GetLotSize(pair *pair.Pair) float64
- func (e *Bitfinex) GetName() exchange.ExchangeName
- func (e *Bitfinex) GetPairBySymbol(symbol string) *pair.Pair
- func (e *Bitfinex) GetPairConstraint(pair *pair.Pair) *exchange.PairConstraint
- func (e *Bitfinex) GetPairs() []*pair.Pair
- func (e *Bitfinex) GetPairsData() error
- func (e *Bitfinex) GetPriceFilter(pair *pair.Pair) float64
- func (e *Bitfinex) GetSymbolByCoin(coin *coin.Coin) string
- func (e *Bitfinex) GetSymbolByPair(pair *pair.Pair) string
- func (e *Bitfinex) GetTradingWebURL(pair *pair.Pair) string
- func (e *Bitfinex) GetTxFee(coin *coin.Coin) float64
- func (e *Bitfinex) GetWithdrawFees() error
- func (e *Bitfinex) HasPair(pair *pair.Pair) bool
- func (e *Bitfinex) InitData() error
- func (e *Bitfinex) LimitBuy(pair *pair.Pair, quantity, rate float64) (*exchange.Order, error)
- func (e *Bitfinex) LimitSell(pair *pair.Pair, quantity, rate float64) (*exchange.Order, error)
- func (e *Bitfinex) ListOrders() ([]*exchange.Order, error)
- func (e *Bitfinex) LoadPublicData(operation *exchange.PublicOperation) error
- func (e *Bitfinex) OrderBook(p *pair.Pair) (*exchange.Maker, error)
- func (e *Bitfinex) OrderStatus(order *exchange.Order) error
- func (e *Bitfinex) SetCoinConstraint(coinConstraint *exchange.CoinConstraint)
- func (e *Bitfinex) SetPairConstraint(pairConstraint *exchange.PairConstraint)
- func (e *Bitfinex) UpdateAllBalances()
- func (e *Bitfinex) UpdateConstraint()
- func (e *Bitfinex) Withdraw(coin *coin.Coin, quantity float64, addr, tag string) bool
- type CoinsData
- type OrderBook
- type PairsData
- type PlaceOrder
- type TradeHistory
- type Withdraw
- type WithdrawFee
Constants ¶
const ( DEFAULT_ID = 18 DEFAULT_TAKER_FEE = 0.002 DEFAULT_MAKER_FEE = 0.001 DEFAULT_LOT_SIZE = 0.00000001 DEFAULT_PRICE_FILTER = 0.00000001 //PRICE FILTER DEFAULT_TXFEE = 0.005 DEFAULT_WITHDRAW = true DEFAULT_DEPOSIT = true DEFAULT_CONFIRMATION = 2 )
const (
API_URL = "https://api.bitfinex.com"
)
The Base Endpoint URL
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AccountBalances ¶
type Bitfinex ¶
type Bitfinex struct { ID int Name string `bson:"name"` Website string `bson:"website"` API_KEY string API_SECRET string Source exchange.DataSource // / exchange API / microservicve api 1 / PSQL SourceURI string }
func CreateBitfinex ¶
*************************************************
func (*Bitfinex) ApiKeyPost ¶
************** Signature Http Request ************** Method: API Request and Signature is required Step 1: Change Instance Name (e *<exchange Instance Name>) Step 2: Create mapParams Depend on API Signature request Step 3: Add HttpGetRequest below strUrl if API has different requests
func (*Bitfinex) CancelAllOrder ¶
func (*Bitfinex) DeleteCoin ¶
func (*Bitfinex) DeletePair ¶
func (*Bitfinex) DoAccountOperation ¶
func (e *Bitfinex) DoAccountOperation(operation *exchange.AccountOperation) error
************** Private API **************
func (*Bitfinex) GetCoinConstraint ¶
func (e *Bitfinex) GetCoinConstraint(coin *coin.Coin) *exchange.CoinConstraint
************** Coins on the Exchanges **************
func (*Bitfinex) GetCoinsData ¶
************** Public API ************** Get Coins Information (If API provide) Step 1: Change Instance Name (e *<exchange Instance Name>) Step 2: Add Model of API Response Step 3: Modify API Path(strRequestUrl)
func (*Bitfinex) GetConstraintFetchMethod ¶
func (e *Bitfinex) GetConstraintFetchMethod(pair *pair.Pair) *exchange.ConstrainFetchMethod
*************** Exchange Constraint ***************
func (*Bitfinex) GetName ¶
func (e *Bitfinex) GetName() exchange.ExchangeName
func (*Bitfinex) GetPairConstraint ¶
func (e *Bitfinex) GetPairConstraint(pair *pair.Pair) *exchange.PairConstraint
************** Pairs on the Exchanges **************
func (*Bitfinex) GetPairsData ¶
GetPairsData - Get Pairs Information (If API provide)
Step 1: Change Instance Name (e *<exchange Instance Name>) Step 2: Add Model of API Response Step 3: Modify API Path(strRequestUrl)
func (*Bitfinex) GetWithdrawFees ¶
func (*Bitfinex) LoadPublicData ¶
func (e *Bitfinex) LoadPublicData(operation *exchange.PublicOperation) error
func (*Bitfinex) OrderBook ¶
Get Pair Market Depth Step 1: Change Instance Name (e *<exchange Instance Name>) Step 2: Add Model of API Response Step 3: Get Exchange Pair Code ex. symbol := e.GetPairCode(p) Step 4: Modify API Path(strRequestUrl) Step 5: Add Params - Depend on API request Step 6: Convert the response to Standard Maker struct
func (*Bitfinex) SetCoinConstraint ¶
func (e *Bitfinex) SetCoinConstraint(coinConstraint *exchange.CoinConstraint)
func (*Bitfinex) SetPairConstraint ¶
func (e *Bitfinex) SetPairConstraint(pairConstraint *exchange.PairConstraint)
func (*Bitfinex) UpdateAllBalances ¶
func (e *Bitfinex) UpdateAllBalances()
func (*Bitfinex) UpdateConstraint ¶
func (e *Bitfinex) UpdateConstraint()
type PairsData ¶
type PairsData []struct { Pair string `json:"pair"` PricePrecision int `json:"price_precision"` InitialMargin string `json:"initial_margin"` MinimumMargin string `json:"minimum_margin"` MaximumOrderSize string `json:"maximum_order_size"` MinimumOrderSize string `json:"minimum_order_size"` Expiration string `json:"expiration"` Margin bool `json:"margin"` }
type PlaceOrder ¶
type PlaceOrder struct { ID int64 `json:"id"` Cid int `json:"cid"` CidDate string `json:"cid_date"` Gid interface{} `json:"gid"` Symbol string `json:"symbol"` Exchange string `json:"exchange"` Price string `json:"price"` AvgExecutionPrice string `json:"avg_execution_price"` Side string `json:"side"` Type string `json:"type"` Timestamp string `json:"timestamp"` IsLive bool `json:"is_live"` IsCancelled bool `json:"is_cancelled"` IsHidden bool `json:"is_hidden"` OcoOrder interface{} `json:"oco_order"` WasForced bool `json:"was_forced"` OriginalAmount string `json:"original_amount"` RemainingAmount string `json:"remaining_amount"` ExecutedAmount string `json:"executed_amount"` Src string `json:"src"` OrderID int64 `json:"order_id"` Message string `json:"message"` }
type TradeHistory ¶
type TradeHistory [][]float64
type WithdrawFee ¶
type WithdrawFee struct {
Withdraw map[string]interface{}
}