Documentation ¶
Index ¶
- Constants
- type AccountBalances
- type Bitpie
- func (e *Bitpie) ApiKeyGET(strRequestPath string, mapParams map[string]string) string
- func (e *Bitpie) CanDeposit(coin *coin.Coin) bool
- func (e *Bitpie) CanWithdraw(coin *coin.Coin) bool
- func (e *Bitpie) CancelAllOrder() error
- func (e *Bitpie) CancelOrder(order *exchange.Order) error
- func (e *Bitpie) DeleteCoin(coin *coin.Coin)
- func (e *Bitpie) DeletePair(pair *pair.Pair)
- func (e *Bitpie) DoAccountOperation(operation *exchange.AccountOperation) error
- func (e *Bitpie) GetBalance(coin *coin.Coin) float64
- func (e *Bitpie) GetCoinBySymbol(symbol string) *coin.Coin
- func (e *Bitpie) GetCoinConstraint(coin *coin.Coin) *exchange.CoinConstraint
- func (e *Bitpie) GetCoins() []*coin.Coin
- func (e *Bitpie) GetCoinsData() error
- func (e *Bitpie) GetConfirmation(coin *coin.Coin) int
- func (e *Bitpie) GetConstraintFetchMethod(pair *pair.Pair) *exchange.ConstrainFetchMethod
- func (e *Bitpie) GetFee(pair *pair.Pair) float64
- func (e *Bitpie) GetID() int
- func (e *Bitpie) GetLotSize(pair *pair.Pair) float64
- func (e *Bitpie) GetName() exchange.ExchangeName
- func (e *Bitpie) GetPairBySymbol(symbol string) *pair.Pair
- func (e *Bitpie) GetPairConstraint(pair *pair.Pair) *exchange.PairConstraint
- func (e *Bitpie) GetPairs() []*pair.Pair
- func (e *Bitpie) GetPairsData() error
- func (e *Bitpie) GetPriceFilter(pair *pair.Pair) float64
- func (e *Bitpie) GetSymbolByCoin(coin *coin.Coin) string
- func (e *Bitpie) GetSymbolByPair(pair *pair.Pair) string
- func (e *Bitpie) GetTradingWebURL(pair *pair.Pair) string
- func (e *Bitpie) GetTxFee(coin *coin.Coin) float64
- func (e *Bitpie) HasPair(pair *pair.Pair) bool
- func (e *Bitpie) InitData() error
- func (e *Bitpie) LimitBuy(pair *pair.Pair, quantity, rate float64) (*exchange.Order, error)
- func (e *Bitpie) LimitSell(pair *pair.Pair, quantity, rate float64) (*exchange.Order, error)
- func (e *Bitpie) ListOrders() ([]*exchange.Order, error)
- func (e *Bitpie) LoadPublicData(operation *exchange.PublicOperation) error
- func (e *Bitpie) OrderBook(pair *pair.Pair) (*exchange.Maker, error)
- func (e *Bitpie) OrderStatus(order *exchange.Order) error
- func (e *Bitpie) SetCoinConstraint(coinConstraint *exchange.CoinConstraint)
- func (e *Bitpie) SetPairConstraint(pairConstraint *exchange.PairConstraint)
- func (e *Bitpie) TestAuth() string
- func (e *Bitpie) UpdateAllBalances()
- func (e *Bitpie) UpdateConstraint()
- func (e *Bitpie) Withdraw(coin *coin.Coin, quantity float64, addr, tag string) bool
- type CoinsData
- type JsonResponse
- type OrderBook
- type PairsData
- type PlaceOrder
- type Uuid
Constants ¶
const ( DEFAULT_ID = 65 DEFAULT_TAKER_FEE = 0.0025 DEFAULT_MAKER_FEE = 0.0025 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.expie.com"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountBalances ¶
type Bitpie ¶
type Bitpie 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 CreateBitpie ¶
*************************************************
func (*Bitpie) 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 (*Bitpie) CancelAllOrder ¶
func (*Bitpie) DeleteCoin ¶
func (*Bitpie) DeletePair ¶
func (*Bitpie) DoAccountOperation ¶
func (e *Bitpie) DoAccountOperation(operation *exchange.AccountOperation) error
************** Private API **************
func (*Bitpie) GetCoinConstraint ¶
func (e *Bitpie) GetCoinConstraint(coin *coin.Coin) *exchange.CoinConstraint
************** Coins on the Exchanges **************
func (*Bitpie) 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 (*Bitpie) GetConstraintFetchMethod ¶
func (e *Bitpie) GetConstraintFetchMethod(pair *pair.Pair) *exchange.ConstrainFetchMethod
*************** Exchange Constraint ***************
func (*Bitpie) GetName ¶
func (e *Bitpie) GetName() exchange.ExchangeName
func (*Bitpie) GetPairConstraint ¶
func (e *Bitpie) GetPairConstraint(pair *pair.Pair) *exchange.PairConstraint
************** Pairs on the Exchanges **************
func (*Bitpie) 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 (*Bitpie) GetTradingWebURL ¶
no website version, use app
func (*Bitpie) LoadPublicData ¶
func (e *Bitpie) LoadPublicData(operation *exchange.PublicOperation) error
************** Public API **************
func (*Bitpie) 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 (*Bitpie) SetCoinConstraint ¶
func (e *Bitpie) SetCoinConstraint(coinConstraint *exchange.CoinConstraint)
func (*Bitpie) SetPairConstraint ¶
func (e *Bitpie) SetPairConstraint(pairConstraint *exchange.PairConstraint)
func (*Bitpie) UpdateAllBalances ¶
func (e *Bitpie) UpdateAllBalances()
func (*Bitpie) UpdateConstraint ¶
func (e *Bitpie) UpdateConstraint()
type CoinsData ¶
type CoinsData []struct { Coins []struct { Chain string `json:"chain"` NumOfConfirmations int `json:"numOfConfirmations"` NumOfFastConfirmations int `json:"numOfFastConfirmations"` DepositStatus string `json:"depositStatus"` MinDepositAmt string `json:"minDepositAmt"` WithdrawStatus string `json:"withdrawStatus"` MinWithdrawAmt string `json:"minWithdrawAmt"` WithdrawPrecision int `json:"withdrawPrecision"` MaxWithdrawAmt string `json:"maxWithdrawAmt"` WithdrawQuotaPerDay string `json:"withdrawQuotaPerDay"` WithdrawQuotaPerYear string `json:"withdrawQuotaPerYear"` WithdrawQuotaTotal string `json:"withdrawQuotaTotal"` WithdrawFeeType string `json:"withdrawFeeType"` TransactFeeWithdraw string `json:"transactFeeWithdraw"` } `json:"coins"` }
type JsonResponse ¶
type JsonResponse struct { Success bool `json:"success"` Message string `json:"message"` Result json.RawMessage `json:"result"` }
type PairsData ¶
type PairsData []struct { Name string `json:"name"` MarketOrderMinMoney string `json:"market_order_min_money"` StockPrecision int `json:"stock_precision"` Money string `json:"money"` MakerFeeRate int `json:"maker_fee_rate"` OrderMinVol string `json:"order_min_vol"` MoneyPrecision int `json:"money_precision"` MarketOrderEnabled bool `json:"market_order_enabled"` Stock string `json:"stock"` Enabled bool `json:"enabled"` TakerFeeRate int `json:"taker_fee_rate"` }
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 }