Documentation ¶
Index ¶
- Constants
- func PoloniexOnDepthOrTrade(args []interface{}, kwargs map[string]interface{})
- func PoloniexOnTicker(args []interface{}, kwargs map[string]interface{})
- func PoloniexOnTrollbox(args []interface{}, kwargs map[string]interface{})
- type Poloniex
- func (p *Poloniex) CancelLoanOffer(orderNumber int64) (bool, error)
- func (p *Poloniex) CancelOrder(orderID int64) (bool, error)
- func (p *Poloniex) CloseMarginPosition(currency string) (bool, error)
- func (p *Poloniex) CreateLoanOffer(currency string, amount, rate float64, duration int, autoRenew bool) (int64, error)
- func (p *Poloniex) GenerateNewAddress(currency string) (string, error)
- func (p *Poloniex) GetActiveLoans() (PoloniexActiveLoans, error)
- func (p *Poloniex) GetAuthenticatedTradeHistory(currency, start, end string) (interface{}, error)
- func (p *Poloniex) GetBalances() (PoloniexBalance, error)
- func (p *Poloniex) GetChartData(currencyPair, start, end, period string) ([]PoloniexChartData, error)
- func (p *Poloniex) GetCompleteBalances() (PoloniexCompleteBalances, error)
- func (p *Poloniex) GetCurrencies() (map[string]PoloniexCurrencies, error)
- func (p *Poloniex) GetDepositAddresses() (PoloniexDepositAddresses, error)
- func (p *Poloniex) GetDepositsWithdrawals(start, end string) (PoloniexDepositsWithdrawals, error)
- func (p *Poloniex) GetExchangeAccountInfo() (exchange.AccountInfo, error)
- func (p *Poloniex) GetFee() float64
- func (p *Poloniex) GetFeeInfo() (PoloniexFee, error)
- func (p *Poloniex) GetLendingHistory(start, end string) ([]PoloniexLendingHistory, error)
- func (p *Poloniex) GetLoanOrders(currency string) (PoloniexLoanOrders, error)
- func (p *Poloniex) GetMarginAccountSummary() (PoloniexMargin, error)
- func (p *Poloniex) GetMarginPosition(currency string) (interface{}, error)
- func (p *Poloniex) GetOpenLoanOffers() (map[string][]PoloniexLoanOffer, error)
- func (p *Poloniex) GetOpenOrders(currency string) (interface{}, error)
- func (p *Poloniex) GetOrderbook(currencyPair string, depth int) (PoloniexOrderbook, error)
- func (p *Poloniex) GetOrderbookEx(currencyPair pair.CurrencyPair, assetType string) (orderbook.Base, error)
- func (p *Poloniex) GetTicker() (map[string]PoloniexTicker, error)
- func (p *Poloniex) GetTickerPrice(currencyPair pair.CurrencyPair, assetType string) (ticker.Price, error)
- func (p *Poloniex) GetTradableBalances() (map[string]map[string]float64, error)
- func (p *Poloniex) GetTradeHistory(currencyPair, start, end string) ([]PoloniexTradeHistory, error)
- func (p *Poloniex) GetVolume() (interface{}, error)
- func (p *Poloniex) MoveOrder(orderID int64, rate, amount float64) (PoloniexMoveOrderResponse, error)
- func (p *Poloniex) PlaceMarginOrder(currency string, rate, amount, lendingRate float64, buy bool) (PoloniexOrderResponse, error)
- func (p *Poloniex) PlaceOrder(currency string, rate, amount float64, immediate, fillOrKill, buy bool) (PoloniexOrderResponse, error)
- func (p *Poloniex) Run()
- func (p *Poloniex) SendAuthenticatedHTTPRequest(method, endpoint string, values url.Values, result interface{}) error
- func (p *Poloniex) SetDefaults()
- func (p *Poloniex) Setup(exch config.ExchangeConfig)
- func (p *Poloniex) Start()
- func (p *Poloniex) ToggleAutoRenew(orderNumber int64) (bool, error)
- func (p *Poloniex) TransferBalance(currency, from, to string, amount float64) (bool, error)
- func (p *Poloniex) UpdateOrderbook(currencyPair pair.CurrencyPair, assetType string) (orderbook.Base, error)
- func (p *Poloniex) UpdateTicker(currencyPair pair.CurrencyPair, assetType string) (ticker.Price, error)
- func (p *Poloniex) WebsocketClient()
- func (p *Poloniex) Withdraw(currency, address string, amount float64) (bool, error)
- type PoloniexActiveLoans
- type PoloniexAuthenticatedTradeHistoryAll
- type PoloniexAuthenticatedTradeHistoryResponse
- type PoloniexAuthentictedTradeHistory
- type PoloniexBalance
- type PoloniexChartData
- type PoloniexCompleteBalance
- type PoloniexCompleteBalances
- type PoloniexCurrencies
- type PoloniexDepositAddresses
- type PoloniexDepositsWithdrawals
- type PoloniexFee
- type PoloniexGenericResponse
- type PoloniexLendingHistory
- type PoloniexLoanOffer
- type PoloniexLoanOrder
- type PoloniexLoanOrders
- type PoloniexMargin
- type PoloniexMarginPosition
- type PoloniexMoveOrderResponse
- type PoloniexOpenOrdersResponse
- type PoloniexOpenOrdersResponseAll
- type PoloniexOrder
- type PoloniexOrderResponse
- type PoloniexOrderbook
- type PoloniexOrderbookItem
- type PoloniexOrderbookResponse
- type PoloniexResultingTrades
- type PoloniexTicker
- type PoloniexTradeHistory
- type PoloniexWebsocketTicker
- type PoloniexWebsocketTrollboxMessage
- type PoloniexWithdraw
Constants ¶
const ( POLONIEX_WEBSOCKET_ADDRESS = "wss://api.poloniex.com" POLONIEX_WEBSOCKET_REALM = "realm1" POLONIEX_WEBSOCKET_TICKER = "ticker" POLONIEX_WEBSOCKET_TROLLBOX = "trollbox" )
Variables ¶
This section is empty.
Functions ¶
func PoloniexOnDepthOrTrade ¶
func PoloniexOnDepthOrTrade(args []interface{}, kwargs map[string]interface{})
func PoloniexOnTicker ¶
func PoloniexOnTicker(args []interface{}, kwargs map[string]interface{})
func PoloniexOnTrollbox ¶
func PoloniexOnTrollbox(args []interface{}, kwargs map[string]interface{})
Types ¶
type Poloniex ¶
type Poloniex struct {
exchange.Base
}
Poloniex is the overarching type across the poloniex package
func (*Poloniex) CancelLoanOffer ¶
func (*Poloniex) CloseMarginPosition ¶
func (*Poloniex) CreateLoanOffer ¶
func (*Poloniex) GenerateNewAddress ¶
func (*Poloniex) GetActiveLoans ¶
func (p *Poloniex) GetActiveLoans() (PoloniexActiveLoans, error)
func (*Poloniex) GetAuthenticatedTradeHistory ¶
func (*Poloniex) GetBalances ¶
func (p *Poloniex) GetBalances() (PoloniexBalance, error)
func (*Poloniex) GetChartData ¶
func (p *Poloniex) GetChartData(currencyPair, start, end, period string) ([]PoloniexChartData, error)
GetChartData returns chart data for a specific currency pair
func (*Poloniex) GetCompleteBalances ¶
func (p *Poloniex) GetCompleteBalances() (PoloniexCompleteBalances, error)
func (*Poloniex) GetCurrencies ¶
func (p *Poloniex) GetCurrencies() (map[string]PoloniexCurrencies, error)
GetCurrencies returns information about currencies
func (*Poloniex) GetDepositAddresses ¶
func (p *Poloniex) GetDepositAddresses() (PoloniexDepositAddresses, error)
func (*Poloniex) GetDepositsWithdrawals ¶
func (p *Poloniex) GetDepositsWithdrawals(start, end string) (PoloniexDepositsWithdrawals, error)
func (*Poloniex) GetExchangeAccountInfo ¶
GetExchangeAccountInfo retrieves balances for all enabled currencies for the Poloniex exchange
func (*Poloniex) GetFeeInfo ¶
func (p *Poloniex) GetFeeInfo() (PoloniexFee, error)
func (*Poloniex) GetLendingHistory ¶
func (p *Poloniex) GetLendingHistory(start, end string) ([]PoloniexLendingHistory, error)
func (*Poloniex) GetLoanOrders ¶
func (p *Poloniex) GetLoanOrders(currency string) (PoloniexLoanOrders, error)
GetLoanOrders returns the list of loan offers and demands for a given currency, specified by the "currency" GET parameter.
func (*Poloniex) GetMarginAccountSummary ¶
func (p *Poloniex) GetMarginAccountSummary() (PoloniexMargin, error)
func (*Poloniex) GetMarginPosition ¶
func (*Poloniex) GetOpenLoanOffers ¶
func (p *Poloniex) GetOpenLoanOffers() (map[string][]PoloniexLoanOffer, error)
func (*Poloniex) GetOpenOrders ¶
func (*Poloniex) GetOrderbook ¶
func (p *Poloniex) GetOrderbook(currencyPair string, depth int) (PoloniexOrderbook, error)
GetOrderbook returns the full orderbook from poloniex
func (*Poloniex) GetOrderbookEx ¶
func (p *Poloniex) GetOrderbookEx(currencyPair pair.CurrencyPair, assetType string) (orderbook.Base, error)
GetOrderbookEx returns orderbook base on the currency pair
func (*Poloniex) GetTicker ¶
func (p *Poloniex) GetTicker() (map[string]PoloniexTicker, error)
GetTicker returns current ticker information
func (*Poloniex) GetTickerPrice ¶
func (p *Poloniex) GetTickerPrice(currencyPair pair.CurrencyPair, assetType string) (ticker.Price, error)
GetTickerPrice returns the ticker for a currency pair
func (*Poloniex) GetTradableBalances ¶
func (*Poloniex) GetTradeHistory ¶
func (p *Poloniex) GetTradeHistory(currencyPair, start, end string) ([]PoloniexTradeHistory, error)
GetTradeHistory returns trades history from poloniex
func (*Poloniex) MoveOrder ¶
func (p *Poloniex) MoveOrder(orderID int64, rate, amount float64) (PoloniexMoveOrderResponse, error)
func (*Poloniex) PlaceMarginOrder ¶
func (*Poloniex) PlaceOrder ¶
func (*Poloniex) SendAuthenticatedHTTPRequest ¶
func (*Poloniex) SetDefaults ¶
func (p *Poloniex) SetDefaults()
SetDefaults sets default settings for poloniex
func (*Poloniex) Setup ¶
func (p *Poloniex) Setup(exch config.ExchangeConfig)
Setup sets user exchange configuration settings
func (*Poloniex) ToggleAutoRenew ¶
func (*Poloniex) TransferBalance ¶
func (*Poloniex) UpdateOrderbook ¶
func (p *Poloniex) UpdateOrderbook(currencyPair pair.CurrencyPair, assetType string) (orderbook.Base, error)
UpdateOrderbook updates and returns the orderbook for a currency pair
func (*Poloniex) UpdateTicker ¶
func (p *Poloniex) UpdateTicker(currencyPair pair.CurrencyPair, assetType string) (ticker.Price, error)
UpdateTicker updates and returns the ticker for a currency pair
func (*Poloniex) WebsocketClient ¶
func (p *Poloniex) WebsocketClient()
type PoloniexActiveLoans ¶
type PoloniexActiveLoans struct { Provided []PoloniexLoanOffer `json:"provided"` Used []PoloniexLoanOffer `json:"used"` }
type PoloniexAuthenticatedTradeHistoryAll ¶
type PoloniexAuthenticatedTradeHistoryAll struct {
Data map[string][]PoloniexAuthentictedTradeHistory
}
type PoloniexAuthenticatedTradeHistoryResponse ¶
type PoloniexAuthenticatedTradeHistoryResponse struct {
Data []PoloniexAuthentictedTradeHistory
}
type PoloniexAuthentictedTradeHistory ¶
type PoloniexAuthentictedTradeHistory struct { GlobalTradeID int64 `json:"globalTradeID"` TradeID int64 `json:"tradeID,string"` Date string `json:"date"` Rate float64 `json:"rate,string"` Amount float64 `json:"amount,string"` Total float64 `json:"total,string"` Fee float64 `json:"fee,string"` OrderNumber int64 `json:"orderNumber,string"` Type string `json:"type"` Category string `json:"category"` }
type PoloniexBalance ¶
type PoloniexChartData ¶
type PoloniexChartData struct { Date int `json:"date"` High float64 `json:"high"` Low float64 `json:"low"` Open float64 `json:"open"` Close float64 `json:"close"` Volume float64 `json:"volume"` QuoteVolume float64 `json:"quoteVolume"` WeightedAverage float64 `json:"weightedAverage"` Error string `json:"error"` }
type PoloniexCompleteBalance ¶
type PoloniexCompleteBalances ¶
type PoloniexCompleteBalances struct {
Currency map[string]PoloniexCompleteBalance
}
type PoloniexCurrencies ¶
type PoloniexCurrencies struct { Name string `json:"name"` MaxDailyWithdrawal string `json:"maxDailyWithdrawal"` TxFee float64 `json:"txFee,string"` MinConfirmations int `json:"minConf"` DepositAddresses interface{} `json:"depositAddress"` Disabled int `json:"disabled"` Delisted int `json:"delisted"` Frozen int `json:"frozen"` }
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 int64 `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 int64 `json:"timestamp"` Status string `json:"status"` IPAddress string `json:"ipAddress"` } `json:"withdrawals"` }
type PoloniexFee ¶
type PoloniexGenericResponse ¶
type PoloniexLendingHistory ¶
type PoloniexLendingHistory struct { ID int64 `json:"id"` Currency string `json:"currency"` Rate float64 `json:"rate,string"` Amount float64 `json:"amount,string"` Duration float64 `json:"duration,string"` Interest float64 `json:"interest,string"` Fee float64 `json:"fee,string"` Earned float64 `json:"earned,string"` Open string `json:"open"` Close string `json:"close"` }
type PoloniexLoanOffer ¶
type PoloniexLoanOrder ¶
type PoloniexLoanOrders ¶
type PoloniexLoanOrders struct { Offers []PoloniexLoanOrder `json:"offers"` Demands []PoloniexLoanOrder `json:"demands"` }
type PoloniexMargin ¶
type PoloniexMargin struct { TotalValue float64 `json:"totalValue,string"` ProfitLoss float64 `json:"pl,string"` LendingFees float64 `json:"lendingFees,string"` NetValue float64 `json:"netValue,string"` BorrowedValue float64 `json:"totalBorrowedValue,string"` CurrentMargin float64 `json:"currentMargin,string"` }
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"` }
type PoloniexMoveOrderResponse ¶
type PoloniexMoveOrderResponse struct { Success int `json:"success"` Error string `json:"error"` OrderNumber int64 `json:"orderNumber,string"` Trades map[string][]PoloniexResultingTrades `json:"resultingTrades"` }
type PoloniexOpenOrdersResponse ¶
type PoloniexOpenOrdersResponse struct {
Data []PoloniexOrder
}
type PoloniexOpenOrdersResponseAll ¶
type PoloniexOpenOrdersResponseAll struct {
Data map[string][]PoloniexOrder
}
type PoloniexOrder ¶
type PoloniexOrderResponse ¶
type PoloniexOrderResponse struct { OrderNumber int64 `json:"orderNumber,string"` Trades []PoloniexResultingTrades `json:"resultingTrades"` }
type PoloniexOrderbook ¶
type PoloniexOrderbook struct { Asks []PoloniexOrderbookItem `json:"asks"` Bids []PoloniexOrderbookItem `json:"bids"` }
type PoloniexOrderbookItem ¶
type PoloniexResultingTrades ¶
type PoloniexTicker ¶
type PoloniexTicker struct { Last float64 `json:"last,string"` LowestAsk float64 `json:"lowestAsk,string"` HighestBid float64 `json:"highestBid,string"` PercentChange float64 `json:"percentChange,string"` BaseVolume float64 `json:"baseVolume,string"` QuoteVolume float64 `json:"quoteVolume,string"` IsFrozen int `json:"isFrozen,string"` High24Hr float64 `json:"high24hr,string"` Low24Hr float64 `json:"low24hr,string"` }