Versions in this module Expand all Collapse all v1 v1.0.0 Jun 16, 2026 Changes in this version + type AccountSettings struct + FuturesMakerFee string + FuturesTakerFee string + SpotMakerFee string + SpotTakerFee string + type CancelOrderRequest struct + OrderID string + Symbol string + type CapitalBalance struct + Available string + Locked string + Staked string + type Client struct + func NewClient() *Client + func (c *Client) CancelOpenOrders(ctx context.Context, symbol, marketType string) error + func (c *Client) CancelOrder(ctx context.Context, req CancelOrderRequest) (*Order, error) + func (c *Client) ExecuteOrder(ctx context.Context, req CreateOrderRequest) (*Order, error) + func (c *Client) GetAccount(ctx context.Context) (*AccountSettings, error) + func (c *Client) GetBalances(ctx context.Context) (map[string]CapitalBalance, error) + func (c *Client) GetDepth(ctx context.Context, symbol string, limit int) (*Depth, error) + func (c *Client) GetFundingRates(ctx context.Context) ([]FundingRate, error) + func (c *Client) GetKlines(ctx context.Context, symbol, interval string, startTime, endTime int64, ...) ([]Kline, error) + func (c *Client) GetMarkets(ctx context.Context) ([]Market, error) + func (c *Client) GetOpenOrders(ctx context.Context, marketType, symbol string) ([]Order, error) + func (c *Client) GetOpenPositions(ctx context.Context, symbol string) ([]Position, error) + func (c *Client) GetOrderBook(ctx context.Context, symbol string, limit int) (*Depth, error) + func (c *Client) GetTicker(ctx context.Context, symbol string) (*Ticker, error) + func (c *Client) GetTrades(ctx context.Context, symbol string, limit int) ([]Trade, error) + func (c *Client) PlaceOrder(ctx context.Context, req CreateOrderRequest) (*Order, error) + func (c *Client) WithCredentials(apiKey, privateKey string) *Client + type CreateOrderRequest struct + ClientID uint32 + OrderType string + Price string + Quantity string + ReduceOnly bool + Side string + Symbol string + TimeInForce string + type Depth struct + Asks [][]string + Bids [][]string + LastUpdateID string + Timestamp int64 + type DepthEvent struct + Asks [][]string + Bids [][]string + EngineTimestamp int64 + EventTime int64 + EventType string + FinalUpdateID int64 + FirstUpdateID int64 + Symbol string + type FundingRate struct + FundingRate string + IndexPrice string + MarkPrice string + NextFundingTimestamp int64 + Symbol string + type Kline struct + Close string + End string + High string + Low string + Open string + QuoteVolume string + Start string + Trades string + Volume string + type Market struct + BaseSymbol string + Filters MarketFilters + MarketType string + QuoteSymbol string + Symbol string + Visible bool + type MarketFilters struct + Price PriceFilter + Quantity QuantityFilter + type Order struct + ClientID uint32 + CreatedAt int64 + ExecutedQuantity string + ExecutedQuoteQuantity string + ID string + OrderType string + Price string + Quantity string + QuoteQuantity string + ReduceOnly bool + Side string + Status string + Symbol string + TimeInForce string + type OrderUpdateEvent struct + ClientID StringValue + EngineTimestamp int64 + EventTime int64 + EventType string + ExecutedQuantity string + ExecutedQuoteQuantity string + Fee string + FeeSymbol string + FillPrice string + FillQuantity string + IsMaker bool + OrderID string + OrderState string + OrderType string + PostOnly bool + Price string + Quantity string + QuoteQuantity string + Side string + Symbol string + TimeInForce string + TradeID StringValue + type Position struct + BreakEvenPrice string + EntryPrice string + EstLiquidationPrice string + NetCost string + NetExposureNotional string + NetExposureQuantity string + NetQuantity string + PnlRealized string + PnlUnrealized string + PositionID string + Symbol string + type PositionUpdateEvent struct + BreakEvenPrice StringValue + EngineTimestamp int64 + EntryPrice StringValue + EventTime int64 + EventType string + ExposureNotional StringValue + ExposureQuantity StringValue + MarkPrice StringValue + NetQuantity StringValue + PnlRealized StringValue + PnlUnrealized StringValue + PositionID string + Symbol string + type PriceFilter struct + MinPrice string + TickSize string + type QuantityFilter struct + MinQuantity string + StepSize string + type StreamEnvelope struct + Data json.RawMessage + Stream string + type StringValue string + func (v *StringValue) UnmarshalJSON(data []byte) error + func (v StringValue) String() string + type Ticker struct + FirstPrice string + High string + LastPrice string + Low string + PriceChange string + PriceChangePercent string + QuoteVolume string + Symbol string + Trades string + Volume string + type Trade struct + ID int64 + IsBuyerMaker bool + Price string + Quantity string + QuoteQuantity string + Timestamp int64 + type WSClient struct + func NewWSClient() *WSClient + func (c *WSClient) Close() error + func (c *WSClient) Connect(ctx context.Context) error + func (c *WSClient) Subscribe(ctx context.Context, stream string, private bool, ...) error + func (c *WSClient) Unsubscribe(ctx context.Context, stream string) error + func (c *WSClient) WithCredentials(apiKey, privateKey string) *WSClient