Martingale42/nautilus-dev / skills/nt-adapters
nt-adapters
VerifiedUse when working with exchange or data provider adapters, HTTP/WebSocket clients, instrument providers, or venue integration in NautilusTrader.
references/examples/interactive_brokers/contract_download.py
View on GitHubimport asyncio
from nautilus_trader.adapters.interactive_brokers.common import IBContract
from nautilus_trader.adapters.interactive_brokers.historical import HistoricInteractiveBrokersClient
async def main() -> None:
host: str = "localhost"
port: int = 7497
client = HistoricInteractiveBrokersClient(host=host, port=port, log_level="DEBUG")
await client.connect()
await asyncio.sleep(1)
nse_nifty_fut_contract = IBContract(
secType="FUT",
exchange="NSE",
symbol="NIFTY50",
lastTradeDateOrContractMonth="20250327",
)
ce_contract = IBContract(
secType="OPT",
exchange="NSE",
symbol="NIFTY50",
lastTradeDateOrContractMonth="20250227",
strike=25000,
right="C",
includeExpired=True,
)
pe_contract = IBContract(
secType="OPT",
exchange="NSE",
symbol="NIFTY50",
lastTradeDateOrContractMonth="20250227",
strike=25000,
right="P",
includeExpired=True,
)
contracts = [nse_nifty_fut_contract, ce_contract, pe_contract]
instruments = await client.request_instruments(
contracts=contracts,
)
print(instruments)
if __name__ == "__main__":
asyncio.run(main())
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |