Documentation ¶
Index ¶
- Constants
- type CancelOrder
- type CoinsData
- type Kline
- type OrderBook
- type OrderDetail
- type OrderStatus
- type PairsData
- type PlaceOrder
- type Poloniex
- func (e *Poloniex) ApiKeyGET(strRequestPath string, mapParams map[string]string) string
- func (e *Poloniex) ApiKeyPost(strRequestPath string, mapParams map[string]string) string
- func (e *Poloniex) CanDeposit(coin *coin.Coin) bool
- func (e *Poloniex) CanWithdraw(coin *coin.Coin) bool
- func (e *Poloniex) CancelAllOrder() error
- func (e *Poloniex) CancelOrder(order *exchange.Order) error
- func (e *Poloniex) DeleteCoin(coin *coin.Coin)
- func (e *Poloniex) DeletePair(pair *pair.Pair)
- func (e *Poloniex) DoAccountOperation(operation *exchange.AccountOperation) error
- func (e *Poloniex) GetBalance(coin *coin.Coin) float64
- func (e *Poloniex) GetCoinBySymbol(symbol string) *coin.Coin
- func (e *Poloniex) GetCoinConstraint(coin *coin.Coin) *exchange.CoinConstraint
- func (e *Poloniex) GetCoins() []*coin.Coin
- func (e *Poloniex) GetCoinsData() error
- func (e *Poloniex) GetConfirmation(coin *coin.Coin) int
- func (e *Poloniex) GetConstraintFetchMethod(pair *pair.Pair) *exchange.ConstrainFetchMethod
- func (e *Poloniex) GetFee(pair *pair.Pair) float64
- func (e *Poloniex) GetID() int
- func (e *Poloniex) GetIDByPair(pair *pair.Pair) string
- func (e *Poloniex) GetLotSize(pair *pair.Pair) float64
- func (e *Poloniex) GetName() exchange.ExchangeName
- func (e *Poloniex) GetPairByID(exID string) *pair.Pair
- func (e *Poloniex) GetPairBySymbol(symbol string) *pair.Pair
- func (e *Poloniex) GetPairConstraint(pair *pair.Pair) *exchange.PairConstraint
- func (e *Poloniex) GetPairs() []*pair.Pair
- func (e *Poloniex) GetPairsData() error
- func (e *Poloniex) GetPriceFilter(pair *pair.Pair) float64
- func (e *Poloniex) GetSymbolByCoin(coin *coin.Coin) string
- func (e *Poloniex) GetSymbolByPair(pair *pair.Pair) string
- func (e *Poloniex) GetTradingWebURL(pair *pair.Pair) string
- func (e *Poloniex) GetTxFee(coin *coin.Coin) float64
- func (e *Poloniex) HasPair(pair *pair.Pair) bool
- func (e *Poloniex) InitData() error
- func (e *Poloniex) LimitBuy(pair *pair.Pair, quantity, rate float64) (*exchange.Order, error)
- func (e *Poloniex) LimitSell(pair *pair.Pair, quantity, rate float64) (*exchange.Order, error)
- func (e *Poloniex) ListOrders() ([]*exchange.Order, error)
- func (e *Poloniex) LoadPublicData(operation *exchange.PublicOperation) error
- func (e *Poloniex) OrderBook(pair *pair.Pair) (*exchange.Maker, error)
- func (e *Poloniex) OrderStatus(order *exchange.Order) error
- func (e *Poloniex) SetCoinConstraint(coinConstraint *exchange.CoinConstraint)
- func (e *Poloniex) SetPairConstraint(pairConstraint *exchange.PairConstraint)
- func (e *Poloniex) UpdateAllBalances()
- func (e *Poloniex) UpdateConstraint()
- func (e *Poloniex) Withdraw(coin *coin.Coin, quantity float64, addr, tag string) bool
- type TradeHistory
- type Withdraw
Constants ¶
const ( DEFAULT_ID = 29 DEFAULT_TAKER_FEE = 0.0020 DEFAULT_MAKER_FEE = 0.0008 DEFAULT_LOT_SIZE = 0.00000001 DEFAULT_PRICE_FILTER = 0.00000001 DEFAULT_LISTED = true )
const (
API_URL string = "https://poloniex.com"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CancelOrder ¶
type CoinsData ¶
type CoinsData struct { ID int `json:"id"` Name string `json:"name"` HumanType string `json:"humanType"` CurrencyType string `json:"currencyType"` TxFee string `json:"txFee"` MinConf int `json:"minConf"` DepositAddress interface{} `json:"depositAddress"` Disabled int `json:"disabled"` Delisted int `json:"delisted"` Frozen int `json:"frozen"` IsGeofenced int `json:"isGeofenced"` }
type OrderDetail ¶
type OrderStatus ¶
type OrderStatus struct { Result map[string]*OrderDetail `json:"result"` Success int `json:"success"` }
type PairsData ¶
type PairsData struct { ID int `json:"id"` Last string `json:"last"` LowestAsk string `json:"lowestAsk"` HighestBid string `json:"highestBid"` PercentChange string `json:"percentChange"` BaseVolume string `json:"baseVolume"` QuoteVolume string `json:"quoteVolume"` IsFrozen string `json:"isFrozen"` High24Hr string `json:"high24hr"` Low24Hr string `json:"low24hr"` }
type PlaceOrder ¶
type Poloniex ¶
type Poloniex 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 CreatePoloniex ¶
*************************************************
func (*Poloniex) ApiKeyPost ¶
************** 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 (*Poloniex) CancelAllOrder ¶
func (*Poloniex) DeleteCoin ¶
func (*Poloniex) DeletePair ¶
func (*Poloniex) DoAccountOperation ¶
func (e *Poloniex) DoAccountOperation(operation *exchange.AccountOperation) error
************** Private API **************
func (*Poloniex) GetCoinConstraint ¶
func (e *Poloniex) GetCoinConstraint(coin *coin.Coin) *exchange.CoinConstraint
************** Coins on the Exchanges **************
func (*Poloniex) 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 (*Poloniex) GetConstraintFetchMethod ¶
func (e *Poloniex) GetConstraintFetchMethod(pair *pair.Pair) *exchange.ConstrainFetchMethod
*************** Exchange Constraint ***************
func (*Poloniex) GetName ¶
func (e *Poloniex) GetName() exchange.ExchangeName
func (*Poloniex) GetPairConstraint ¶
func (e *Poloniex) GetPairConstraint(pair *pair.Pair) *exchange.PairConstraint
************** Pairs on the Exchanges **************
func (*Poloniex) 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 (*Poloniex) LoadPublicData ¶
func (e *Poloniex) LoadPublicData(operation *exchange.PublicOperation) error
************** PUBLIC API **************
func (*Poloniex) 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 (*Poloniex) SetCoinConstraint ¶
func (e *Poloniex) SetCoinConstraint(coinConstraint *exchange.CoinConstraint)
func (*Poloniex) SetPairConstraint ¶
func (e *Poloniex) SetPairConstraint(pairConstraint *exchange.PairConstraint)
func (*Poloniex) UpdateAllBalances ¶
func (e *Poloniex) UpdateAllBalances()
func (*Poloniex) UpdateConstraint ¶
func (e *Poloniex) UpdateConstraint()