Documentation
¶
Overview ¶
Package SouthXchange is an implementation of the SouthXchange API in Golang.
Index ¶
- Constants
- func DecodeData(body []byte, indexes []int) (ret []byte, err error)
- func NewClient(apiKey, apiSecret, userAgent string) (c *client)
- func NewClientWithCustomHttpConfig(apiKey, apiSecret, userAgent string, httpClient *http.Client) (c *client)
- func NewClientWithCustomTimeout(apiKey, apiSecret, userAgent string, timeout time.Duration) (c *client)
- type Balance
- type MarketSummary
- type Order
- type PayloadData
- type SouthXchange
- func (o *SouthXchange) GetBalances() (balances []Balance, err error)
- func (b *SouthXchange) GetDepositAddress(currency string) (address string, err error)
- func (b *SouthXchange) GetMarketSummaries() (marketSummaries []MarketSummary, err error)
- func (b *SouthXchange) GetOpenOrders() (openOrders []Order, err error)
- func (b *SouthXchange) GetTransactions(start uint64, limit uint32, sort string, desc bool) (transactions []Transaction, err error)
- func (o *SouthXchange) SetDebug(enable bool)
- func (o *SouthXchange) Withdraw(address string, currency string, quantity float64) (withdraw WithdrawalInfo, err error)
- type Timestamp
- type Transaction
- type WithdrawalInfo
Constants ¶
const (
API_BASE = "https://www.southxchange.com/api" // SouthXchange API endpoint
)
Variables ¶
This section is empty.
Functions ¶
func NewClient ¶
func NewClient(apiKey, apiSecret, userAgent string) (c *client)
NewClient return a new SouthXchange HTTP client
func NewClientWithCustomHttpConfig ¶
func NewClientWithCustomHttpConfig(apiKey, apiSecret, userAgent string, httpClient *http.Client) (c *client)
NewClientWithCustomHttpConfig returns a new SouthXchange HTTP client using the predefined http client
func NewClientWithCustomTimeout ¶
func NewClientWithCustomTimeout(apiKey, apiSecret, userAgent string, timeout time.Duration) (c *client)
NewClient returns a new SouthXchange HTTP client with custom timeout
Types ¶
type MarketSummary ¶
func (*MarketSummary) UnmarshalJSON ¶
func (n *MarketSummary) UnmarshalJSON(buf []byte) error
type PayloadData ¶
type PayloadData map[string]interface{}
type SouthXchange ¶
type SouthXchange struct {
// contains filtered or unexported fields
}
SouthXchange represent a SouthXchange client
func New ¶
func New(apiKey, apiSecret, userAgent string) *SouthXchange
New returns an instantiated SouthXchange struct
func NewWithCustomHttpClient ¶
func NewWithCustomHttpClient(apiKey, apiSecret, userAgent string, httpClient *http.Client) *SouthXchange
NewWithCustomHttpClient returns an instantiated SouthXchange struct with custom http client
func NewWithCustomTimeout ¶
func NewWithCustomTimeout(apiKey, apiSecret, userAgent string, timeout time.Duration) *SouthXchange
NewWithCustomTimeout returns an instantiated SouthXchange struct with custom timeout
func (*SouthXchange) GetBalances ¶
func (o *SouthXchange) GetBalances() (balances []Balance, err error)
GetBalances is used to retrieve all balances from your account
func (*SouthXchange) GetDepositAddress ¶
func (b *SouthXchange) GetDepositAddress(currency string) (address string, err error)
GetDepositAddress is sed to generate or retrieve an address for a specific currency. currency a string literal for the currency (ie. BTC)
func (*SouthXchange) GetMarketSummaries ¶
func (b *SouthXchange) GetMarketSummaries() (marketSummaries []MarketSummary, err error)
GetMarketSummaries is used to get the last 24 hour summary of all active exchanges
func (*SouthXchange) GetOpenOrders ¶
func (b *SouthXchange) GetOpenOrders() (openOrders []Order, err error)
GetOpenOrders returns orders that you currently have opened.
func (*SouthXchange) GetTransactions ¶
func (b *SouthXchange) GetTransactions(start uint64, limit uint32, sort string, desc bool) (transactions []Transaction, err error)
GetTransactions is used to retrieve your transaction history
func (*SouthXchange) SetDebug ¶
func (o *SouthXchange) SetDebug(enable bool)
set enable/disable http request/response dump
func (*SouthXchange) Withdraw ¶
func (o *SouthXchange) Withdraw(address string, currency string, quantity float64) (withdraw WithdrawalInfo, err error)
Withdraw is used to withdraw funds from your account. address string the address where to send the funds. currency string literal for the currency (ie. BTC) quantity float the quantity of coins to withdraw fee float the quantity of coins to withdraw