Versions in this module Expand all Collapse all v0 v0.1.11 May 30, 2024 v0.1.10 May 30, 2024 v0.1.9 May 30, 2024 v0.1.8 May 30, 2024 v0.1.7 May 30, 2024 v0.1.6 May 30, 2024 v0.1.5 May 30, 2024 v0.1.4 May 27, 2024 v0.1.3 May 23, 2024 v0.1.2 Apr 26, 2024 Changes in this version type Client + func NewClientWithIP(apiKey, secretKey, ip string) *Client v0.1.1 Mar 31, 2024 Changes in this version + const ContractTypePerpetual + const ForceOrderCloseTypeADL + const ForceOrderCloseTypeLiquidation + const MarginTypeCrossed + const MarginTypeIsolated + const NewOrderRespTypeACK + const NewOrderRespTypeRESULT + const OptionSideTypeCall + const OptionSideTypePut + const OrderExecutionTypeCalculated + const OrderExecutionTypeCanceled + const OrderExecutionTypeExpired + const OrderExecutionTypeFill + const OrderExecutionTypeNew + const OrderExecutionTypePartialFill + const OrderExecutionTypeTrade + const OrderStatusTypeAccepted + const OrderStatusTypeCanceled + const OrderStatusTypeExpired + const OrderStatusTypeFilled + const OrderStatusTypeNew + const OrderStatusTypeNewADL + const OrderStatusTypeNewInsurance + const OrderStatusTypePartiallyFilled + const OrderStatusTypeRejected + const OrderTypeLimit + const OrderTypeMarket + const OrderTypeStop + const OrderTypeStopMarket + const OrderTypeTakeProfit + const OrderTypeTakeProfitMarket + const OrderTypeTrailingStopMarket + const PositionSideTypeBoth + const PositionSideTypeLong + const PositionSideTypeShort + const SideEffectTypeAutoRepay + const SideEffectTypeMarginBuy + const SideEffectTypeNoSideEffect + const SideTypeBuy + const SideTypeSell + const SymbolFilterTypeLotSize + const SymbolFilterTypeMarketLotSize + const SymbolFilterTypeMaxNumAlgoOrders + const SymbolFilterTypeMaxNumOrders + const SymbolFilterTypeMinNotional + const SymbolFilterTypePercentPrice + const SymbolFilterTypePrice + const SymbolStatusTypeAuctionMatch + const SymbolStatusTypeBreak + const SymbolStatusTypeEndOfDay + const SymbolStatusTypeHalt + const SymbolStatusTypePostTrading + const SymbolStatusTypePreTrading + const SymbolStatusTypeTrading + const SymbolTypeFuture + const TimeInForceTypeFOK + const TimeInForceTypeGTC + const TimeInForceTypeGTX + const TimeInForceTypeIOC + const UserDataEventReasonTypeAdjustment + const UserDataEventReasonTypeAdminDeposit + const UserDataEventReasonTypeAdminWithdraw + const UserDataEventReasonTypeAssetTransfer + const UserDataEventReasonTypeDeposit + const UserDataEventReasonTypeFundingFee + const UserDataEventReasonTypeInsuranceClear + const UserDataEventReasonTypeMarginTransfer + const UserDataEventReasonTypeMarginTypeChange + const UserDataEventReasonTypeOptionsPremiumFee + const UserDataEventReasonTypeOptionsSettleProfit + const UserDataEventReasonTypeOrder + const UserDataEventReasonTypeWithdraw + const UserDataEventReasonTypeWithdrawReject + const UserDataEventTypeAccountConfigUpdate + const UserDataEventTypeAccountUpdate + const UserDataEventTypeListenKeyExpired + const UserDataEventTypeMarginCall + const UserDataEventTypeOrderTradeUpdate + const WorkingTypeContractPrice + const WorkingTypeMarkPrice + type Ask = common.PriceLevel + type Bid = common.PriceLevel + type CancelAllOpenOrdersService struct + func (s *CancelAllOpenOrdersService) Do(ctx context.Context, opts ...RequestOption) (err error) + func (s *CancelAllOpenOrdersService) Symbol(symbol string) *CancelAllOpenOrdersService + type CancelMultiplesOrdersService struct + func (s *CancelMultiplesOrdersService) ClientOrderIDList(clientOrderIDList []string) *CancelMultiplesOrdersService + func (s *CancelMultiplesOrdersService) Do(ctx context.Context, opts ...RequestOption) (res []*CancelSingleOrderResponse, err error) + func (s *CancelMultiplesOrdersService) OrderIDList(orderIDList []int64) *CancelMultiplesOrdersService + func (s *CancelMultiplesOrdersService) Symbol(symbol string) *CancelMultiplesOrdersService + type CancelOrderResponse struct + AvgPrice string + ClientOrderID string + CreateTime int64 + ExecutedQty string + Fee string + Mmp bool + OptionSide OptionSideType + OrderID int64 + PostOnly bool + Price string + PriceScale int + Quantity string + QuantityScale int + QuoteAsset string + ReduceOnly bool + Side SideType + Source string + Status OrderStatusType + Symbol string + TimeInForce TimeInForceType + Type OrderType + UpdateTime int64 + type CancelOrderService struct + func (s *CancelOrderService) ClientOrderID(clientOrderID string) *CancelOrderService + func (s *CancelOrderService) Do(ctx context.Context, opts ...RequestOption) (res *CancelOrderResponse, err error) + func (s *CancelOrderService) OrderID(orderID int64) *CancelOrderService + func (s *CancelOrderService) Symbol(symbol string) *CancelOrderService + type CancelSingleOrderResponse struct + AvgPrice string + ClientOrderID string + CreateTime int64 + ExecutedQty string + Fee string + OrderID int64 + Price string + Quantity string + ReduceOnly bool + Side SideType + Status OrderStatusType + Symbol string + TimeInForce TimeInForceType + Type OrderType + UpdateTime int64 + type Client struct + APIKey string + BaseURL string + Debug bool + HTTPClient *http.Client + Logger *log.Logger + SecretKey string + TimeOffset int64 + UserAgent string + func NewClient(apiKey, secretKey string) *Client + func NewProxiedClient(apiKey, secretKey, proxyUrl string) *Client + func (c *Client) NewCancelAllOpenOrdersService() *CancelAllOpenOrdersService + func (c *Client) NewCancelMultipleOrdersService() *CancelMultiplesOrdersService + func (c *Client) NewCancelOrderService() *CancelOrderService + func (c *Client) NewCreateBatchOrdersService() *CreateBatchOrdersService + func (c *Client) NewCreateOrderService() *CreateOrderService + func (c *Client) NewDepthService() *DepthService + func (c *Client) NewExchangeInfoService() *ExchangeInfoService + func (c *Client) NewGetOrderService() *GetOrderService + func (c *Client) NewKlinesService() *KlinesService + func (c *Client) NewListOpenOrdersService() *ListOpenOrdersService + func (c *Client) SetApiEndpoint(url string) *Client + type ContractType string + type CreateBatchOrdersResponse struct + Orders []*SingleOrder + type CreateBatchOrdersService struct + func (s *CreateBatchOrdersService) Do(ctx context.Context, opts ...RequestOption) (res *CreateBatchOrdersResponse, err error) + func (s *CreateBatchOrdersService) OrderList(orders []*CreateOrderService) *CreateBatchOrdersService + type CreateOrderResponse struct + AvgPrice string + ClientOrderID string + CreateTime int64 + ExecutedQty string + Fee string + Mmp bool + OptionSide OptionSideType + OrderID int64 + PostOnly bool + Price string + PriceScale int + Quantity string + QuantityScale int + QuoteAsset string + RateLimitOrder10s string + RateLimitOrder1m string + ReduceOnly bool + Side SideType + Status OrderStatusType + Symbol string + TimeInForce TimeInForceType + Type OrderType + UpdateTime int64 + type CreateOrderService struct + func (s *CreateOrderService) ClientOrderID(ClientOrderID string) *CreateOrderService + func (s *CreateOrderService) Do(ctx context.Context, opts ...RequestOption) (res *CreateOrderResponse, err error) + func (s *CreateOrderService) IsMmp(isMmp bool) *CreateOrderService + func (s *CreateOrderService) NewOrderResponseType(newOrderResponseType NewOrderRespType) *CreateOrderService + func (s *CreateOrderService) PostOnly(postOnly bool) *CreateOrderService + func (s *CreateOrderService) Price(price string) *CreateOrderService + func (s *CreateOrderService) Quantity(quantity string) *CreateOrderService + func (s *CreateOrderService) ReduceOnly(reduceOnly bool) *CreateOrderService + func (s *CreateOrderService) Side(side SideType) *CreateOrderService + func (s *CreateOrderService) Symbol(symbol string) *CreateOrderService + func (s *CreateOrderService) TimeInForce(timeInForce TimeInForceType) *CreateOrderService + func (s *CreateOrderService) Type(orderType OrderType) *CreateOrderService + type DepthResponse struct + Asks []Ask + Bids []Bid + TradeTime int64 + UpdateID int64 + type DepthService struct + func (s *DepthService) Do(ctx context.Context, opts ...RequestOption) (res *DepthResponse, err error) + func (s *DepthService) Limit(limit int) *DepthService + func (s *DepthService) Symbol(symbol string) *DepthService + type ExchangeInfo struct + OptionAssets []OptionAsset + OptionContracts []OptionContract + OptionSymbols []OptionSymbol + RateLimits []RateLimit + ServerTime int64 + Timezone string + type ExchangeInfoService struct + func (s *ExchangeInfoService) Do(ctx context.Context, opts ...RequestOption) (res *ExchangeInfo, err error) + type ForceOrderCloseType string + type GetOrderService struct + func (s *GetOrderService) ClientOrderID(clientOrderID string) *GetOrderService + func (s *GetOrderService) Do(ctx context.Context, opts ...RequestOption) (res *Order, err error) + func (s *GetOrderService) OrderID(orderID int64) *GetOrderService + func (s *GetOrderService) Symbol(symbol string) *GetOrderService + type Kline struct + Amount string + Close string + CloseTime int64 + High string + Interval string + Low string + Open string + OpenTime int64 + TakerAmount string + TakerVolume string + TradeCount int64 + Volume string + type KlinesService struct + func (s *KlinesService) Do(ctx context.Context, opts ...RequestOption) (res []*Kline, err error) + func (s *KlinesService) EndTime(endTime int64) *KlinesService + func (s *KlinesService) Interval(interval string) *KlinesService + func (s *KlinesService) Limit(limit int) *KlinesService + func (s *KlinesService) StartTime(startTime int64) *KlinesService + func (s *KlinesService) Symbol(symbol string) *KlinesService + type ListOpenOrdersService struct + func (s *ListOpenOrdersService) Do(ctx context.Context, opts ...RequestOption) (res []*Order, err error) + func (s *ListOpenOrdersService) EndTime(endTime int64) *ListOpenOrdersService + func (s *ListOpenOrdersService) Limit(limit int) *ListOpenOrdersService + func (s *ListOpenOrdersService) OrderId(orderId int64) *ListOpenOrdersService + func (s *ListOpenOrdersService) StartTime(startTime int64) *ListOpenOrdersService + func (s *ListOpenOrdersService) Symbol(symbol string) *ListOpenOrdersService + type LotSizeFilter struct + MaxQuantity string + MinQuantity string + StepSize string + type MarginType string + type NewOrderRespType string + type OptionAsset struct + Id int64 + Name string + type OptionContract struct + BaseAsset string + Id int64 + QuoteAsset string + SettleAsset string + Underlying string + type OptionSideType string + type OptionSymbol struct + ContractId int64 + ExpiryDate int64 + Filters []map[string]interface{} + 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 + func (s *OptionSymbol) LotSizeFilter() *LotSizeFilter + func (s *OptionSymbol) PriceFilter() *PriceFilter + type Order struct + AvgPrice string + ClientOrderID string + CreateTime int64 + ExecutedQty string + Fee string + Mmp bool + OptionSide OptionSideType + OrderID int64 + PostOnly bool + Price string + PriceScale int + Quantity string + QuantityScale int + QuoteAsset string + ReduceOnly bool + Side SideType + Source string + Status OrderStatusType + Symbol string + TimeInForce TimeInForceType + Type OrderType + UpdateTime int64 + type OrderExecutionType string + type OrderStatusType string + type OrderType string + type PositionSideType string + type PriceFilter struct + MaxPrice string + MinPrice string + TickSize string + type RateLimit struct + Interval string + IntervalNum int64 + Limit int64 + RateLimitType string + type RequestOption func(*request) + func WithHeader(key, value string, replace bool) RequestOption + func WithHeaders(header http.Header) RequestOption + func WithRecvWindow(recvWindow int64) RequestOption + type SideEffectType string + type SideType string + type SingleOrder struct + ClientOrderID string + Mmp bool + OrderID int64 + PostOnly bool + Price string + Quantity string + ReduceOnly bool + Side SideType + Symbol string + Type OrderType + type SymbolFilterType string + type SymbolStatusType string + type SymbolType string + type TimeInForceType string + type UserDataEventReasonType string + type UserDataEventType string + type WorkingType string