Skip to main content

Openfeed SDK for Python

This SDK encapuslates the openfeed proto objects and faciliates client connections to openfeed servers.

Build

PyPI

Installation

pip install openfeed

Example Usage

import openfeed

# new client with credentials
of_client = openfeed.OpenfeedClient("username", "password")

# optional state handlers
of_client.on_error = lambda x: print("Error:", x)
of_client.on_connected = lambda x: print("Connected")
of_client.on_disconnected = lambda x: print("Disconnected")

# attach a global message handler
of_client.on_message = lambda x: print("Global Message:", x)

# sub to markets by symbol
def on_message(msg):
    print("Market Data: ", msg)

of_client.add_symbol_subscription("AAPL", callback=on_message)

# sub to markets by exchange
of_client.add_exchange_subscription("NYSE", callback=on_message)

of_client.start()

Expected Output

of-client: Connected
of-client: Market Data:  subscriptionResponse
of-client: Market Data:  marketSnapshot
of-client: Market Data:  marketUpdate
of-client: Market Data:  marketUpdate

Openfeed Documentation

Subscription Types

Openfeed supports many levels of subscription types.

OHLC

of_client.add_exchange_subscription(["NYSE"], callback=on_message, subscription_type=["OHLC"])
{
  marketId: 5389879102616877808
  symbol: "AAPL"
  open {
    price: 1205600
  }
  high {
    price: 1205600
  }
  low {
    price: 1205247
  }
  close {
    price: 1205490
  }
  volume: 43635
  priceVolume: 5259897.1422
  numberTrades: 224
  tradeDate: 20201116
  transactionTime: 1605547921000000000
  openStartTime: 1605547885850000000
  closeEndTime: 1605547920964000000
}

Release files for openfeed 1.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for openfeed 1.4.0
File Size Uploaded
openfeed-1.4.0.tar.gz 37.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for openfeed 1.4.0
File Interpreter ABI Platform
openfeed-1.4.0-py3-none-any.whl Python 3 none any Details

Total release size:75.3 kB

Release files / openfeed-1.4.0.tar.gz

Download URL openfeed-1.4.0.tar.gz
Size 37.0 kB
Tags Source
SHA-256 checksum
How to use checksums
bcd244fe8679d0fac5d70b5518044e32b6d462a5aa6b7bd9ff6e9a214611e7be
BLAKE2b-256 checksum
How to use checksums
390fa19a521811b91817a9e2d0afa91cd137a41ab852b9e862097b323d19f41e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / openfeed-1.4.0-py3-none-any.whl

Download URL openfeed-1.4.0-py3-none-any.whl
Size 38.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3a1ac95b03124458cff6995e8532693939776860d403329795c7e00e66d26722
BLAKE2b-256 checksum
How to use checksums
0413b561b0cf1fbe3a12a87aef0ec22e12c7f05233cc9839dcf87eecfddab624
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release history Release notifications | RSS feed

This release

1.4.0 This release

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.9

2 release files

1.1.8

2 release files

1.1.6

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

1 release file

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

4 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page