fhqvst / avanza

A JavaScript client for the unofficial Avanza API
MIT License
229 stars 59 forks source link

get_stock_info now has different results #84

Open ageaenes opened 1 year ago

ageaenes commented 1 year ago

for example subobject company is now missing. Also i can no longer get the information whether a stock is in the superLoan category or not. was there in the previous response

example response: {'orderbookId': '5235', 'name': 'Atlas Copco B', 'isin': 'SE0017486897', 'sectors': [{'sectorId': '108', 'sectorName': 'Process & Automation'}, {'sectorId': '6', 'sectorName': 'Industriella Varor & Tjänster'}, {'sectorId': '29', 'sectorName': 'Industri'}], 'tradable': 'BUYABLE_AND_SELLABLE', 'listing': {'shortName': 'ATCO B', 'tickerSymbol': 'ATCO B', 'countryCode': 'SE', 'currency': 'SEK', 'marketPlaceCode': 'XSTO', 'marketPlaceName': 'Stockholmsbörsen', 'marketListName': 'Large Cap Stockholm', 'tickSizeListId': '34', 'marketTradesAvailable': True}, 'historicalClosingPrices': {'oneDay': 111.1, 'oneWeek': 111.22, 'oneMonth': 118.06, 'threeMonths': 93.26, 'startOfYear': 111.1, 'oneYear': 133.05, 'threeYears': 81.3, 'fiveYears': 78.65, 'tenYears': 39.55, 'start': 1.92, 'startDate': '1989-08-28'}, 'keyIndicators': {'numberOfOwners': 38383, 'reportDate': '2022-10-19', 'directYield': 0.0171, 'volatility': 0.2331, 'beta': 1.2202, 'priceEarningsRatio': 24.49, 'priceSalesRatio': 4.18, 'returnOnEquity': 0.3735, 'returnOnTotalAssets': 0.1685, 'equityRatio': 0.4508, 'capitalTurnover': 0.7686, 'operatingProfitMargin': 0.2191, 'grossMargin': 0.4186, 'netMargin': 0.2192, 'marketCapital': {'value': 586730980025.6, 'currency': 'SEK'}, 'equityPerShare': {'value': 15.6, 'currency': 'SEK'}, 'turnoverPerShare': {'value': 26.59, 'currency': 'SEK'}, 'earningsPerShare': {'value': 4.54, 'currency': 'SEK'}, 'dividend': {'exDate': '2022-10-20', 'paymentDate': '2022-10-26', 'amount': 0.95, 'currencyCode': 'SEK', 'exDateStatus': 'HISTORICAL'}, 'dividendsPerYear': 2, 'nextReport': {'date': '2023-01-26', 'reportType': 'ANNUAL'}, 'previousReport': {'date': '2022-10-19', 'reportType': 'INTERIM'}}, 'quote': {'buy': 111.04, 'sell': 111.08, 'last': 111.08, 'highest': 112.26, 'lowest': 110.88, 'change': -0.02, 'changePercent': -0.02, 'spread': 0.04, 'timeOfLast': 1672669008000, 'totalValueTraded': 69336556.43, 'totalVolumeTraded': 622601, 'updated': 1672669008000, 'volumeWeightedAveragePrice': 111.37}, 'type': 'STOCK'}