Reader small image

You're reading from  Python Algorithmic Trading Cookbook

Product typeBook
Published inAug 2020
Reading LevelIntermediate
PublisherPackt
ISBN-139781838989354
Edition1st Edition
Languages
Right arrow
Author (1)
Pushpak Dagade
Pushpak Dagade
author image
Pushpak Dagade

Pushpak Dagade is working in the area of algorithmic trading with Python for more than 3 years. He is a co-founder and CEO of AlgoBulls, an algorithmic trading platform.
Read more about Pushpak Dagade

Right arrow

Fetching the list of financial instruments

Financial instruments, also known as securities, are assets that can be traded in an exchange. In an exchange, there can be tens of thousands of financial instruments. The list of financial instruments is static in nature, as it doesn't change during the live trading hours. Financial instruments may change from time to time, but never within the same day. Having this data handy is the first step for algorithmic trading. This recipe shows how to fetch the list of financial instruments.

Getting ready

Make sure the broker_connection object is available in your Python namespace. Refer to the Technical requirements section of this chapter to set it up.

How to do it…

Fetch and display all the available financial instruments using broker_connection:

>>> instruments = broker_connection.get_all_instruments()
>>> instruments

We get the following output (your output may differ):

How it works…

This recipe fetches all...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Python Algorithmic Trading Cookbook
Published in: Aug 2020Publisher: PacktISBN-13: 9781838989354

Author (1)

author image
Pushpak Dagade

Pushpak Dagade is working in the area of algorithmic trading with Python for more than 3 years. He is a co-founder and CEO of AlgoBulls, an algorithmic trading platform.
Read more about Pushpak Dagade