Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) Get(endpoint string, params map[string]interface{}) (*http.Response, error)
- func (c *Client) GetDealtOrders(limit int, page int) (*DealtOrdersResponse, error)
- func (c *Client) GetTick() (*TickResponse, error)
- func (c *Client) GetUserInfo() (*UserInfo, error)
- func (c *Client) WalletRecords(coin string, page int) (*WalletRecordsResponse, error)
- type DealtOrdersResponse
- type TickEntry
- type TickResponse
- type Trade
- type UserInfo
- type WalletRecordEntry
- type WalletRecordsResponse
Constants ¶
View Source
const API_ROOT = "https://api.kucoin.com"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewAnonymousClient ¶
func NewAnonymousClient() *Client
func (*Client) GetDealtOrders ¶
func (c *Client) GetDealtOrders(limit int, page int) (*DealtOrdersResponse, error)
func (*Client) GetTick ¶
func (c *Client) GetTick() (*TickResponse, error)
func (*Client) GetUserInfo ¶
func (*Client) WalletRecords ¶
func (c *Client) WalletRecords(coin string, page int) (*WalletRecordsResponse, error)
type DealtOrdersResponse ¶
type DealtOrdersResponse struct { Success bool `json:"success"` Code string `json:"code"` Message string `json:"msg"` TimestampMillis int64 `json:"timestamp"` Data struct { Total int64 `json:"total"` Limit int64 `json:"limit"` Page int64 `json:"page"` Trades []*Trade `json:"datas"` } `json:"data"` Raw string }
type TickEntry ¶
type TickEntry struct { CoinType string `json:"coinType"` Trading bool `json:"trading"` Symbol string `json:"symbol"` LastDealPrice float64 `json:"lastDealPrice"` Buy float64 `json:"buy"` Sell float64 `json:"sell"` Change float64 `json:"change"` CoinTypePair string `json:"coinTypePair"` Sort int64 `json:"sort"` FeeRate float64 `json:"feeRate"` VolValue float64 `json:"volValue"` High float64 `json:"high"` DateTimeMillis int64 `json:"datetime"` Vol float64 `json:"vol"` Low float64 `json:"low"` ChangeRate float64 `json:"changeRate"` }
type TickResponse ¶
type TickResponse struct { Success bool `json:"success"` Code string `json:"code"` Message string `json:"msg"` TimestampMillis int64 `json:"timestamp"` Entries []TickEntry `json:"data"` Raw string }
func (*TickResponse) GetTimestamp ¶
func (t *TickResponse) GetTimestamp() time.Time
type Trade ¶
type Trade struct { CoinType string `json:"coinType"` CreatedAtMillis int64 `json:"createdAt"` Amount float64 `json:"amount"` DealValue float64 `json:"dealValue"` Fee float64 `json:"fee"` DealDirection string `json:"dealDirection"` CoinTypePair string `json:"coinTypePair"` OID string `json:"oid"` DealPrice float64 `json:"dealPrice"` OrderID string `json:"orderOid"` FeeRate float64 `json:"feeRate"` Direction string `json:"direction"` Timestamp time.Time `json:"-"` }
type UserInfo ¶
type UserInfo struct { Raw string Success bool `json:"success"` Code string `json:"code"` Msg string `json:"msg"` Timestamp int64 `json:"timestamp"` Data map[string]interface{} `json:"data"` }
func (*UserInfo) PrintPretty ¶
type WalletRecordEntry ¶
type WalletRecordEntry struct { Address string `json:"address"` Amount float64 `json:"amount"` CoinType string `json:"coinType"` Confirmation int64 `json:"confirmation"` CreatedAtMillis int64 `json:"createdAt"` Fee float64 `json:"fee"` OID string `json:"oid"` OuterWalletTxID string `json:"outerWalletTxid"` Remark interface{} `json:"remark"` Status string `json:"status"` Type string `json:"type"` UpdatedAtMillis int64 `json:"updateAt"` }
type WalletRecordsResponse ¶
type WalletRecordsResponse struct { Success bool `json:"success"` Code string `json:"code"` Message string `json:"msg"` TimestampMillis int64 `json:"timestamp"` Data struct { CurrPageNo int64 `json:"currPageNo"` FirstPage bool `json:"firstPage"` LastPage bool `json:"lastPage"` Total int64 `json:"total"` Limit int64 `json:"limit"` Entries []WalletRecordEntry `json:"datas"` } `json:"data"` }
Click to show internal directories.
Click to hide internal directories.