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. By default, our library uses the environment variable DATABENTO_API_KEY as your API key. However, if you pass an API key to the Live constructor through the key parameter, then this value will be used instead.

Our Live API uses a challenge-response authentication mechanism to ensure that your API key is never sent over the network.

Related: Securing your API keys.

Example usage
1
2
3
4
5
6
7
8
9
10
11
12
import databento as db

# Create a live client
client = db.Live(key="$YOUR_API_KEY")

# Authentication happens on the first subscribe
client.subscribe(
    dataset="GLBX.MDP3",
    schema="trades",
    stype_in="parent",
    symbols="ES.FUT",
)