Documentation ¶
Index ¶
- Constants
- type AccountBalances
- type Bitbns
- func (e *Bitbns) ApiKeyGet(strRequestPath string, mapParams map[string]string) string
- func (e *Bitbns) ApiKeyRequest(strMethod, strRequestPath string, mapParams map[string]string) string
- func (e *Bitbns) CanDeposit(coin *coin.Coin) bool
- func (e *Bitbns) CanWithdraw(coin *coin.Coin) bool
- func (e *Bitbns) CancelAllOrder() error
- func (e *Bitbns) CancelOrder(order *exchange.Order) error
- func (e *Bitbns) DeleteCoin(coin *coin.Coin)
- func (e *Bitbns) DeletePair(pair *pair.Pair)
- func (e *Bitbns) DoAccountOperation(operation *exchange.AccountOperation) error
- func (e *Bitbns) GetBalance(coin *coin.Coin) float64
- func (e *Bitbns) GetCoinBySymbol(symbol string) *coin.Coin
- func (e *Bitbns) GetCoinConstraint(coin *coin.Coin) *exchange.CoinConstraint
- func (e *Bitbns) GetCoins() []*coin.Coin
- func (e *Bitbns) GetCoinsData() error
- func (e *Bitbns) GetConfirmation(coin *coin.Coin) int
- func (e *Bitbns) GetConstraintFetchMethod(pair *pair.Pair) *exchange.ConstrainFetchMethod
- func (e *Bitbns) GetFee(pair *pair.Pair) float64
- func (e *Bitbns) GetID() int
- func (e *Bitbns) GetLotSize(pair *pair.Pair) float64
- func (e *Bitbns) GetName() exchange.ExchangeName
- func (e *Bitbns) GetPairBySymbol(symbol string) *pair.Pair
- func (e *Bitbns) GetPairConstraint(pair *pair.Pair) *exchange.PairConstraint
- func (e *Bitbns) GetPairs() []*pair.Pair
- func (e *Bitbns) GetPairsData() error
- func (e *Bitbns) GetPriceFilter(pair *pair.Pair) float64
- func (e *Bitbns) GetSymbolByCoin(coin *coin.Coin) string
- func (e *Bitbns) GetSymbolByPair(pair *pair.Pair) string
- func (e *Bitbns) GetTradingWebURL(pair *pair.Pair) string
- func (e *Bitbns) GetTxFee(coin *coin.Coin) float64
- func (e *Bitbns) HasPair(pair *pair.Pair) bool
- func (e *Bitbns) InitData() error
- func (e *Bitbns) LimitBuy(pair *pair.Pair, quantity, rate float64) (*exchange.Order, error)
- func (e *Bitbns) LimitSell(pair *pair.Pair, quantity, rate float64) (*exchange.Order, error)
- func (e *Bitbns) ListOrders() ([]*exchange.Order, error)
- func (e *Bitbns) LoadPublicData(operation *exchange.PublicOperation) error
- func (e *Bitbns) OrderBook(p *pair.Pair) (*exchange.Maker, error)
- func (e *Bitbns) OrderStatus(order *exchange.Order) error
- func (e *Bitbns) SetCoinConstraint(coinConstraint *exchange.CoinConstraint)
- func (e *Bitbns) SetPairConstraint(pairConstraint *exchange.PairConstraint)
- func (e *Bitbns) UpdateAllBalances()
- func (e *Bitbns) UpdateConstraint()
- func (e *Bitbns) Withdraw(coin *coin.Coin, quantity float64, addr, tag string) bool
- type CoinsData
- type CoinsDetail
- type JsonResponse
- type OrderBook
- type PlaceOrder
- type WithdrawResponse
Constants ¶
const ( DEFAULT_ID = 73 DEFAULT_TAKER_FEE = 0.0025 DEFAULT_MAKER_FEE = 0.0025 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.bitbns.com"
)
The Base Endpoint URL
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountBalances ¶
type AccountBalances []struct { Asset string `json:"asset"` Total float64 `json:"total"` Available float64 `json:"available"` Locked float64 `json:"locked"` }
********* Private API Structure*********
type Bitbns ¶
type Bitbns 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 CreateBitbns ¶
*************************************************
func (*Bitbns) ApiKeyGet ¶
************** Signature Http Request ************** Method: API Get 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 (*Bitbns) ApiKeyRequest ¶
func (e *Bitbns) ApiKeyRequest(strMethod, strRequestPath string, mapParams map[string]string) string
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
func (*Bitbns) CancelAllOrder ¶
func (*Bitbns) DeleteCoin ¶
func (*Bitbns) DeletePair ¶
func (*Bitbns) DoAccountOperation ¶
func (e *Bitbns) DoAccountOperation(operation *exchange.AccountOperation) error
************** Private API **************
func (*Bitbns) GetCoinConstraint ¶
func (e *Bitbns) GetCoinConstraint(coin *coin.Coin) *exchange.CoinConstraint
************** Coins on the Exchanges **************
func (*Bitbns) 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(strRequestPath)
func (*Bitbns) GetConstraintFetchMethod ¶
func (e *Bitbns) GetConstraintFetchMethod(pair *pair.Pair) *exchange.ConstrainFetchMethod
*************** Exchange Constraint ***************
func (*Bitbns) GetName ¶
func (e *Bitbns) GetName() exchange.ExchangeName
func (*Bitbns) GetPairConstraint ¶
func (e *Bitbns) GetPairConstraint(pair *pair.Pair) *exchange.PairConstraint
************** Pairs on the Exchanges **************
func (*Bitbns) 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 (*Bitbns) LoadPublicData ¶
func (e *Bitbns) LoadPublicData(operation *exchange.PublicOperation) error
func (*Bitbns) SetCoinConstraint ¶
func (e *Bitbns) SetCoinConstraint(coinConstraint *exchange.CoinConstraint)
func (*Bitbns) SetPairConstraint ¶
func (e *Bitbns) SetPairConstraint(pairConstraint *exchange.PairConstraint)
func (*Bitbns) UpdateAllBalances ¶
func (e *Bitbns) UpdateAllBalances()
func (*Bitbns) UpdateConstraint ¶
func (e *Bitbns) UpdateConstraint()
type CoinsDetail ¶
type CoinsDetail struct { HighestBuyBid float64 `json:"highest_buy_bid"` LowestSellBid float64 `json:"lowest_sell_bid"` LastTradedPrice float64 `json:"last_traded_price"` YesPrice float64 `json:"yes_price"` Volume struct { Max float64 `json:"max"` Min float64 `json:"min"` Volume float64 `json:"volume"` } `json:"volume"` }
type JsonResponse ¶
type PlaceOrder ¶
type PlaceOrder struct { Symbol string `json:"symbol"` OrderID string `json:"orderId"` Side string `json:"side"` Type string `json:"type"` Price string `json:"price"` AveragePrice string `json:"executedQty"` OrigQty string `json:"origQty"` ExecutedQty string `json:"executedQty"` Status string `json:"status"` TimeInForce string `json:"timeInForce"` }