exchanges

package
v0.0.0-...-f659ba7 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2020 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Overview

Package exchanges contains all wrappers for common exchanges.

Index

Constants

View Source
const (
	// TakerTrade represents the "buy" order type.
	TakerTrade = "taker"
	// MakerTrade represents the "sell" order type.
	MakerTrade = "maker"
)

Variables

This section is empty.

Functions

func MarketNameFor

func MarketNameFor(m *environment.Market, wrapper ExchangeWrapper) string

MarketNameFor gets the market name as seen by the exchange.

Types

type BinanceWrapper

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

BinanceWrapper represents the wrapper for the Binance exchange.

func (BinanceWrapper) BuyLimit

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

BuyLimit performs a limit buy action.

func (BinanceWrapper) CalculateTradingFees

func (wrapper BinanceWrapper) 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 (BinanceWrapper) CalculateWithdrawFees

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

CalculateWithdrawFees calculates the withdrawal fees on a specified market.

func (BinanceWrapper) FeedConnect

func (wrapper BinanceWrapper) FeedConnect()

FeedConnect connects to the feed of the exchange.

func (BinanceWrapper) GetKlines

func (wrapper BinanceWrapper) GetKlines(start int64, symbol string, interval string) (*environment.CandleStickChart, error)

GetKlines Gets candlestick bar information

func (BinanceWrapper) GetMarketSummary

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

GetMarketSummary gets the current market summary.

func (BinanceWrapper) GetMarkets

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

GetMarkets Gets all the markets info.

func (BinanceWrapper) GetOrderBook

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

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

func (BinanceWrapper) GetTicker

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

GetTicker gets the updated ticker for a market.

func (BinanceWrapper) Name

func (wrapper BinanceWrapper) Name() string

Name returns the name of the wrapped exchange.

func (BinanceWrapper) SellLimit

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

SellLimit performs a limit sell action.

func (BinanceWrapper) String

func (wrapper BinanceWrapper) String() string

func (BinanceWrapper) SubscribeMarketSummaryFeed

func (wrapper BinanceWrapper) SubscribeMarketSummaryFeed(market *environment.Market, onUpdate func(environment.MarketSummary))

SubscribeMarketSummaryFeed subscribes to the Market Summary Feed service.

func (BinanceWrapper) UnsubscribeMarketSummaryFeed

func (wrapper BinanceWrapper) UnsubscribeMarketSummaryFeed(market *environment.Market)

UnsubscribeMarketSummaryFeed unsubscribes from the Market Summary Feed service.

type BitfinexWrapper

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

BitfinexWrapper provides a Generic wrapper of the Bitfinex API.

func (BitfinexWrapper) BuyLimit

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

BuyLimit performs a limit buy action.

NOTE: In bitfinex buy and sell orders behave the same (the go bitfinex api automatically puts it on correct side)

func (BitfinexWrapper) CalculateTradingFees

func (wrapper BitfinexWrapper) 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 Bitfinex fees are currently hardcoded.

func (BitfinexWrapper) CalculateWithdrawFees

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

CalculateWithdrawFees calculates the withdrawal fees on a specified market.

func (BitfinexWrapper) FeedConnect

func (wrapper BitfinexWrapper) FeedConnect()

FeedConnect connects to the feed of the exchange.

func (BitfinexWrapper) GetKlines

func (wrapper BitfinexWrapper) GetKlines(time int64, symbol string, interval string) (*environment.CandleStickChart, error)

GetKlines Gets candlestick bar information

func (BitfinexWrapper) GetMarketSummary

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

GetMarketSummary gets the current market summary.

func (BitfinexWrapper) GetMarkets

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

GetMarkets gets all the markets info.

func (BitfinexWrapper) GetOrderBook

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

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

func (BitfinexWrapper) GetTicker

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

GetTicker gets the updated ticker for a market.

func (BitfinexWrapper) Name

func (wrapper BitfinexWrapper) Name() string

Name returns the name of the wrapped exchange.

func (BitfinexWrapper) SellLimit

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

SellLimit performs a limit sell action.

NOTE: In bitfinex buy and sell orders behave the same (the go bitfinex api automatically puts it on correct side)

func (BitfinexWrapper) String

func (wrapper BitfinexWrapper) String() string

func (BitfinexWrapper) SubscribeMarketSummaryFeed

func (wrapper BitfinexWrapper) SubscribeMarketSummaryFeed(market *environment.Market, onUpdate func(environment.MarketSummary))

SubscribeMarketSummaryFeed subscribes to the Market Summary Feed service.

