Documentation ¶
Index ¶
- Constants
- type Abcc
- func (e *Abcc) ApiKeyGET(strRequestPath string, mapParams map[string]string) string
- func (e *Abcc) CanDeposit(coin *coin.Coin) bool
- func (e *Abcc) CanWithdraw(coin *coin.Coin) bool
- func (e *Abcc) CancelAllOrder() error
- func (e *Abcc) CancelOrder(order *exchange.Order) error
- func (e *Abcc) DeleteCoin(coin *coin.Coin)
- func (e *Abcc) DeletePair(pair *pair.Pair)
- func (e *Abcc) DoAccountOperation(operation *exchange.AccountOperation) error
- func (e *Abcc) GetBalance(coin *coin.Coin) float64
- func (e *Abcc) GetCoinBySymbol(symbol string) *coin.Coin
- func (e *Abcc) GetCoinConstraint(coin *coin.Coin) *exchange.CoinConstraint
- func (e *Abcc) GetCoins() []*coin.Coin
- func (e *Abcc) GetCoinsData() error
- func (e *Abcc) GetConfirmation(coin *coin.Coin) int
- func (e *Abcc) GetConstraintFetchMethod(pair *pair.Pair) *exchange.ConstrainFetchMethod
- func (e *Abcc) GetFee(pair *pair.Pair) float64
- func (e *Abcc) GetID() int
- func (e *Abcc) GetLotSize(pair *pair.Pair) float64
- func (e *Abcc) GetName() exchange.ExchangeName
- func (e *Abcc) GetPairBySymbol(symbol string) *pair.Pair
- func (e *Abcc) GetPairConstraint(pair *pair.Pair) *exchange.PairConstraint
- func (e *Abcc) GetPairs() []*pair.Pair
- func (e *Abcc) GetPairsData() error
- func (e *Abcc) GetPriceFilter(pair *pair.Pair) float64
- func (e *Abcc) GetSymbolByCoin(coin *coin.Coin) string
- func (e *Abcc) GetSymbolByPair(pair *pair.Pair) string
- func (e *Abcc) GetTradingWebURL(pair *pair.Pair) string
- func (e *Abcc) GetTxFee(coin *coin.Coin) float64
- func (e *Abcc) HasPair(pair *pair.Pair) bool
- func (e *Abcc) InitData() error
- func (e *Abcc) LimitBuy(pair *pair.Pair, quantity, rate float64) (*exchange.Order, error)
- func (e *Abcc) LimitSell(pair *pair.Pair, quantity, rate float64) (*exchange.Order, error)
- func (e *Abcc) ListOrders() ([]*exchange.Order, error)
- func (e *Abcc) LoadPublicData(operation *exchange.PublicOperation) error
- func (e *Abcc) OrderBook(pair *pair.Pair) (*exchange.Maker, error)
- func (e *Abcc) OrderStatus(order *exchange.Order) error
- func (e *Abcc) SetCoinConstraint(coinConstraint *exchange.CoinConstraint)
- func (e *Abcc) SetPairConstraint(pairConstraint *exchange.PairConstraint)
- func (e *Abcc) UpdateAllBalances()
- func (e *Abcc) UpdateConstraint()
- func (e *Abcc) Withdraw(coin *coin.Coin, quantity float64, addr, tag string) bool
- type AccountBalances
- type JsonResponse
- type OrderBook
- type PairsData
- type PlaceOrder
- type Uuid
Constants ¶
const ( DEFAULT_ID = 51 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.abcc.com"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Abcc ¶
type Abcc 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 CreateAbcc ¶
*************************************************
func (*Abcc) 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 (*Abcc) CancelAllOrder ¶
func (*Abcc) DeleteCoin ¶
func (*Abcc) DeletePair ¶
func (*Abcc) DoAccountOperation ¶
func (e *Abcc) DoAccountOperation(operation *exchange.AccountOperation) error
func (*Abcc) GetCoinConstraint ¶
func (e *Abcc) GetCoinConstraint(coin *coin.Coin) *exchange.CoinConstraint
************** Coins on the Exchanges **************
func (*Abcc) 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 (*Abcc) GetConstraintFetchMethod ¶
func (e *Abcc) GetConstraintFetchMethod(pair *pair.Pair) *exchange.ConstrainFetchMethod
*************** Exchange Constraint ***************
func (*Abcc) GetName ¶
func (e *Abcc) GetName() exchange.ExchangeName
func (*Abcc) GetPairConstraint ¶
func (e *Abcc) GetPairConstraint(pair *pair.Pair) *exchange.PairConstraint
************** Pairs on the Exchanges **************
func (*Abcc) 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 (*Abcc) LoadPublicData ¶
func (e *Abcc) LoadPublicData(operation *exchange.PublicOperation) error
func (*Abcc) 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 (*Abcc) SetCoinConstraint ¶
func (e *Abcc) SetCoinConstraint(coinConstraint *exchange.CoinConstraint)
func (*Abcc) SetPairConstraint ¶
func (e *Abcc) SetPairConstraint(pairConstraint *exchange.PairConstraint)
func (*Abcc) UpdateAllBalances ¶
func (e *Abcc) UpdateAllBalances()
func (*Abcc) UpdateConstraint ¶
func (e *Abcc) UpdateConstraint()
type AccountBalances ¶
type JsonResponse ¶
type JsonResponse struct { Success bool `json:"success"` Message string `json:"message"` Result json.RawMessage `json:"result"` }
type PairsData ¶
type PairsData struct { Markets []struct { ID int `json:"id"` Code string `json:"code"` Name string `json:"name"` BaseUnit string `json:"base_unit"` QuoteUnit string `json:"quote_unit"` PriceFixed int `json:"price_fixed"` VolumeFixed int `json:"volume_fixed"` Fee string `json:"fee"` MarketPartition string `json:"market_partition"` } }
type PlaceOrder ¶
type PlaceOrder struct { AccountId string OrderUuid string `json:"OrderUuid"` Exchange string `json:"Exchange"` Type string Quantity float64 `json:"Quantity"` QuantityRemaining float64 `json:"QuantityRemaining"` Limit float64 `json:"Limit"` Reserved float64 ReserveRemaining float64 CommissionReserved float64 CommissionReserveRemaining float64 CommissionPaid float64 Price float64 `json:"Price"` PricePerUnit float64 `json:"PricePerUnit"` Opened string Closed string IsOpen bool Sentinel string CancelInitiated bool ImmediateOrCancel bool IsConditional bool Condition string ConditionTarget float64 }