Kotak-Neo / kotak-neo-api

120 stars 112 forks source link

Time pExpiry date column in files returned by scrip_master() is off by 10 years #104

Closed soumyajyotibiswas closed 10 months ago

soumyajyotibiswas commented 11 months ago

What is the pExpiryDate format of the csv files as obtained from this? It doesnt seem to be standard unix timestamps. This seems to be a bug. Example file https://lapi.kotaksecurities.com/wso2-scripmaster/v1/prod/2023-12-08/transformed/nse_fo.csv

Lets take the example of nse_fo.csv, pExpiryDate 1388241000 from the following is Saturday, 28 December 2013 20:00:00 [GMT+05:30](link) Is this a bug?

<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40">

pSymbol | pGroup | pExchSeg | pInstType | pSymbolName | pTrdSymbol | pOptionType | pScripRefKey | pISIN | pAssetCode | pSubGroup | pCombinedSymbol | pDesc | pAmcCode | pContractId | dTickSize | lLotSize | lExpiryDate | lMultiplier | lPrecision | dStrikePrice; | pExchange | pInstName | pExpiryDate | pIssueDate | pMaturityDate | pListingDate | pNoDelStartDate | pNoDelEndDate | pBookClsStartDate | pBookClsEndDate | pRecordDate | pCreditRating | pReAdminDate | pExpulsionDate | pLocalUpdateTime | pDeliveryUnits | pPriceUnits | pLastTradingDate | pTenderPeridEndDate | pTenderPeridStartDate | pSellVarMargin | pBuyVarMargin | pInstrumentInfo | pRemarksText | pSegment | pNav | pNavDate | pMfAmt | pSipSecurity | pFaceValue | pTrdUnits | pExerciseStartDate | pExerciseEndDate | pElmMargin | pVarMargin | pTotProposedLimitValue | pScripBasePrice | pSettlementType | pCurrectionTime | iPermittedToTrade | iBoardLotQty | iMaxOrderSize | iLotSize | dOpenInterest | dHighPriceRange | dLowPriceRange | dPriceNum | dGenDen | dGenNum | dPriceQuatation | dIssuerate | dPriceDen | dWarningQty | dIssueCapital | dExposureMargin | dMinRedemptionQty | lFreezeQty -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- 129315 | XX | nse_fo | OPTSTK | HAVELLS | HAVELLS23DEC840CE | CE | HAVELLS23DEC840CE | 9819 |   |   |   |   |   | 5 | 500 | 1388241000 | -1 | 2 | 84000 | NSE | OPTSTK | 1388241000 | 1380412800 | 1388241000 | 1380412800 | 0 | 0 | 0 | 0 | 0 |   | 0 | 0 | 1386436485 |   |   |   |   |   |   |   |   |   | FO |   |   |   |   |   |   | 1388188800 | 1388241000 |   |   |   | 51275 | Physical |   | 0 | 1 | 15001 | 500 | 0 | 57920 | 44630 | 1 | 1 | 1 | 0 | 0 | 1 | 0 | 6.2651e+08 | 3.5 | 0 | 15001

Anirudh-12 commented 11 months ago

Expiry date is 10 year's behind add 10 years to it

soumyajyotibiswas commented 11 months ago

Expiry date is 10 year's behind add 10 years to it

I understand, but it shouldn't be right? And should be fixed in the actual data source.

darshil-lakhani commented 11 months ago

Expiry date is 10 year's behind add 10 years to it

I understand, but it shouldn't be right? And should be fixed in the actual data source.

Until then just add 10 years to it, simple. Not a serious issue.

Kotak-Neo commented 10 months ago

Yes, we are going to release a new scripmaster version very soon which will fix all existing issues. Stay Tuned!