Back to godoc.org

Package allcoin

v1.1.3
Latest Go to latest

The latest major version is .

Published: Jan 15, 2020 | License: MIT | Module: code.dllexport.com/mario/goex.git

Index

Constants

const (
	API_BASE_URL = "https://www.allcoin.ca/"

	TICKER_URI             = "Api_Market/getCoinTrade"
	TICKER_URI_2           = "Api_Order/ticker"
	TICKERS_URI            = "ticker/allBookTickers"
	DEPTH_URI              = "Api_Order/depth"
	ACCOUNT_URI            = "Api_User/userBalance"
	ORDER_URI              = "Api_Order/coinTrust"
	ORDER_CANCEL_URI       = "Api_Order/cancel"
	ORDER_INFO_URI         = "Api_Order/orderInfo"
	UNFINISHED_ORDERS_INFO = "Api_Order/trustList"
)

type Allcoin

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

func New

func New(client *http.Client, api_key, secret_key string) *Allcoin

func (*Allcoin) CancelOrder

func (ac *Allcoin) CancelOrder(orderId string, currencyPair CurrencyPair) (bool, error)

func (*Allcoin) GetAccount

func (ac *Allcoin) GetAccount() (*Account, error)

func (*Allcoin) GetDepth

func (ac *Allcoin) GetDepth(size int, currencyPair CurrencyPair) (*Depth, error)

func (*Allcoin) GetExchangeName

func (ac *Allcoin) GetExchangeName() string

func (*Allcoin) GetKlineRecords

func (ac *Allcoin) GetKlineRecords(currency CurrencyPair, period, size, since int) ([]Kline, error)

func (*Allcoin) GetOneOrder

func (ac *Allcoin) GetOneOrder(orderId string, currencyPair CurrencyPair) (*Order, error)

func (*Allcoin) GetOrderHistorys

func (ac *Allcoin) GetOrderHistorys(currency CurrencyPair, currentPage, pageSize int) ([]Order, error)

func (*Allcoin) GetTicker

func (ac *Allcoin) GetTicker(currency CurrencyPair) (*Ticker, error)

func (*Allcoin) GetTrades

func (ac *Allcoin) GetTrades(currencyPair CurrencyPair, since int64) ([]Trade, error)

非个人,整个交易所的交易记录

func (*Allcoin) GetUnfinishOrders

func (ac *Allcoin) GetUnfinishOrders(currencyPair CurrencyPair) ([]Order, error)

func (*Allcoin) LimitBuy

func (ac *Allcoin) LimitBuy(amount, price string, currencyPair CurrencyPair) (*Order, error)

func (*Allcoin) LimitSell

func (ac *Allcoin) LimitSell(amount, price string, currencyPair CurrencyPair) (*Order, error)

func (*Allcoin) MarketBuy

func (ac *Allcoin) MarketBuy(amount, price string, currencyPair CurrencyPair) (*Order, error)

func (*Allcoin) MarketSell

func (ac *Allcoin) MarketSell(amount, price string, currencyPair CurrencyPair) (*Order, error)

Package Files

  • allcoin.go
Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier