bitopro

package
v1.3.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

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 GetAuthClient

func GetAuthClient(identity, key, secret string) *AuthAPI

GetAuthClient func

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

func (api *AuthAPI) GetAccountBalance() *Account

GetAccountBalance Ref. https://developer.bitopro.com/docs#operation/getAccountBalance

func (*AuthAPI) GetOrder

func (api *AuthAPI) GetOrder(pair string, orderID string) (*OrderInfo, error)

GetOrder Ref. https://developer.bitopro.com/docs#operation/getOrderStatus

func (*AuthAPI) GetOrderBook

func (a *AuthAPI) GetOrderBook(pair string) *OrderBook

GetOrderBook Ref. https://developer.bitopro.com/docs#operation/getOrderBookByPair

func (*AuthAPI) GetOrderBookWithLimit added in v1.1.0

func (a *AuthAPI) GetOrderBookWithLimit(pair string, limit int) *OrderBook

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

func (api *AuthAPI) GetOrderList(pair string, active bool, page uint) *OrderList

GetOrderList Ref. https://developer.bitopro.com/docs#operation/getOrders

func (*AuthAPI) GetTicker

func (a *AuthAPI) GetTicker(pair string) *Ticker

GetTicker Ref. https://developer.bitopro.com/docs#operation/getTickers

func (*AuthAPI) GetTickers

func (a *AuthAPI) GetTickers() *Tickers

GetTickers Ref. https://developer.bitopro.com/docs#operation/getTickers

func (*AuthAPI) GetTrades

func (a *AuthAPI) GetTrades(pair string) *Trade

GetTrades Ref. https://developer.bitopro.com/docs#operation/getPairTrades

func (*AuthAPI) SetProxy added in v1.2.10

func (a *AuthAPI) SetProxy(in string)

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 CancelAllResp struct {
	Data  map[string][]string
	Error string
	Code  int
}

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 OrderData added in v1.3.0

type OrderData struct {
	Pair      string `json:"pair,omitempty"`
	Action    string `json:"action,omitempty"`
	Type      string `json:"type,omitempty"`
	Price     string `json:"price,omitempty"`
	Amount    string `json:"amount,omitempty"`
	Timestamp int64  `json:"timestamp,omitempty"`
}

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 GetPubClient

func GetPubClient() *PubAPI

GetPubClient func

func (*PubAPI) GetOrderBook

func (p *PubAPI) GetOrderBook(pair string) *OrderBook

GetOrderBook Ref. https://developer.bitopro.com/docs#operation/getOrderBookByPair

func (*PubAPI) GetOrderBookWithLimit added in v1.1.0

func (p *PubAPI) GetOrderBookWithLimit(pair string, limit int) *OrderBook

GetOrderBookWithLimit Ref. https://developer.bitopro.com/docs#operation/getOrderBookByPair

func (*PubAPI) GetTicker

func (p *PubAPI) GetTicker(pair string) *Ticker

GetTicker Ref. https://developer.bitopro.com/docs#operation/getTickers

func (*PubAPI) GetTickers

func (p *PubAPI) GetTickers() *Tickers

GetTickers Ref. https://developer.bitopro.com/docs#operation/getTickers

func (*PubAPI) GetTrades

func (p *PubAPI) GetTrades(pair string) *Trade

GetTrades Ref. https://developer.bitopro.com/docs#operation/getPairTrades

func (*PubAPI) SetProxy added in v1.2.10

func (a *PubAPI) SetProxy(in string)

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

type Trade

type Trade struct {
	Data []TradeInfo `json:"data,omitempty"`
	StatusCode
}

Trade struct

type TradeInfo

type TradeInfo struct {
	Amount    string `json:"amount"`
	Price     string `json:"price"`
	Timestamp int64  `json:"timestamp"`
	IsBuyer   bool   `json:"isBuyer"`
}

TradeInfo struct

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL