Documentation ¶
Index ¶
- Constants
- type AccountBalance
- type AccountID
- type CancelOrder
- type InnerTrans
- type JsonResponse
- type OrderBook
- type OrderDetail
- type OrderStatus
- type PairsData
- type Tagz
- func (e *Tagz) ApiKeyRequest(strMethod, strRequestPath string, mapParams map[string]string) string
- func (e *Tagz) CanDeposit(coin *coin.Coin) bool
- func (e *Tagz) CanWithdraw(coin *coin.Coin) bool
- func (e *Tagz) CancelAllOrder() error
- func (e *Tagz) CancelOrder(order *exchange.Order) error
- func (e *Tagz) DeleteCoin(coin *coin.Coin)
- func (e *Tagz) DeletePair(pair *pair.Pair)
- func (e *Tagz) DoAccountOperation(operation *exchange.AccountOperation) error
- func (e *Tagz) GetBalance(coin *coin.Coin) float64
- func (e *Tagz) GetCoinBySymbol(symbol string) *coin.Coin
- func (e *Tagz) GetCoinConstraint(coin *coin.Coin) *exchange.CoinConstraint
- func (e *Tagz) GetCoins() []*coin.Coin
- func (e *Tagz) GetCoinsData() error
- func (e *Tagz) GetConfirmation(coin *coin.Coin) int
- func (e *Tagz) GetConstraintFetchMethod(pair *pair.Pair) *exchange.ConstrainFetchMethod
- func (e *Tagz) GetFee(pair *pair.Pair) float64
- func (e *Tagz) GetID() int
- func (e *Tagz) GetLotSize(pair *pair.Pair) float64
- func (e *Tagz) GetName() exchange.ExchangeName
- func (e *Tagz) GetPairBySymbol(symbol string) *pair.Pair
- func (e *Tagz) GetPairConstraint(pair *pair.Pair) *exchange.PairConstraint
- func (e *Tagz) GetPairs() []*pair.Pair
- func (e *Tagz) GetPairsData() error
- func (e *Tagz) GetPriceFilter(pair *pair.Pair) float64
- func (e *Tagz) GetSymbolByCoin(coin *coin.Coin) string
- func (e *Tagz) GetSymbolByPair(pair *pair.Pair) string
- func (e *Tagz) GetTradingWebURL(pair *pair.Pair) string
- func (e *Tagz) GetTxFee(coin *coin.Coin) float64
- func (e *Tagz) HasPair(pair *pair.Pair) bool
- func (e *Tagz) InitData() error
- func (e *Tagz) LimitBuy(pair *pair.Pair, quantity, rate float64) (*exchange.Order, error)
- func (e *Tagz) LimitSell(pair *pair.Pair, quantity, rate float64) (*exchange.Order, error)
- func (e *Tagz) ListOrders() ([]*exchange.Order, error)
- func (e *Tagz) LoadPublicData(operation *exchange.PublicOperation) error
- func (e *Tagz) OrderBook(p *pair.Pair) (*exchange.Maker, error)
- func (e *Tagz) OrderStatus(order *exchange.Order) error
- func (e *Tagz) SetCoinConstraint(coinConstraint *exchange.CoinConstraint)
- func (e *Tagz) SetPairConstraint(pairConstraint *exchange.PairConstraint)
- func (e *Tagz) UpdateAllBalances()
- func (e *Tagz) UpdateConstraint()
- func (e *Tagz) Withdraw(coin *coin.Coin, quantity float64, addr, tag string) bool
- type Withdraw
Constants ¶
const ( DEFAULT_ID = 66 DEFAULT_TAKER_FEE = 0.00 DEFAULT_MAKER_FEE = 0.00 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 DEFAULT_LISTED = true )
const (
API_URL = "https://trade.tagz.com"
)
The Base Endpoint URL
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountBalance ¶
type CancelOrder ¶
type CancelOrder struct {
CancelledOrderIds []string `json:"cancelledOrderIds"`
}
type InnerTrans ¶
type JsonResponse ¶
type OrderBook ¶
type OrderBook struct { Instrument string `json:"instrument"` Bids []struct { Amount float64 `json:"amount"` Price float64 `json:"price"` } `json:"bids"` Asks []struct { Amount float64 `json:"amount"` Price float64 `json:"price"` } `json:"asks"` Version int `json:"version"` AskTotalAmount float64 `json:"askTotalAmount"` BidTotalAmount float64 `json:"bidTotalAmount"` Snapshot bool `json:"snapshot"` }
type OrderDetail ¶
type OrderDetail struct {
OrderID string `json:"orderId"`
}
type OrderStatus ¶
type OrderStatus struct { ID string `json:"id"` Symbol string `json:"symbol"` OpType string `json:"opType"` Type string `json:"type"` Side string `json:"side"` Price string `json:"price"` Size string `json:"size"` Funds string `json:"funds"` DealFunds string `json:"dealFunds"` DealSize string `json:"dealSize"` Fee string `json:"fee"` FeeCurrency string `json:"feeCurrency"` Stp string `json:"stp"` Stop string `json:"stop"` StopTriggered bool `json:"stopTriggered"` StopPrice string `json:"stopPrice"` TimeInForce string `json:"timeInForce"` PostOnly bool `json:"postOnly"` Hidden bool `json:"hidden"` Iceberg bool `json:"iceberg"` VisibleSize string `json:"visibleSize"` CancelAfter int `json:"cancelAfter"` Channel string `json:"channel"` ClientOid string `json:"clientOid"` Remark string `json:"remark"` Tags string `json:"tags"` IsActive bool `json:"isActive"` CancelExist bool `json:"cancelExist"` CreatedAt int64 `json:"createdAt"` }
type Tagz ¶
type Tagz struct { ID int Name string `bson:"name"` Website string `bson:"website"` API_KEY string API_SECRET string Passphrase string Source exchange.DataSource // / exchange API / microservicve api 1 / PSQL SourceURI string }
func CreateTagz ¶
*************************************************
func (*Tagz) ApiKeyRequest ¶
************** 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 (*Tagz) CancelAllOrder ¶
func (*Tagz) DeleteCoin ¶
func (*Tagz) DeletePair ¶
func (*Tagz) DoAccountOperation ¶
func (e *Tagz) DoAccountOperation(operation *exchange.AccountOperation) error
************** Private API **************
func (*Tagz) GetCoinConstraint ¶
func (e *Tagz) GetCoinConstraint(coin *coin.Coin) *exchange.CoinConstraint
************** Coins on the Exchanges **************
func (*Tagz) 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 (*Tagz) GetConstraintFetchMethod ¶
func (e *Tagz) GetConstraintFetchMethod(pair *pair.Pair) *exchange.ConstrainFetchMethod
*************** Exchange Constraint ***************
func (*Tagz) GetName ¶
func (e *Tagz) GetName() exchange.ExchangeName
func (*Tagz) GetPairConstraint ¶
func (e *Tagz) GetPairConstraint(pair *pair.Pair) *exchange.PairConstraint
************** Pairs on the Exchanges **************
func (*Tagz) 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 (*Tagz) GetTradingWebURL ¶
no trade url for each pair
func (*Tagz) LoadPublicData ¶
func (e *Tagz) LoadPublicData(operation *exchange.PublicOperation) error
************** Public API **************
func (*Tagz) 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 (*Tagz) SetCoinConstraint ¶
func (e *Tagz) SetCoinConstraint(coinConstraint *exchange.CoinConstraint)
func (*Tagz) SetPairConstraint ¶
func (e *Tagz) SetPairConstraint(pairConstraint *exchange.PairConstraint)
func (*Tagz) UpdateAllBalances ¶
func (e *Tagz) UpdateAllBalances()
func (*Tagz) UpdateConstraint ¶
func (e *Tagz) UpdateConstraint()