Documentation ¶
Index ¶
- Constants
- func ComputeHmac256EncodingTwice(strMessage string, strSecret string) string
- func CreatePayload(nonce string, path string, coid string) string
- type AccountBalances
- type AccountGroup
- type Bitmax
- func (e *Bitmax) AccountGroup()
- func (e *Bitmax) ApiKeyGet(mapParams map[string]string, strRequestPath, path string) string
- func (e *Bitmax) ApiKeyRequest(mapParams map[string]string, strMethod, strRequestPath, path string) string
- func (e *Bitmax) CanDeposit(coin *coin.Coin) bool
- func (e *Bitmax) CanWithdraw(coin *coin.Coin) bool
- func (e *Bitmax) CancelAllOrder() error
- func (e *Bitmax) CancelOrder(order *exchange.Order) error
- func (e *Bitmax) DeleteCoin(coin *coin.Coin)
- func (e *Bitmax) DeletePair(pair *pair.Pair)
- func (e *Bitmax) DoAccountOperation(operation *exchange.AccountOperation) error
- func (e *Bitmax) GetBalance(coin *coin.Coin) float64
- func (e *Bitmax) GetCoinBySymbol(symbol string) *coin.Coin
- func (e *Bitmax) GetCoinConstraint(coin *coin.Coin) *exchange.CoinConstraint
- func (e *Bitmax) GetCoins() []*coin.Coin
- func (e *Bitmax) GetCoinsData() error
- func (e *Bitmax) GetConfirmation(coin *coin.Coin) int
- func (e *Bitmax) GetConstraintFetchMethod(pair *pair.Pair) *exchange.ConstrainFetchMethod
- func (e *Bitmax) GetFee(pair *pair.Pair) float64
- func (e *Bitmax) GetID() int
- func (e *Bitmax) GetLotSize(pair *pair.Pair) float64
- func (e *Bitmax) GetName() exchange.ExchangeName
- func (e *Bitmax) GetPairBySymbol(symbol string) *pair.Pair
- func (e *Bitmax) GetPairConstraint(pair *pair.Pair) *exchange.PairConstraint
- func (e *Bitmax) GetPairs() []*pair.Pair
- func (e *Bitmax) GetPairsData() error
- func (e *Bitmax) GetPriceFilter(pair *pair.Pair) float64
- func (e *Bitmax) GetSymbolByCoin(coin *coin.Coin) string
- func (e *Bitmax) GetSymbolByPair(pair *pair.Pair) string
- func (e *Bitmax) GetTradingWebURL(pair *pair.Pair) string
- func (e *Bitmax) GetTxFee(coin *coin.Coin) float64
- func (e *Bitmax) HasPair(pair *pair.Pair) bool
- func (e *Bitmax) InitData() error
- func (e *Bitmax) LimitBuy(pair *pair.Pair, quantity, rate float64) (*exchange.Order, error)
- func (e *Bitmax) LimitSell(pair *pair.Pair, quantity, rate float64) (*exchange.Order, error)
- func (e *Bitmax) ListOrders() ([]*exchange.Order, error)
- func (e *Bitmax) LoadPublicData(operation *exchange.PublicOperation) error
- func (e *Bitmax) OrderBook(pair *pair.Pair) (*exchange.Maker, error)
- func (e *Bitmax) OrderStatus(order *exchange.Order) error
- func (e *Bitmax) SetCoinConstraint(coinConstraint *exchange.CoinConstraint)
- func (e *Bitmax) SetPairConstraint(pairConstraint *exchange.PairConstraint)
- func (e *Bitmax) UpdateAllBalances()
- func (e *Bitmax) UpdateConstraint()
- func (e *Bitmax) Withdraw(coin *coin.Coin, quantity float64, addr, tag string) bool
- type CoinsData
- type JsonResponse
- type OrderBook
- type OrderStatus
- type PairsData
- type PlaceOrder
- type Withdrawal
Constants ¶
const ( DEFAULT_ID = 7 DEFAULT_TAKER_FEE = 0.0004 DEFAULT_MAKER_FEE = 0.0004 DEFAULT_LOT_SIZE = 0.00000001 DEFAULT_PRICE_FILTER = 0.00000001 DEFAULT_WITHDRAW = true DEFAULT_DEPOSIT = true DEFAULT_CONFIRMATION = 2 DEFAULT_LISTED = true )
const (
API_URL string = "https://bitmax.io"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AccountBalances ¶
type AccountGroup ¶
type AccountGroup struct {
AccountGroup int `json:"accountGroup"`
}
type Bitmax ¶
type Bitmax struct { ID int Name string `bson:"name"` Website string `bson:"website"` API_KEY string API_SECRET string Account_Group string Source exchange.DataSource // / exchange API / microservicve api 1 / PSQL SourceURI string }
func CreateBitmax ¶
*************************************************
func (*Bitmax) AccountGroup ¶
func (e *Bitmax) AccountGroup()
func (*Bitmax) 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 (*Bitmax) ApiKeyRequest ¶
func (*Bitmax) CancelAllOrder ¶
func (*Bitmax) DeleteCoin ¶
func (*Bitmax) DeletePair ¶
func (*Bitmax) DoAccountOperation ¶
func (e *Bitmax) DoAccountOperation(operation *exchange.AccountOperation) error
************** Private API **************
func (*Bitmax) GetCoinConstraint ¶
func (e *Bitmax) GetCoinConstraint(coin *coin.Coin) *exchange.CoinConstraint
************** Coins on the Exchanges **************
func (*Bitmax) 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 (*Bitmax) GetConstraintFetchMethod ¶
func (e *Bitmax) GetConstraintFetchMethod(pair *pair.Pair) *exchange.ConstrainFetchMethod
*************** Exchange Constraint ***************
func (*Bitmax) GetName ¶
func (e *Bitmax) GetName() exchange.ExchangeName
func (*Bitmax) GetPairConstraint ¶
func (e *Bitmax) GetPairConstraint(pair *pair.Pair) *exchange.PairConstraint
************** Pairs on the Exchanges **************
func (*Bitmax) 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 (*Bitmax) LoadPublicData ¶
func (e *Bitmax) LoadPublicData(operation *exchange.PublicOperation) error
func (*Bitmax) 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 (*Bitmax) SetCoinConstraint ¶
func (e *Bitmax) SetCoinConstraint(coinConstraint *exchange.CoinConstraint)
func (*Bitmax) SetPairConstraint ¶
func (e *Bitmax) SetPairConstraint(pairConstraint *exchange.PairConstraint)
func (*Bitmax) UpdateAllBalances ¶
func (e *Bitmax) UpdateAllBalances()
func (*Bitmax) UpdateConstraint ¶
func (e *Bitmax) UpdateConstraint()
type CoinsData ¶
type CoinsData []struct { AssetCode string `json:"assetCode"` AssetName string `json:"assetName"` PrecisionScale int `json:"precisionScale"` NativeScale int `json:"nativeScale"` WithdrawalFee float64 `json:"withdrawalFee"` MinWithdrawalAmt float64 `json:"minWithdrawalAmt"` Status string `json:"status"` }
type JsonResponse ¶
type OrderStatus ¶
type OrderStatus struct { Time int64 `json:"time"` Coid string `json:"coid"` Symbol string `json:"symbol"` BaseAsset string `json:"baseAsset"` QuoteAsset string `json:"quoteAsset"` Side string `json:"side"` OrderPrice string `json:"orderPrice"` StopPrice string `json:"stopPrice"` OrderQty string `json:"orderQty"` Filled string `json:"filled"` Fee string `json:"fee"` FeeAsset string `json:"feeAsset"` Status string `json:"status"` }
type PairsData ¶
type PairsData []struct { Symbol string `json:"symbol"` BaseAsset string `json:"baseAsset"` QuoteAsset string `json:"quoteAsset"` PriceScale int `json:"priceScale"` QtyScale int `json:"qtyScale"` NotionalScale int `json:"notionalScale"` MinQty string `json:"minQty"` MaxQty string `json:"maxQty"` MinNotional string `json:"minNotional"` MaxNotional string `json:"maxNotional"` Status string `json:"status"` MiningStatus string `json:"miningStatus"` }