# Functions
NewClient initialize an API client instance with API key and secret key.
NewProxiedClient passing a proxy url.
No description provided by the author
WithHeader set or add a header value to the request.
WithHeaders set or replace the headers of the request.
WithRecvWindow set recvWindow param for the request.
reference: https://binance-docs.github.io/apidocs/voptions/en/#websocket-market-streams
streamName: you should collaborate stream names through official documentation or other function above defined, the legitimacy of parameters needs to be guaranteed by the caller handler: a map of handler function, its key needs to correspond to the handler of the incoming streamname, handler's key should be in ["trade", "index", "markPrice", "kline", "ticker", "openInterest", "option_pair", "depth"] for example: WsCombinedServe({"ETH-240927-5500-P@depth10"}, map[string]interface{}{"depth": func(*WsDepthEvent) {}}, func(error){}) WsCombinedServe({"ETH-240927-5500-P@depth10", "ETH-240927-5500-P@kline_1m"}, map[string]interface{}{"depth": func(*WsDepthEvent) {}, "kline": func(*WsKlineEvent){}}, func(error){}) note: the symbol(underlying) of streamName should be upper.
levels: [10, 20, 50, 100, 1000] rate: [100, 500, 100] ms, default 500ms while rate is nil.
WsIndexServe serve websocket that push trade information that is aggregated for a single taker order.
No description provided by the author
No description provided by the author
expireDate: for example 220930 underlying: for example ETH.
No description provided by the author
No description provided by the author
expireDate: for example 220930 underlying: for example ETH.
WsTradeServe serve websocket that push trade information that is aggregated for a single taker order.
No description provided by the author
# Constants
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Fill or Kill.
Good Till Cancel.
Good Till Crossing (Post Only).
Immediate or Cancel.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
Global enums.
# Variables
No description provided by the author
UseTestnet switch all the WS streams from production to the testnet.
WebsocketKeepalive enables sending ping/pong messages to check the connection stability.
WebsocketTimeout is an interval for sending ping/pong messages if WebsocketKeepalive is enabled.
# Structs
Account define create order response.
AccountService create order.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
CancelAllOpenOrdersService cancel all open orders.
CancelBatchOrdersService cancel a list of orders.
CancelOrderService cancel an order.
Client define API client.
CloseUserStreamService delete listen key.
No description provided by the author
CreateOrderService create order.
DepthResponse define depth info with bids and asks.
DepthService show depth info.
ExchangeInfo exchange info.
ExchangeInfoService exchange info service.
No description provided by the author
underlying: Spot trading pairs such as BTCUSDT.
No description provided by the author
No description provided by the author
GetOrderService get an order.
No description provided by the author
HistoricalTrade define historical trade info.
HistoricalTradesService trades.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
underlying: Spot trading pairs such as BTCUSDT.
KeepaliveUserStreamService update listen key.
Kline define kline info.
KlinesService list klines.
No description provided by the author
ListOpenOrdersService list opened orders.
LotSizeFilter define lot size filter of symbol.
No description provided by the author
MarkService list recent trades in orderbook.
No description provided by the author
underlying: Spot trading pairs such as BTCUSDT.
Option Asset.
Option Contract.
Option Symbol.
Unified order structure, it would be used in many ways, for example, create order, cancel order, query open orders, query historical order and so on.
PingService ping server.
No description provided by the author
No description provided by the author
No description provided by the author
PriceFilter define price filter of symbol.
RateLimit struct.
ServerTimeService get server time.
StartUserStreamService create listen key for user stream service.
No description provided by the author
TickerService list recent trades in orderbook.
No description provided by the author
TradesService list recent trades in orderbook.
No description provided by the author
No description provided by the author
WsBalance define balance.
WsConfig webservice configuration.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
WsOrderTradeUpdate define order trade update.
WsPosition define position.
No description provided by the author
No description provided by the author
WsUserDataEvent define user data event.
# Type aliases
Ask is a type alias for PriceLevel.
Bid is a type alias for PriceLevel.
ContractType define contract type.
ErrHandler handles errors.
ForceOrderCloseType define reason type for force order.
MarginType define margin type.
NewOrderRespType define response JSON verbosity.
OptionSideType define option side type of order.
OrderExecutionType define order execution type.
OrderStatusType define order status type.
OrderType define order type.
PositionSideType define position side type of order.
RequestOption define option type for request.
SideEffectType define side effect type for orders.
SideType define side type of order.
SymbolFilterType define symbol filter type.
SymbolStatusType define symbol status type.
SymbolType define symbol type.
TimeInForceType define time in force type of order.
UserDataEventReasonType define reason type for user data event.
UserDataEventType define user data event type.
WorkingType define working type.
No description provided by the author
WsHandler handle raw websocket message.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
WsUserDataHandler handle WsUserDataEvent.