Documentation ¶
Overview ¶
Package binance is a generated GoMock package.
Index ¶
- func NewAccountQuery() *accountQuery
- func NewCancelOrderRequest(symbol string) *cancelOrderRequest
- func NewCompressedTradesQuery(symbol string) *compressedTradesQuery
- func NewDepthQuery(symbol string) *depthQuery
- func NewGetAllOrdersQuery(symbol string) *getAllOrdersQuery
- func NewGetOpenOrdersQuery(symbol string) *getOpenOrdersQuery
- func NewGetOrderQuery(symbol string) *getOrderQuery
- func NewKLinesQuery(symbol string, interval Interval) *kLinesQuery
- func NewMyTradesQuery(symbol string) *myTradesQuery
- func NewOrderRequest(symbol string, side string, orderType string, quantity float64) *newOrderRequest
- func NewSymbolOrderBookTickerQuery(symbol string) *symbolOrderBookTickerQuery
- func NewSymbolPriceTickerQuery(symbol string) *symbolPriceTickerQuery
- func NewTradesQuery(symbol string) *tradesQuery
- type Account
- type AccountTrade
- type Balance
- type CancelledOrder
- type Client
- type Clock
- type CompressedTrade
- type Depth
- type DepthOrder
- type ExchangeInfo
- type Filter
- type FullOrder
- type Interval
- type KLine
- type MockClient
- type MockClientMockRecorder
- type MockClock
- type MockClockMockRecorder
- type Order
- type OrderBookTicker
- type OrderFill
- type RateLimits
- type Sdk
- func (sdk Sdk) Account(query *accountQuery) (*Account, error)
- func (sdk Sdk) AllSymbolOrderBookTickers() ([]OrderBookTicker, error)
- func (sdk Sdk) AllSymbolPriceTickers() ([]SymbolPrice, error)
- func (sdk Sdk) CancelOrder(request *cancelOrderRequest) (*CancelledOrder, error)
- func (sdk *Sdk) CompressedTrades(query *compressedTradesQuery) ([]CompressedTrade, error)
- func (sdk Sdk) Depth(query *depthQuery) (*Depth, error)
- func (sdk Sdk) ExchangeInfo() (*ExchangeInfo, error)
- func (sdk Sdk) GetAllOrders(query *getAllOrdersQuery) ([]Order, error)
- func (sdk Sdk) GetOpenOrders(query *getOpenOrdersQuery) ([]Order, error)
- func (sdk Sdk) GetOrder(query *getOrderQuery) (*Order, error)
- func (sdk *Sdk) KLines(query *kLinesQuery) ([]KLine, error)
- func (sdk Sdk) MyTrades(query *myTradesQuery) ([]AccountTrade, error)
- func (sdk Sdk) NewOrder(request *newOrderRequest) (*FullOrder, error)
- func (sdk Sdk) SymbolOrderBookTicker(query *symbolOrderBookTickerQuery) (*OrderBookTicker, error)
- func (sdk Sdk) SymbolPriceTicker(query *symbolPriceTickerQuery) (*SymbolPrice, error)
- func (sdk *Sdk) Trades(query *tradesQuery) ([]Trade, error)
- type Symbol
- type SymbolPrice
- type Trade
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAccountQuery ¶
func NewAccountQuery() *accountQuery
func NewCancelOrderRequest ¶
func NewCancelOrderRequest(symbol string) *cancelOrderRequest
func NewCompressedTradesQuery ¶
func NewCompressedTradesQuery(symbol string) *compressedTradesQuery
Returns the required query for the Trades endpoint.
func NewDepthQuery ¶
func NewDepthQuery(symbol string) *depthQuery
Returns the required query for the Depth endpoint.
func NewGetAllOrdersQuery ¶
func NewGetAllOrdersQuery(symbol string) *getAllOrdersQuery
func NewGetOpenOrdersQuery ¶
func NewGetOpenOrdersQuery(symbol string) *getOpenOrdersQuery
func NewGetOrderQuery ¶
func NewGetOrderQuery(symbol string) *getOrderQuery
func NewKLinesQuery ¶
func NewMyTradesQuery ¶
func NewMyTradesQuery(symbol string) *myTradesQuery
func NewOrderRequest ¶
func NewSymbolOrderBookTickerQuery ¶
func NewSymbolOrderBookTickerQuery(symbol string) *symbolOrderBookTickerQuery
func NewSymbolPriceTickerQuery ¶
func NewSymbolPriceTickerQuery(symbol string) *symbolPriceTickerQuery
Required query for SymbolPriceTicker.
func NewTradesQuery ¶
func NewTradesQuery(symbol string) *tradesQuery
Returns the required query for the Trades endpoint.
Types ¶
type AccountTrade ¶
type AccountTrade struct { Id int64 `json:"id"` OrderId int64 `json:"orderId"` Price float64 `json:"price,string"` Quantity float64 `json:"qty,string"` Commission float64 `json:"commission,string"` CommissionAsset string `json:"commissionAsset"` Time int64 `json:"time"` IsBuyer bool `json:"isBuyer"` IsMaker bool `json:"isMaker"` IsBestMatch bool `json:"isBestMatch"` }
type CancelledOrder ¶
type CompressedTrade ¶
type Depth ¶
type Depth struct { LastUpdateId int Bids []DepthOrder Asks []DepthOrder }
type DepthOrder ¶
type ExchangeInfo ¶
type Filter ¶
type Filter struct { FilterType string MinPrice float64 `json:",omitempty,string"` MaxPrice float64 `json:",omitempty,string"` TickSize float64 `json:",omitempty,string"` MinQuantity float64 `json:"minQty,omitempty,string"` MaxQuantity float64 `json:"maxQty,omitempty,string"` StepSize float64 `json:",omitempty,string"` MinNotional float64 `json:",omitempty,string"` }
type FullOrder ¶
type FullOrder struct { Symbol string `json:"symbol"` OrderId int `json:"orderId"` ClientOrderId string `json:"clientOrderId"` TransactionTime int `json:"transactTime"` Price float64 `json:"price,string"` OriginalQuantity float64 `json:"origQty,string"` ExecutedQuantity float64 `json:"executedQty,string"` Status string `json:"status"` TimeInForce string `json:"timeInForce"` Type string `json:"type"` Side string `json:"side"` Fills []OrderFill `json:"fills"` }
type Interval ¶
type Interval string
const ( Interval1m Interval = "1m" Interval3m Interval = "3m" Interval5m Interval = "5m" Interval15m Interval = "15m" Interval30m Interval = "30m" Interval1h Interval = "1h" Interval2h Interval = "2h" Interval4h Interval = "4h" Interval8h Interval = "8h" Interval12h Interval = "12h" Interval1d Interval = "1d" Interval3d Interval = "3d" Interval1w Interval = "1w" Interval1M Interval = "1M" )
type MockClient ¶
type MockClient struct {
// contains filtered or unexported fields
}
MockClient is a mock of Client interface
func NewMockClient ¶
func NewMockClient(ctrl *gomock.Controller) *MockClient
NewMockClient creates a new mock instance
func (*MockClient) Do ¶
func (m *MockClient) Do(request *request) ([]byte, error)
Do mocks base method
func (*MockClient) EXPECT ¶
func (m *MockClient) EXPECT() *MockClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockClientMockRecorder ¶
type MockClientMockRecorder struct {
// contains filtered or unexported fields
}
MockClientMockRecorder is the mock recorder for MockClient
func (*MockClientMockRecorder) Do ¶
func (mr *MockClientMockRecorder) Do(request interface{}) *gomock.Call
Do indicates an expected call of Do
type MockClock ¶
type MockClock struct {
// contains filtered or unexported fields
}
MockClock is a mock of Clock interface
func NewMockClock ¶
func NewMockClock(ctrl *gomock.Controller) *MockClock
NewMockClock creates a new mock instance
func (*MockClock) EXPECT ¶
func (m *MockClock) EXPECT() *MockClockMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockClockMockRecorder ¶
type MockClockMockRecorder struct {
// contains filtered or unexported fields
}
MockClockMockRecorder is the mock recorder for MockClock
func (*MockClockMockRecorder) Now ¶
func (mr *MockClockMockRecorder) Now() *gomock.Call
Now indicates an expected call of Now
type Order ¶
type Order struct { Symbol string `json:"symbol"` OrderId int64 `json:"orderId"` ClientOrderId string `json:"clientOrderId"` Price float64 `json:"price,string"` OriginalQuantity float64 `json:"origQty,string"` ExecutedQuantity float64 `json:"executedQty,string"` Status string `json:"status"` TimeInForce string `json:"timeInForce"` Type string `json:"type"` Side string `json:"side"` StopPrice float64 `json:"stopPrice,string"` IcebergQuantity float64 `json:"icebergQty,string"` Time int64 `json:"time"` IsWorking bool `json:"isWorking"` }
type OrderBookTicker ¶
type RateLimits ¶
type Sdk ¶
type Sdk struct {
// contains filtered or unexported fields
}
func (Sdk) AllSymbolOrderBookTickers ¶
func (sdk Sdk) AllSymbolOrderBookTickers() ([]OrderBookTicker, error)
func (Sdk) AllSymbolPriceTickers ¶
func (sdk Sdk) AllSymbolPriceTickers() ([]SymbolPrice, error)
Latest price for all symbols.
func (Sdk) CancelOrder ¶
func (sdk Sdk) CancelOrder(request *cancelOrderRequest) (*CancelledOrder, error)
func (*Sdk) CompressedTrades ¶
func (sdk *Sdk) CompressedTrades(query *compressedTradesQuery) ([]CompressedTrade, error)
func (Sdk) Depth ¶
Market depth for a specific symbol. An example of a symbol is "ETHBTC"
The query is optional and it specifies the depth limit. Accepted values for the limit: [5, 10, 20, 50, 100 (default), 500, 1000]
Caution: setting limit=0 can return a lot of data.
func (Sdk) ExchangeInfo ¶
func (sdk Sdk) ExchangeInfo() (*ExchangeInfo, error)
func (Sdk) GetAllOrders ¶
func (Sdk) GetOpenOrders ¶
func (Sdk) MyTrades ¶
func (sdk Sdk) MyTrades(query *myTradesQuery) ([]AccountTrade, error)
func (Sdk) SymbolOrderBookTicker ¶
func (sdk Sdk) SymbolOrderBookTicker(query *symbolOrderBookTickerQuery) (*OrderBookTicker, error)
func (Sdk) SymbolPriceTicker ¶
func (sdk Sdk) SymbolPriceTicker(query *symbolPriceTickerQuery) (*SymbolPrice, error)
Latest price for a symbol.
type SymbolPrice ¶
Symbol price ticker data transfer object (DTO)