Categorygithub.com/cryptwire/go-binance/v2
modulepackage
2.2.3
Repository: https://github.com/cryptwire/go-binance.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author

# Functions

FormatTimestamp formats a time into Unix timestamp in milliseconds, as requested by Binance.
NewClient initialize an API client instance with API key and secret key.
NewDeliveryClient initialize client for coin-M futures API.
NewFuturesClient initialize client for futures API.
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.
WsAggTradeServe serve websocket aggregate handler with a symbol.
WsAllBookTickerServe serve websocket that pushes updates to the best bid or ask price or quantity in real-time for all symbols.
WsAllMarketsStatServe serve websocket that push 24hr statistics for all market every second.
WsAllMiniMarketsStatServe serve websocket that push mini version of 24hr statistics for all market every second.
WsBookTickerServe serve websocket that pushes updates to the best bid or ask price or quantity in real-time for a specified symbol.
WsCombinedAggTradeServe is similar to WsAggTradeServe, but it handles multiple symbolx.
WsCombinedKlineServe is similar to WsKlineServe, but it handles multiple symbols with it interval.
WsCombinedMarketStatServe is similar to WsMarketStatServe, but it handles multiple symbolx.
WsCombinedPartialDepthServe is similar to WsPartialDepthServe, but it for multiple symbols.
WsDepthServe serve websocket depth handler with a symbol, using 1sec updates.
WsDepthServe100Ms serve websocket depth handler with a symbol, using 100msec updates.
WsKlineServe serve websocket kline handler with a symbol and interval like 15m, 30s.
WsMarketStatServe serve websocket that push 24hr statistics for single market every second.
WsPartialDepthServe serve websocket partial depth handler with a symbol, using 1sec updates.
WsPartialDepthServe100Ms serve websocket partial depth handler with a symbol, using 100msec updates.
WsTradeServe serve websocket handler with a symbol.
WsUserDataServe serve user data handler with listen key.

# 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.

# Variables

