Documentation ¶
Index ¶
- Constants
- type AccountBalances
- type Bitz
- func (e *Bitz) ApiKeyPOST(mapParams map[string]string, strRequestPath string) string
- func (e *Bitz) CanDeposit(coin *coin.Coin) bool
- func (e *Bitz) CanWithdraw(coin *coin.Coin) bool
- func (e *Bitz) CancelAllOrder() error
- func (e *Bitz) CancelOrder(order *exchange.Order) error
- func (e *Bitz) DeleteCoin(coin *coin.Coin)
- func (e *Bitz) DeletePair(pair *pair.Pair)
- func (e *Bitz) DoAccountOperation(operation *exchange.AccountOperation) error
- func (e *Bitz) GetBalance(coin *coin.Coin) float64
- func (e *Bitz) GetCoinBySymbol(symbol string) *coin.Coin
- func (e *Bitz) GetCoinConstraint(coin *coin.Coin) *exchange.CoinConstraint
- func (e *Bitz) GetCoins() []*coin.Coin
- func (e *Bitz) GetCoinsData() error
- func (e *Bitz) GetConfirmation(coin *coin.Coin) int
- func (e *Bitz) GetConstraintFetchMethod(pair *pair.Pair) *exchange.ConstrainFetchMethod
- func (e *Bitz) GetFee(pair *pair.Pair) float64
- func (e *Bitz) GetID() int
- func (e *Bitz) GetLotSize(pair *pair.Pair) float64
- func (e *Bitz) GetName() exchange.ExchangeName
- func (e *Bitz) GetPairBySymbol(symbol string) *pair.Pair
- func (e *Bitz) GetPairConstraint(pair *pair.Pair) *exchange.PairConstraint
- func (e *Bitz) GetPairs() []*pair.Pair
- func (e *Bitz) GetPairsData() error
- func (e *Bitz) GetPriceFilter(pair *pair.Pair) float64
- func (e *Bitz) GetSymbolByCoin(coin *coin.Coin) string
- func (e *Bitz) GetSymbolByPair(pair *pair.Pair) string
- func (e *Bitz) GetTradingWebURL(pair *pair.Pair) string
- func (e *Bitz) GetTxFee(coin *coin.Coin) float64
- func (e *Bitz) HasPair(pair *pair.Pair) bool
- func (e *Bitz) InitData() error
- func (e *Bitz) LimitBuy(pair *pair.Pair, quantity, rate float64) (*exchange.Order, error)
- func (e *Bitz) LimitSell(pair *pair.Pair, quantity, rate float64) (*exchange.Order, error)
- func (e *Bitz) ListOrders() ([]*exchange.Order, error)
- func (e *Bitz) LoadPublicData(operation *exchange.PublicOperation) error
- func (e *Bitz) OrderBook(pair *pair.Pair) (*exchange.Maker, error)
- func (e *Bitz) OrderStatus(order *exchange.Order) error
- func (e *Bitz) SetCoinConstraint(coinConstraint *exchange.CoinConstraint)
- func (e *Bitz) SetPairConstraint(pairConstraint *exchange.PairConstraint)
- func (e *Bitz) UpdateAllBalances()
- func (e *Bitz) UpdateConstraint()
- func (e *Bitz) Withdraw(coin *coin.Coin, quantity float64, addr, tag string) bool
- type CancelOrder
- type JsonResponse
- type OrderBook
- type OrderDetails
- type PairsData
- type PlaceOrder
- type TradeHistory
- type UserInfo
- type Withdraw
Constants ¶
const ( DEFAULT_ID = 14 DEFAULT_TAKER_FEE = 0.0012 DEFAULT_MAKER_FEE = 0.0008 DEFAULT_TXFEE = 0.005 DEFAULT_WITHDRAW = true DEFAULT_DEPOSIT = true DEFAULT_CONFIRMATION = 2 DEFAULT_LISTED = true )
const ( // API_URL string = "https://apiv2.bit-z.pro" // lookup apiv2.bit-z.pro: no such host API_URL string = "https://apiv2.bitz.com" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountBalances ¶
type Bitz ¶
type Bitz struct { ID int Name string `bson:"name"` Website string `bson:"https://www.bit-z.com/"` API_KEY string API_SECRET string TradePassword string Source exchange.DataSource // / exchange API / microservicve api 1 / PSQL SourceURI string }
func CreateBitz ¶
*************************************************
func (*Bitz) 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 (*Bitz) CancelAllOrder ¶
func (*Bitz) DeleteCoin ¶
func (*Bitz) DeletePair ¶
func (*Bitz) DoAccountOperation ¶
func (e *Bitz) DoAccountOperation(operation *exchange.AccountOperation) error
************** Private API **************
func (*Bitz) GetCoinConstraint ¶
func (e *Bitz) GetCoinConstraint(coin *coin.Coin) *exchange.CoinConstraint
************** Coins on the Exchanges **************
func (*Bitz) 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 (*Bitz) GetConstraintFetchMethod ¶
func (e *Bitz) GetConstraintFetchMethod(pair *pair.Pair) *exchange.ConstrainFetchMethod
*************** Exchange Constraint ***************
func (*Bitz) GetName ¶
func (e *Bitz) GetName() exchange.ExchangeName
func (*Bitz) GetPairConstraint ¶
func (e *Bitz) GetPairConstraint(pair *pair.Pair) *exchange.PairConstraint
************** Pairs on the Exchanges **************
func (*Bitz) 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 (*Bitz) LoadPublicData ¶
func (e *Bitz) LoadPublicData(operation *exchange.PublicOperation) error
************** PUBLIC API **************
func (*Bitz) 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 (*Bitz) SetCoinConstraint ¶
func (e *Bitz) SetCoinConstraint(coinConstraint *exchange.CoinConstraint)
func (*Bitz) SetPairConstraint ¶
func (e *Bitz) SetPairConstraint(pairConstraint *exchange.PairConstraint)
func (*Bitz) UpdateAllBalances ¶
func (e *Bitz) UpdateAllBalances()
func (*Bitz) UpdateConstraint ¶
func (e *Bitz) UpdateConstraint()
type CancelOrder ¶
type JsonResponse ¶
type OrderDetails ¶
type OrderDetails struct { ID string `json:"id"` UID string `json:"uId"` Price string `json:"price"` Number string `json:"number"` Total string `json:"total"` NumberOver string `json:"numberOver"` NumberDeal string `json:"numberDeal"` Flag string `json:"flag"` Status int `json:"status"` CoinFrom string `json:"coinFrom"` CoinTo string `json:"coinTo"` AveragePrice string `json:"averagePrice"` OrderTotalPrice string `json:"orderTotalPrice"` TradeType string `json:"tradeType"` Created string `json:"created"` }
type PairsData ¶
type PairsData struct { ID string `json:"id"` Name string `json:"name"` CoinFrom string `json:"coinFrom"` CoinTo string `json:"coinTo"` NumberFloat string `json:"numberFloat"` PriceFloat string `json:"priceFloat"` Status string `json:"status"` MinTrade string `json:"minTrade"` MaxTrade string `json:"maxTrade"` BuyFree string `json:"buyFree"` SellFree string `json:"sellFree"` }
type PlaceOrder ¶
type PlaceOrder struct { ID int64 `json:"id"` UID int `json:"uId"` Price string `json:"price"` Number string `json:"number"` NumberOver string `json:"numberOver"` NumberDeal interface{} `json:"numberDeal"` Flag string `json:"flag"` Status int `json:"status"` CoinFrom string `json:"coinFrom"` CoinTo string `json:"coinTo"` }
type TradeHistory ¶
type TradeHistory struct { Status int `json:"status"` Msg string `json:"msg"` Data []struct { ID int64 `json:"id"` // t string `json:"t"` T0 string `json:"t"` T int64 `json:"T"` P string `json:"p"` N string `json:"n"` S string `json:"s"` } `json:"data"` Time int `json:"time"` Microtime string `json:"microtime"` Source string `json:"source"` }
type UserInfo ¶
type UserInfo struct { CNY interface{} `json:"cny"` //This may be a string USD interface{} `json:"usd"` BTC_TOTAL interface{} `json:"btc_total"` Info json.RawMessage `json:"info"` }