Documentation ¶
Index ¶
- Constants
- type AccountBalances
- type BitATM
- func (e *BitATM) ApiKeyGET(strRequestPath string, mapParams map[string]interface{}) string
- func (e *BitATM) ApiKeyPOST(strRequestPath string, mapParams map[string]interface{}) string
- func (e *BitATM) CanDeposit(coin *coin.Coin) bool
- func (e *BitATM) CanWithdraw(coin *coin.Coin) bool
- func (e *BitATM) CancelAllOrder() error
- func (e *BitATM) CancelOrder(order *exchange.Order) error
- func (e *BitATM) DeleteCoin(coin *coin.Coin)
- func (e *BitATM) DeletePair(pair *pair.Pair)
- func (e *BitATM) DoAccountOperation(operation *exchange.AccountOperation) error
- func (e *BitATM) GetBalance(coin *coin.Coin) float64
- func (e *BitATM) GetCoinBySymbol(symbol string) *coin.Coin
- func (e *BitATM) GetCoinConstraint(coin *coin.Coin) *exchange.CoinConstraint
- func (e *BitATM) GetCoins() []*coin.Coin
- func (e *BitATM) GetCoinsData() error
- func (e *BitATM) GetConfirmation(coin *coin.Coin) int
- func (e *BitATM) GetConstraintFetchMethod(pair *pair.Pair) *exchange.ConstrainFetchMethod
- func (e *BitATM) GetFee(pair *pair.Pair) float64
- func (e *BitATM) GetID() int
- func (e *BitATM) GetLotSize(pair *pair.Pair) float64
- func (e *BitATM) GetName() exchange.ExchangeName
- func (e *BitATM) GetPairBySymbol(symbol string) *pair.Pair
- func (e *BitATM) GetPairConstraint(pair *pair.Pair) *exchange.PairConstraint
- func (e *BitATM) GetPairs() []*pair.Pair
- func (e *BitATM) GetPairsData() error
- func (e *BitATM) GetPriceFilter(pair *pair.Pair) float64
- func (e *BitATM) GetSymbolByCoin(coin *coin.Coin) string
- func (e *BitATM) GetSymbolByPair(pair *pair.Pair) string
- func (e *BitATM) GetTradingWebURL(pair *pair.Pair) string
- func (e *BitATM) GetTxFee(coin *coin.Coin) float64
- func (e *BitATM) HasPair(pair *pair.Pair) bool
- func (e *BitATM) InitData() error
- func (e *BitATM) LimitBuy(pair *pair.Pair, quantity, rate float64) (*exchange.Order, error)
- func (e *BitATM) LimitSell(pair *pair.Pair, quantity, rate float64) (*exchange.Order, error)
- func (e *BitATM) ListOrders() ([]*exchange.Order, error)
- func (e *BitATM) LoadPublicData(operation *exchange.PublicOperation) error
- func (e *BitATM) OrderBook(pair *pair.Pair) (*exchange.Maker, error)
- func (e *BitATM) OrderStatus(order *exchange.Order) error
- func (e *BitATM) SetCoinConstraint(coinConstraint *exchange.CoinConstraint)
- func (e *BitATM) SetPairConstraint(pairConstraint *exchange.PairConstraint)
- func (e *BitATM) UpdateAllBalances()
- func (e *BitATM) UpdateConstraint()
- func (e *BitATM) Withdraw(coin *coin.Coin, quantity float64, addr, tag string) bool
- type CoinsData
- type JsonResponse
- type OrderBook
- type OrderStatus
- type PairsData
- type Withdrawal
Constants ¶
const ( DEFAULT_ID = 26 DEFAULT_TAKER_FEE = 0.001 DEFAULT_MAKER_FEE = 0.001 DEFAULT_LOT_SIZE = 0.00000001 DEFAULT_PRICE_FILTER = 0.01 DEFAULT_TXFEE = 0.005 DEFAULT_WITHDRAW = true DEFAULT_DEPOSIT = true DEFAULT_CONFIRMATION = 2 DEFAULT_LISTED = true )
const (
API_URL string = "https://open.bitatm.com"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountBalances ¶
type BitATM ¶
type BitATM 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 CreateBitATM ¶
*************************************************
func (*BitATM) 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 (*BitATM) ApiKeyPOST ¶
func (*BitATM) CancelAllOrder ¶
func (*BitATM) DeleteCoin ¶
func (*BitATM) DeletePair ¶
func (*BitATM) DoAccountOperation ¶
func (e *BitATM) DoAccountOperation(operation *exchange.AccountOperation) error
************** Private API **************
func (*BitATM) GetCoinConstraint ¶
func (e *BitATM) GetCoinConstraint(coin *coin.Coin) *exchange.CoinConstraint
************** Coins on the Exchanges **************
func (*BitATM) 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 (*BitATM) GetConstraintFetchMethod ¶
func (e *BitATM) GetConstraintFetchMethod(pair *pair.Pair) *exchange.ConstrainFetchMethod
*************** Exchange Constraint ***************
func (*BitATM) GetName ¶
func (e *BitATM) GetName() exchange.ExchangeName
func (*BitATM) GetPairConstraint ¶
func (e *BitATM) GetPairConstraint(pair *pair.Pair) *exchange.PairConstraint
************** Pairs on the Exchanges **************
func (*BitATM) 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 (*BitATM) LoadPublicData ¶
func (e *BitATM) LoadPublicData(operation *exchange.PublicOperation) error
func (*BitATM) 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 (*BitATM) SetCoinConstraint ¶
func (e *BitATM) SetCoinConstraint(coinConstraint *exchange.CoinConstraint)
func (*BitATM) SetPairConstraint ¶
func (e *BitATM) SetPairConstraint(pairConstraint *exchange.PairConstraint)
func (*BitATM) UpdateAllBalances ¶
func (e *BitATM) UpdateAllBalances()
func (*BitATM) UpdateConstraint ¶
func (e *BitATM) UpdateConstraint()
type JsonResponse ¶
type JsonResponse struct { Code string `json:"code"` Msg string `json:"msg"` Ts int `json:"ts"` Data json.RawMessage `json:"Data"` }
type OrderStatus ¶
type OrderStatus struct { Orderid int64 `json:"orderid"` Ordertype int32 `json:"ordertype"` Direction int32 `json:"direction"` Price float64 `json:"price"` Amount float64 `json:"amount"` Transactionamount float64 `json:"transactionamount"` Fee float64 `json:"fee"` Symbol string `json:"symbol"` Orderstatus int32 `json:"orderstatus"` Updatetime time.Time `json:"updatetime"` Createtime time.Time `json:"createtime"` Basecurrency string `json:"basecurrency"` Quotecurrency string `json:"quotecurrency"` }