Python SDK for the Simudyne Pulse synthetic market data API
Project description
Simudyne Pulse Python SDK
Python client for the Pulse synthetic market data API. Returns data as Polars DataFrames.
Installation
pip install simudyne-pulse
The distribution is named simudyne-pulse; the import name is simudyne:
from simudyne import PulseABM
Requires Python 3.10+.
Development builds
The dev branch is a prerelease channel. Pushes to it publish prerelease
versions (e.g. 0.6.0.dev1) that are separate from the stable versions cut on
prod. pip install simudyne-pulse always resolves to the latest stable
release and ignores prereleases, so dev builds can never affect a normal
install.
To install the latest dev build, opt in with --pre:
pip install --pre simudyne-pulse
Only use dev builds for testing unreleased changes; they are not guaranteed
stable. Merge dev into main to promote those changes to a stable release.
Quick start
from simudyne import PulseABM
client = PulseABM(api_key="pk_live_...")
# List available exchanges, symbols, and dates
symbols = client.data.get_symbols(year=2024)
print(symbols)
# Fetch L2 order book data
df = client.data.get_L2("HKEX", "HSIJ4", "2024-04-02T09:15:00", "2024-04-02T09:16:00")
print(df.head())
API reference
PulseABM(api_key, base_url=None)
| Parameter | Env variable | Default |
|---|---|---|
api_key |
SIMUDYNE_API_KEY |
required |
base_url |
SIMUDYNE_BASE_URL |
Pulse API |
client.data
All data methods return Polars DataFrames. Large result sets are automatically paginated.
# Available exchanges, symbols, and dates
client.data.get_symbols(year=2024)
# L1: top of book (best bid/ask)
client.data.get_L1("HKEX", "HSIJ4", "2024-04-02T09:15:00", "2024-04-02T10:00:00")
# L2: full order book (all levels)
client.data.get_L2("HKEX", "HSIJ4", "2024-04-02T09:15:00", "2024-04-02T09:16:00")
# Orders: individual order events
client.data.get_orders("HKEX", "HSIJ4", "2024-04-02T09:15:00", "2024-04-02T10:00:00")
# Trades: executed trades
client.data.get_trades("HKEX", "HSIJ4", "2024-04-02T09:15:00", "2024-04-02T10:00:00")
Parameters (same for all data methods):
| Parameter | Type | Description |
|---|---|---|
exchange |
str | Exchange code (e.g. HKEX) |
sym |
str | Symbol name (e.g. HSIJ4) |
datetime_start |
str | Start time, ISO 8601 (e.g. 2024-04-02T09:15:00) |
datetime_end |
str | End time, ISO 8601 |
client.profile
client.profile.get() # Account info
client.profile.usage() # API usage stats
client.api_keys
client.api_keys.list() # List active keys
client.api_keys.create(name="research") # Create a new key
client.api_keys.revoke(key_id="key_...") # Revoke a key
Configuration
You can set your API key as an environment variable instead of passing it directly:
export SIMUDYNE_API_KEY=pk_live_...
from simudyne import PulseABM
client = PulseABM() # picks up SIMUDYNE_API_KEY automatically
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file simudyne_pulse-0.6.0.dev1.tar.gz.
File metadata
- Download URL: simudyne_pulse-0.6.0.dev1.tar.gz
- Upload date:
- Size: 18.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9d2463117654c5c3e30a20c45f12ab51c574929c675ea91603c745aa95c2107
|
|
| MD5 |
39cb656412a2fe9de1d773d4913240ad
|
|
| BLAKE2b-256 |
ad7859eeed4ab6b4fcfab7db9e562095cf0fb11d186e5e0a6f7ddc047ff2c6dd
|
Provenance
The following attestation bundles were made for simudyne_pulse-0.6.0.dev1.tar.gz:
Publisher:
release.yml on simudyne/pulse-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
simudyne_pulse-0.6.0.dev1.tar.gz -
Subject digest:
b9d2463117654c5c3e30a20c45f12ab51c574929c675ea91603c745aa95c2107 - Sigstore transparency entry: 2184267571
- Sigstore integration time:
-
Permalink:
simudyne/pulse-sdk@873893c6e1d724fc334ec85b4f7ac750b23b759a -
Branch / Tag:
refs/heads/dev - Owner: https://github.com/simudyne
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@873893c6e1d724fc334ec85b4f7ac750b23b759a -
Trigger Event:
push
-
Statement type:
File details
Details for the file simudyne_pulse-0.6.0.dev1-py3-none-any.whl.
File metadata
- Download URL: simudyne_pulse-0.6.0.dev1-py3-none-any.whl
- Upload date:
- Size: 18.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
223d6ba7887acb141c508d556c8b4d9aa617c71624f209571c20ec1d4be48322
|
|
| MD5 |
b8bed5074ddc389a323399dde0e1cf61
|
|
| BLAKE2b-256 |
e1c3dab14a11e643dcc066323f7d750560e1fe5c9eee520ec3b5980678bfb1ad
|
Provenance
The following attestation bundles were made for simudyne_pulse-0.6.0.dev1-py3-none-any.whl:
Publisher:
release.yml on simudyne/pulse-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
simudyne_pulse-0.6.0.dev1-py3-none-any.whl -
Subject digest:
223d6ba7887acb141c508d556c8b4d9aa617c71624f209571c20ec1d4be48322 - Sigstore transparency entry: 2184267770
- Sigstore integration time:
-
Permalink:
simudyne/pulse-sdk@873893c6e1d724fc334ec85b4f7ac750b23b759a -
Branch / Tag:
refs/heads/dev - Owner: https://github.com/simudyne
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@873893c6e1d724fc334ec85b4f7ac750b23b759a -
Trigger Event:
push
-
Statement type: