question

zitrono avatar image
1 Like"
zitrono asked ·

next_page argument is missing in Python get_stock_exchange_realtime_prices

Hi, I am calling `get_stock_exchange_realtime_prices()` api call via python. But, unlike in documentation, I do not get back attribute `next_page` (hence can not receive full response ).

This happens even if second page does exist (tested by decreasing page size).


Docs: https://docs.intrinio.com/documentation/python/get_stock_exchange_realtime_prices_v2

Reproducible code:

	

import intrinio_sdk intrinio_sdk.ApiClient().configuration.api_key['api_key'] = "xxx" stock_exchange_api = intrinio_sdk.StockExchangeApi() identifier = 'USCOMP' source = '' page_size = 1000 next_page = ''

api_response = stock_exchange_api.get_stock_exchange_realtime_prices(identifier, page_size=page_size, next_page=next_page) api_response.next_page api_response.attribute_map

apipython
1564411941113.png (176.0 KiB)
· 2
10 |600 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

I am trying to recreate the issue so out of curiosity, what happens when you try to print api_response_2.next_page? Does it come back with an "object has no attribute 'next_page'" or something else?

0 Likes 0 · ·

yes:

AttributeError: 'ApiResponseStockExchangeRealtimeStockPrices' object has no attribute 'next_page'
0 Likes 0 · ·

1 Answer

· Write an Answer
mkelly avatar image
1 Like"
mkelly answered ·

This has been a known issue in previous versions of the Python SDK. Try updating your local SDK version and see if that fixes the issue.

· 1 · Share
10 |600 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

That was the issue. Thanks.

0 Likes 0 · ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.