NOTE: Content of result array
BID	float	Price of last highest bid
BID_SIZE	float	Size of the last highest bid
ASK	float	Price of last lowest ask
ASK_SIZE	float	Size of the last lowest ask
DAILY_CHANGE	float	Amount that the last price has changed since yesterday
DAILY_CHANGE_PERC	float	Amount that the price has changed expressed in percentage terms
LAST_PRICE	float	Price of the last trade.
VOLUME	float	Daily volume
HIGH	float	Daily high
LOW	float	Daily low

func (BitfinexWrapper) UnsubscribeMarketSummaryFeed

func (wrapper BitfinexWrapper) UnsubscribeMarketSummaryFeed(market *environment.Market)

UnsubscribeMarketSummaryFeed unsubscribes from the Market Summary Feed service.

type BitmexWrapper

type BitmexWrapper struct {
}

BitmexWrapper represents the wrapper for the Bitmex exchange.

func (BitmexWrapper) BuyLimit

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

BuyLimit performs a limit buy action.

func (BitmexWrapper) CalculateTradingFees

func (wrapper BitmexWrapper) 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 (BitmexWrapper) CalculateWithdrawFees

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

CalculateWithdrawFees calculates the withdrawal fees on a specified market.

func (BitmexWrapper) FeedConnect

func (wrapper BitmexWrapper) FeedConnect()

FeedConnect connects to the feed of the exchange.

func (BitmexWrapper) GetKlines

func (wrapper BitmexWrapper) GetKlines(start int64, symbol string, interval string) (*environment.CandleStickChart, error)

GetKlines Gets candlestick bar information

func (BitmexWrapper) GetMarketSummary

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

GetMarketSummary gets the current market summary.

func (BitmexWrapper) GetMarkets

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

GetMarkets Gets all the markets info.

func (BitmexWrapper) GetOrderBook

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

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

func (BitmexWrapper) GetTicker

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

GetTicker gets the updated ticker for a market.

func (BitmexWrapper) Name

func (wrapper BitmexWrapper) Name() string

Name returns the name of the wrapped exchange.

func (BitmexWrapper) SellLimit

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

SellLimit performs a limit sell action.

func (BitmexWrapper) String

func (wrapper BitmexWrapper) String() string

func (BitmexWrapper) SubscribeMarketSummaryFeed

func (wrapper BitmexWrapper) SubscribeMarketSummaryFeed(market *environment.Market, onUpdate func(environment.MarketSummary))

SubscribeMarketSummaryFeed subscribes to the Market Summary Feed service.

func (BitmexWrapper) UnsubscribeMarketSummaryFeed

func (wrapper BitmexWrapper) UnsubscribeMarketSummaryFeed(market *environment.Market)

UnsubscribeMarketSummaryFeed unsubscribes from the Market Summary Feed service.

type BittrexWrapper

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

BittrexWrapper provides a Generic wrapper of the Bittrex API.

func (BittrexWrapper) BuyLimit

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

BuyLimit performs a limit buy action.

func (BittrexWrapper) CalculateTradingFees

func (wrapper BittrexWrapper) 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 Bittrex fees are hardcoded due to the inability to obtain them via API before placing an order.

func (BittrexWrapper) CalculateWithdrawFees

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

CalculateWithdrawFees calculates the withdrawal fees on a specified market.

func (BittrexWrapper) FeedConnect

func (wrapper BittrexWrapper) FeedConnect()

FeedConnect connects to the feed of the exchange.

NOTE: Not supported on Bittrex v1 API, use BittrexWrapperV2.

func (BittrexWrapper) GetKlines

func (wrapper BittrexWrapper) GetKlines(time int64, symbol string, interval string) (*environment.CandleStickChart, error)

GetKlines Gets candlestick bar information

func (BittrexWrapper) GetMarketSummary

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

GetMarketSummary gets the current market summary.

func (BittrexWrapper) GetMarkets

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

GetMarkets gets all the markets info.

func (BittrexWrapper) GetOrderBook

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

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

func (BittrexWrapper) GetTicker

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

GetTicker gets the updated ticker for a market.

func (BittrexWrapper) Name

func (wrapper BittrexWrapper) Name() string

Name returns the name of the wrapped exchange.

func (BittrexWrapper) SellLimit

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

SellLimit performs a limit sell action.

func (BittrexWrapper) String

func (wrapper BittrexWrapper) String() string

func (BittrexWrapper) SubscribeMarketSummaryFeed

func (wrapper BittrexWrapper) SubscribeMarketSummaryFeed(market *environment.Market, onUpdate func(environment.MarketSummary))