Endpoints.
Endpoints.
Endpoints.
Endpoints.
UseTestnet switch all the API endpoints 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 account info.
AggTrade define aggregate trade info.
AggTradesService list aggregate trades.
AssetDetail represents the detail of an asset.
AssetDetailResponse represents a response from AssetDetailService.
AveragePriceService show current average price for a symbol.
AvgPrice define average price.
Balance define user balance of your account.
BookTicker define book ticker info.
CancelMarginOrderResponse define response of canceling order.
CancelMarginOrderService cancel an order.
CancelOCOResponse may be returned included in a CancelOpenOrdersResponse.
CancelOCOService cancel all active orders on the list order.
CancelOpenOrdersResponse defines cancel open orders response.
CancelOpenOrdersService cancel all active orders on a symbol.
CancelOrderResponse may be returned included in a CancelOpenOrdersResponse.
CancelOrderService cancel an order.
Client define API client.
CloseIsolatedMarginUserStreamService delete listen key.
CloseMarginUserStreamService delete listen key.
CloseUserStreamService delete listen key.
CreateMarginOrderService create order.
CreateOCOResponse define create order response.
CreateOCOService create order.
CreateOrderResponse define create order response.
CreateOrderService create order.
CreateWithdrawResponse represents a response from CreateWithdrawService.
CreateWithdrawService submits a withdraw request.
Deposit represents a single deposit entry.
DepositHistoryResponse represents a response from ListDepositsService.
DepthResponse define depth info with bids and asks.
DepthService show depth info.
DustLog represents one dust log informations.
DustLogResponseWrapper represents a response from ListDustLogService.
DustResult represents the result of a DustLog API Call.
DustRow represents one dust log row.
DustTransferResponse represents the response from DustTransferService.
DustTransferResult represents the result of a dust transfer.
DustTransferService convert dust assets to BNB.
ExchangeInfo exchange info.
ExchangeInfoService exchange info service.
Fill may be returned in an array of fills in a CreateOrderResponse.
FuturesTransfer define futures transfer history item.
FuturesTransferHistory define futures transfer history.
FuturesTransferService transfer asset between spot account and futures account.
GetAccountService get account info.
GetAccountSnapshotService all account orders; active, canceled, or filled.
GetAssetDetailService fetches all asset detail.
GetDepositAddressResponse represents a response from GetDepositsAddressService.
GetDepositsAddressService retrieves the details of a deposit address.
GetIsolatedMarginAccountService gets isolated margin account info.
GetMarginAccountService get margin account info.
GetMarginAllPairsService get margin pair info.
GetMarginAssetService get margin asset info.
GetMarginOrderService get an order.
GetMarginPairService get margin pair info.
GetMarginPriceIndexService get margin price index.
GetMaxBorrowableService get max borrowable of asset.
GetMaxTransferableService get max transferable of asset.
GetOrderService get an order.
HistoricalTradesService trades.
IcebergPartsFilter define iceberg part filter of symbol.
IsolatedMarginAccount defines isolated user assets of margin account.
IsolatedMarginAsset defines isolated margin asset information, like margin level, liquidation price..
IsolatedUserAsset defines isolated user assets of the margin account.
KeepaliveIsolatedMarginUserStreamService updates listen key for isolated margin user data stream.
KeepaliveMarginUserStreamService update listen key.
KeepaliveUserStreamService update listen key.
Kline define kline info.
KlinesService list klines.
ListBookTickersService list best price/qty on the order book for a symbol or symbols.
ListDepositsService fetches deposit history.
ListDustLogService fetch small amounts of assets exchanged versus BNB See https://binance-docs.github.io/apidocs/spot/en/#dustlog-user_data.
ListFuturesTransferService list futures transfer.
ListMarginLoansService list loan record.
ListMarginOpenOrdersService list margin open orders.
ListMarginOrdersService all account orders; active, canceled, or filled.
ListMarginRepaysService list repay record.
ListMarginTradesService list trades.
ListOpenOrdersService list opened orders.
ListOrdersService all account orders; active, canceled, or filled.
ListPriceChangeStatsService show stats of price change in last 24 hours for all symbols.
ListPricesService list latest price for a symbol or symbols.
ListTradesService list trades.
ListWithdrawsService fetches withdraw history.
LotSizeFilter define lot size filter of symbol.
MarginAccount define margin account info.
MarginAllPair define margin pair info.
MarginAsset define margin asset info.
MarginLoan define margin loan.
MarginLoanResponse define margin loan response.
MarginLoanService apply for a loan.
MarginPair define margin pair info.
MarginPriceIndex define margin price index.
MarginRepay define margin repay.
MarginRepayResponse define margin repay response.
MarginRepayService repay loan for margin account.
MarginTransferService transfer between spot account and margin account.
MarketLotSizeFilter define market lot size filter of symbol.
MaxBorrowable define max borrowable response.
MaxNumAlgoOrdersFilter define max num algo orders filter of symbol.
MaxTransferable define max transferable response.
MinNotionalFilter define min notional filter of symbol.
OCOOrder may be returned in an array of OCOOrder in a CreateOCOResponse.
OCOOrderReport may be returned in an array of OCOOrderReport in a CreateOCOResponse.
Order define order info.
PercentPriceFilter define percent price filter of symbol.
PingService ping server.
PriceChangeStats define price change stats.
PriceFilter define price filter of symbol.
RateLimit struct.
RecentTradesService list recent trades.
ServerTimeService get server time.
SetServerTimeService set server time.
Snapshot define snapshot.
SnapshotAssets define snapshot assets.
SnapshotBalances define snapshot balances.
SnapshotData define content of a snapshot.
SnapshotPositions define snapshot positions.
SnapshotUserAssets define snapshot user assets.
SnapshotVos define content of a snapshot.
StartIsolatedMarginUserStreamService create listen key for margin user stream service.
StartMarginUserStreamService create listen key for margin user stream service.
StartUserStreamService create listen key for user stream service.
Symbol market symbol.
SymbolPrice define symbol and price pair.
Trade define trade info.
TradeV3 define v3 trade info.
TransactionResponse define transaction response.
UserAsset define user assets of margin account.
Withdraw represents a single withdraw entry.
WithdrawHistoryResponse represents a response from ListWithdrawsService.
WsAggTradeEvent define websocket aggregate trade event.
WsBookTickerEvent define websocket best book ticker event.
WsConfig webservice configuration.
WsDepthEvent define websocket depth event.
WsKline define websocket kline.
WsKlineEvent define websocket kline event.
WsMarketStatEvent define websocket market statistics event.
WsMiniMarketsStatEvent define websocket market mini-ticker statistics event.
WsPartialDepthEvent define websocket partial depth book event.
WsTradeEvent define websocket trade event.

# Type aliases

Ask is a type alias for PriceLevel.
Bid is a type alias for PriceLevel.
ErrHandler handles errors.
FuturesTransferStatusType define futures transfer status type.
FuturesTransferType define futures transfer type.
MarginLoanStatusType define margin loan status type.
MarginRepayStatusType define margin repay status type.
MarginTransferType define margin transfer type.
NewOrderRespType define response JSON verbosity.
OrderStatusType define order status type.
OrderType define order type.
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.
WsAggTradeHandler handle websocket aggregate trade event.
WsAllMarketsStatEvent define array of websocket market statistics events.
WsAllMarketsStatHandler handle websocket that push all markets statistics for 24hr.
WsAllMiniMarketsStatEvent define array of websocket market mini-ticker statistics events.
WsAllMiniMarketsStatServeHandler handle websocket that push all mini-ticker market statistics for 24hr.
WsBookTickerHandler handle websocket that pushes updates to the best bid or ask price or quantity in real-time for a specified symbol.
WsDepthHandler handle websocket depth event.
WsHandler handle raw websocket message.
WsKlineHandler handle websocket kline event.
WsMarketStatHandler handle websocket that push single market statistics for 24hr.
WsPartialDepthHandler handle websocket partial depth event.
WsTradeHandler handle websocket trade event.