Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
This class retrieves historical data from exchanges and stores it in a database.
Example:
```bash
pip install ehdtd
```
```python
import time
from ehdtd import Ehdtd
exchange = 'binance'
symbol = 'BTC/USDT'
interval = '1m'
limit = 10
db_data = {
'db_type': 'postgresql', # postgresql, mysql
'db_name': 'ehdtd',
'db_user': 'ehdtd',
'db_pass': 'xxxxxxxxx',
'db_host': '127.0.0.1',
'db_port': '5432'
}
fetch_data = [
{
'symbol': symbol,
'interval': interval
}
]
ehd = Ehdtd(exchange, fetch_data, db_data) # Create an instance
ehd.start() # Start fetching data
time.sleep(900) # First time Wait for available data, for the data to be updated,
# you must wait between 90 minutes and 2.5 hours depending on the interval
for v in fetch_data:
symbol = v['symbol']
interval = v['interval']
start_from = 0
until_to = None
return_type = 'pandas'
data_db = ehd.get_data_from_db(symbol, interval, start_from, until_to, return_type)
print(data_db)
print('=========================================================================')
print('')
time.sleep(1)
ehd.stop() # Stop fetching data
```
open_time
, open_date
, open_price
, close_time
, close_date
, close_price
, low
,
high
, volume
, exchange
, symbol
, interval
, status
, data
Column data
is not used,
and column status
can have three values: '__NON_CHECK__'
, '__OK__'
, '__ERROR__'
.
status == '__OK__'
, the file has consistent data.status == '__ERROR__'
, the file has inconsistent data.status == '__NON_CHECK__'
, the file is not analyzed.Use the function ehd.get_data_from_db(symbol, interval, start_from, until_to, return_type)
:
return_type == 'pandas'
, it returns a Pandas DataFrame.return_type == 'list'
, it returns a list of dictionaries.FAQs
Ehdtd - cryptoCurrency Exchange history data to database
We found that ehdtd demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.