coinpark

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	API_BASE_URL = "https://api.coinpark.cc/"
	V1           = "v1/"
	API_URL      = API_BASE_URL + V1
	TICKER_API   = "mdata?cmd=ticker&pair=%s"
	ALL_TICKERs  = "mdata?cmd=marketAll"
	Pair_List    = "mdata?cmd=pairList"
	DEPTH_API    = "mdata?cmd=depth&pair=%s&size=%d"

	TRADE_URL       = "orderpending"
	GET_ACCOUNT_API = "transfer"
	GET_ORDER_API   = "orders/%s"
	//GET_ORDERS_LIST_API             = ""
	GET_UNFINISHED_ORDERS_API = "getUnfinishedOrdersIgnoreTradeType"
	CANCEL_ORDER_API          = TRADE_URL + "/%s/submit-cancel"
	PLACE_ORDER_API           = "order"
	WITHDRAW_API              = "withdraw"
	CANCELWITHDRAW_API        = "cancelWithdraw"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Cpk

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

func New

func New(client *http.Client, apikey, secretkey string) *Cpk

func (*Cpk) CancelOrder

func (c *Cpk) CancelOrder(orderId string, currency CurrencyPair) (bool, error)

func (*Cpk) GetAccount

func (c *Cpk) GetAccount() (*Account, error)

func (*Cpk) GetDepth

func (c *Cpk) GetDepth(size int, currency CurrencyPair) (*Depth, error)

func (*Cpk) GetExchangeName

func (c *Cpk) GetExchangeName() string

func (*Cpk) GetKlineRecords

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

func (*Cpk) GetOneOrder

func (c *Cpk) GetOneOrder(orderId string, currency CurrencyPair) (*Order, error)

func (*Cpk) GetOrderHistorys

func (c *Cpk) GetOrderHistorys(currency CurrencyPair, currentPage, pageSize int) ([]Order, error)

func (*Cpk) GetOrdersList

func (c *Cpk) GetOrdersList()

func (*Cpk) GetPairList

func (c *Cpk) GetPairList() ([]CurrencyPair, error)

func (*Cpk) GetServerTime

func (c *Cpk) GetServerTime() error

func (*Cpk) GetTicker

func (c *Cpk) GetTicker(currencyPair CurrencyPair) (*Ticker, error)

func (*Cpk) GetTrades

func (c *Cpk) GetTrades(currencyPair CurrencyPair, since int64) ([]Trade, error)

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

func (*Cpk) GetUnfinishOrders

func (c *Cpk) GetUnfinishOrders(currency CurrencyPair) ([]Order, error)

func (*Cpk) LimitBuy

func (c *Cpk) LimitBuy(amount, price string, currency CurrencyPair) (*Order, error)

func (*Cpk) LimitSell

func (c *Cpk) LimitSell(amount, price string, currency CurrencyPair) (*Order, error)

func (*Cpk) MarketBuy

func (c *Cpk) MarketBuy(amount, price string, currency CurrencyPair) (*Order, error)

func (*Cpk) MarketSell

func (c *Cpk) MarketSell(amount, price string, currency CurrencyPair) (*Order, error)

Jump to

Keyboard shortcuts

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