Documentation
¶
Index ¶
- Constants
- type AccountInfo
- type AccountPosition
- type AccountResponse
- type BalanceUpdate
- type BaseResponse
- type Binance
- func (bn *Binance) CancelOrder(orderId string, currencyPair CurrencyPair) (bool, error)
- func (bn *Binance) GetAccount() (*Account, error)
- func (bn *Binance) GetDepth(size int, currencyPair CurrencyPair) (*Depth, error)
- func (bn *Binance) GetExchangeInfo() (*ExchangeInfo, error)
- func (bn *Binance) GetExchangeName() string
- func (bn *Binance) GetKlineRecords(currency CurrencyPair, period KlinePeriod, size int, ...) ([]Kline, error)
- func (bn *Binance) GetListenKey() (string, error)
- func (bn *Binance) GetOneOrder(orderId string, currencyPair CurrencyPair) (*Order, error)
- func (bn *Binance) GetOrderHistorys(currency CurrencyPair, optional ...OptionalParameter) ([]Order, error)
- func (bn *Binance) GetTicker(currency CurrencyPair) (*Ticker, error)
- func (bn *Binance) GetTradeSymbol(currencyPair CurrencyPair) (*TradeSymbol, error)
- func (bn *Binance) GetTrades(currencyPair CurrencyPair, since int64) ([]Trade, error)
- func (bn *Binance) GetUnfinishOrders(currencyPair CurrencyPair) ([]Order, error)
- func (bn *Binance) KeepAliveListenKey(listenKey string) error
- func (bn *Binance) LimitBuy(amount, price string, currencyPair CurrencyPair, ...) (*Order, error)
- func (bn *Binance) LimitSell(amount, price string, currencyPair CurrencyPair, ...) (*Order, error)
- func (bn *Binance) MarketBuy(amount, price string, currencyPair CurrencyPair) (*Order, error)
- func (bn *Binance) MarketSell(amount, price string, currencyPair CurrencyPair) (*Order, error)
- func (bn *Binance) Ping() bool
- type BinanceFutures
- func (bs *BinanceFutures) FutureCancelOrder(currencyPair CurrencyPair, contractType, orderId string) (bool, error)
- func (bs *BinanceFutures) GetContractValue(currencyPair CurrencyPair) (float64, error)
- func (bs *BinanceFutures) GetDeliveryTime() (int, int, int, int)
- func (bs *BinanceFutures) GetExchangeInfo()
- func (bs *BinanceFutures) GetExchangeName() string
- func (bs *BinanceFutures) GetFee() (float64, error)
- func (bs *BinanceFutures) GetFutureDepth(currencyPair CurrencyPair, contractType string, size int) (*Depth, error)
- func (bs *BinanceFutures) GetFutureEstimatedPrice(currencyPair CurrencyPair) (float64, error)
- func (bs *BinanceFutures) GetFutureIndex(currencyPair CurrencyPair) (float64, error)
- func (bs *BinanceFutures) GetFutureOrder(orderId string, currencyPair CurrencyPair, contractType string) (*FutureOrder, error)
- func (bs *BinanceFutures) GetFutureOrderHistory(pair CurrencyPair, contractType string, optional ...OptionalParameter) ([]FutureOrder, error)
- func (bs *BinanceFutures) GetFutureOrders(orderIds []string, currencyPair CurrencyPair, contractType string) ([]FutureOrder, error)
- func (bs *BinanceFutures) GetFuturePosition(currencyPair CurrencyPair, contractType string) ([]FuturePosition, error)
- func (bs *BinanceFutures) GetFutureTicker(currencyPair CurrencyPair, contractType string) (*Ticker, error)
- func (bs *BinanceFutures) GetFutureUserinfo(currencyPair ...CurrencyPair) (*FutureAccount, error)
- func (bs *BinanceFutures) GetKlineRecords(contractType string, currency CurrencyPair, period KlinePeriod, size int, ...) ([]FutureKline, error)
- func (bs *BinanceFutures) GetTrades(contractType string, currencyPair CurrencyPair, since int64) ([]Trade, error)
- func (bs *BinanceFutures) GetUnfinishFutureOrders(currencyPair CurrencyPair, contractType string) ([]FutureOrder, error)
- func (bs *BinanceFutures) LimitFuturesOrder(currencyPair CurrencyPair, contractType, price, amount string, openType int, ...) (*FutureOrder, error)
- func (bs *BinanceFutures) MarketFuturesOrder(currencyPair CurrencyPair, contractType, amount string, openType int) (*FutureOrder, error)
- func (bs *BinanceFutures) PlaceFutureOrder(currencyPair CurrencyPair, contractType, price, amount string, ...) (string, error)
- func (bs *BinanceFutures) SetBaseUri(uri string)
- type BinanceSwap
- func (bs *BinanceSwap) FutureCancelAllOrders(currencyPair CurrencyPair, contractType string) (bool, error)
- func (bs *BinanceSwap) FutureCancelOrder(currencyPair CurrencyPair, contractType, orderId string) (bool, error)
- func (bs *BinanceSwap) FutureCancelOrders(currencyPair CurrencyPair, contractType string, orderIdList []string) (bool, error)
- func (bs *BinanceSwap) GetContractValue(currencyPair CurrencyPair) (float64, error)
- func (bs *BinanceSwap) GetDeliveryTime() (int, int, int, int)
- func (bs *BinanceSwap) GetExchangeName() string
- func (bs *BinanceSwap) GetFee() (float64, error)
- func (bs *BinanceSwap) GetFutureDepth(currency CurrencyPair, contractType string, size int) (*Depth, error)
- func (bs *BinanceSwap) GetFutureEstimatedPrice(currencyPair CurrencyPair) (float64, error)
- func (bs *BinanceSwap) GetFutureIndex(currencyPair CurrencyPair) (float64, error)
- func (bs *BinanceSwap) GetFutureOrder(orderId string, currencyPair CurrencyPair, contractType string) (*FutureOrder, error)
- func (bs *BinanceSwap) GetFutureOrderHistory(pair CurrencyPair, contractType string, optional ...OptionalParameter) ([]FutureOrder, error)
- func (bs *BinanceSwap) GetFutureOrders(orderIds []string, currencyPair CurrencyPair, contractType string) ([]FutureOrder, error)
- func (bs *BinanceSwap) GetFuturePosition(currencyPair CurrencyPair, contractType string) ([]FuturePosition, error)
- func (bs *BinanceSwap) GetFutureTicker(currency CurrencyPair, contractType string) (*Ticker, error)
- func (bs *BinanceSwap) GetFutureUserinfo(currencyPair ...CurrencyPair) (*FutureAccount, error)
- func (bs *BinanceSwap) GetKlineRecords(contractType string, currency CurrencyPair, period KlinePeriod, size int, ...) ([]FutureKline, error)
- func (bs *BinanceSwap) GetServerTime() (int64, error)
- func (bs *BinanceSwap) GetTrades(contractType string, currencyPair CurrencyPair, since int64) ([]Trade, error)
- func (bs *BinanceSwap) GetUnfinishFutureOrders(currencyPair CurrencyPair, contractType string) ([]FutureOrder, error)
- func (bs *BinanceSwap) LimitFuturesOrder(currencyPair CurrencyPair, contractType, price, amount string, openType int, ...) (*FutureOrder, error)
- func (bs *BinanceSwap) MarketFuturesOrder(currencyPair CurrencyPair, contractType, amount string, openType int) (*FutureOrder, error)
- func (bs *BinanceSwap) Ping() bool
- func (bs *BinanceSwap) PlaceFutureOrder(currencyPair CurrencyPair, contractType, price, amount string, ...) (string, error)
- func (bs *BinanceSwap) PlaceFutureOrder2(currencyPair CurrencyPair, contractType, price, amount string, ...) (*FutureOrder, error)
- func (bs *BinanceSwap) SetBaseUri(uri string)
- func (bs *BinanceSwap) Transfer(currency Currency, transferType int, amount float64) (int64, error)
- type ExchangeInfo
- type Filter
- type FuturesWs
- func (s *FuturesWs) DepthCallback(f func(depth *goex.Depth))
- func (s *FuturesWs) SubscribeDepth(pair goex.CurrencyPair, contractType string) error
- func (s *FuturesWs) SubscribeTicker(pair goex.CurrencyPair, contractType string) error
- func (s *FuturesWs) SubscribeTrade(pair goex.CurrencyPair, contractType string) error
- func (s *FuturesWs) TickerCallback(f func(ticker *goex.FutureTicker))
- func (s *FuturesWs) TradeCallback(f func(trade *goex.Trade, contract string))
- type ListStatus
- type OrderInfoResponse
- type OrderUpdate
- type PositionRiskResponse
- type RateLimit
- type SpotWs
- func (s *SpotWs) DepthCallback(f func(depth *goex.Depth))
- func (s *SpotWs) OrderCallback(f func(order *goex.Order))
- func (s *SpotWs) SubscribeDepth(pair goex.CurrencyPair) error
- func (s *SpotWs) SubscribeTicker(pair goex.CurrencyPair) error
- func (s *SpotWs) SubscribeTrade(pair goex.CurrencyPair) error
- func (s *SpotWs) TickerCallback(f func(ticker *goex.Ticker))
- func (s *SpotWs) TradeCallback(f func(trade *goex.Trade))
- type SymbolInfo
- type TradeSymbol
- type UserDataWs
- func (s *UserDataWs) AccountInfoCallback(f func(accountInfo *AccountInfo))
- func (s *UserDataWs) AccountPositionCallback(f func(accountPosition *AccountPosition))
- func (s *UserDataWs) BalanceUpdateCallback(f func(balanceUpdate *BalanceUpdate))
- func (s *UserDataWs) ListStatusCallback(f func(listStatus *ListStatus))
- func (s *UserDataWs) OrderUpdateCallback(f func(orderUpdateorder *OrderUpdate))
- type Wallet
- func (w *Wallet) GetAccount() (*Account, error)
- func (w *Wallet) GetDepositHistory(currency *Currency) ([]DepositWithdrawHistory, error)
- func (w *Wallet) GetWithDrawHistory(currency *Currency) ([]DepositWithdrawHistory, error)
- func (w *Wallet) Transfer(param TransferParameter) error
- func (w *Wallet) Withdrawal(param WithdrawParameter) (withdrawId string, err error)
Constants ¶
View Source
const ( GLOBAL_API_BASE_URL = "https://api.binance.com" US_API_BASE_URL = "https://api.binance.us" JE_API_BASE_URL = "https://api.binance.je" TICKER_URI = "ticker/24hr?symbol=%s" TICKERS_URI = "ticker/allBookTickers" DEPTH_URI = "depth?symbol=%s&limit=%d" ACCOUNT_URI = "account?" ORDER_URI = "order" UNFINISHED_ORDERS_INFO = "openOrders?" KLINE_URI = "klines" SERVER_TIME_URL = "time" USER_DATA_STREAM_URI = "userDataStream" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountInfo ¶
type AccountInfo struct { Stream string `json:"stream"` Data struct { CanDeposit bool `json:"D"` CanTrade bool `json:"T"` CanWithdraw bool `json:"W"` EventTime int64 `json:"E"` LastUpdated int64 `json:"u"` BuyerCommission float64 `json:"b"` MakerCommission float64 `json:"m"` SellerCommission float64 `json:"s"` TakerCommission float64 `json:"t"` EventType string `json:"e"` Currencies []struct { Asset string `json:"a"` Available float64 `json:"f,string"` Locked float64 `json:"l,string"` } `json:"B"` } `json:"data"` }
type AccountPosition ¶
type AccountPosition struct { Stream string `json:"stream"` Data struct { Currencies []struct { Asset string `json:"a"` Available float64 `json:"f,string"` Locked float64 `json:"l,string"` } `json:"B"` EventTime int64 `json:"E"` LastUpdated int64 `json:"u"` EventType string `json:"e"` } `json:"data"` }
type AccountResponse ¶
type AccountResponse struct { FeeTier int `json:"feeTier"` CanTrade bool `json:"canTrade"` Assets []struct { Asset string `json:"asset"` WalletBalance float64 `json:"walletBalance,string"` MarginBalance float64 `json:"marginBalance,string"` UnrealizedProfit float64 `json:"unrealizedProfit,string"` MaintMargin float64 `json:"maintMargin,string"` } `json:"assets"` }
type BalanceUpdate ¶
type BaseResponse ¶
type Binance ¶
type Binance struct { *ExchangeInfo // contains filtered or unexported fields }
func NewWithConfig ¶
func NewWithConfig(config *APIConfig) *Binance
func (*Binance) CancelOrder ¶
func (*Binance) GetAccount ¶
func (*Binance) GetExchangeInfo ¶
func (bn *Binance) GetExchangeInfo() (*ExchangeInfo, error)
func (*Binance) GetExchangeName ¶
func (*Binance) GetKlineRecords ¶
func (*Binance) GetListenKey ¶
func (*Binance) GetOneOrder ¶
func (*Binance) GetOrderHistorys ¶
func (*Binance) GetTradeSymbol ¶
func (bn *Binance) GetTradeSymbol(currencyPair CurrencyPair) (*TradeSymbol, error)
func (*Binance) GetUnfinishOrders ¶
func (*Binance) KeepAliveListenKey ¶
func (*Binance) MarketSell ¶
type BinanceFutures ¶
type BinanceFutures struct {
// contains filtered or unexported fields
}
func NewBinanceFutures ¶
func NewBinanceFutures(config *APIConfig) *BinanceFutures
func (*BinanceFutures) FutureCancelOrder ¶
func (bs *BinanceFutures) FutureCancelOrder(currencyPair CurrencyPair, contractType, orderId string) (bool, error)
func (*BinanceFutures) GetContractValue ¶
func (bs *BinanceFutures) GetContractValue(currencyPair CurrencyPair) (float64, error)
func (*BinanceFutures) GetDeliveryTime ¶
func (bs *BinanceFutures) GetDeliveryTime() (int, int, int, int)
func (*BinanceFutures) GetExchangeInfo ¶
func (bs *BinanceFutures) GetExchangeInfo()
func (*BinanceFutures) GetExchangeName ¶
func (bs *BinanceFutures) GetExchangeName() string
func (*BinanceFutures) GetFee ¶
func (bs *BinanceFutures) GetFee() (float64, error)
func (*BinanceFutures) GetFutureDepth ¶
func (bs *BinanceFutures) GetFutureDepth(currencyPair CurrencyPair, contractType string, size int) (*Depth, error)
func (*BinanceFutures) GetFutureEstimatedPrice ¶
func (bs *BinanceFutures) GetFutureEstimatedPrice(currencyPair CurrencyPair) (float64, error)
func (*BinanceFutures) GetFutureIndex ¶
func (bs *BinanceFutures) GetFutureIndex(currencyPair CurrencyPair) (float64, error)
func (*BinanceFutures) GetFutureOrder ¶
func (bs *BinanceFutures) GetFutureOrder(orderId string, currencyPair CurrencyPair, contractType string) (*FutureOrder, error)
func (*BinanceFutures) GetFutureOrderHistory ¶
func (bs *BinanceFutures) GetFutureOrderHistory(pair CurrencyPair, contractType string, optional ...OptionalParameter) ([]FutureOrder, error)
func (*BinanceFutures) GetFutureOrders ¶
func (bs *BinanceFutures) GetFutureOrders(orderIds []string, currencyPair CurrencyPair, contractType string) ([]FutureOrder, error)
func (*BinanceFutures) GetFuturePosition ¶
func (bs *BinanceFutures) GetFuturePosition(currencyPair CurrencyPair, contractType string) ([]FuturePosition, error)
func (*BinanceFutures) GetFutureTicker ¶
func (bs *BinanceFutures) GetFutureTicker(currencyPair CurrencyPair, contractType string) (*Ticker, error)
func (*BinanceFutures) GetFutureUserinfo ¶
func (bs *BinanceFutures) GetFutureUserinfo(currencyPair ...CurrencyPair) (*FutureAccount, error)
func (*BinanceFutures) GetKlineRecords ¶
func (bs *BinanceFutures) GetKlineRecords(contractType string, currency CurrencyPair, period KlinePeriod, size int, opt ...OptionalParameter) ([]FutureKline, error)
func (*BinanceFutures) GetTrades ¶
func (bs *BinanceFutures) GetTrades(contractType string, currencyPair CurrencyPair, since int64) ([]Trade, error)
func (*BinanceFutures) GetUnfinishFutureOrders ¶
func (bs *BinanceFutures) GetUnfinishFutureOrders(currencyPair CurrencyPair, contractType string) ([]FutureOrder, error)
func (*BinanceFutures) LimitFuturesOrder ¶
func (bs *BinanceFutures) LimitFuturesOrder(currencyPair CurrencyPair, contractType, price, amount string, openType int, opt ...LimitOrderOptionalParameter) (*FutureOrder, error)
func (*BinanceFutures) MarketFuturesOrder ¶
func (bs *BinanceFutures) MarketFuturesOrder(currencyPair CurrencyPair, contractType, amount string, openType int) (*FutureOrder, error)
func (*BinanceFutures) PlaceFutureOrder ¶
func (*BinanceFutures) SetBaseUri ¶
func (bs *BinanceFutures) SetBaseUri(uri string)
type BinanceSwap ¶
type BinanceSwap struct { Binance // contains filtered or unexported fields }
func NewBinanceSwap ¶
func NewBinanceSwap(config *APIConfig) *BinanceSwap
func (*BinanceSwap) FutureCancelAllOrders ¶
func (bs *BinanceSwap) FutureCancelAllOrders(currencyPair CurrencyPair, contractType string) (bool, error)
func (*BinanceSwap) FutureCancelOrder ¶
func (bs *BinanceSwap) FutureCancelOrder(currencyPair CurrencyPair, contractType, orderId string) (bool, error)
func (*BinanceSwap) FutureCancelOrders ¶
func (bs *BinanceSwap) FutureCancelOrders(currencyPair CurrencyPair, contractType string, orderIdList []string) (bool, error)
func (*BinanceSwap) GetContractValue ¶
func (bs *BinanceSwap) GetContractValue(currencyPair CurrencyPair) (float64, error)
func (*BinanceSwap) GetDeliveryTime ¶
func (bs *BinanceSwap) GetDeliveryTime() (int, int, int, int)
func (*BinanceSwap) GetExchangeName ¶
func (bs *BinanceSwap) GetExchangeName() string
func (*BinanceSwap) GetFee ¶
func (bs *BinanceSwap) GetFee() (float64, error)
func (*BinanceSwap) GetFutureDepth ¶
func (bs *BinanceSwap) GetFutureDepth(currency CurrencyPair, contractType string, size int) (*Depth, error)
func (*BinanceSwap) GetFutureEstimatedPrice ¶
func (bs *BinanceSwap) GetFutureEstimatedPrice(currencyPair CurrencyPair) (float64, error)
func (*BinanceSwap) GetFutureIndex ¶
func (bs *BinanceSwap) GetFutureIndex(currencyPair CurrencyPair) (float64, error)
func (*BinanceSwap) GetFutureOrder ¶
func (bs *BinanceSwap) GetFutureOrder(orderId string, currencyPair CurrencyPair, contractType string) (*FutureOrder, error)
func (*BinanceSwap) GetFutureOrderHistory ¶
func (bs *BinanceSwap) GetFutureOrderHistory(pair CurrencyPair, contractType string, optional ...OptionalParameter) ([]FutureOrder, error)
func (*BinanceSwap) GetFutureOrders ¶
func (bs *BinanceSwap) GetFutureOrders(orderIds []string, currencyPair CurrencyPair, contractType string) ([]FutureOrder, error)
func (*BinanceSwap) GetFuturePosition ¶
func (bs *BinanceSwap) GetFuturePosition(currencyPair CurrencyPair, contractType string) ([]FuturePosition, error)
func (*BinanceSwap) GetFutureTicker ¶
func (bs *BinanceSwap) GetFutureTicker(currency CurrencyPair, contractType string) (*Ticker, error)
func (*BinanceSwap) GetFutureUserinfo ¶
func (bs *BinanceSwap) GetFutureUserinfo(currencyPair ...CurrencyPair) (*FutureAccount, error)
func (*BinanceSwap) GetKlineRecords ¶
func (bs *BinanceSwap) GetKlineRecords(contractType string, currency CurrencyPair, period KlinePeriod, size int, opt ...OptionalParameter) ([]FutureKline, error)
func (*BinanceSwap) GetServerTime ¶
func (bs *BinanceSwap) GetServerTime() (int64, error)
func (*BinanceSwap) GetTrades ¶
func (bs *BinanceSwap) GetTrades(contractType string, currencyPair CurrencyPair, since int64) ([]Trade, error)
func (*BinanceSwap) GetUnfinishFutureOrders ¶
func (bs *BinanceSwap) GetUnfinishFutureOrders(currencyPair CurrencyPair, contractType string) ([]FutureOrder, error)
func (*BinanceSwap) LimitFuturesOrder ¶
func (bs *BinanceSwap) LimitFuturesOrder(currencyPair CurrencyPair, contractType, price, amount string, openType int, opt ...LimitOrderOptionalParameter) (*FutureOrder, error)
func (*BinanceSwap) MarketFuturesOrder ¶
func (bs *BinanceSwap) MarketFuturesOrder(currencyPair CurrencyPair, contractType, amount string, openType int) (*FutureOrder, error)
func (*BinanceSwap) Ping ¶
func (bs *BinanceSwap) Ping() bool
func (*BinanceSwap) PlaceFutureOrder ¶
func (*BinanceSwap) PlaceFutureOrder2 ¶
func (bs *BinanceSwap) PlaceFutureOrder2(currencyPair CurrencyPair, contractType, price, amount string, openType, matchPrice int, leverRate float64) (*FutureOrder, error)
func (*BinanceSwap) SetBaseUri ¶
func (bs *BinanceSwap) SetBaseUri(uri string)
type ExchangeInfo ¶
type ExchangeInfo struct { Timezone string `json:"timezone"` ServerTime int `json:"serverTime"` ExchangeFilters []interface{} `json:"exchangeFilters,omitempty"` RateLimits []RateLimit `json:"rateLimits"` Symbols []TradeSymbol `json:"symbols"` }
type Filter ¶
type Filter struct { FilterType string `json:"filterType"` MaxPrice float64 `json:"maxPrice,string"` MinPrice float64 `json:"minPrice,string"` TickSize float64 `json:"tickSize,string"` MultiplierUp float64 `json:"multiplierUp,string"` MultiplierDown float64 `json:"multiplierDown,string"` AvgPriceMins int `json:"avgPriceMins"` MinQty float64 `json:"minQty,string"` MaxQty float64 `json:"maxQty,string"` StepSize float64 `json:"stepSize,string"` MinNotional float64 `json:"minNotional,string"` ApplyToMarket bool `json:"applyToMarket"` Limit int `json:"limit"` MaxNumAlgoOrders int `json:"maxNumAlgoOrders"` MaxNumIcebergOrders int `json:"maxNumIcebergOrders"` MaxNumOrders int `json:"maxNumOrders"` }
type FuturesWs ¶
type FuturesWs struct {
// contains filtered or unexported fields
}
func NewFuturesWs ¶
func NewFuturesWs() *FuturesWs
func (*FuturesWs) DepthCallback ¶
func (s *FuturesWs) DepthCallback(f func(depth *goex.Depth))
func (*FuturesWs) SubscribeDepth ¶
func (*FuturesWs) SubscribeTicker ¶
func (*FuturesWs) SubscribeTrade ¶
func (*FuturesWs) TickerCallback ¶
func (s *FuturesWs) TickerCallback(f func(ticker *goex.FutureTicker))
func (*FuturesWs) TradeCallback ¶
type ListStatus ¶
type ListStatus struct { Stream string `json:"stream"` Data struct { ListClientOrderID string `json:"C"` EventTime int64 `json:"E"` ListOrderStatus string `json:"L"` Orders []struct { ClientOrderID string `json:"c"` OrderID int64 `json:"i"` Symbol string `json:"s"` } `json:"O"` TransactionTime int64 `json:"T"` ContingencyType string `json:"c"` EventType string `json:"e"` OrderListID int64 `json:"g"` ListStatusType string `json:"l"` RejectionReason string `json:"r"` Symbol string `json:"s"` } `json:"data"` }
type OrderInfoResponse ¶
type OrderInfoResponse struct { BaseResponse Symbol string `json:"symbol"` Pair string `json:"pair"` ClientOrderId string `json:"clientOrderId"` OrderId int64 `json:"orderId"` AvgPrice float64 `json:"avgPrice,string"` ExecutedQty float64 `json:"executedQty,string"` OrigQty float64 `json:"origQty,string"` Price float64 `json:"price,string"` Side string `json:"side"` PositionSide string `json:"positionSide"` Status string `json:"status"` Type string `json:"type"` Time int64 `json:"time"` UpdateTime int64 `json:"updateTime"` }
type OrderUpdate ¶
type OrderUpdate struct { Stream string `json:"stream"` Data struct { ClientOrderID string `json:"C"` EventTime int64 `json:"E"` IcebergQuantity float64 `json:"F,string"` LastExecutedPrice float64 `json:"L,string"` CommissionAsset string `json:"N"` OrderCreationTime int64 `json:"O"` StopPrice float64 `json:"P,string"` QuoteOrderQuantity float64 `json:"Q,string"` Side string `json:"S"` TransactionTime int64 `json:"T"` OrderStatus string `json:"X"` LastQuoteAssetTransactedQuantity float64 `json:"Y,string"` CumulativeQuoteTransactedQuantity float64 `json:"Z,string"` CancelledClientOrderID string `json:"c"` EventType string `json:"e"` TimeInForce string `json:"f"` OrderListID int64 `json:"g"` OrderID int64 `json:"i"` LastExecutedQuantity float64 `json:"l,string"` IsMaker bool `json:"m"` Commission float64 `json:"n,string"` OrderType string `json:"o"` Price float64 `json:"p,string"` Quantity float64 `json:"q,string"` RejectionReason string `json:"r"` Symbol string `json:"s"` TradeID int64 `json:"t"` IsOnOrderBook bool `json:"w"` CurrentExecutionType string `json:"x"` CumulativeFilledQuantity float64 `json:"z,string"` } `json:"data"` }
type PositionRiskResponse ¶
type PositionRiskResponse struct { Symbol string `json:"symbol"` PositionAmt float64 `json:"positionAmt,string"` EntryPrice float64 `json:"entryPrice,string"` UnRealizedProfit float64 `json:"unRealizedProfit,string"` LiquidationPrice float64 `json:"liquidationPrice,string"` Leverage float64 `json:"leverage,string"` MarginType string `json:"marginType"` PositionSide string `json:"positionSide"` }
type SpotWs ¶
type SpotWs struct {
// contains filtered or unexported fields
}
func (*SpotWs) DepthCallback ¶
func (s *SpotWs) DepthCallback(f func(depth *goex.Depth))
func (*SpotWs) OrderCallback ¶
func (s *SpotWs) OrderCallback(f func(order *goex.Order))
func (*SpotWs) SubscribeDepth ¶
func (*SpotWs) SubscribeTicker ¶
func (*SpotWs) SubscribeTrade ¶
func (*SpotWs) TickerCallback ¶
func (s *SpotWs) TickerCallback(f func(ticker *goex.Ticker))
func (*SpotWs) TradeCallback ¶
func (s *SpotWs) TradeCallback(f func(trade *goex.Trade))
type SymbolInfo ¶
type TradeSymbol ¶
type TradeSymbol struct { Symbol string `json:"symbol"` Status string `json:"status"` BaseAsset string `json:"baseAsset"` BaseAssetPrecision int `json:"baseAssetPrecision"` QuoteAsset string `json:"quoteAsset"` QuotePrecision int `json:"quotePrecision"` BaseCommissionPrecision int `json:"baseCommissionPrecision"` QuoteCommissionPrecision int `json:"quoteCommissionPrecision"` Filters []Filter `json:"filters"` IcebergAllowed bool `json:"icebergAllowed"` IsMarginTradingAllowed bool `json:"isMarginTradingAllowed"` IsSpotTradingAllowed bool `json:"isSpotTradingAllowed"` OcoAllowed bool `json:"ocoAllowed"` QuoteOrderQtyMarketAllowed bool `json:"quoteOrderQtyMarketAllowed"` OrderTypes []string `json:"orderTypes"` }
func (TradeSymbol) GetAmountPrecision ¶
func (ts TradeSymbol) GetAmountPrecision() int
func (TradeSymbol) GetMinAmount ¶
func (ts TradeSymbol) GetMinAmount() float64
func (TradeSymbol) GetMinPrice ¶
func (ts TradeSymbol) GetMinPrice() float64
func (TradeSymbol) GetMinValue ¶
func (ts TradeSymbol) GetMinValue() float64
func (TradeSymbol) GetPricePrecision ¶
func (ts TradeSymbol) GetPricePrecision() int
type UserDataWs ¶
type UserDataWs struct {
// contains filtered or unexported fields
}
func NewUserDataWs ¶
func NewUserDataWs(bn *Binance) *UserDataWs
func (*UserDataWs) AccountInfoCallback ¶
func (s *UserDataWs) AccountInfoCallback(f func(accountInfo *AccountInfo))
func (*UserDataWs) AccountPositionCallback ¶
func (s *UserDataWs) AccountPositionCallback(f func(accountPosition *AccountPosition))
func (*UserDataWs) BalanceUpdateCallback ¶
func (s *UserDataWs) BalanceUpdateCallback(f func(balanceUpdate *BalanceUpdate))
func (*UserDataWs) ListStatusCallback ¶
func (s *UserDataWs) ListStatusCallback(f func(listStatus *ListStatus))
func (*UserDataWs) OrderUpdateCallback ¶
func (s *UserDataWs) OrderUpdateCallback(f func(orderUpdateorder *OrderUpdate))
type Wallet ¶
type Wallet struct {
// contains filtered or unexported fields
}
func (*Wallet) GetAccount ¶
func (*Wallet) GetDepositHistory ¶
func (*Wallet) GetWithDrawHistory ¶
func (*Wallet) Withdrawal ¶
Click to show internal directories.
Click to hide internal directories.