Refinitiv / websocket-api

A direct access WebSocket API that enables easy integration into a multitude of client technology environments such as scripting and web.
Other
68 stars 40 forks source link

How to get currency holiday? #29

Closed peakzhao closed 7 months ago

fogol commented 7 months ago

@peakzhao Thank you for your question! I believe, you can find the answer on LSEG Developer Community Portal. Please, take a look at the existing one:

Currency holidays

I just tried to change the RIC code in my JSON request to 'US/HOLIDAY' and have received the table in the response:

image

I believe, this information is exactly that you were looking for. Sure, you need to parse the table.

Please, do not hesitate to ask other questions on LSEG Developer Community Portal.

If this answer solved your question, I will close this issue. Thank you!

peakzhao commented 7 months ago

@fogol Thanks, I found it before. Can I know the Endpoint? Like https://api.refinitiv.com/streaming/......

fogol commented 7 months ago

@peakzhao The endpoint is a part of the Service Discovery process. Please, take a look at RDP Examples, like

Python Refinitiv Data Platform Examples

You can use one of

market_price_rdpgw_service_discovery market_price_rdpgw_client_cred_auth market_price_rdpgw_jwt_auth

Depends on which Authentication type you need.

I have used market_price_rdpgw_service_discovery one, to run my code sample with 'US/HOLIDAY' RIC request.

peakzhao commented 7 months ago

@fogol Do you mean than Get holiday data according to web socket? Is there a Rest-API method to obtain holidays? Thanks.

vlevendel commented 7 months ago

@fogol Do you mean than Get holiday data according to web socket? Is there a Rest-API method to obtain holidays? Thanks.

Yes, a websocket connection is needed. In the context of using the sample applications we provide on this site, you must make a websocket connection to a Real-time host and port (incidentally also called 'endpoint') and request the RIC, 'US/HOLIDAY' to get the holiday content you seek. As for which host and port to use, if you are connecting to RDP, you may use another API called "service discovery", to get this (host/port) information. Please see fogol's explanation above.

vlevendel commented 7 months ago

@fogol Thanks, I found it before. Can I know the Endpoint? Like https://api.refinitiv.com/streaming/......

@peakzhao Please use the Q&A section on LSEG Developer Community Portal to request access to the Snapshot API (REST API which will permit you to make a request for a RIC like 'US/HOLIDAY').

Closing issue for now. Please let us know if there are further questions.