Documentation ¶
Index ¶
- Constants
- type AccountBalances
- type Bibox
- func (e *Bibox) ApiKeyPOST(strRequestPath string, mapParams map[string]interface{}) string
- func (e *Bibox) ApiKeyPOSTInner(strRequestPath string, mapParams map[string]interface{}) string
- func (e *Bibox) CanDeposit(coin *coin.Coin) bool
- func (e *Bibox) CanWithdraw(coin *coin.Coin) bool
- func (e *Bibox) CancelAllOrder() error
- func (e *Bibox) CancelOrder(order *exchange.Order) error
- func (e *Bibox) DeleteCoin(coin *coin.Coin)
- func (e *Bibox) DeletePair(pair *pair.Pair)
- func (e *Bibox) DoAccountOperation(operation *exchange.AccountOperation) error
- func (e *Bibox) GetBalance(coin *coin.Coin) float64
- func (e *Bibox) GetCoinBySymbol(symbol string) *coin.Coin
- func (e *Bibox) GetCoinConstraint(coin *coin.Coin) *exchange.CoinConstraint
- func (e *Bibox) GetCoins() []*coin.Coin
- func (e *Bibox) GetCoinsData() error
- func (e *Bibox) GetConfirmation(coin *coin.Coin) int
- func (e *Bibox) GetConstraintFetchMethod(pair *pair.Pair) *exchange.ConstrainFetchMethod
- func (e *Bibox) GetFee(pair *pair.Pair) float64
- func (e *Bibox) GetID() int
- func (e *Bibox) GetLotSize(pair *pair.Pair) float64
- func (e *Bibox) GetName() exchange.ExchangeName
- func (e *Bibox) GetPairBySymbol(symbol string) *pair.Pair
- func (e *Bibox) GetPairConstraint(pair *pair.Pair) *exchange.PairConstraint
- func (e *Bibox) GetPairs() []*pair.Pair
- func (e *Bibox) GetPairsData() error
- func (e *Bibox) GetPriceFilter(pair *pair.Pair) float64
- func (e *Bibox) GetSymbolByCoin(coin *coin.Coin) string
- func (e *Bibox) GetSymbolByPair(pair *pair.Pair) string
- func (e *Bibox) GetTradingWebURL(pair *pair.Pair) string
- func (e *Bibox) GetTxFee(coin *coin.Coin) float64
- func (e *Bibox) HasPair(pair *pair.Pair) bool
- func (e *Bibox) InitData() error
- func (e *Bibox) LimitBuy(pair *pair.Pair, quantity, rate float64) (*exchange.Order, error)
- func (e *Bibox) LimitSell(pair *pair.Pair, quantity, rate float64) (*exchange.Order, error)
- func (e *Bibox) ListOrders() ([]*exchange.Order, error)
- func (e *Bibox) LoadPublicData(operation *exchange.PublicOperation) error
- func (e *Bibox) OrderBook(pair *pair.Pair) (*exchange.Maker, error)
- func (e *Bibox) OrderStatus(order *exchange.Order) error
- func (e *Bibox) SetCoinConstraint(coinConstraint *exchange.CoinConstraint)
- func (e *Bibox) SetPairConstraint(pairConstraint *exchange.PairConstraint)
- func (e *Bibox) UpdateAllBalances()
- func (e *Bibox) UpdateConstraint()
- func (e *Bibox) Withdraw(coin *coin.Coin, quantity float64, addr, tag string) bool
- type CancelOrder
- type CoinsData
- type Error
- type InnerTrans
- type JsonResponse
- type OrderBook
- type OrderStatus
- type PairsData
- type PlaceOrder
- type Withdraw
Constants ¶
const ( DEFAULT_ID = 12 DEFAULT_MAKER_FEE = 0.001 DEFAULT_TAKER_FEE = 0.001 DEFAULT_LOT_SIZE = 0.0001 DEFAULT_PRICE_FILTER = 0.00000001 USDT_PRICE_FILTER = 0.0001 DEFAULT_CONFIRMATION = 2 DEFAULT_LISTED = true )
const (
API_URL string = "https://api.bibox.com"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountBalances ¶
type AccountBalances []struct { Result struct { TotalBtc string `json:"total_btc"` TotalCny string `json:"total_cny"` TotalUsd string `json:"total_usd"` AssetsList []struct { CoinSymbol string `json:"coin_symbol"` Balance string `json:"balance"` Freeze string `json:"freeze"` BTCValue string `json:"BTCValue"` CNYValue string `json:"CNYValue"` USDValue string `json:"USDValue"` } `json:"assets_list"` } `json:"result"` Cmd string `json:"cmd"` }
type Bibox ¶
type Bibox 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 CreateBibox ¶
*************************************************
func (*Bibox) 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 (*Bibox) ApiKeyPOSTInner ¶
func (*Bibox) CancelAllOrder ¶
func (*Bibox) DeleteCoin ¶
func (*Bibox) DeletePair ¶
func (*Bibox) DoAccountOperation ¶
func (e *Bibox) DoAccountOperation(operation *exchange.AccountOperation) error
************** Private API **************
func (*Bibox) GetCoinConstraint ¶
func (e *Bibox) GetCoinConstraint(coin *coin.Coin) *exchange.CoinConstraint
************** Coins on the Exchanges **************
func (*Bibox) 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 (*Bibox) GetConstraintFetchMethod ¶
func (e *Bibox) GetConstraintFetchMethod(pair *pair.Pair) *exchange.ConstrainFetchMethod
*************** Exchange Constraint ***************
func (*Bibox) GetName ¶
func (e *Bibox) GetName() exchange.ExchangeName
func (*Bibox) GetPairConstraint ¶
func (e *Bibox) GetPairConstraint(pair *pair.Pair) *exchange.PairConstraint
************** Pairs on the Exchanges **************
func (*Bibox) 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 (*Bibox) LoadPublicData ¶
func (e *Bibox) LoadPublicData(operation *exchange.PublicOperation) error
func (*Bibox) 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 (*Bibox) SetCoinConstraint ¶
func (e *Bibox) SetCoinConstraint(coinConstraint *exchange.CoinConstraint)
func (*Bibox) SetPairConstraint ¶
func (e *Bibox) SetPairConstraint(pairConstraint *exchange.PairConstraint)
func (*Bibox) UpdateAllBalances ¶
func (e *Bibox) UpdateAllBalances()
func (*Bibox) UpdateConstraint ¶
func (e *Bibox) UpdateConstraint()
type CancelOrder ¶
type CoinsData ¶
type CoinsData []struct { Result []struct { CoinSymbol string `json:"coin_symbol"` IsActive int `json:"is_active"` OriginalDecimals int `json:"original_decimals"` EnableDeposit int `json:"enable_deposit"` EnableWithdraw int `json:"enable_withdraw"` WithdrawFee float64 `json:"withdraw_fee"` WithdrawMin float64 `json:"withdraw_min"` } `json:"result"` Cmd string `json:"cmd"` }
type InnerTrans ¶
type JsonResponse ¶
type JsonResponse struct { Error Error `json:"error"` Result json.RawMessage `json:"result"` Cmd string `json:"cmd"` Ver string `json:"ver"` }
type OrderStatus ¶
type OrderStatus []struct { Result struct { ID int `json:"id"` CreatedAt int64 `json:"createdAt"` AccountType int `json:"account_type"` Pair string `json:"pair"` CoinSymbol string `json:"coin_symbol"` CurrencySymbol string `json:"currency_symbol"` OrderSide int `json:"order_side"` OrderType int `json:"order_type"` Price string `json:"price"` DealPrice string `json:"deal_price"` Amount string `json:"amount"` Money string `json:"money"` DealAmount string `json:"deal_amount"` DealPercent string `json:"deal_percent"` DealMoney string `json:"deal_money"` Status int `json:"status"` Unexecuted string `json:"unexecuted"` OrderFrom int `json:"order_from"` } `json:"result"` Cmd string `json:"cmd"` }