Documentation ¶
Index ¶
- func SetEndpoint(in string)
- type Account
- type AuthAPI
- func (api *AuthAPI) BatchCreateOrders(orders *OrderData) *BatchCreateOrders
- func (api *AuthAPI) CancelAll(pair string) *CancelAllResp
- func (api *AuthAPI) CancelOrder(pair string, orderID int) *CancelOrder
- func (api *AuthAPI) CreateOrderLimitBuy(clientID int, pair, price, amount string) *CreateOrder
- func (api *AuthAPI) CreateOrderLimitSell(clientID int, pair, price, amount string) *CreateOrder
- func (api *AuthAPI) CreateOrderMarketBuy(clientID int, pair, amount string) *CreateOrder
- func (api *AuthAPI) CreateOrderMarketSell(clientID int, pair, amount string) *CreateOrder
- func (api *AuthAPI) GetAccountBalance() *Account
- func (api *AuthAPI) GetOrder(pair string, orderID string) (*OrderInfo, error)
- func (a *AuthAPI) GetOrderBook(pair string) *OrderBook
- func (a *AuthAPI) GetOrderBookWithLimit(pair string, limit int) *OrderBook
- func (api *AuthAPI) GetOrderHistory(pair string, queryParams url.Values) *OrderHistory
- func (api *AuthAPI) GetOrderList(pair string, active bool, page uint) *OrderList
- func (a *AuthAPI) GetTicker(pair string) *Ticker
- func (a *AuthAPI) GetTickers() *Tickers
- func (a *AuthAPI) GetTrades(pair string) *Trade
- func (a *AuthAPI) SetProxy(in string)
- type Balance
- type BatchCreateOrders
- type CancelAllResp
- type CancelOrder
- type CreateOrder
- type OrderBook
- type OrderBookInfo
- type OrderData
- type OrderHistory
- type OrderInfo
- type OrderList
- type PubAPI
- type StatusCode
- type Ticker
- type TickerInfo
- type Tickers
- type Trade
- type TradeInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetEndpoint ¶ added in v1.2.2
func SetEndpoint(in string)
Types ¶
type Account ¶
type Account struct { Data []Balance `json:"data,omitempty"` StatusCode }
Account struct
type AuthAPI ¶
type AuthAPI struct { Key string // contains filtered or unexported fields }
AuthAPI struct
func (*AuthAPI) BatchCreateOrders ¶ added in v1.3.0
func (api *AuthAPI) BatchCreateOrders(orders *OrderData) *BatchCreateOrders
CreateOrderMarketSell Ref. https://developer.bitopro.com/docs#operation/createOrder
func (*AuthAPI) CancelAll ¶ added in v1.3.2
func (api *AuthAPI) CancelAll(pair string) *CancelAllResp
func (*AuthAPI) CancelOrder ¶
func (api *AuthAPI) CancelOrder(pair string, orderID int) *CancelOrder
CancelOrder Ref. https://developer.bitopro.com/docs#operation/cancelOrder
func (*AuthAPI) CreateOrderLimitBuy ¶
func (api *AuthAPI) CreateOrderLimitBuy(clientID int, pair, price, amount string) *CreateOrder
CreateOrderLimitBuy Ref. https://developer.bitopro.com/docs#operation/createOrder
func (*AuthAPI) CreateOrderLimitSell ¶
func (api *AuthAPI) CreateOrderLimitSell(clientID int, pair, price, amount string) *CreateOrder
CreateOrderLimitSell Ref. https://developer.bitopro.com/docs#operation/createOrder
func (*AuthAPI) CreateOrderMarketBuy ¶
func (api *AuthAPI) CreateOrderMarketBuy(clientID int, pair, amount string) *CreateOrder
CreateOrderMarketBuy Ref. https://developer.bitopro.com/docs#operation/createOrder
func (*AuthAPI) CreateOrderMarketSell ¶
func (api *AuthAPI) CreateOrderMarketSell(clientID int, pair, amount string) *CreateOrder
CreateOrderMarketSell Ref. https://developer.bitopro.com/docs#operation/createOrder
func (*AuthAPI) GetAccountBalance ¶
GetAccountBalance Ref. https://developer.bitopro.com/docs#operation/getAccountBalance
func (*AuthAPI) GetOrder ¶
GetOrder Ref. https://developer.bitopro.com/docs#operation/getOrderStatus
func (*AuthAPI) GetOrderBook ¶
GetOrderBook Ref. https://developer.bitopro.com/docs#operation/getOrderBookByPair
func (*AuthAPI) GetOrderBookWithLimit ¶ added in v1.1.0
GetOrderBookWithLimit Ref. https://developer.bitopro.com/docs#operation/getOrderBookByPair
func (*AuthAPI) GetOrderHistory ¶
func (api *AuthAPI) GetOrderHistory(pair string, queryParams url.Values) *OrderHistory
GetOrderHistory Ref. https://developer.bitopro.com/docs#operation/getOrderHistory
func (*AuthAPI) GetOrderList ¶
GetOrderList Ref. https://developer.bitopro.com/docs#operation/getOrders
func (*AuthAPI) GetTicker ¶
GetTicker Ref. https://developer.bitopro.com/docs#operation/getTickers
func (*AuthAPI) GetTickers ¶
GetTickers Ref. https://developer.bitopro.com/docs#operation/getTickers
func (*AuthAPI) GetTrades ¶
GetTrades Ref. https://developer.bitopro.com/docs#operation/getPairTrades
type Balance ¶
type Balance struct { Currency string `json:"currency"` Amount string `json:"amount"` Available string `json:"available"` Stake string `json:"stake"` Tradable bool `json:"tradable"` }
Balance struct
type BatchCreateOrders ¶ added in v1.3.0
type BatchCreateOrders struct { Data []struct { OrderID string `json:"orderId,omitempty"` Timestamp int64 `json:"timestamp,omitempty"` Action string `json:"action,omitempty"` Amount string `json:"amount,omitempty"` IsBuy string `json:"isBuy,omitempty"` Price string `json:"price,omitempty"` TimeInForce string `json:"timeInForce,omitempty"` ClientID int `json:"clientId,omitempty"` Type string `json:"type,omitempty"` } `json:"data"` StatusCode }
type CancelAllResp ¶ added in v1.3.2
type CancelOrder ¶
type CancelOrder struct { OrderID string `json:"orderId,omitempty"` Action string `json:"action,omitempty"` Timestamp int64 `json:"timestamp,omitempty"` Price string `json:"price,omitempty"` Amount string `json:"amount,omitempty"` StatusCode }
CancelOrder struct
type CreateOrder ¶
type CreateOrder struct { OrderID string `json:"orderId,omitempty"` Timestamp int64 `json:"timestamp,omitempty"` Action string `json:"action,omitempty"` Amount string `json:"amount,omitempty"` IsBuy string `json:"isBuy,omitempty"` Price string `json:"price,omitempty"` TimeInForce string `json:"timeInForce,omitempty"` ClientID int `json:"clientId,omitempty"` Type string `json:"type,omitempty"` StatusCode }
type OrderBook ¶
type OrderBook struct { Bids []OrderBookInfo `json:"bids"` Asks []OrderBookInfo `json:"asks"` StatusCode }
OrderBook struct
type OrderBookInfo ¶
type OrderBookInfo struct { Amount string `json:"amount"` Price string `json:"price"` Count int `json:"count"` Total string `json:"total"` }
OrderBookInfo struct
type OrderHistory ¶
type OrderHistory struct { Data []OrderInfo `json:"data,omitempty"` StatusCode }
OrderHistory struct
type OrderInfo ¶
type OrderInfo struct { ID string `json:"id"` Pair string `json:"pair"` Price string `json:"price"` AvgExecutionPrice string `json:"avgExecutionPrice,omitempty"` Action string `json:"action,omitempty"` Type string `json:"type,omitempty"` Timestamp int64 `json:"timestamp,omitempty"` Status int `json:"status,omitempty"` CreatedTimestamp int64 `json:"createdTimestamp,omitempty"` UpdatedTimestamp int64 `json:"updatedTimestamp,omitempty"` OriginalAmount string `json:"originalAmount,omitempty"` RemainingAmount string `json:"remainingAmount,omitempty"` ExecutedAmount string `json:"executedAmount,omitempty"` Fee string `json:"fee,omitempty"` FeeSymbol string `json:"feeSymbol,omitempty"` BitoFee string `json:"bitoFee,omitempty"` Total string `json:"total,omitempty"` Seq string `json:"seq,omitempty"` TimeInForce string `json:"timeInForce,omitempty"` Error error StatusCode }
OrderInfo struct
type OrderList ¶
type OrderList struct { Data []OrderInfo `json:"data,omitempty"` Page int `json:"page"` TotalPages int `json:"totalPages"` StatusCode }
OrderList struct
type PubAPI ¶
type PubAPI struct {
// contains filtered or unexported fields
}
PubAPI struct
func (*PubAPI) GetOrderBook ¶
GetOrderBook Ref. https://developer.bitopro.com/docs#operation/getOrderBookByPair
func (*PubAPI) GetOrderBookWithLimit ¶ added in v1.1.0
GetOrderBookWithLimit Ref. https://developer.bitopro.com/docs#operation/getOrderBookByPair
func (*PubAPI) GetTicker ¶
GetTicker Ref. https://developer.bitopro.com/docs#operation/getTickers
func (*PubAPI) GetTickers ¶
GetTickers Ref. https://developer.bitopro.com/docs#operation/getTickers
func (*PubAPI) GetTrades ¶
GetTrades Ref. https://developer.bitopro.com/docs#operation/getPairTrades
type StatusCode ¶
type StatusCode struct { Code interface{} `json:"code,omitempty"` Error string `json:"error,omitempty"` Offset int `json:"Offset,omitempty"` }
StatusCode struct
type Ticker ¶
type Ticker struct { Data TickerInfo `json:"data,omitempty"` StatusCode }
Ticker struct
type TickerInfo ¶
type TickerInfo struct { Pair string `json:"pair"` IsBuyer bool `json:"isBuyer"` High24hr string `json:"high24hr"` Low24hr string `json:"low24hr"` PriceChange24hr string `json:"priceChange24hr"` Volume24hr string `json:"volume24hr"` LastPrice string `json:"lastPrice"` }
TickerInfo struct
type Tickers ¶
type Tickers struct { Data []TickerInfo `json:"data,omitempty"` StatusCode }
Tickers struct