Skip to main content

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.

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


Download files

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

Source Distribution

fundedops-0.1.0.tar.gz (24.8 kB view details)

Uploaded Source

Built Distribution

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

fundedops-0.1.0-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for fundedops-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b3058fceec242d4178c3b2242b9f99a54b53078f1bf597563cef218c78fdd339
MD5 2fccf455ae9bb798ee2a379546697045
BLAKE2b-256 d0386c7f1401534936746fdbce6486838b7d5c162ed92568470cfff42dbefc76

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for fundedops-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 838be6ffff9785695169064e914001893cebd27b41916e1c0811467430dcdca1
MD5 0e5eff8e90fa8f2605ad4d9cca114231
BLAKE2b-256 460e6d39352cbf845d025cdd6061a8f138f073d03b1e39b7e7603e13735fb095

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