Excel
OpenAlgo Excel Documentation
Introduction
OpenAlgo provides seamless integration with Excel for executing trading strategies, fetching market data, and managing orders. This documentation covers the available Excel functions, their usage, and examples.
Install the OpenAlgo - Excel Addins
Before installing OpenAlgo Excel Add-In, ensure you are selecting the correct version based on your Excel installation.
📌 Steps to Check Your Excel Version
Open Microsoft Excel
Click File → Account
Click About Excel
Look for "32-bit" or "64-bit" in the version details.
🔹 Which Version Should You Install?
If your Excel version is 64-bit → Install the 64-bit add-in ✅ (Recommended)
If your Excel version is 32-bit → Install the 32-bit add-in ✅
Download the OpenAlgo Excel Addin
âš .NET 6 Desktop Runtime is Required
OpenAlgo Excel Add-In is built using Excel-DNA, which requires the .NET 6 Desktop Runtime to run add-ins.
🔹 If the add-in is not working or Excel does not recognize it, install the .NET 6 Desktop Runtime from the link below:
âž¡ Download .NET 6 Desktop Runtime
✅ After installing the runtime, restart your system and try loading the add-in again.
Configuration
Setting API Key, Version, and Host URL
Function: oa_api(api_key, [version], [host_url])
Example Usage:
Parameters:
api_key
(Mandatory): API Key for authenticationversion
(Optional, default: "v1"): API versionhost_url
(Optional, default: "http://127.0.0.1:5000"): API host URL
Account Functions
Retrieve Funds
Function: oa_funds()
Example Usage:
Returns: A table with available funds and collateral details.
Retrieve Order Book
Function: oa_orderbook()
Example Usage:
Returns: A table with all open orders.
Retrieve Trade Book
Function: oa_tradebook()
Example Usage:
Returns: A table with executed trades.
Market Data Functions
Get Market Quotes
Function: oa_quotes(symbol, exchange)
Example Usage:
Returns: Market price details for the given symbol.
Get Market Depth
Function: oa_depth(symbol, exchange)
Example Usage:
Returns: Order book depth for buy/sell levels.
Fetch Historical Data
Function: oa_history(symbol, exchange, interval, start_date, end_date)
Example Usage:
Returns: Historical market data in a table format.
Order Functions
Place an Order
Function: oa_placeorder(strategy, symbol, action, exchange, pricetype, product, [quantity], [price], [trigger_price], [disclosed_quantity])
Example Usage:
Parameters:
Mandatory:
strategy
,symbol
,action
,exchange
,pricetype
,product
Optional:
quantity
,price
,trigger_price
,disclosed_quantity
Place a Smart Order
Function: oa_placesmartorder(strategy, symbol, action, exchange, pricetype, product, [quantity], [position_size], [price], [trigger_price], [disclosed_quantity])
Example Usage:
Modify an Order
Function: oa_modifyorder(orderid, strategy, symbol, action, exchange, [quantity], [pricetype], [product], [price], [trigger_price], [disclosed_quantity])
Example Usage:
Cancel an Order
Function: oa_cancelorder(orderid, strategy)
Example Usage:
Close All Open Positions
Function: oa_closeposition(strategy)
Example Usage:
Get Order Status
Function: oa_orderstatus(orderid, strategy)
Example Usage:
Open a Position
Function: oa_openposition(strategy, symbol, exchange, product)
Example Usage:
Notes
Test in OpenAlgo Analyzer Mode before using in live markets.
Support
For more details, visit OpenAlgo Docs.
Last updated