Nubra Python SDK V3¶
Our new powerful OMS is coming soon, and as part of this transition we are providing UAT V3 access to help you test early and migrate with confidence. Use this documentation set with Nubra Python SDK 0.4.5 or above to validate your strategies against the newer V3 trading payload structure.
To use V3 payloads, initialize the SDK with trading_version=TradingAPIVersion.V3. If you are not testing V3 yet, you can continue using the main Python SDK documentation.
The Nubra Python SDK V3 gives Python developers a higher-level interface for authentication, market data, instruments, orders, and portfolio workflows without having to build low-level HTTP and session plumbing from scratch.
Use this page as the main entry point for installation, first-run setup, and the most common SDK workflows.
What's New In V3¶
This documentation set is intended for users who want to test the newer V3 trading payload structure with SDK 0.4.5 or above.
Compared with the current public track, this documentation set focuses on:
- the newer V3 order and payload structure
- the Python SDK
0.4.5or above release line for V3 testing - a cleaner and more unified order workflow
- updated trading examples aligned to the upgraded OMS flow
- a clear upgrade path for teams preparing to adopt V3 payloads
Majorly Updated Sections¶
If you are getting started with V3 payloads, start with these pages first:
- Authentication
- Trading Overview
- Place Order
- Place Multiple Orders
- Place Strategy Order
- Get Order Margin
- Realtime Order Updates
Migration Quick Start¶
If you are moving to SDK 0.4.5 or above and want to begin testing V3 payloads, use this order:
- Review Release Notes to understand the
0.4.5or above release line and V3 support. - Complete Authentication using SDK
0.4.5or above. - Resolve instruments through Get Instruments before testing quotes or order workflows.
- Read Trading Overview to understand the V3 order model and updated request shape.
- Validate one end-to-end order path using Place Order or Place Strategy Order, depending on your workflow.
Start here
If you are new to Nubra APIs, follow this order:
- Install SDK
0.4.5or above - Complete Authentication
- Use Get Instruments
- Fetch Current Price or Market Quotes
- Move to Place Order when your integration is ready
Why Use The Python SDK¶
Use the Python SDK when you want:
- a faster Python integration path
- built-in client abstractions for trading and market data
- a cleaner development workflow than raw HTTP requests
- support for UAT V3 testing and later production migration
If you prefer direct HTTP control or a language-agnostic integration path, use the REST API documentation instead.
Before You Install¶
Before installing the SDK, make sure you have:
- Python installed
- a Nubra account with API access
- your registered phone number and MPIN
Recommended:
- Visual Studio Code with the Python extension
Install Python from python.org.
Verify your Python installation:
python --version
python3 --version
Installation¶
Watch the SDK installation walkthrough:
Install the V3 SDK from PyPI:
python -m pip install nubra-sdk==0.4.5
If python points to Python 2 on your system, use:
python3 -m pip install nubra-sdk==0.4.5
Upgrade an existing installation:
python -m pip install --upgrade nubra-sdk==0.4.5
Environment choice
Use NubraEnv.UAT while testing V3 payloads. Move to NubraEnv.PROD only when your production environment is ready for the same flow.
Quick Start¶
The usual SDK workflow is:
- Install
nubra-sdk0.4.5or above. - Initialize the SDK client with the correct environment.
- Authenticate with OTP or TOTP and MPIN.
- Resolve instruments and
ref_idvalues. - Fetch market data or place trades.
Example:
from nubra_python_sdk.start_sdk import InitNubraSdk, NubraEnv
from nubra_python_sdk.refdata.instruments import InstrumentData
from nubra_python_sdk.marketdata.market_data import MarketData
from nubra_python_sdk.trading.trading_data import NubraTrader
from nubra_python_sdk.trading.trading_enum import TradingAPIVersion
# Use NubraEnv.UAT for V3 testing and enable Trading API V3 explicitly.
nubra = InitNubraSdk(
NubraEnv.UAT,
env_creds=True,
trading_version=TradingAPIVersion.V3,
)
instruments = InstrumentData(nubra)
market_data = MarketData(nubra)
trader = NubraTrader(nubra)
Common Next Steps¶
After installation, most users continue with these pages:
SDK Areas¶
The SDK provides Python access to these main areas:
Authentication
- OTP login
- TOTP login
Reference Data
- Instruments master
- Index master
Market Data
- Current price snapshots
- Market quotes
- Option chain snapshots
- Historical OHLC data
Real-Time Data
- Real-time quotes
- Option Greeks stream
- OHLCV stream
- Order book stream
- Index stream
Trading
- Place orders
- Modify and Cancel orders
- F&O Strategies orders
- Margin checks
- Real-time order updates
Portfolio
- Positions
- Holdings
- Funds and margins
Important Notes¶
Implementation details
- The install package name is
nubra-sdk, but the Python import root isnubra_python_sdk. - To test V3 payloads on SDK
0.4.5or above, initialize the client withtrading_version=TradingAPIVersion.V3. - Trading methods reach the Sentinel/V3 backend only when the account has the required server-side OMS/Sentinel flag enabled.
ref_idis a key identifier across quote, market-data, and trading workflows.- Use
NubraTrader(nubra)for Trading API V3 order workflows. - Validate instruments before placing orders.
If you are upgrading from an older integration, review Release Notes before switching to the V3 flow.
Before building polling-heavy or streaming-heavy systems, review API Rate Limits.
SDK Or REST API¶
Choose the Python SDK if you want:
- a faster onboarding path in Python
- built-in SDK abstractions
- a more convenient trading and market-data workflow in Python
Choose the REST APIs if you want:
- direct HTTP control
- language-agnostic integration
- lower-level implementation flexibility
Support¶
For support, contact support@nubra.io.