Discussions
The API returns incomplete JSON data
A script used to work before stopped working recently, and it seems due to an incomplete JSON data returned by the API. for instance, the return of 'https://api.fintel.io/data/v/0.0/so/us/googl' , is a JSON but not closed properly.
The return:
b'{"symbol":"GOOGL","exchange":"NasdaqGS","country":"US","name":"Alphabet Inc.","url":"https://fintel.io/so/us/googl","owners":[{"securityName":"ALPHABET INC-CL A 0.00000000","securityClass":"EC","putCall":null,"cusipSedol":"02079K305","isin":"US02079K3059","manualIdentifier":null,"ticker":null,"formType":"NPORT-P","name":"CMEUX - Six Circles Trust - Six Circles Managed Equity Portfolio U.S. Unconstrained Fund","lei":"5493006MHB84DD0ZWV18","currencyCode":"USD","payoffProfile":"Long","issuerClass":"CORP","fairValueLevel":"1","couponKind":null,"countryCode":"US","units":"NS","fileDate":"2025-08-11","effectiveDate":"2025-06-30","superceded":false,"principal":null,"shares":2663443,"percent":null,"value":469378559,"sharesChange":48413,"percentChange":1.851336313541336,"prevShares":2615030,"prevValue":404388,"percentValueChange":16.07,"percentOwnershipChange":null,"sharePrice":131.6908,"costBasis":350750.8,"profit":null,"performance":null,"sharesMultiplier":1,"valueMultiplier":0.001,"allocation":2.071977884418,"prevAllocation":2.055961692224,"allocationPercentChange":0.7790121895060734,"allocationChange":0.016016192194,"current":null,"unrealized":118627.7,"realized":null,"pageDataId":null,"lineNbr":null,"option":false,"default":null,"formTypeShort":"NP","formattedFileDate":"08-11","valueChange":64990000,"bestIdentifier":"US02079K3059","restricted":null,"safeAllocationChange":0.016016192194,"latestUnrealized":391897,"slug":"six-circles-trust-six-circles-managed-equity-portfolio-u-s-unconstrained-fund","url":"https://fintel.io/i/six-circles-trust-six-circles-managed-equity-portfolio-u-s-unconstrained-fund","ownershipPercent":0.04577935716741148,"ownershipPercentChange":1.851336313541336,"sharesPercentChange":1.851336313541336,"valuePercentChange":16.07},…,{"securityName":"ALPHABET INC","securityClass":"CAP STK CL A","putCall":null,"cusipSedol":"02079K305","isin":null,"manualIdentifier":null,"ticker":null,"formType":"13F-HR","name":"PKS Advisory Services, LLC","lei":null,"currencyCode":null,"payoffProfile":null,"issuerClass":null,"fairValueLevel":null,"couponKind":null,"countryCode":null,"units":null,"fileDate":"2025-08-12","effectiveDate":"2025-06-30","superceded":false,"principal":null,"shares":12784,"percent":null,"value":'
As the JSON stream doesn’t have ‘}]’ in the end, Python API is unable to parse it properly, hence the error.
It's the same result with 'Curl' and Python API. The difference is that since curl doesn't parse the return afterwards, it doesn't give error; while Python does as it's unable to parse the return properly.
Could someone please take a look?