SubscribeMarketSummaryFeed subscribes to the Market Summary Feed service.

NOTE: Not supported on Bittrex v1 API, use BittrexWrapperV2.

func (BittrexWrapper) UnsubscribeMarketSummaryFeed

func (wrapper BittrexWrapper) UnsubscribeMarketSummaryFeed(market *environment.Market)

UnsubscribeMarketSummaryFeed unsubscribes from the Market Summary Feed service.

NOTE: Not supported on Bittrex v1 API, use BittrexWrapperV2.

type BittrexWrapperV2

type BittrexWrapperV2 struct {
	PublicKey string
	SecretKey string
}

BittrexWrapperV2 wraps Bittrex API v2.0

func (BittrexWrapperV2) BuyLimit

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

BuyLimit performs a limit buy action.

func (BittrexWrapperV2) BuyMarket

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

BuyMarket performs a market buy action.

func (BittrexWrapperV2) CalculateTradingFees

func (wrapper BittrexWrapperV2) 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 Bittrex fees are hardcoded due to the inability to obtain them via API before placing an order.

func (BittrexWrapperV2) CalculateWithdrawFees

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

CalculateWithdrawFees calculates the withdrawal fees on a specified market.

func (BittrexWrapperV2) FeedConnect

func (wrapper BittrexWrapperV2) FeedConnect()

FeedConnect connects to the feed of the exchange.

NOTE: Not supported on Bittrex v1 API, use BittrexWrapperV2.

func (BittrexWrapperV2) GetKlines

func (wrapper BittrexWrapperV2) GetKlines(time int64, symbol string, interval string) (*environment.CandleStickChart, error)

GetKlines Gets candlestick bar information

func (BittrexWrapperV2) GetMarketSummary

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

GetMarketSummary gets the current market summary.

func (BittrexWrapperV2) GetMarkets

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

GetMarkets gets all the markets info.

func (BittrexWrapperV2) GetOrderBook

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

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

func (BittrexWrapperV2) GetTicker

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

GetTicker gets the updated ticker for a market.

func (BittrexWrapperV2) Name

func (wrapper BittrexWrapperV2) Name() string

Name returns the name of the wrapped exchange.

func (BittrexWrapperV2) SellLimit

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

SellLimit performs a limit sell action.

func (BittrexWrapperV2) SellMarket

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

SellMarket performs a market sell action.

func (BittrexWrapperV2) String

func (wrapper BittrexWrapperV2) String() string

func (BittrexWrapperV2) SubscribeMarketSummaryFeed

func (wrapper BittrexWrapperV2) SubscribeMarketSummaryFeed(market *environment.Market, onUpdate func(environment.MarketSummary))

SubscribeMarketSummaryFeed subscribes to the Market Summary Feed service.

NOTE: Not supported on Bittrex v1 API, use BittrexWrapperV2.

func (BittrexWrapperV2) UnsubscribeMarketSummaryFeed

func (wrapper BittrexWrapperV2) UnsubscribeMarketSummaryFeed(market *environment.Market)

UnsubscribeMarketSummaryFeed unsubscribes from the Market Summary Feed service.

NOTE: Not supported on Bittrex v1 API, use BittrexWrapperV2.

type ExchangeWrapper

type ExchangeWrapper interface {
	Name() string                                                                                                // Gets the name of the exchange.
	GetTicker(market *environment.Market) (*environment.Ticker, error)                                           // Gets the updated ticker for a market.
	GetMarkets() ([]*environment.Market, error)                                                                  // Gets the current market data.
	GetMarketSummary(market *environment.Market) (*environment.MarketSummary, error)                             // Gets the current market summary.
	GetOrderBook(market *environment.Market) (*environment.OrderBook, error)                                     // Gets the order(ASK + BID) book of a market.
	BuyLimit(market *environment.Market, amount float64, limit float64) (string, error)                          // Performs a limit buy action.
	SellLimit(market *environment.Market, amount float64, limit float64) (string, error)                         // Performs a limit sell action.
	CalculateTradingFees(market *environment.Market, amount float64, limit float64, orderType TradeType) float64 // Calculates the trading fees for an order on a specified market.
	CalculateWithdrawFees(market *environment.Market, amount float64) float64                                    // Calculates the withdrawal fees on a specified market.

	FeedConnect()                                                                                    // Connects to the feed of the exchange.
	SubscribeMarketSummaryFeed(market *environment.Market, onUpdate func(environment.MarketSummary)) // Subscribes to the Market Summary Feed service.
	UnsubscribeMarketSummaryFeed(market *environment.Market)                                         // Unsubscribes from the Market Summary Feed service.

	GetKlines(time int64, symbol string, interval string) (*environment.CandleStickChart, error) // Return Candlestick Chart
}

