Download Prices CSV

using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

namespace TechnetSamples
{
class Program
{
static void Main(string[] args)
{
string URL = "FILE_URL_PATH";
System.Net.WebRequest webRequest = System.Net.WebRequest.Create(URL);
webRequest.Method = "POST";
webRequest.ContentType = "application/x-www-form-urlencoded";
Stream reqStream = webRequest.GetRequestStream();
string postData = "username=YourUser&password=YourPassword";
byte[] postArray = Encoding.ASCII.GetBytes(postData);
reqStream.Write(postArray, 0, postArray.Length);
reqStream.Close();
StreamReader sr = new StreamReader(webRequest.GetResponse().GetResponseStream());
string Result = sr.ReadToEnd();

using (TextWriter tw = new StreamWriter("c:\\result.csv", true))
{
tw.Write(Result);
}
}
}
}