Documentation ¶
Index ¶
- Constants
- type AccountBalances
- type Bithumb
- func (e *Bithumb) ApiKeyGET(strRequestPath string, mapParams map[string]string) string
- func (e *Bithumb) ApiKeyRequest(strMethod string, mapParams map[string]string, strRequestPath string) string
- func (e *Bithumb) CanDeposit(coin *coin.Coin) bool
- func (e *Bithumb) CanWithdraw(coin *coin.Coin) bool
- func (e *Bithumb) CancelAllOrder() error
- func (e *Bithumb) CancelOrder(order *exchange.Order) error
- func (e *Bithumb) DeleteCoin(coin *coin.Coin)
- func (e *Bithumb) DeletePair(pair *pair.Pair)
- func (e *Bithumb) DoAccountOperation(operation *exchange.AccountOperation) error
- func (e *Bithumb) GetBalance(coin *coin.Coin) float64
- func (e *Bithumb) GetCoinBySymbol(symbol string) *coin.Coin
- func (e *Bithumb) GetCoinConstraint(coin *coin.Coin) *exchange.CoinConstraint
- func (e *Bithumb) GetCoins() []*coin.Coin
- func (e *Bithumb) GetCoinsData() error
- func (e *Bithumb) GetConfirmation(coin *coin.Coin) int
- func (e *Bithumb) GetConstraintFetchMethod(pair *pair.Pair) *exchange.ConstrainFetchMethod
- func (e *Bithumb) GetFee(pair *pair.Pair) float64
- func (e *Bithumb) GetID() int
- func (e *Bithumb) GetLotSize(pair *pair.Pair) float64
- func (e *Bithumb) GetName() exchange.ExchangeName
- func (e *Bithumb) GetPairBySymbol(symbol string) *pair.Pair
- func (e *Bithumb) GetPairConstraint(pair *pair.Pair) *exchange.PairConstraint
- func (e *Bithumb) GetPairs() []*pair.Pair
- func (e *Bithumb) GetPairsData() error
- func (e *Bithumb) GetPriceFilter(pair *pair.Pair) float64
- func (e *Bithumb) GetSymbolByCoin(coin *coin.Coin) string
- func (e *Bithumb) GetSymbolByPair(pair *pair.Pair) string
- func (e *Bithumb) GetTradingWebURL(pair *pair.Pair) string
- func (e *Bithumb) GetTxFee(coin *coin.Coin) float64
- func (e *Bithumb) HasPair(pair *pair.Pair) bool
- func (e *Bithumb) InitData() error
- func (e *Bithumb) LimitBuy(pair *pair.Pair, quantity, rate float64) (*exchange.Order, error)
- func (e *Bithumb) LimitSell(pair *pair.Pair, quantity, rate float64) (*exchange.Order, error)
- func (e *Bithumb) ListOrders() ([]*exchange.Order, error)
- func (e *Bithumb) LoadPublicData(operation *exchange.PublicOperation) error
- func (e *Bithumb) OrderBook(pair *pair.Pair) (*exchange.Maker, error)
- func (e *Bithumb) OrderStatus(order *exchange.Order) error
- func (e *Bithumb) SetCoinConstraint(coinConstraint *exchange.CoinConstraint)
- func (e *Bithumb) SetPairConstraint(pairConstraint *exchange.PairConstraint)
- func (e *Bithumb) UpdateAllBalances()
- func (e *Bithumb) UpdateConstraint()
- func (e *Bithumb) Withdraw(coin *coin.Coin, quantity float64, addr, tag string) bool
- type CoinsData
- type JsonResponse
- type OrderBook
- type OrderStatus
- type PlaceOrder
- type TradeHistory
Constants ¶
const ( DEFAULT_ID = 54 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://global-openapi.bithumb.pro/openapi/v1"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountBalances ¶
type Bithumb ¶
type Bithumb 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 CreateBithumb ¶
*************************************************
func (*Bithumb) 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 (*Bithumb) ApiKeyRequest ¶
func (*Bithumb) CancelAllOrder ¶
func (*Bithumb) DeleteCoin ¶
func (*Bithumb) DeletePair ¶
func (*Bithumb) DoAccountOperation ¶
func (e *Bithumb) DoAccountOperation(operation *exchange.AccountOperation) error
************** Private API **************
func (*Bithumb) GetCoinConstraint ¶
func (e *Bithumb) GetCoinConstraint(coin *coin.Coin) *exchange.CoinConstraint
************** Coins on the Exchanges **************
func (*Bithumb) 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 (*Bithumb) GetConstraintFetchMethod ¶
func (e *Bithumb) GetConstraintFetchMethod(pair *pair.Pair) *exchange.ConstrainFetchMethod
*************** Exchange Constraint ***************
func (*Bithumb) GetName ¶
func (e *Bithumb) GetName() exchange.ExchangeName
func (*Bithumb) GetPairConstraint ¶
func (e *Bithumb) GetPairConstraint(pair *pair.Pair) *exchange.PairConstraint
************** Pairs on the Exchanges **************
func (*Bithumb) 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 (*Bithumb) LoadPublicData ¶
func (e *Bithumb) LoadPublicData(operation *exchange.PublicOperation) error
************** PUBLIC API **************
func (*Bithumb) 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 (*Bithumb) SetCoinConstraint ¶
func (e *Bithumb) SetCoinConstraint(coinConstraint *exchange.CoinConstraint)
func (*Bithumb) SetPairConstraint ¶
func (e *Bithumb) SetPairConstraint(pairConstraint *exchange.PairConstraint)
func (*Bithumb) UpdateAllBalances ¶
func (e *Bithumb) UpdateAllBalances()
func (*Bithumb) UpdateConstraint ¶
func (e *Bithumb) UpdateConstraint()
type CoinsData ¶
type CoinsData struct { CoinConfig []struct { // MakerFeeRate string `json:"makerFeeRate"` MinTxAmt string `json:"minTxAmt,omitempty"` Name string `json:"name"` DepositStatus string `json:"depositStatus"` FullName string `json:"fullName"` // TakerFeeRate string `json:"takerFeeRate"` MinWithdraw string `json:"minWithdraw"` WithdrawFee string `json:"withdrawFee"` WithdrawStatus string `json:"withdrawStatus"` } `json:"coinConfig"` ContractConfig []struct { Symbol string `json:"symbol"` MakerFeeRate string `json:"makerFeeRate"` TakerFeeRate string `json:"takerFeeRate"` } `json:"contractConfig"` SpotConfig []struct { Symbol string `json:"symbol"` Accuracy []string `json:"accuracy"` OpenTime int64 `json:"openTime"` } `json:"spotConfig"` }
type JsonResponse ¶
type JsonResponse struct { Data json.RawMessage `json:"data"` Success bool `json:"success"` Msg string `json:"msg"` Code string `json:"code"` Params []interface{} `json:"params"` }
type OrderStatus ¶
type OrderStatus struct { OrderID string `json:"orderId"` Symbol string `json:"symbol"` Price string `json:"price"` TradedNum string `json:"tradedNum"` Quantity string `json:"quantity"` AvgPrice string `json:"avgPrice"` Status string `json:"status"` Type string `json:"type"` Side string `json:"side"` CreateTime int64 `json:"createTime"` TradeTotal string `json:"tradeTotal"` }