Authentication
Databento uses API keys to authenticate requests. You can view and manage your keys on the API keys page of your portal.
Each API key is a 32-character string starting with db-. By default, our library uses the environment variable DATABENTO_API_KEY as your API key. However, if you pass an API key to the Historical constructor through the key parameter, then this value will be used instead.
Related: Securing your API keys.
Example usage
1 2 3 4 5 6 7
import databento as db
# Establish connection and authenticate
client = db.Historical("$YOUR_API_KEY")
# Authenticated request
print(client.metadata.list_datasets())