Documentation ¶
Index ¶
- Constants
- type Poloniex
- func (poloniex *Poloniex) CancelOrder(orderId string, currency CurrencyPair) (bool, error)
- func (poloniex *Poloniex) CloseMarginPosition(currency CurrencyPair) (bool, error)
- func (poloniex *Poloniex) GetAccount() (*Account, error)
- func (poloniex *Poloniex) GetDepositsWithdrawals(start, end string) (*PoloniexDepositsWithdrawals, error)
- func (poloniex *Poloniex) GetDepth(size int, currency CurrencyPair) (*Depth, error)
- func (poloniex *Poloniex) GetExchangeName() string
- func (Poloniex *Poloniex) GetKlineRecords(currency CurrencyPair, period, size, since int) ([]Kline, error)
- func (poloniex *Poloniex) GetMarginPosition(currency CurrencyPair) (*PoloniexMarginPosition, error)
- func (poloniex *Poloniex) GetOneOrder(orderId string, currency CurrencyPair) (*Order, error)
- func (Poloniex *Poloniex) GetOrderHistorys(currency CurrencyPair, currentPage, pageSize int) ([]Order, error)
- func (poloniex *Poloniex) GetTicker(currency CurrencyPair) (*Ticker, error)
- func (poloniex *Poloniex) GetTrades(currencyPair CurrencyPair, since int64) ([]Trade, error)
- func (poloniex *Poloniex) GetUnfinishOrders(currency CurrencyPair) ([]Order, error)
- func (poloniex *Poloniex) LimitBuy(amount, price string, currency CurrencyPair) (*Order, error)
- func (poloniex *Poloniex) LimitSell(amount, price string, currency CurrencyPair) (*Order, error)
- func (poloniex *Poloniex) MarginLimitBuy(amount, price string, currency CurrencyPair) (*Order, error)
- func (poloniex *Poloniex) MarginLimitSell(amount, price string, currency CurrencyPair) (*Order, error)
- func (poloniex *Poloniex) MarketBuy(amount, price string, currency CurrencyPair) (*Order, error)
- func (poloniex *Poloniex) MarketSell(amount, price string, currency CurrencyPair) (*Order, error)
- func (p *Poloniex) Withdraw(amount string, currency Currency, fees, receiveAddr, safePwd string) (string, error)
- type PoloniexDepositsWithdrawals
- type PoloniexGenericResponse
- type PoloniexMarginPosition
Constants ¶
View Source
const ( BASE_URL = "https://poloniex.com/" TRADE_API = BASE_URL + "tradingApi" PUBLIC_URL = BASE_URL + "public" TICKER_API = "?command=returnTicker" ORDER_BOOK_API = "?command=returnOrderBook¤cyPair=%s&depth=%d" )
View Source
const EXCHANGE_NAME = "poloniex.com"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Poloniex ¶
type Poloniex struct {
// contains filtered or unexported fields
}
func (*Poloniex) CancelOrder ¶
func (*Poloniex) CloseMarginPosition ¶
func (*Poloniex) GetAccount ¶
func (*Poloniex) GetDepositsWithdrawals ¶
func (poloniex *Poloniex) GetDepositsWithdrawals(start, end string) (*PoloniexDepositsWithdrawals, error)
func (*Poloniex) GetExchangeName ¶
func (*Poloniex) GetKlineRecords ¶
func (*Poloniex) GetMarginPosition ¶
func (poloniex *Poloniex) GetMarginPosition(currency CurrencyPair) (*PoloniexMarginPosition, error)
func (*Poloniex) GetOneOrder ¶
func (*Poloniex) GetOrderHistorys ¶
func (*Poloniex) GetUnfinishOrders ¶
func (*Poloniex) MarginLimitBuy ¶
func (*Poloniex) MarginLimitSell ¶
func (*Poloniex) MarketSell ¶
type PoloniexDepositsWithdrawals ¶
type PoloniexDepositsWithdrawals struct { Deposits []struct { Currency string `json:"currency"` Address string `json:"address"` Amount float64 `json:"amount,string"` Confirmations int `json:"confirmations"` TransactionID string `json:"txid"` Timestamp time.Time `json:"timestamp"` Status string `json:"status"` } `json:"deposits"` Withdrawals []struct { WithdrawalNumber int64 `json:"withdrawalNumber"` Currency string `json:"currency"` Address string `json:"address"` Amount float64 `json:"amount,string"` Confirmations int `json:"confirmations"` TransactionID string `json:"txid"` Timestamp time.Time `json:"timestamp"` Status string `json:"status"` IPAddress string `json:"ipAddress"` } `json:"withdrawals"` }
type PoloniexGenericResponse ¶
type PoloniexMarginPosition ¶
type PoloniexMarginPosition struct { Amount float64 `json:"amount,string"` Total float64 `json:"total,string"` BasePrice float64 `json:"basePrice,string"` LiquidiationPrice float64 `json:"liquidiationPrice"` ProfitLoss float64 `json:"pl,string"` LendingFees float64 `json:"lendingFees,string"` Type string `json:"type"` }
Click to show internal directories.
Click to hide internal directories.