Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "-startdate-enddate" to the filename #17

Open
vritme opened this issue Jan 29, 2021 · 3 comments
Open

Add "-startdate-enddate" to the filename #17

vritme opened this issue Jan 29, 2021 · 3 comments

Comments

@vritme
Copy link

vritme commented Jan 29, 2021

When downloading an array of datasets of one contract and the same timeframe, separated, for example, by months in one folder - they will be replacing each other in one file with "contract code - timeframe" filename mask.
The only way is to download no more than one query in one folder by one time, and then rename resulting filename before next query with same contract code and timeframe in this folder. Or prepare different folders and set each query to "their own" folder from the beginning, which might be a little bit messy in the end... With years it may be ok, but with months or shorter - so many folder are needed..

Could filename mask be like "SBRF-TICKS-2020-01-01-2020-01-31" or "SBRF-TICKS-2020-01-01-2020-12-31" ?
It will automatically solve auto-replacing and losing data therefore, while downloading files in one folder by one commands array in cmd. Also it's much more informative than just "SBRF-TICKS" for all possible periods...

Ps. Thanks so much for brilliant lib ;> @ffeast

@ffeast
Copy link
Owner

ffeast commented Jan 30, 2021

@vritme thanks for your suggestion.
It was built like that on purpose so that if you have a trading tool that works with a specific contract you can update the data, open the tool and see up-to-date values without switching to a new filename. To support your case I think there could be an additional option indicating how the resulting file must be named. For example, --destfile="{{contract}}-{{timeframe}}-{{start_date}}-{{end_date}}". Does it make sense? Can you submit a PR?

@vritme
Copy link
Author

vritme commented Jan 31, 2021

Yes, an additional option would be perfect solution, so that everyone could specify the variant they need more.
Will make pull request.

@vritme
Copy link
Author

vritme commented Jan 31, 2021

PR is done. A bit tricky system with forking -> pr in your own fork -> then go in original project and only then you see your pr and able to link it with original project... But I've made it =).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants