b3cotahist
Biblioteca Python para leitura e fetch do arquivo COTAHIST da B3.
Instalação
pip install b3cotahist
Uso
Fetch da B3
import datetime
import b3cotahist
# Fetch dos dados do pregão de 01/03/2024
date = datetime.date(2024, 3, 1)
df = b3cotahist.get(date)
# Caso tenha problemas com SSL da b3
df = b3cotahist.get(date, raise_ssl_error=False)
# A B3 também disponibiliza dados consolidados por ano
df = b3cotahist.get_year(2024)
Leitura de arquivos
df = b3cotahist.read_zip(path='COTAHIST_D20240301.ZIP')
df = b3cotahist.read_txt(path='COTAHIST_D20240301.TXT')
Leitura de bytes
# Lendo a partir de bytes
with open('COTAHIST_D20240301.TXT', 'rb') as f:
dados = f.read()
df = b3cotahist.read_bytes(dados)
# Ou a partir de BytesIO
import io
bytes_io = io.BytesIO(dados)
df = b3cotahist.read_bytes(bytes_io)
Metadata
Release files for b3cotahist 0.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| b3cotahist-0.1.9.tar.gz | 4.8 kB | Without provenance | Details for b3cotahist-0.1.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| b3cotahist-0.1.9-py3-none-any.whl | Python 3 | none | any | Details for b3cotahist-0.1.9-py3-none-any.whl |
Total release size: 9.9 kB
Release files / b3cotahist-0.1.9.tar.gz
| Download URL | b3cotahist-0.1.9.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e4793484cbfbd5de736ae8fb7e252758668ee549dd7ed87ff763d67729fb1a7c
|
|
BLAKE2b-256 checksum How to use checksums |
d7047054203c1df53770c9189de4e7f598213f41bc07a48ecd22d443fc1246ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.7 Windows/10
|
Release files / b3cotahist-0.1.9-py3-none-any.whl
| Download URL | b3cotahist-0.1.9-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d962dd8a7ab703d03453e8a63b5a863af6b42f509310b4df55e348d9cde9dfb8
|
|
BLAKE2b-256 checksum How to use checksums |
2a9e0763fb7318a38fd40a3de8ded12433203ce5d3ce0646b15e7978583a9168
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.7 Windows/10
|
Security for b3cotahist 0.1.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.