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 Reference 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.Reference("$YOUR_API_KEY")

# Authenticated request
print(client.security_master.get_last(symbols="AAPL"))