Documentation ¶
Overview ¶
Package Cryptopia is an implementation of the Cryptopia API in Golang.
Index ¶
- Constants
- func NewClient(apiKey, apiSecret string) (c *client)
- type Balance
- type BalanceParams
- type Cryptopia
- func (b *Cryptopia) GetBalance(params BalanceParams) (balances []Balance, err error)
- func (b *Cryptopia) GetMarkets() (markets []Market, err error)
- func (b *Cryptopia) GetTradeHistory(params TradeHistoryParams) (trades []Trade, err error)
- func (b *Cryptopia) GetTradePairs() (pairs []Pair, err error)
- func (b *Cryptopia) GetTransactions(params TransactionsParams) (transactions []Transaction, err error)
- func (c *Cryptopia) SetDebug(enable bool)
- type Market
- type Pair
- type Timestamp
- type Trade
- type TradeHistoryParams
- type Transaction
- type TransactionsParams
- type Uuid
Constants ¶
View Source
const ( API_BASE = "https://www.cryptopia.co.nz/api/" // Cryptopia API endpoint API_VERSION = "v1.1" // Cryptopia API version DEFAULT_HTTPCLIENT_TIMEOUT = 30 // HTTP client timeout )
View Source
const TIME_FORMAT = "2006-01-02T15:04:05"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BalanceParams ¶
type Cryptopia ¶
type Cryptopia struct {
// contains filtered or unexported fields
}
cryptopia represent a cryptopia client
func (*Cryptopia) GetBalance ¶
func (b *Cryptopia) GetBalance(params BalanceParams) (balances []Balance, err error)
GetBalance Returns all balances or a specific currency balance
func (*Cryptopia) GetMarkets ¶
GetMarkets Returns a list of markets
func (*Cryptopia) GetTradeHistory ¶
func (b *Cryptopia) GetTradeHistory(params TradeHistoryParams) (trades []Trade, err error)
GetTradeHistory Returns all trade history data
func (*Cryptopia) GetTradePairs ¶
GetTradePairs Returns all trade pair data
func (*Cryptopia) GetTransactions ¶
func (b *Cryptopia) GetTransactions(params TransactionsParams) (transactions []Transaction, err error)
GetTransactions Returns a list of transactions
type Market ¶
type Market struct { ID int64 `json:"TradePairId"` Label string `json:"Label"` AskPrice float64 `json:"AskPrice"` BidPrice float64 `json:"BidPrice"` Low float64 `json:"Low"` High float64 `json:"High"` Volume float64 `json:"Volume"` LastPrice float64 `json:"LastPrice"` BuyVolume float64 `json:"BuyVolume"` SellVolume float64 `json:"SellVolume"` Change float64 `json:"Change"` Open float64 `json:"Open"` Close float64 `json:"Close"` BaseVolume float64 `json:"BaseVolume"` BaseBuyVolume float64 `json:"BaseBuyVolume"` BaseSellVolume float64 `json:"BaseSellVolume"` }
type TradeHistoryParams ¶
type Transaction ¶
type TransactionsParams ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.