Skip to content

Commit

Permalink
Feature: download specification (#18)
Browse files Browse the repository at this point in the history
* feat: parameterless ctor in downloader

* feat: json specification
  • Loading branch information
Romazes authored May 2, 2024
1 parent 7b2d453 commit 5cd9538
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
4 changes: 4 additions & 0 deletions QuantConnect.OandaBrokerage.ToolBox/OandaDataDownloader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
using NodaTime;
using QuantConnect.Data;
using QuantConnect.Data.Market;
using QuantConnect.Configuration;
using QuantConnect.Brokerages.Oanda;
using QuantConnect.Util;
using Environment = QuantConnect.Brokerages.Oanda.Environment;
Expand All @@ -33,6 +34,9 @@ public class OandaDataDownloader : IDataDownloader
private readonly OandaBrokerage _brokerage;
private readonly OandaSymbolMapper _symbolMapper = new OandaSymbolMapper();

public OandaDataDownloader() : this(Config.Get("oanda-access-token"), Config.Get("oanda-account-id"))
{ }

/// <summary>
/// Initializes a new instance of the <see cref="OandaDataDownloader"/> class
/// </summary>
Expand Down
21 changes: 20 additions & 1 deletion oanda.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,24 @@
"order-types": [ "Market", "Limit", "Stop Market" ],
"assets": ["Forex", "CFD"],
"brokerage-url": "https://www.oanda.com/",
"documentation": "/docs/v2/cloud-platform/live-trading/brokerages/oanda"
"documentation": "/docs/v2/cloud-platform/live-trading/brokerages/oanda",
"module-specification": {
"download": {
"data-types": [
"Quote"
],
"resolutions": [
"Second",
"Minute",
"Hour",
"Daily"
],
"security-types": [
"Forex"
],
"markets": [
"Oanda"
]
}
}
}

0 comments on commit 5cd9538

Please sign in to comment.