Versions in this module Expand all Collapse all v1 v1.0.0 Jun 16, 2026 Changes in this version + const BaseURL + const EndpointAccount + const EndpointDepth + const EndpointExchangeInfo + const EndpointHistoryOrders + const EndpointKlines + const EndpointListenKey + const EndpointMark + const EndpointOpenOrders + const EndpointOrder + const EndpointPosition + const EndpointTicker + const WSBaseURL + const WSPrivatePath + const WSPublicPath + func GenerateSignature(secretKey, data string) string + func Timestamp() int64 + type AccountAsset struct + Asset string + Available string + Equity string + Locked string + MarginBalance string + UnrealizedPNL string + type AccountGreek struct + Delta string + Gamma string + Theta string + Underlying string + Vega string + type AccountResponse struct + Asset []AccountAsset + GreekRecord []AccountGreek + RiskLevel string + Time int64 + type Client struct + APIKey string + BaseURL string + HTTPClient *http.Client + Logger *zap.SugaredLogger + SecretKey string + func NewClient() *Client + func (c *Client) CancelOrder(ctx context.Context, symbol, orderID, clientOrderID string) (*OrderResponse, error) + func (c *Client) CloseListenKey(ctx context.Context, key string) error + func (c *Client) CreateListenKey(ctx context.Context) (string, error) + func (c *Client) GetAccount(ctx context.Context) (*AccountResponse, error) + func (c *Client) GetExchangeInfo(ctx context.Context) (*ExchangeInfoResponse, error) + func (c *Client) GetMark(ctx context.Context, symbol string) (MarkResponse, error) + func (c *Client) GetOpenOrders(ctx context.Context, symbol string) ([]OrderResponse, error) + func (c *Client) GetOrder(ctx context.Context, symbol, orderID, clientOrderID string) (*OrderResponse, error) + func (c *Client) GetPositions(ctx context.Context, symbol string) (PositionResponse, error) + func (c *Client) KeepAliveListenKey(ctx context.Context, key string) error + func (c *Client) PlaceOrder(ctx context.Context, req *OrderRequest) (*OrderResponse, error) + func (c *Client) WithCredentials(apiKey, secretKey string) *Client + func (c *Client) WithHTTPClient(httpClient *http.Client) *Client + type ErrorResponse struct + Code int + Msg string + type ExchangeInfoResponse struct + OptionAssets []OptionAsset + OptionContracts []OptionContract + OptionSymbols []OptionSymbol + ServerTime int64 + Timezone string + type ListenKeyResponse struct + ListenKey string + type MarkEntry struct + AskIV string + BidIV string + Delta string + Gamma string + HighPriceLimit string + LowPriceLimit string + MarkIV string + MarkPrice string + RiskFreeInterest string + Symbol string + Theta string + Vega string + type MarkResponse []MarkEntry + type OptionAsset struct + ID int64 + Name string + type OptionContract struct + BaseAsset string + ID int64 + QuoteAsset string + SettleAsset string + Underlying string + type OptionSymbol struct + ContractStatus string + ExpiryDate int64 + ID int64 + InitialMargin string + MaintenanceMargin string + MakerFeeRate string + MaxQty string + MinInitialMargin string + MinMaintenanceMargin string + MinQty string + PriceScale int + QuantityScale int + QuoteAsset string + Side string + StrikePrice string + Symbol string + TakerFeeRate string + Underlying string + Unit int64 + type OrderRequest struct + ClientOrderID string + PostOnly bool + Price string + Quantity string + ReduceOnly bool + Side string + Symbol string + TimeInForce string + Type string + type OrderResponse struct + AvgPrice string + ClientOrderID string + CreateTime int64 + ExecutedQty string + Fee string + OrderID int64 + PostOnly bool + Price string + Quantity string + ReduceOnly bool + Side string + Status string + Symbol string + TimeInForce string + Type string + UpdateTime int64 + type PositionEntry struct + EntryPrice string + ExpiryDate int64 + MarkPrice string + MarkValue string + OptionSide string + PositionCost string + PriceScale int + Quantity string + QuantityScale int + QuoteAsset string + ReducibleQty string + Ror string + Side string + StrikePrice string + Symbol string + Time int64 + UnrealizedPNL string + type PositionResponse []PositionEntry