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
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 684 Datastream
- 1.4K DSS
- 615 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 250 ETA
- 554 WebSocket API
- 37 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 643 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 26 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 193 TREP Infrastructure
- 228 TRKD
- 915 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