Google Spreadsheets

Quick Start Guide

OpenAlgo ExcelSheets

Step 1: Clone the Template Spreadsheet

  1. Click "File" > "Make a copy" to create a duplicate of the spreadsheet.

  2. In the "Make a copy" dialog, enter a name for your copy of the spreadsheet, such as "My OpenAlgo Trading Sheet".

  3. Ensure the "Folder" is set to your desired location, such as "My Drive".

  4. Click the "Make a copy" button to create the new spreadsheet.

Step 2: Configure API Settings

  1. Open the cloned spreadsheet

  2. Go to Extensions > AppScript editor

  3. Locate these lines in the script:

  4. Replace with your OpenAlgo credentials:

    • apikey: Your unique OpenAlgo API key

    • HostSefver: Your Custom Domain or Free Ngrok Domain where OpenAlgo is hosted

Spreadsheet Structure

The template contains two main sheets:

  • PlaceOrder: For entering trade details

  • Logs: Automatic logging of trade orders

PlaceOrder Sheet Columns

Column
Description
Example

C3

Exchange

NSE, BSE, NFO, MCX, CDS

D3

OpenAlgo Symbol

INFY, RELIANCE

E3

Action

BUY/SELL

F3

Price Type

MARKET/LIMIT/SL/SL-M

G3

Total Quantity

100

H3

Price

1500.50 (for LIMIT/STOP)

I3

Trigger Price

1480.00 (for STOP)

J3

Split Size

0 - No SplitOrder Specific Number - Send Split order with split size quantity

K3

Product Type

INTRADAY/DELIVERY

Split Order Functionality

  • Split Size 0: Entire quantity in one order

  • Split Size > 0: Multiple orders of specified size

Execution

  1. Fill in trade details in the PlaceOrder sheet

  2. Press the PlaceOrder function

  3. Check response in cell C9

  4. View detailed logs in the Logs sheet

Troubleshooting

Common Issues

  1. API Key Invalid

    • Verify key in OpenAlgo dashboard

    • Check network connectivity

    • Ensure API key has trading permissions

  2. Host URL Incorrect

    • Confirm exact URL from OpenAlgo platform

    • Check for any trailing slashes

    • Verify ngrok or custom endpoint

  3. Permissions

    • Accept Google Sheets script permissions

    • Verify API key authorization

Security Notes

  • Keep API key confidential

  • Use secure, unique API keys

  • Regularly rotate credentials

  • Monitor trading activities

Last updated

Was this helpful?