Comments (14)
Hi @InnovArul, sure you're right, I'll probably roll back investiny
to use investpy
format by default, which is dd/mm/yyyy
👍🏻
from investiny.
@alvarobartt thats awesome. thanks! :)
from investiny.
Right @GSLabIt, so the intervals are as it follows: 1, 5, 15, 30, 45, 60, 120, 240, 300, "D", "W", "M"
, find more details at https://alvarobartt.github.io/investiny
from investiny.
no but u can convert it by d.strftime('%m/%d/%Y') d for dateformat
from investiny.
no but u can convert it by d.strftime('%m/%d/%Y') d for dateformat
well ok ..but yyyy-mm-dd
is widely used ..btw ..thx anyway
from investiny.
found an issue on same day data, try:
d = historical_data(6408, '09/01/2022', '09/01/2022', "1")
i get an error:
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "venv-3/lib/python3.8/site-packages/investiny/historical.py", line 48, in historical_data "date": [datetime.fromtimestamp(t).strftime(time_format) for t in data["t"]], # type: ignore KeyError: 't'
from investiny.
Could you at least change:
d['date] = [ '13:25 09/01/2022' .....]
to [ '09/01/2022 13:25' .....]
from investiny.
I had a similar question regarding the date format.
In investpy
library, the date format followed was %d/%m/%Y
. In investiny
library, the date format is changed to %m/%d/%Y
.
Would it be possible to maintain consistency?
I think its ok to follow any of these formats. If possible, please maintain the same format in both libraries?
from investiny.
Hi @GSLabIt I'm still exploring how to add that functionality, but I'll probably add some environment variables or a configuration file to define all those things (like input formats, output formats, timezone, etc.) so that you set it up once and that's it 👍🏻
from investiny.
Indeed I don't know why I picked the %m/%d/%Y
when it's probably the most confusing date format ever lol... Now this is a breaking change as some developers are already using investiny
as a replacement for investpy
, so let me figure out the best way to do it without breaking anything. Thanks!
from investiny.
found an issue on same day data, try:
d = historical_data(6408, '09/01/2022', '09/01/2022', "1")
i get an error:
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "venv-3/lib/python3.8/site-packages/investiny/historical.py", line 48, in historical_data "date": [datetime.fromtimestamp(t).strftime(time_format) for t in data["t"]], # type: ignore KeyError: 't'
I found the issue.. need to use int
when interval
is numeric a value.
from investiny.
Right @GSLabIt, so the intervals are as it follows:
1, 5, 15, 30, 45, 60, 120, 240, 300, "D", "W", "M"
, find more details at https://alvarobartt.github.io/investiny
Could you add a check for interval
, kind of if interval = int(interval) if interval.isdigit() else interval
. This will avoid issues
from investiny.
@GSLabIt let me think about that! 👍🏻
from investiny.
Hi again @GSLabIt I've decided to use environment variables at the end, I still need to add the documentation page of this newly included feature, but in the meantime you can set the environment values of INVESTINY_DATE_FORMAT
and INVESTINY_TIME_FORMAT
to use your preferred format for both the date and the date plus the time, default values are %m/%d/%Y
and %m/%d/%y %H/%M
, respectively.
To install the current unreleased version please run pip install git+https://github.com/alvarobartt/investiny.git
from investiny.
Related Issues (20)
- Request to Investing.com API failed with error code: 503. HOT 2
- `exchange` param in `search_assets` has unexpected behaviour HOT 1
- pip install error in Linux HOT 4
- Issue with Date and Price mapping HOT 4
- `volume` is returned even when `n/\a
- Send asynchronous requests to tvc6.investing.com to improve performance
- Issue with Date and Price mapping HOT 5
- Issue with max from date and limit of max daily data HOT 9
- Error 403 HOT 5
- solution for investiny 403 HOT 9
- Still get 403 with tvc6 API HOT 33
- Request to Investing.com API failed with error code: 403
- Possible way to fix 403 Error HOT 14
- ERROR: Could not find a version that satisfies the requirement investiny HOT 7
- 403 in search_assets as well HOT 7
- Error code: 403 with investpy and investiny HOT 3
- Can not install this library HOT 4
- Solution with cloudscraper
- Examples from the README fail
- Request to Investing.com API failed with error code: 403 HOT 25
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from investiny.