Documentation ¶
Index ¶
- type BalanceCurrency
- type Balances
- type BalancesResponse
- type BuyAndSellResponse
- type BuyInstantResponse
- type BuyLimit
- type BuyLimitResponse
- type BuySell
- type CancelOrderResponse
- type CancelOrderWithInfoData
- type CancelOrderWithInfoResponse
- type OpenOrdersData
- type OpenOrdersResponse
- type Order
- func (o *Order) BuyInstant(total float64, cp string, clientOrderId uint64) (BuyAndSellResponse, error)
- func (o *Order) BuyLimit(amount, price, stopPrice float64, currencyPair string, ...) (BuyLimit, error)
- func (o *Order) CancelOrder(orderId uint64) (CancelOrderResponse, error)
- func (o *Order) CancelOrderWithInfo(orderId uint64) (CancelOrderWithInfoResponse, error)
- func (o *Order) GetHistory(currencyPair string, limit int64) (OrderHistoryResponse, error)
- func (o *Order) GetOpenOrders(currencyPair string) (OpenOrdersResponse, error)
- func (o *Order) SellInstant(total float64, cp string, clientOrderId uint64) (BuyAndSellResponse, error)
- func (o *Order) SellLimit(amount, price, stopPrice float64, currencyPair string, ...) (SellLimit, error)
- type OrderHistoryData
- type OrderHistoryResponse
- type SellLimit
- type SellLimitResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BalanceCurrency ¶
type BalanceCurrency struct { Currency string `json:"currency"` Balance float32 `json:"balance"` Reserved float32 `json:"reserved"` Available float32 `json:"available"` }
Balance currency data
type Balances ¶
type Balances struct {
Client coinmate.ClientInterface
}
func (*Balances) GetBalances ¶
func (b *Balances) GetBalances() (BalancesResponse, error)
Balances endpoint
type BalancesResponse ¶
type BalancesResponse struct { Error bool ErrorMessage string Data map[string]BalanceCurrency }
Order book response
type BuyAndSellResponse ¶
type BuyInstantResponse ¶
Buy instant response
type BuyLimitResponse ¶
Buy limit response
type CancelOrderResponse ¶
Cancel order
type CancelOrderWithInfoData ¶
type CancelOrderWithInfoData struct { Success bool `json:"success"` RemainingAmount float64 `json:"remainingAmount"` }
Cancel order info data
type CancelOrderWithInfoResponse ¶
type CancelOrderWithInfoResponse struct { Error bool ErrorMessage string Data CancelOrderWithInfoData }
Cancel order with info response
type OpenOrdersData ¶
type OpenOrdersData struct { Id uint64 `json:"id"` Timestamp int64 `json:"timestamp"` Type string `json:"type"` CurrencyPair string `json:"currencyPair"` Price float64 `json:"price"` Amount float64 `json:"amount"` OrderTradeType string `json:"orderTradeType"` StopPrice float64 `json:"stopPrice"` Hidden bool `json:"hidden"` }
Open orders data
type OpenOrdersResponse ¶
type OpenOrdersResponse struct { Error bool ErrorMessage string Data []OpenOrdersData }
Open orders history response
type Order ¶
type Order struct {
Client coinmate.ClientInterface
}
func (*Order) BuyInstant ¶
func (o *Order) BuyInstant(total float64, cp string, clientOrderId uint64) (BuyAndSellResponse, error)
Buy instantly
func (*Order) BuyLimit ¶
func (o *Order) BuyLimit(amount, price, stopPrice float64, currencyPair string, hidden, immediateOrCancel bool, clientOrderId uint64) (BuyLimit, error)
Buy limit
func (*Order) CancelOrder ¶
func (o *Order) CancelOrder(orderId uint64) (CancelOrderResponse, error)
Cancel order
func (*Order) CancelOrderWithInfo ¶
func (o *Order) CancelOrderWithInfo(orderId uint64) (CancelOrderWithInfoResponse, error)
Cancel order with info
func (*Order) GetHistory ¶
func (o *Order) GetHistory(currencyPair string, limit int64) (OrderHistoryResponse, error)
Order history
func (*Order) GetOpenOrders ¶
func (o *Order) GetOpenOrders(currencyPair string) (OpenOrdersResponse, error)
Order history
func (*Order) SellInstant ¶
func (o *Order) SellInstant(total float64, cp string, clientOrderId uint64) (BuyAndSellResponse, error)
Sell instantly
type OrderHistoryData ¶
type OrderHistoryData struct { Id uint64 `json:"id"` Timestamp int64 `json:"timestamp"` Type string `json:"type"` Price float64 `json:"price"` RemainingAmount float64 `json:"remainingAmount"` OriginalAmount float64 `json:"originalAmount"` Status string `json:"status"` StopPrice float64 `json:"stopPrice"` OrderTradeType string `json:"orderTradeType"` Hidden bool `json:"hidden"` }
Order history data
type OrderHistoryResponse ¶
type OrderHistoryResponse struct { Error bool ErrorMessage string Data []OrderHistoryData }
Order history response
type SellLimitResponse ¶
Sell limit response
Click to show internal directories.
Click to hide internal directories.