Documentation ¶
Index ¶
- Constants
- func CreateSign(mapParams map[string]string, ...) string
- type AccountBalances
- type AccountID
- type HuobiCoins
- type HuobiJsonResponse
- type Ibankdigital
- func (e *Ibankdigital) ApiKeyGet(strRequestPath string, mapParams map[string]string) string
- func (e *Ibankdigital) ApiKeyPost(strRequestPath string, mapParams map[string]string) string
- func (e *Ibankdigital) CanDeposit(coin *coin.Coin) bool
- func (e *Ibankdigital) CanWithdraw(coin *coin.Coin) bool
- func (e *Ibankdigital) CancelAllOrder() error
- func (e *Ibankdigital) CancelOrder(order *exchange.Order) error
- func (e *Ibankdigital) DeleteCoin(coin *coin.Coin)
- func (e *Ibankdigital) DeletePair(pair *pair.Pair)
- func (e *Ibankdigital) DoAccountOperation(operation *exchange.AccountOperation) error
- func (e *Ibankdigital) GetAccounts()
- func (e *Ibankdigital) GetBalance(coin *coin.Coin) float64
- func (e *Ibankdigital) GetCoinBySymbol(symbol string) *coin.Coin
- func (e *Ibankdigital) GetCoinConstraint(coin *coin.Coin) *exchange.CoinConstraint
- func (e *Ibankdigital) GetCoins() []*coin.Coin
- func (e *Ibankdigital) GetCoinsData() error
- func (e *Ibankdigital) GetConfirmation(coin *coin.Coin) int
- func (e *Ibankdigital) GetConstraintFetchMethod(pair *pair.Pair) *exchange.ConstrainFetchMethod
- func (e *Ibankdigital) GetFee(pair *pair.Pair) float64
- func (e *Ibankdigital) GetID() int
- func (e *Ibankdigital) GetLotSize(pair *pair.Pair) float64
- func (e *Ibankdigital) GetName() exchange.ExchangeName
- func (e *Ibankdigital) GetPairBySymbol(symbol string) *pair.Pair
- func (e *Ibankdigital) GetPairConstraint(pair *pair.Pair) *exchange.PairConstraint
- func (e *Ibankdigital) GetPairs() []*pair.Pair
- func (e *Ibankdigital) GetPairsData() error
- func (e *Ibankdigital) GetPriceFilter(pair *pair.Pair) float64
- func (e *Ibankdigital) GetSymbolByCoin(coin *coin.Coin) string
- func (e *Ibankdigital) GetSymbolByPair(pair *pair.Pair) string
- func (e *Ibankdigital) GetTradingWebURL(pair *pair.Pair) string
- func (e *Ibankdigital) GetTxFee(coin *coin.Coin) float64
- func (e *Ibankdigital) HasPair(pair *pair.Pair) bool
- func (e *Ibankdigital) InitData() error
- func (e *Ibankdigital) LimitBuy(pair *pair.Pair, quantity, rate float64) (*exchange.Order, error)
- func (e *Ibankdigital) LimitSell(pair *pair.Pair, quantity, rate float64) (*exchange.Order, error)
- func (e *Ibankdigital) ListOrders() ([]*exchange.Order, error)
- func (e *Ibankdigital) LoadPublicData(operation *exchange.PublicOperation) error
- func (e *Ibankdigital) OrderBook(pair *pair.Pair) (*exchange.Maker, error)
- func (e *Ibankdigital) OrderStatus(order *exchange.Order) error
- func (e *Ibankdigital) SetCoinConstraint(coinConstraint *exchange.CoinConstraint)
- func (e *Ibankdigital) SetPairConstraint(pairConstraint *exchange.PairConstraint)
- func (e *Ibankdigital) UpdateAllBalances()
- func (e *Ibankdigital) UpdateConstraint()
- func (e *Ibankdigital) Withdraw(coin *coin.Coin, quantity float64, addr, tag string) bool
- type JsonResponse
- type OrderBook
- type OrderStatus
- type PairsData
- type PlaceOrder
Constants ¶
const ( DEFAULT_ID = 33 DEFAULT_TAKER_FEE = 0.002 DEFAULT_MAKER_FEE = 0.002 DEFAULT_TXFEE = 0.005 DEFAULT_WITHDRAW = true DEFAULT_DEPOSIT = true DEFAULT_CONFIRMATION = 2 DEFAULT_LISTED = true )
const (
API_URL string = "https://www.ibankex.io/api"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AccountBalances ¶
type HuobiCoins ¶
type HuobiCoins []struct { CurrencyAddrWithTag bool `json:"currency-addr-with-tag"` FastConfirms int `json:"fast-confirms"` SafeConfirms int `json:"safe-confirms"` CurrencyType string `json:"currency-type"` SupportSites []interface{} `json:"support-sites"` OtcEnable int `json:"otc-enable"` CountryDisabled bool `json:"country-disabled"` Tags interface{} `json:"tags"` DepositEnabled bool `json:"deposit-enabled"` WithdrawEnabled bool `json:"withdraw-enabled"` WhiteEnabled bool `json:"white-enabled"` WithdrawPrecision int `json:"withdraw-precision"` CurrencyPartition string `json:"currency-partition"` QuoteCurrency bool `json:"quote-currency"` WithdrawMinAmount string `json:"withdraw-min-amount"` Weight int `json:"weight"` Visible bool `json:"visible"` ShowPrecision string `json:"show-precision"` DepositMinAmount string `json:"deposit-min-amount"` VisibleAssetsTimestamp int64 `json:"visible-assets-timestamp"` DepositEnableTimestamp int64 `json:"deposit-enable-timestamp"` WithdrawEnableTimestamp int64 `json:"withdraw-enable-timestamp"` Name string `json:"name"` State string `json:"state"` DisplayName string `json:"display-name"` DepositDesc string `json:"deposit-desc"` WithdrawDesc string `json:"withdraw-desc"` SuspendVisibleDesc string `json:"suspend-visible-desc"` SuspendDepositDesc string `json:"suspend-deposit-desc"` SuspendWithdrawDesc string `json:"suspend-withdraw-desc"` CurrencyAddrOneoff bool `json:"currency-addr-oneoff,omitempty"` Blockchains string `json:"blockchains,omitempty"` }
type HuobiJsonResponse ¶
type HuobiJsonResponse struct { Status string `json:"status"` Data json.RawMessage `json:"data"` Tick json.RawMessage `json:"tick"` ErrCode string `json:"err-code"` ErrMsg string `json:"err-msg"` }
type Ibankdigital ¶
type Ibankdigital struct { ID int Name string `bson:"name"` Website string `bson:"website"` API_KEY string API_SECRET string Account_ID string Source exchange.DataSource // / exchange API / microservicve api 1 / PSQL SourceURI string }
func CreateIbankdigital ¶
func CreateIbankdigital(config *exchange.Config) *Ibankdigital
*************************************************
func (*Ibankdigital) ApiKeyGet ¶
func (e *Ibankdigital) ApiKeyGet(strRequestPath string, mapParams map[string]string) string
************** 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 (*Ibankdigital) ApiKeyPost ¶
func (e *Ibankdigital) ApiKeyPost(strRequestPath string, mapParams map[string]string) string
func (*Ibankdigital) CanDeposit ¶
func (e *Ibankdigital) CanDeposit(coin *coin.Coin) bool
func (*Ibankdigital) CanWithdraw ¶
func (e *Ibankdigital) CanWithdraw(coin *coin.Coin) bool
func (*Ibankdigital) CancelAllOrder ¶
func (e *Ibankdigital) CancelAllOrder() error
func (*Ibankdigital) CancelOrder ¶
func (e *Ibankdigital) CancelOrder(order *exchange.Order) error
func (*Ibankdigital) DeleteCoin ¶
func (e *Ibankdigital) DeleteCoin(coin *coin.Coin)
func (*Ibankdigital) DeletePair ¶
func (e *Ibankdigital) DeletePair(pair *pair.Pair)
func (*Ibankdigital) DoAccountOperation ¶
func (e *Ibankdigital) DoAccountOperation(operation *exchange.AccountOperation) error
************** Private API **************
func (*Ibankdigital) GetAccounts ¶
func (e *Ibankdigital) GetAccounts()
func (*Ibankdigital) GetBalance ¶
func (e *Ibankdigital) GetBalance(coin *coin.Coin) float64
func (*Ibankdigital) GetCoinBySymbol ¶
func (e *Ibankdigital) GetCoinBySymbol(symbol string) *coin.Coin
func (*Ibankdigital) GetCoinConstraint ¶
func (e *Ibankdigital) GetCoinConstraint(coin *coin.Coin) *exchange.CoinConstraint
************** Coins on the Exchanges **************
func (*Ibankdigital) GetCoins ¶
func (e *Ibankdigital) GetCoins() []*coin.Coin
func (*Ibankdigital) GetCoinsData ¶
func (e *Ibankdigital) GetCoinsData() error
************** 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 (*Ibankdigital) GetConfirmation ¶
func (e *Ibankdigital) GetConfirmation(coin *coin.Coin) int
func (*Ibankdigital) GetConstraintFetchMethod ¶
func (e *Ibankdigital) GetConstraintFetchMethod(pair *pair.Pair) *exchange.ConstrainFetchMethod
*************** Exchange Constraint ***************
func (*Ibankdigital) GetFee ¶
func (e *Ibankdigital) GetFee(pair *pair.Pair) float64
*************** Pair Constraint ***************
func (*Ibankdigital) GetID ¶
func (e *Ibankdigital) GetID() int
*************** Exchange Information ***************
func (*Ibankdigital) GetLotSize ¶
func (e *Ibankdigital) GetLotSize(pair *pair.Pair) float64
func (*Ibankdigital) GetName ¶
func (e *Ibankdigital) GetName() exchange.ExchangeName
func (*Ibankdigital) GetPairBySymbol ¶
func (e *Ibankdigital) GetPairBySymbol(symbol string) *pair.Pair
func (*Ibankdigital) GetPairConstraint ¶
func (e *Ibankdigital) GetPairConstraint(pair *pair.Pair) *exchange.PairConstraint
************** Pairs on the Exchanges **************
func (*Ibankdigital) GetPairs ¶
func (e *Ibankdigital) GetPairs() []*pair.Pair
func (*Ibankdigital) GetPairsData ¶
func (e *Ibankdigital) GetPairsData() error
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 (*Ibankdigital) GetPriceFilter ¶
func (e *Ibankdigital) GetPriceFilter(pair *pair.Pair) float64
func (*Ibankdigital) GetSymbolByCoin ¶
func (e *Ibankdigital) GetSymbolByCoin(coin *coin.Coin) string
func (*Ibankdigital) GetSymbolByPair ¶
func (e *Ibankdigital) GetSymbolByPair(pair *pair.Pair) string
func (*Ibankdigital) GetTradingWebURL ¶
func (e *Ibankdigital) GetTradingWebURL(pair *pair.Pair) string
func (*Ibankdigital) GetTxFee ¶
func (e *Ibankdigital) GetTxFee(coin *coin.Coin) float64
*************** Coin Constraint ***************
func (*Ibankdigital) InitData ¶
func (e *Ibankdigital) InitData() error
func (*Ibankdigital) ListOrders ¶
func (e *Ibankdigital) ListOrders() ([]*exchange.Order, error)
func (*Ibankdigital) LoadPublicData ¶
func (e *Ibankdigital) LoadPublicData(operation *exchange.PublicOperation) error
func (*Ibankdigital) 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 (*Ibankdigital) OrderStatus ¶
func (e *Ibankdigital) OrderStatus(order *exchange.Order) error
func (*Ibankdigital) SetCoinConstraint ¶
func (e *Ibankdigital) SetCoinConstraint(coinConstraint *exchange.CoinConstraint)
func (*Ibankdigital) SetPairConstraint ¶
func (e *Ibankdigital) SetPairConstraint(pairConstraint *exchange.PairConstraint)
func (*Ibankdigital) UpdateAllBalances ¶
func (e *Ibankdigital) UpdateAllBalances()
func (*Ibankdigital) UpdateConstraint ¶
func (e *Ibankdigital) UpdateConstraint()
type JsonResponse ¶
type JsonResponse struct { Status string `json:"status"` ErrCode string `json:"err-code"` ErrMsg string `json:"err-msg"` Data json.RawMessage `json:"data"` }
type OrderStatus ¶
type OrderStatus struct { ID int `json:"id"` Symbol string `json:"symbol"` AccountID int `json:"account-id"` Amount string `json:"amount"` Price string `json:"price"` CreatedAt int64 `json:"created-at"` Type string `json:"type"` FieldAmount string `json:"field-amount"` FieldCashAmount string `json:"field-cash-amount"` FieldFees string `json:"field-fees"` FinishedAt int64 `json:"finished-at"` UserID int `json:"user-id"` Source string `json:"source"` State string `json:"state"` CanceledAt int `json:"canceled-at"` Exchange string `json:"exchange"` Batch string `json:"batch"` }
type PairsData ¶
type PairsData []struct { BaseCurrency string `json:"base-currency"` QuoteCurrency string `json:"quote-currency"` PricePrecision int `json:"price-precision"` AmountPrecision int `json:"amount-precision"` SymbolPartition string `json:"symbol-partition"` Symbol string `json:"symbol"` State string `json:"state"` }
type PlaceOrder ¶
type PlaceOrder struct {
Data string `json:"data"`
}