Official Python SDK for the FundedOps API — typed accounts, positions, orders, history, and real-time streaming.
Project description
fundedops
The official Python SDK for the FundedOps API — typed access to accounts, positions, orders, trade history, and real-time streaming, backed by pydantic v2 models that mirror the wire format exactly.
Supports both MT4 and MT5 accounts — the same clients, methods, and models work identically against either platform.
This file doubles as the package's PyPI page.
Install
pip install fundedops
Requires Python 3.10+.
Authentication
Every request carries your API key as a bearer token
(Authorization: Bearer fo_...). Create a key from the developer portal. The
key travels in the WebSocket URL's query string — never log stream URLs.
Usage
Two first-class clients with an identical method surface — synchronous
FundedOps and asynchronous AsyncFundedOps. Every method lives under the
client.accounts namespace, except wait_until_connected and stream,
which are on the client itself.
Synchronous
from fundedops import FundedOps
with FundedOps(api_key="fo_live_...") as client:
for account in client.accounts.list():
print(account.id, account.state, account.connection_status)
info = client.accounts.account_information(account.id)
print(info.balance, info.equity, info.currency)
# Deploy and block until connected (timeout is mandatory).
client.accounts.deploy(account.id)
client.wait_until_connected(account.id, timeout=180)
The full lifecycle and read surface is available on client.accounts:
create, get, list, update, delete, deploy, undeploy,
redeploy, account_information, positions, pending_orders,
history_deals, and history_orders.
Asynchronous
AsyncFundedOps is the exact awaitable mirror — same constructor, same
method names, same return types (a parity test enforces it):
import asyncio
from fundedops import AsyncFundedOps
async def main():
async with AsyncFundedOps(api_key="fo_live_...") as client:
accounts = await client.accounts.list()
info = await client.accounts.account_information(accounts[0].id)
print(info.equity)
asyncio.run(main())
Streaming
client.stream([account_id, ...]) opens a WebSocket, subscribes each
account, answers server pings for you, and yields typed events:
from fundedops import FundedOps
client = FundedOps(api_key="fo_live_...")
for event in client.stream(["9b2c..."]):
if event.type == "positions_updated":
print("open:", len(event.updated), "closed:", event.removed_ids)
Errors
Every non-2xx response raises a typed exception derived from
FundedOpsError (ValidationError, UnauthorizedError,
PaymentRequiredError, NotFoundError, RateLimitedError with
retry_after, and more), each carrying status, message, and
request_id.
Documentation
Full API reference and guides: https://api.fundedops.com/docs
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 fundedops-0.1.1.tar.gz.
File metadata
- Download URL: fundedops-0.1.1.tar.gz
- Upload date:
- Size: 26.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a98544f310ef29d3fa1021848a255ac794ac525db70f7d86e1426543f2596ebb
|
|
| MD5 |
ac029efd8426a0fe33de99946637beaf
|
|
| BLAKE2b-256 |
d46ef21401dc39d291facf8b98b385fba4a7a8d682473a957474a378c4dd8e62
|
File details
Details for the file fundedops-0.1.1-py3-none-any.whl.
File metadata
- Download URL: fundedops-0.1.1-py3-none-any.whl
- Upload date:
- Size: 17.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a1578aa3ff898884cd60c6128e4631b5c7ec61c72a8c6738a4b0f03357b6388
|
|
| MD5 |
cf8f44a471a48504470decdfceafb2df
|
|
| BLAKE2b-256 |
569dc20d8e62907c8909206cb7c51d06d5092f99fb0827bfdff0b7b09cb41d6d
|