Documentation ¶
Index ¶
- Constants
- type AccountBalances
- type CancelOrder
- type Homiex
- func (e *Homiex) ApiKeyGET(strRequestPath string, mapParams map[string]string) string
- func (e *Homiex) ApiKeyRequest(strMethod string, strRequestPath string, mapParams map[string]string) string
- func (e *Homiex) CanDeposit(coin *coin.Coin) bool
- func (e *Homiex) CanWithdraw(coin *coin.Coin) bool
- func (e *Homiex) CancelAllOrder() error
- func (e *Homiex) CancelOrder(order *exchange.Order) error
- func (e *Homiex) DeleteCoin(coin *coin.Coin)
- func (e *Homiex) DeletePair(pair *pair.Pair)
- func (e *Homiex) DoAccountOperation(operation *exchange.AccountOperation) error
- func (e *Homiex) GetBalance(coin *coin.Coin) float64
- func (e *Homiex) GetCoinBySymbol(symbol string) *coin.Coin
- func (e *Homiex) GetCoinConstraint(coin *coin.Coin) *exchange.CoinConstraint
- func (e *Homiex) GetCoins() []*coin.Coin
- func (e *Homiex) GetCoinsData() error
- func (e *Homiex) GetConfirmation(coin *coin.Coin) int
- func (e *Homiex) GetConstraintFetchMethod(pair *pair.Pair) *exchange.ConstrainFetchMethod
- func (e *Homiex) GetFee(pair *pair.Pair) float64
- func (e *Homiex) GetID() int
- func (e *Homiex) GetLotSize(pair *pair.Pair) float64
- func (e *Homiex) GetName() exchange.ExchangeName
- func (e *Homiex) GetPairBySymbol(symbol string) *pair.Pair
- func (e *Homiex) GetPairConstraint(pair *pair.Pair) *exchange.PairConstraint
- func (e *Homiex) GetPairs() []*pair.Pair
- func (e *Homiex) GetPairsData() error
- func (e *Homiex) GetPriceFilter(pair *pair.Pair) float64
- func (e *Homiex) GetSymbolByCoin(coin *coin.Coin) string
- func (e *Homiex) GetSymbolByPair(pair *pair.Pair) string
- func (e *Homiex) GetTradingWebURL(pair *pair.Pair) string
- func (e *Homiex) GetTxFee(coin *coin.Coin) float64
- func (e *Homiex) HasPair(pair *pair.Pair) bool
- func (e *Homiex) InitData() error
- func (e *Homiex) LimitBuy(pair *pair.Pair, quantity, rate float64) (*exchange.Order, error)
- func (e *Homiex) LimitSell(pair *pair.Pair, quantity, rate float64) (*exchange.Order, error)
- func (e *Homiex) ListOrders() ([]*exchange.Order, error)
- func (e *Homiex) LoadPublicData(operation *exchange.PublicOperation) error
- func (e *Homiex) OrderBook(pair *pair.Pair) (*exchange.Maker, error)
- func (e *Homiex) OrderStatus(order *exchange.Order) error
- func (e *Homiex) SetCoinConstraint(coinConstraint *exchange.CoinConstraint)
- func (e *Homiex) SetPairConstraint(pairConstraint *exchange.PairConstraint)
- func (e *Homiex) UpdateAllBalances()
- func (e *Homiex) UpdateConstraint()
- func (e *Homiex) Withdraw(coin *coin.Coin, quantity float64, addr, tag string) bool
- type JsonResponse
- type OrderBook
- type OrderStatus
- type PairsData
- type PlaceOrder
- type TradeHistory
- type Withdraw
Constants ¶
const ( DEFAULT_ID = 69 DEFAULT_TAKER_FEE = 0.001 DEFAULT_MAKER_FEE = 0.001 DEFAULT_LOT_SIZE = 0.00000001 DEFAULT_PRICE_FILTER = 0.00000001 DEFAULT_TXFEE = 0.005 DEFAULT_WITHDRAW = true DEFAULT_DEPOSIT = true DEFAULT_CONFIRMATION = 2 DEFAULT_LISTED = true )
const (
API_URL string = "https://api.homiex.com"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountBalances ¶
type AccountBalances struct { CanTrade bool `json:"canTrade"` CanWithdraw bool `json:"canWithdraw"` CanDeposit bool `json:"canDeposit"` UpdateTime int `json:"updateTime"` Balances []struct { Asset string `json:"asset"` Total string `json:"total"` Free string `json:"free"` Locked string `json:"locked"` AssetID string `json:"assetId"` } `json:"balances"` }
type CancelOrder ¶
type Homiex ¶
type Homiex 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 CreateHomiex ¶
*************************************************
func (*Homiex) ApiKeyGET ¶
************** 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 (*Homiex) ApiKeyRequest ¶
func (*Homiex) CancelAllOrder ¶
func (*Homiex) DeleteCoin ¶
func (*Homiex) DeletePair ¶
func (*Homiex) DoAccountOperation ¶
func (e *Homiex) DoAccountOperation(operation *exchange.AccountOperation) error
************** Private API **************
func (*Homiex) GetCoinConstraint ¶
func (e *Homiex) GetCoinConstraint(coin *coin.Coin) *exchange.CoinConstraint
************** Coins on the Exchanges **************
func (*Homiex) 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 (*Homiex) GetConstraintFetchMethod ¶
func (e *Homiex) GetConstraintFetchMethod(pair *pair.Pair) *exchange.ConstrainFetchMethod
*************** Exchange Constraint ***************
func (*Homiex) GetName ¶
func (e *Homiex) GetName() exchange.ExchangeName
func (*Homiex) GetPairConstraint ¶
func (e *Homiex) GetPairConstraint(pair *pair.Pair) *exchange.PairConstraint
************** Pairs on the Exchanges **************
func (*Homiex) 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 (*Homiex) LoadPublicData ¶
func (e *Homiex) LoadPublicData(operation *exchange.PublicOperation) error
func (*Homiex) 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 (*Homiex) SetCoinConstraint ¶
func (e *Homiex) SetCoinConstraint(coinConstraint *exchange.CoinConstraint)
func (*Homiex) SetPairConstraint ¶
func (e *Homiex) SetPairConstraint(pairConstraint *exchange.PairConstraint)
func (*Homiex) UpdateAllBalances ¶
func (e *Homiex) UpdateAllBalances()
func (*Homiex) UpdateConstraint ¶
func (e *Homiex) UpdateConstraint()
type JsonResponse ¶
type OrderStatus ¶
type OrderStatus struct { Symbol string `json:"symbol"` OrderID string `json:"orderId"` ClientOrderID string `json:"clientOrderId"` Price string `json:"price"` OrigQty string `json:"origQty"` ExecutedQty string `json:"executedQty"` CummulativeQuoteQty string `json:"cummulativeQuoteQty"` Status string `json:"status"` TimeInForce string `json:"timeInForce"` Type string `json:"type"` Side string `json:"side"` StopPrice string `json:"stopPrice"` IcebergQty string `json:"icebergQty"` Time string `json:"time"` UpdateTime string `json:"updateTime"` IsWorking bool `json:"isWorking"` }
type PairsData ¶
type PairsData struct { Timezone string `json:"timezone"` ServerTime string `json:"serverTime"` BrokerFilters []interface{} `json:"brokerFilters"` Symbols []struct { Filters []struct { MinPrice string `json:"minPrice,omitempty"` MaxPrice string `json:"maxPrice,omitempty"` TickSize string `json:"tickSize,omitempty"` FilterType string `json:"filterType"` MinQty string `json:"minQty,omitempty"` MaxQty string `json:"maxQty,omitempty"` StepSize string `json:"stepSize,omitempty"` MinNotional string `json:"minNotional,omitempty"` } `json:"filters"` ExchangeID string `json:"exchangeId"` Symbol string `json:"symbol"` SymbolName string `json:"symbolName"` Status string `json:"status"` BaseAsset string `json:"baseAsset"` BaseAssetPrecision string `json:"baseAssetPrecision"` QuoteAsset string `json:"quoteAsset"` QuotePrecision string `json:"quotePrecision"` IcebergAllowed bool `json:"icebergAllowed"` } `json:"symbols"` }