poloniex

package
v0.0.0-...-78b482a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 26, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PoloniexWrapper

type PoloniexWrapper struct {
	// contains filtered or unexported fields
}

PoloniexWrapper provides a Generic wrapper of the Poloniex API.

func (*PoloniexWrapper) BuyLimit

func (wrapper *PoloniexWrapper) BuyLimit(market *environment.Market, amount float64, limit float64) (string, error)

BuyLimit performs a limit buy action.

func (*PoloniexWrapper) BuyMarket

func (wrapper *PoloniexWrapper) BuyMarket(market *environment.Market, amount float64) (string, error)

BuyMarket performs a market buy action.

func (*PoloniexWrapper) CalculateTradingFees

func (wrapper *PoloniexWrapper) CalculateTradingFees(market *environment.Market, amount float64, limit float64, orderType TradeType) float64

CalculateTradingFees calculates the trading fees for an order on a specified market.

NOTE: In Binance fees are currently hardcoded.

func (*PoloniexWrapper) CalculateWithdrawFees

func (wrapper *PoloniexWrapper) CalculateWithdrawFees(market *environment.Market, amount float64) float64

CalculateWithdrawFees calculates the withdrawal fees on a specified market.

func (*PoloniexWrapper) FeedConnect

func (wrapper *PoloniexWrapper) FeedConnect(markets []*environment.Market) error

FeedConnect connects to the feed of the poloniex websocket.

func (*PoloniexWrapper) GetBalance

func (wrapper *PoloniexWrapper) GetBalance(symbol string) (*decimal.Decimal, error)

GetBalance gets the balance of the user of the specified currency.

func (*PoloniexWrapper) GetCandles

func (wrapper *PoloniexWrapper) GetCandles(market *environment.Market) ([]environment.CandleStick, error)

GetCandles gets the candle data from the exchange.

func (*PoloniexWrapper) GetDepositAddress

func (wrapper *PoloniexWrapper) GetDepositAddress(coinTicker string) (string, bool)

GetDepositAddress gets the deposit address for the specified coin on the exchange.

func (*PoloniexWrapper) GetMarketSummary

func (wrapper *PoloniexWrapper) GetMarketSummary(market *environment.Market) (*environment.MarketSummary, error)

GetMarketSummary gets the current market summary.

func (*PoloniexWrapper) GetMarkets

func (wrapper *PoloniexWrapper) GetMarkets() ([]*environment.Market, error)

GetMarkets gets all the markets info.

func (*PoloniexWrapper) GetOrderBook

func (wrapper *PoloniexWrapper) GetOrderBook(market *environment.Market) (*environment.OrderBook, error)

GetOrderBook gets the order(ASK + BID) book of a market.

func (*PoloniexWrapper) GetTicker

func (wrapper *PoloniexWrapper) GetTicker(market *environment.Market) (*environment.Ticker, error)

GetTicker gets the updated ticker for a market.

func (*PoloniexWrapper) Name

func (wrapper *PoloniexWrapper) Name() string

Name returns the name of the wrapped exchange.

func (*PoloniexWrapper) SellLimit

func (wrapper *PoloniexWrapper) SellLimit(market *environment.Market, amount float64, limit float64) (string, error)

SellLimit performs a limit sell action.

func (*PoloniexWrapper) SellMarket

func (wrapper *PoloniexWrapper) SellMarket(market *environment.Market, amount float64) (string, error)

SellMarket performs a market sell action.

func (*PoloniexWrapper) String

func (wrapper *PoloniexWrapper) String() string

func (*PoloniexWrapper) Withdraw

func (wrapper *PoloniexWrapper) Withdraw(destinationAddress string, coinTicker string, amount float64) error

Withdraw performs a withdraw operation from the exchange to a destination address.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL