allcoin

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: May 29, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
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"
)

Variables

This section is empty.

Functions

This section is empty.

Types

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, opt ...OptionalParameter) ([]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, opt ...LimitOrderOptionalParameter) (*Order, error)

func (*Allcoin) LimitSell

func (ac *Allcoin) LimitSell(amount, price string, currencyPair CurrencyPair, opt ...LimitOrderOptionalParameter) (*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)

Jump to

Keyboard shortcuts

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