forked from DigitalRuby/ExchangeSharp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConvertOption.cs
More file actions
24 lines (21 loc) · 726 Bytes
/
ConvertOption.cs
File metadata and controls
24 lines (21 loc) · 726 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using System.Threading.Tasks;
using CommandLine;
using ExchangeSharp;
using ExchangeSharpConsole.Options.Interfaces;
namespace ExchangeSharpConsole.Options
{
[Verb("convert", HelpText =
"Converts csv exchange data to bin files for optimized reading.\n" +
"Files are converted in place and csv files are left as is.\n" +
"Example: convert --symbol btcusd --path ../../data/gemini")]
public class ConvertOption : BaseOption, IOptionWithIO, IOptionPerMarketSymbol
{
public override Task RunCommand()
{
TraderExchangeExport.ExportExchangeTrades(null, MarketSymbol, Path, CryptoUtility.UtcNow);
return Task.CompletedTask;
}
public string MarketSymbol { get; set; }
public string Path { get; set; }
}
}