# How to Get All Your Open Positions from MetaTrader 5 with Python > MetaTrader 5 Trading Bot **Published by:** [The Crypto - AI - Cyber Disruption Continuum](https://paragraph.com/@appnologyjames/) **Published on:** 2024-08-06 **Categories:** python, trading bot, metatrader 5, metatrader, metatrader 5 python trading bot, metatrader 5 exper **URL:** https://paragraph.com/@appnologyjames/how-to-get-all-your-open-positions-from-metatrader-5-with-python ## Content MetaTrader 5 made Python Trading Bot development significantly simpler. Suddenly it was possible to access the vast range of features available on MetaTrader without going through the pain of learning C++.For Python developers, it was a double win. Python has a huge range of free libraries available for just about any time of computing discipline you can imagine, and it’s incredibly easy to integrate them together. My company, Creative Appnologies, uses this feature of Python for much of our analysis. An open-source version of our Python Trading Bot is being developed and is available on GitHub.One of the key functions you need in a Trading Bot is the ability to list all your open positions. This can be especially useful if you’re tracking multi-day trades.Join our amazing Discord community here. To do this on MetaTrader 5, do the following:Make sure you’re connected to MetaTrader 5Integrate the following code:# Function to retrieve all open positions def get_open_positions(): # Get position objects positions = MetaTrader5.positions_get() # Return position objects return positionsSubscribe to receive more amazingly helpful tips. Subscribe ## Publication Information - [The Crypto - AI - Cyber Disruption Continuum](https://paragraph.com/@appnologyjames/): Publication homepage - [All Posts](https://paragraph.com/@appnologyjames/): More posts from this publication - [RSS Feed](https://api.paragraph.com/blogs/rss/@appnologyjames): Subscribe to updates ## Optional - [Collect as NFT](https://paragraph.com/@appnologyjames/how-to-get-all-your-open-positions-from-metatrader-5-with-python): Support the author by collecting this post - [View Collectors](https://paragraph.com/@appnologyjames/how-to-get-all-your-open-positions-from-metatrader-5-with-python/collectors): See who has collected this post