Documentation ¶
Index ¶
- Variables
- type APIError
- type ExchangeInfo
- type RestClient
- func (rc *RestClient) FeeRate(ctx context.Context, syms ...exchange.Symbol) ([]exchange.TradeFee, error)
- func (rc *RestClient) Init(ctx context.Context) error
- func (c *RestClient) NewSpotSymbol(base, quote string) exchange.SpotSymbol
- func (c *RestClient) ParseSpotSymbol(sym string) (exchange.SpotSymbol, error)
- func (rc *RestClient) Request(ctx context.Context, method, endPoint string, param url.Values, data io.Reader, ...) error
- type SpotSymbol
- type Symbol
- type TradeFee
- type TradeFeeResp
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrPair = errors.New("symbol pair not support")
)
Functions ¶
This section is empty.
Types ¶
type ExchangeInfo ¶
type ExchangeInfo struct {
Symbols []Symbol `json:"symbols"`
}
type RestClient ¶
type RestClient struct {
// contains filtered or unexported fields
}
Binance Rest client instance
func NewRestClient ¶
func NewRestClient(key, secret, host string) *RestClient
func (*RestClient) NewSpotSymbol ¶
func (c *RestClient) NewSpotSymbol(base, quote string) exchange.SpotSymbol
func (*RestClient) ParseSpotSymbol ¶
func (c *RestClient) ParseSpotSymbol(sym string) (exchange.SpotSymbol, error)
type SpotSymbol ¶
type SpotSymbol struct {
*exchange.BaseSpotSymbol
}
func (*SpotSymbol) String ¶
func (ss *SpotSymbol) String() string
type Symbol ¶
type Symbol struct { Symbol string `json:"symbol"` BaseAsset string `json:"baseAsset"` QuoteAsset string `json:"quoteAsset"` }
Symbol info TODO: refactor Symbol add more info pricePrecison ...?
type TradeFeeResp ¶
Click to show internal directories.
Click to hide internal directories.