Hello there, I am very much the noob. I am trying to get historic data, for now, BTCUSD and BTCAUD from coinbase.
I believe BTCAUD may not be available, so lets start with BTCUSD.
I have written this script with the help of the GPT……but it is still prompting me for answers. It does not seem to ignore the --no-interaction flag.
So I am wondering two things;
- Is BTCAUD available (from coinbase)
- How can I get the no interaction flage working
Thank you very much for any info anyone might have.
Hungry.
Below is the script……
# === Runs the included script in the current scope. That'll share variables, functions as though it was one ===
. "$PSScriptRoot\Include.ps1"
# === CONFIG ===
$startDate = "20200101"
$endDate = (Get-Date).ToString("yyyyMMdd")
$market = "coinbase"
$securityType = "crypto"
# Coinbase doesn't have tick
#$resolutions = @("tick", "second", "minute", "hour", "daily")
$resolutions = @("second", "minute", "hour", "daily")
# Coinbase symbols (you can add more)
# $symbols = @("BTCUSD", "BTCAUD", "ETHUSD", "LTCUSD", "BCHUSD", "DOGEUSD", "ADAUSD","SOLUSD", "AVAXUSD", "MATICUSD", "DOTUSD", "SHIBUSD")
$symbols = @("BTCUSD")
# === DOWNLOAD LOOP ===
foreach ($symbol in $symbols) {
foreach ($resolution in $resolutions) {
Write-Host "`n[INFO] Downloading $symbol | $market | $resolution"
# === Clean old data (optional)
$dataPath = ".\data\$securityType\$market\$($symbol.ToLower())\$resolution"
if (Test-Path $dataPath) {
Write-Host "[INFO] Removing old data at $dataPath"
Remove-Item $dataPath -Recurse -Force
}
# === Download fresh data
lean data download --security-type $securityType --symbol $symbol --market $market --resolution $resolution --start $startDate --end $endDate --data-provider "Coinbase Advanced Trade" --no-interaction
}
}
Mia Alissi
Here's the information you need:
Availability of BTCAUD on Coinbase: Based on the Coinbase's supported assets documentation, BTCAUD does not appear in the list of available trading pairs. This suggests that BTCAUD is not supported for download from Coinbase.
Using the
--no-interaction
Flag: The--no-interaction
flag in Lean is intended to run commands without requesting user input during the process. If it prompts for interaction, it may be due to another underlying issue that isn't related to the flag itself, such as a script error or misconfiguration. Ensure that this flag is placed correctly as an option for thelean data download
command.Here's a simplified PowerShell snippet that focuses on downloading
BTCUSD
data to help verify:Replace the script snippet in your context and run it to see if it resolves the issue. For detailed troubleshooting, make sure you have the correct paths and permissions for the application to read and write data.
Sources: Coinbase Crypto Price Data - QuantConnect.com
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!