Historical.batch.list_files
List files for a batch job.
This will include all data files and support files.
Related: Download center.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
job_id | str | required | The batch job identifier. |
Returns
list[dict[str, Any]]
The file details for the batch job.
| Field | Type | Description |
|---|---|---|
filename | str | The file name. |
size | int | The size of the file in bytes. |
hash | str | The SHA256 hash of the file. |
urls | dict | A map of download protocol to URL. |
API method
1 2 3
Historical.batch.list_files(
job_id: str,
) -> list[dict[str, Any]] Example usage
1 2 3 4 5 6
import databento as db
client = db.Historical("$YOUR_API_KEY")
files = client.batch.list_files(job_id="GLBX-20220610-5DEFXVTMSM")
print(files) Example response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
[
{
"filename": "metadata.json",
"size": 1102,
"hash": "sha256:0168d53e1705b69b1d6407f10bb3ab48aac492fa0f68f863cc9b092931cc67a7",
"urls": {
"https": "https://api.databento.com/v0/batch/download/46PCMCVF/GLBX-20230203-WF9WJYSCDU/metadata.json",
"ftp": "ftp://ftp.databento.com/46PCMCVF/GLBX-20230203-WF9WJYSCDU/metadata.json",
}
},
{
"filename": "glbx-mdp3-20220610.mbo.csv.zst",
"size": 21832,
"hash": "sha256:1218930af153b4953632216044ef87607afa467fc7ab7fbb1f031fceacf9d52a",
"urls": {
"https": "https://api.databento.com/v0/batch/download/46PCMCVF/GLBX-20230203-WF9WJYSCDU/glbx-mdp3-20220610.mbo.csv.zst",
"ftp": "ftp://ftp.databento.com/46PCMCVF/GLBX-20230203-WF9WJYSCDU/glbx-mdp3-20220610.mbo.csv.zst",
}
}
]