Skip to main content

Python client for the LOBSTER financial data API

Project description

lobsterdata

Python client for the LOBSTER financial data API.

LOBSTER provides high-quality, tick-level order book data for NASDAQ-listed stocks, widely used in academic finance research.

Installation

pip install lobsterdata

Quick start

from lobsterdata import LobsterClient

client = LobsterClient(
    api_key="your_api_key",
    api_secret="your_api_secret",
    is_pilot=False,   # True → dev.lobsterdata.com, False → lobsterdata.com
)

# Submit a data request
result = client.submit_request(
    symbol="AAPL",
    start_date="2025-02-03",
    end_date="2025-02-07",
    level=10,
    exchange="NASDAQ",
)
request_id = result["data"]["request_id"]

# Download when ready
filepath = client.download_request(request_id, download_dir="./downloads")

# Or download + delete everything that is ready in one call
saved = client.download_and_cleanup(download_dir="./downloads")

See the examples/ directory for a complete polling workflow.

API reference

Method Description
submit_request(symbol, start_date, end_date, level, exchange) Submit a new data construction request
list_requests() List all requests for the authenticated user
get_request(request_id) Look up a single request by ID
list_alive_requests() Requests with status waiting, running, or undeleted finished
list_downloadable_requests() Finished requests with data available for download
download_request(request_id, download_dir) Download a completed request's data file
delete_request(request_id) Delete a request and its file from the server
download_and_cleanup(download_dir) Download all available files then delete them from the server

Credentials

Set your credentials as environment variables (copy .env.example.env):

export LOBSTER_API_KEY="your_api_key"
export LOBSTER_API_SECRET="your_api_secret"
export LOBSTER_IS_PILOT="false"

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lobsterdata-0.1.0.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lobsterdata-0.1.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file lobsterdata-0.1.0.tar.gz.

File metadata

  • Download URL: lobsterdata-0.1.0.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for lobsterdata-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0484acdae0e0fea7a8f0d75dd7923c11bc6a4ef9dcebca2b1dc212b00a0ce3fa
MD5 e2f99c05fdb38ccc54d87a81c772cbe8
BLAKE2b-256 2286d903a219117d0ba2e31478c47a987616f23823c7079e561528470535c658

See more details on using hashes here.

File details

Details for the file lobsterdata-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: lobsterdata-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for lobsterdata-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6b81f1f258870d15ed1662736851e73c384acee2b96397e0acb730955f60b488
MD5 061f7441ce2127be748fb820120ab579
BLAKE2b-256 3e0544bbf309bbf0732ff5026da388eebc198519053f221bd7eb9f60ccb714ec

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page