TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
scott oliver
NA
82
16.6k
Pull API data with RestSharp and insert into SQLite
Oct 7 2020 6:53 PM
Hello, I want to take some information from the OTC website API and put it into a sqlite db. This is what I have to pull the information. It currently saves it into a csv file. What is the easiest way to write it to the DB instead?
public
void
otcRestClient()
{
var restSharpClient =
new
RestClient(
"https://www.otcmarkets.com"
);
var downloadRequest =
new
RestRequest(
"research/stock-screener/api/downloadCSV?pageSize=20"
,
Method.GET);
var fileInBytes = restSharpClient.DownloadData(downloadRequest);
File.WriteAllBytes(@
"C:\Users\openuser\Documents\Stock Reports\OTC\OTCStockData.csv"
,
fileInBytes);
Console.WriteLine(
"\n\nPress any key ..."
);
Console.ReadKey();
}
Reply
Answers (
2
)
What is difference between Private and static Constructor??
Fetch a binary data from database