Hello everyone. I'm excited to be part of LEAN. It's definitely a huge and semi-intimidating project to just dive into. Having said that I kind of understand how the data engine works. I am battling getting up and running with Visual Studio as I prefer the real time intellisense and compiletime error reporting. I put together some code to pull GDAX historical data and then output it to the syntactically correct csv format. I'm trying to run a test algo against BTCUSD data for the last year; however, when I run it I get a CMD error per each "....datetime_trade.zip" file that I am reading from.
EG I'm reading from ....20180212_trade.zip and as a result I get an error for ....20180212_quote.zip. I've checked some of the sample algos with the provided data and do not see any "_quote" data. I'm assuming my alog implicitly needs it for something. Can someone point me into the right direction in regards to this data, what it is needed for, and how I can go about figuring out how to generate it?
As a side note: I have also noticed my lean launcher no longer shows a local chart after my algo runs... Not sure what is causing this.
public class TestAlgo : QCAlgorithm
{
/// <summary>
/// Initialise the data and resolution required, as well as the cash and start-end dates for your algorithm. All algorithms must initialized.
/// </summary>
public override void Initialize()
{
SetStartDate(2018, 1, 1); //Set Start Date
SetEndDate(2018, 6, 1); //Set End Date
SetCash(100000); //Set Strategy Cash
AddCrypto("BTCUSD", Resolution.Minute, Market.GDAX);
}
// Accessing requested data
public override void OnData(Slice data)
{
//via a tradebar dictionary (symbol - bar)
}
Adrian Campos
After some more research I'm assuming LEAN is looking for Quote data since I am subscribing to the `Slice` object `OnData` overload which contains QuoteData. I've figured out csv syntax for it and will be seeding some data soon.
*CLOSED*
Jared Broad
Thanks, Adrian, we can support both (there's a dictionary in LEAN somewhere which configures this). But if you can write quote data that would be better as it will model the spreads which are important in Crypto.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Adrian Campos
Jared, I was looking at the Coinbase Pro APIs to figure out where I should grab this data from. It seems like I may need to grab this data from multiple endpoints in order to satisfy all the properties on one QuoteBar object. The main endpoint I'm looking at is:
GET /products/<product-id>/book
Which seems provide data with no timestamps:
{ "sequence": "3", "bids": [ [ price, size, order_id ], [ "295.96","0.05088265","3b0f1225-7f84-490b-a29f-0faef9de823a" ], ... ], "asks": [ [ price, size, order_id ], [ "295.97","5.72036512","da863862-25f4-4868-ac41-005d11ab0a5f" ], ... ] }
The `QuoteBar` class contains properties: OpenTime, Open, High, Low, and Close which can not be solely satisfied with the data returned from the above endpoint. How does QuantConnect get this data in the algorithm lab?
Right now it seems like the only way I will be able to construct a `QuoteBar` is by getting the entire book, sending a request per bid/ask to the
/orders/<order-id>
endpoint to get the time, and then correlating that time with the tradebar data I have saved in my database. Is there an easier way that you know of that would not require blasting Coinbase's API?
Jared Broad
We work with Kaiko.com - they are a crypto data vendor who have gathered the data over the years.
You can also use the GDAX downloader for TradeBars.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Adrian Campos
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!