ExchangeWrapper provides a generic wrapper for exchange services.

func NewBinanceWrapper

func NewBinanceWrapper(publicKey string, secretKey string) ExchangeWrapper

NewBinanceWrapper creates a generic wrapper of the binance API.

func NewBitfinexWrapper

func NewBitfinexWrapper(publicKey string, secretKey string) ExchangeWrapper

NewBitfinexWrapper creates a generic wrapper of the bittrex API.

func NewBittrexV2Wrapper

func NewBittrexV2Wrapper(publicKey string, secretKey string) ExchangeWrapper

NewBittrexV2Wrapper creates a generic wrapper of the bittrex API v2.0.

func NewBittrexWrapper

func NewBittrexWrapper(publicKey string, secretKey string) ExchangeWrapper

NewBittrexWrapper creates a generic wrapper of the bittrex API.

func NewKrakenWrapper

func NewKrakenWrapper(publicKey string, secretKey string) ExchangeWrapper

NewKrakenWrapper creates a generic wrapper of the poloniex API.

func NewPoloniexWrapper

func NewPoloniexWrapper(publicKey string, secretKey string) ExchangeWrapper

NewPoloniexWrapper creates a generic wrapper of the poloniex API.

type KrakenWrapper

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

KrakenWrapper provides a Generic wrapper of the Kraken API.

func (KrakenWrapper) BuyLimit

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

BuyLimit performs a limit buy action.

func (KrakenWrapper) CalculateTradingFees

func (wrapper KrakenWrapper) 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 Kraken fees are currently hardcoded.

func (KrakenWrapper) CalculateWithdrawFees

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

CalculateWithdrawFees calculates the withdrawal fees on a specified market.

func (KrakenWrapper) FeedConnect

func (wrapper KrakenWrapper) FeedConnect()

FeedConnect connects to the feed of the exchange.

func (KrakenWrapper) GetKlines

func (wrapper KrakenWrapper) GetKlines(time int64, symbol string, interval string) (*environment.CandleStickChart, error)

GetKlines Gets candlestick bar information

func (KrakenWrapper) GetMarketSummary

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

GetMarketSummary gets the current market summary.

func (KrakenWrapper) GetMarkets

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

GetMarkets gets all the markets info.

func (KrakenWrapper) GetOrderBook

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

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

func (KrakenWrapper) GetTicker

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

GetTicker gets the updated ticker for a market.

func (KrakenWrapper) Name

func (wrapper KrakenWrapper) Name() string

Name returns the name of the wrapped exchange.

func (KrakenWrapper) SellLimit

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

SellLimit performs a limit sell action.

NOTE: In kraken buy and sell orders behave the same (the go kraken api automatically puts it on correct side)

func (KrakenWrapper) String

func (wrapper KrakenWrapper) String() string

func (KrakenWrapper) SubscribeMarketSummaryFeed

func (wrapper KrakenWrapper) SubscribeMarketSummaryFeed(market *environment.Market, onUpdate func(environment.MarketSummary))

SubscribeMarketSummaryFeed subscribes to the Market Summary Feed service.

func (KrakenWrapper) UnsubscribeMarketSummaryFeed

func (wrapper KrakenWrapper) UnsubscribeMarketSummaryFeed(market *environment.Market)

UnsubscribeMarketSummaryFeed unsubscribes from the Market Summary Feed service.

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) 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()

FeedConnect connects to the feed of the poloniex websocket.

func (PoloniexWrapper) GetKlines

func (wrapper PoloniexWrapper) GetKlines(time int64, symbol string, interval string) (*environment.CandleStickChart, error)

GetKlines Gets candlestick bar information

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) String

func (wrapper PoloniexWrapper) String() string

func (PoloniexWrapper) SubscribeMarketSummaryFeed

func (wrapper PoloniexWrapper) SubscribeMarketSummaryFeed(market *environment.Market, onUpdate func(environment.MarketSummary))

SubscribeMarketSummaryFeed subscribes to the Market Summary Feed service.

func (PoloniexWrapper) UnsubscribeMarketSummaryFeed

func (wrapper PoloniexWrapper) UnsubscribeMarketSummaryFeed(market *environment.Market)

UnsubscribeMarketSummaryFeed unsubscribes from the Market Summary Feed service.

type TradeType

type TradeType string

TradeType represents a type of order, from trading fees point of view.

Jump to

Keyboard shortcuts

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