Versions in this module Expand all Collapse all v1 v1.1.1 Jun 21, 2023 v1.1.0 Jun 21, 2023 Changes in this version + const DataError + const GeneralError + const InputError + const NetworkError + const OrderError + const PermissionError + const TokenError + const TwoFAError + const URIConvertposition + const URIDeleterOrder + const URIFunds + const URIHistory + const URIHoldings + const URIInstruments + const URILogin + const URIModifyOrder + const URIOrderBook + const URIOrderHistory + const URIOrderMargin + const URIPlaceOrder + const URIPositions + const URIQuotes + const URITrades + const UserError + func GetErrorName(code int) string + func InitializeVortexApi(applicationId string, apiKey string, apiClient *VortexApi) error + func InitializeWire(accessToken string, wire *Wire) error + func NewError(etype string, message string, data interface{}) error + type ConvertPositionObject struct + Exchange ExchangeTypes + NewProductType ProductTypes + OldProductType ProductTypes + Token int + TransactionType TransactionTypes + type ConvertPositionResponse struct + Code string + Message string + Status string + type Error struct + Code int + Data interface{} + ErrorType string + Message string + func (e Error) Error() string + type ExchangeDetails struct + Exchange string + Symbol string + Token int + type ExchangeTypes string + const ExchangeTypesMCX + const ExchangeTypesNSECURRENCY + const ExchangeTypesNSEEQUITY + const ExchangeTypesNSEFO + type FullQuoteData struct + AverageTradePrice float64 + ClosePrice float64 + DPRHigh float64 + DPRLow float64 + Depth *QuoteDepth + Exchange string + HighPrice float64 + LastTradePrice float64 + LastTradeQuantity int + LastTradeTime int + LastUpdateTime int + LowPrice float64 + OpenInterest int + OpenPrice float64 + Token int + TotalBuyQuantity int64 + TotalSellQuantity int64 + Volume int + type FundDetails struct + BookedProfit float64 + Collateral float64 + CreditForSale float64 + Deposit float64 + FundsTransferred float64 + FundsWithdrawn float64 + LimitUtilization float64 + MtmAndBookedLoss float64 + NetAvailable float64 + OptionCreditForSale float64 + TotalTradingPower float64 + TotalUtilization float64 + type FundsResponse struct + MCX FundDetails + NSE FundDetails + type HTTPClient interface + GetClient func() *httpClient + func NewHTTPClient(h *http.Client, hLog *log.Logger, debug bool) HTTPClient + type HTTPResponse struct + Body []byte + Response *http.Response + type HistoricalResponse struct + C []float64 + H []float64 + L []float64 + O []float64 + S string + T []int + V []float64 + type Holding struct + AveragePrice float64 + BSE ExchangeDetails + CollateralQuantity int + CollateralValue float64 + DPFree int + ISIN string + NSE ExchangeDetails + PoolFree int + T1Quantity int + TotalFree int + type HoldingsResponse struct + Data []Holding + Status string + type LoginResponse struct + Data UserData + Status string + type LtpQuoteData struct + Exchange string + LastTradePrice float64 + Token int + type MarginModes string + const MarginModeMODIFY + const MarginModeNew + type MarginResponse struct + Available float64 + Required float64 + Status string + type MarketDepthResponse struct + Data QuoteDepth + Status string + type Metadata struct + TotalRecords int + type ModifyOrderRequest struct + DisclosedQuantity int + Price float64 + Quantity int + TradedQuantity int + TriggerPrice float64 + Validity ValidityTypes + ValidityDays int + Variety VarietyTypes + type OhlcvQuoteData struct + ClosePrice float64 + Exchange string + HighPrice float64 + LastTradePrice float64 + LastTradeTime int + LowPrice float64 + OpenPrice float64 + Token int + Volume int + type Order struct + DisclosedQuantity int + DisclosedQuantityRemaining int + ErrorReason string + Exchange string + ExpiryDate string + InitiatedBy string + InstrumentName string + IsAMO bool + LotSize int + ModifiedBy string + OptionType string + OrderCreatedAt string + OrderID string + OrderIdentifier string + OrderNumber string + OrderPrice float64 + PendingQuantity int + Product string + Series string + Status string + StrikePrice float64 + Symbol string + Token int + TotalQuantity int + TradedPrice float64 + TradedQuantity int + TransactionType string + TriggerPrice float64 + Validity string + ValidityDays int + Variety string + type OrderBookResponse struct + Metadata struct{ ... } + Orders []Order + Status string + type OrderHistory struct + DisclosedQuantity int + ErrorReason string + Exchange string + ExchangeOrderCreatedAt string + ExpiryDate string + InitiatedBy string + InstrumentName string + IsAMO bool + ModifiedBy string + OptionType string + OrderCreatedAt string + OrderID string + OrderIdentifier string + OrderNumber string + OrderPrice float64 + PendingQuantity int + Product string + Series string + Status string + StrikePrice float64 + Symbol string + Token int + TotalQuantity int + TradedQuantity int + TransactionType string + TriggerPrice float64 + Validity string + ValidityDays int + Variety string + type OrderHistoryResponse struct + Code string + Data []OrderHistory + Message string + Metadata Metadata + Status string + type OrderMarginRequest struct + Exchange ExchangeTypes + Mode MarginModes + OldPrice float64 + OldQuantity int + Price float64 + Product ProductTypes + Quantity int + Token int + TransactionType TransactionTypes + Variety VarietyTypes + type OrderResponse struct + Code string + Data struct{ ... } + Message string + Status string + type PlaceOrderRequest struct + DisclosedQuantity int + Exchange ExchangeTypes + IsAMO bool + Price float64 + Product ProductTypes + Quantity int + Token int + TransactionType TransactionTypes + TriggerPrice float64 + Validity ValidityTypes + ValidityDays int + Variety VarietyTypes + type Position struct + AveragePrice float64 + BuyPrice float64 + BuyQuantity int + BuyValue float64 + Exchange string + ExpiryDate string + LotSize int + Multiplier float64 + OptionType string + OvernightAveragePrice float64 + OvernightBuyValue float64 + OvernightSellValue float64 + Product string + Quantity int + SellPrice float64 + SellQuantity int + SellValue float64 + Symbol string + Token int + Value float64 + type PositionData struct + Day []Position + Net []Position + type PositionResponse struct + Data PositionData + Status string + type ProductTypes string + const ProductTypesDelivery + const ProductTypesIntraday + const ProductTypesMTF + type QuoteDepth struct + Buy []QuoteEntry + Sell []QuoteEntry + type QuoteEntry struct + Orders int + Price float64 + Quantity int + type QuoteModes string + const QuoteModesFULL + const QuoteModesLTP + const QuoteModesOHLCV + type QuoteResponse struct + Data map[string]interface{} + Status string + type Resolutions string + const Day1 + const Min1 + const Min10 + const Min120 + const Min15 + const Min180 + const Min2 + const Min240 + const Min3 + const Min30 + const Min4 + const Min45 + const Min5 + const Min60 + const Month1 + const ResolutionsDay + const ResolutionsMin1 + const ResolutionsMin10 + const ResolutionsMin120 + const ResolutionsMin15 + const ResolutionsMin180 + const ResolutionsMin2 + const ResolutionsMin240 + const ResolutionsMin3 + const ResolutionsMin30 + const ResolutionsMin4 + const ResolutionsMin45 + const ResolutionsMin5 + const ResolutionsMin60 + const ResolutionsMonth + const ResolutionsWeek + const Week1 + type SocketMessage struct + Data SocketMessageData + Type string + type SocketMessageData struct + AmoOrderId string + DisclosedQuantity int + DisclosedQuantityRemaining int + Exchange string + ExpiryDate string + GtdOrderStatus string + InstrumentName string + IsAmo bool + MarketSegmentId int + MarketType string + ModifiedBy string + OptionType string + OrderCreatedAt string + OrderId string + OrderIdentifier string + OrderNumber string + OrderPrice float32 + OrderUpdatedAt string + PendingQuantity int + PlacedBy string + Product string + Series string + Status string + StatusMessage string + StrikePrice float32 + Symbol string + Token int + TotalQuantity int + TradeNumber string + TradeTime string + TradedPrice float32 + TradedQuantity int + TransactionType string + TriggerPrice float32 + Validity string + ValidityDays int + Variety string + type Trade struct + Exchange string + ExchangeOrderNo string + ExpiryDate string + InitiatedBy string + InstrumentName string + ModifiedBy string + OptionType string + OrderID string + OrderIdentifier string + Product string + Series string + StrikePrice float64 + Symbol string + Token int + TradeNo string + TradePrice float64 + TradeQuantity int + TradedAt string + TransactionType string + Variety string + type TradeBookResponse struct + Metadata struct{ ... } + Status string + Trades []Trade + type TransactionTypes string + const TransactionTypesBUY + const TransactionTypesSELL + type UserData struct + AccessToken string + Email string + Exchanges []string + LoginTime string + Mobile string + Others struct{ ... } + ProductTypes []string + TradingActive bool + UserID string + UserName string + type ValidityTypes string + const ValidityTypesAfterMarket + const ValidityTypesFullDay + const ValidityTypesImmediateOrCancel + type VarietyTypes string + const VarietyTypesRegularLimitOrder + const VarietyTypesRegularMarketOrder + const VarietyTypesStopLimitOrder + const VarietyTypesStopMarketOrder + type VortexApi struct + AccessToken string + func (v *VortexApi) CancelOrder(ctx context.Context, exchange ExchangeTypes, orderID string) (*OrderResponse, error) + func (v *VortexApi) ConvertPosition(ctx context.Context, req ConvertPositionObject) (*ConvertPositionResponse, error) + func (v *VortexApi) DownloadMaster(ctx context.Context) ([]map[string]string, error) + func (v *VortexApi) Funds(ctx context.Context) (*FundsResponse, error) + func (v *VortexApi) GetLoginUrl() string + func (v *VortexApi) HistoricalCandles(ctx context.Context, exchange ExchangeTypes, token int, from time.Time, ...) (*HistoricalResponse, error) + func (v *VortexApi) Holdings(ctx context.Context) (*HoldingsResponse, error) + func (v *VortexApi) Login(ctx context.Context, clientCode string, password string, totp string) (*LoginResponse, error) + func (v *VortexApi) ModifyOrder(ctx context.Context, request ModifyOrderRequest, exchange ExchangeTypes, ...) (*OrderResponse, error) + func (v *VortexApi) OrderHistory(ctx context.Context, orderId string) (*OrderHistoryResponse, error) + func (v *VortexApi) OrderMargin(ctx context.Context, request *OrderMarginRequest) (*MarginResponse, error) + func (v *VortexApi) Orders(ctx context.Context, offset int, limit int) (*OrderBookResponse, error) + func (v *VortexApi) PlaceOrder(ctx context.Context, request PlaceOrderRequest) (*OrderResponse, error) + func (v *VortexApi) Positions(ctx context.Context) (*PositionResponse, error) + func (v *VortexApi) Quotes(ctx context.Context, instruments []string, mode QuoteModes) (*QuoteResponse, error) + func (v *VortexApi) SetAccessToken(accessToken string) + func (v *VortexApi) SetHTTPClient(h *http.Client) + func (v *VortexApi) SetLogging(h *http.Client) + func (v *VortexApi) Trades(ctx context.Context, offset int, limit int) (*TradeBookResponse, error) + type Wire struct + Conn *websocket.Conn + func (t *Wire) Close() error + func (t *Wire) OnClose(f func(code int, reason string)) + func (t *Wire) OnConnect(f func()) + func (t *Wire) OnError(f func(err error)) + func (t *Wire) OnMessage(f func(messageType int, message []byte)) + func (t *Wire) OnNoReconnect(f func(attempt int)) + func (t *Wire) OnOrderUpdate(f func(order SocketMessage)) + func (t *Wire) OnPriceUpdate(f func(*FullQuoteData)) + func (t *Wire) OnReconnect(f func(attempt int, delay time.Duration)) + func (t *Wire) Resubscribe() + func (t *Wire) Serve() + func (t *Wire) ServeWithContext(ctx context.Context) + func (t *Wire) SetAccessToken(accessToken string) + func (t *Wire) SetAutoReconnect(val bool) + func (t *Wire) SetConnectTimeout(val time.Duration) + func (t *Wire) SetReconnectMaxDelay(val time.Duration) error + func (t *Wire) SetReconnectMaxRetries(val int) + func (t *Wire) SetRootURL(u url.URL) + func (t *Wire) Stop() + func (t *Wire) Subscribe(exchange ExchangeTypes, token int, mode QuoteModes) + func (t *Wire) Unsubscribe(exchange ExchangeTypes, token int, mode QuoteModes) v1.0.4-alpha Jun 20, 2023 v1.0.3-alpha Jun 20, 2023 v1.0.2-alpha Jun 20, 2023 v1.0.1-alpha Jun 19, 2023 v1.0.0-alpha Jun 19, 2023 Other modules containing this package github.com/AsthaTech/govortex/v2