Error in curl::curl_fetch_memory(url, handle = handle) :
While extracting TRTH data with REST API in R but got stuck in the last step to download completed extraction. I have followed the API reference tree to Extraction - ExtractedFile - GetDefaultStream. However, R gives me error message that:
Error in curl::curl_fetch_memory(url, handle = handle) :
Failed writing received data to disk/application.
I can't find anything helpful online about this issue with R. I remember that Refintiv has a tutorial on using REST API with R, so I am wondering if you have any suggestion on how to extract data with R.
I saw
Best Answer
-
The following articles provides example scripts in R.
- Tick History in R language - Part 1
- Tick History in R language - Part 2
- Tick History in R language - Part 3
An example is available in Github.
The error seems like in the R library or script. You may try the examples to see if it works in your environment or not.
Also, I have tried the GetDefaultStream endpoint and can get result. Below is some sample.
> library(httr)
> library(jsonlite)
> token <- paste0("Token_h5bhL...")
> url <- paste0("https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/ExtractedFiles('VjF8fDU5NzQ5ODk2MA')/$value")
> r <- GET(url,add_headers(prefer = "respond-async",Authorization = token))
> r
Response [https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/ExtractedFiles('VjF8fDU5NzQ5ODk2MA')/$value]
Date: 2020-03-11 08:55
Status: 200
Content-Type: text/plain
Size: 122 B
RIC,Bid Price,Ask Price,Trade Date,Asset Type
AAPL.O,289.25,289.32,03/03/2020,EQTY
IBM.N,128.85,128.86,03/03/2020,EQTY0
Answers
-
Hello @Prathibha.Mariyappa,
You are not mentioning if you are able to extract other TRTH content successfully, and only have difficulty with this specific request, or you have not been able to retrieve any results.
I am not familiar with R tutorial.
To make sure that you are able to go through the steps that are required to retrieve from TRTH successfully:
1. Submit the request
2. Check the status of the job until the job is completed
3. Get the result
I would run one of the TRTH Postman tutorials, and once that is successfull, next , would replace the request in the tutorial with the one you are requiring. Once the request is successful in Postman, then one can move it into any code, including R.
Hope this helps
0
Categories
- All Categories
- 6 AHS
- 39 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 60 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