Skip to main content

Build Nubra flexi basket payloads from grouped option legs

Project description

nubra_flexi_payload

Build Nubra flexi basket payloads from grouped option strategy input.

Install

pip install nubra_flexi_payload

Public API

  • build_option_strategy(...)
  • build_flexi_payload(...)
  • quote_fetcher_factory(md_instance)

Usage

from nubra_flexi_payload import build_option_strategy, build_flexi_payload, quote_fetcher_factory


symbols = build_option_strategy(
    underlying="ITC",
    legs=[
        [302.5, "PE", "week1", "BUY", 1],
        [315, "CE", "week1", "BUY", 1],
    ],
)

payload = build_flexi_payload(
    symbols=symbols,
    instruments_df=instruments_df,
    quote_fetcher=quote_fetcher_factory(md),
    basket_name="AutoBuiltFlexiStrategy",
    tag="auto_entry",
    exchange="NSE",
    multiplier=3,
    order_delivery_type="ORDER_DELIVERY_TYPE_CNC",
    limit_buffer_paise=500,
)

trade.flexi_order(payload)

Leg Input

Each leg can be passed as either:

  • [strike, option_type, expiry_type, side, lots]
  • {"strike": 302.5, "option_type": "PE", "expiry_type": "week1", "side": "BUY", "lots": 1}

Supported expiry_type values:

  • week0
  • week1
  • week2
  • week3
  • month

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

nubra_flexi_payload-0.1.0.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

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

nubra_flexi_payload-0.1.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for nubra_flexi_payload-0.1.0.tar.gz
Algorithm Hash digest
SHA256 97e960d70c1a8def1823effbbefadc26f1d623944eff46cfb0a64a6d19879af2
MD5 209de22c49cb6ed1c099450ed8ecc32e
BLAKE2b-256 20631524bbddaca62366f2091fadc2b553363c07f870e8e9a42fddb5c0fd4d20

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nubra_flexi_payload-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 15904568a8d0780635515cc9301c945740356e5752d33578e6bd4f590f43b876
MD5 2455a093092df497fba26208df0bc204
BLAKE2b-256 4ca7a2625b44dce6b1676d9ef94b80830eec94ee9a5cd3af37e5379dce89c832

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