Rajandran R Founder of Marketcalls and Co-Founder Algomojo. Full-Time Derivative Trader. Expert in Designing Trading Systems (Amibroker, Ninjatrader, Metatrader, Python, Pinescript). Trading the markets since 2006. Mentoring Traders on Trading System Designing, Market Profile, Orderflow and Trade Automation.

How to use Postman to Send Orders to Your Trading Account

1 min read

Postman is an API testing tool that started in 2012 as a side project by Abhinav Asthana to simplify API workflow in testing and development. If you are a developer who wants to test and deploy REST API-based algo trading solutions then postman comes in handy without the hassle of writing, not even a single line of code just to test an API’s functionality.

In Algomojo we use Postman a lot to test and deploy robust API solutions for algotrading. Here is a video tutorial that explains how to use Postman to test Algomojo API to send orders and retrieve the order book.

Where to Download Postman?

You can goto www.postman.com/downloads to download the postman application. currently postman supports web based version and desktop application for both Windows and Mac. Install the application in your desktop.

Working with Algomojo API – Get Requests

Currently all the APIs supported by Algomojo are POST Requests

What is a POST Request?

POST requests are used to send data to the Algomojo API server to send orders, modify/cancel orders, or to retrieve the order book/position book details. The data sent to the server is stored in the request body of the HTTP request. In case of Algomojo API the request body needs to be send in json format.

Sample JSON Format to PlaceOrder to the Broker.

{
    "api_key":"86cbef19e7e61ccee91e497690d5814e",
    "api_secret":"8dbb8a1c91649810c82ccfc0ea9d715a",
    "data":
      {
        "strg_name":"Test Strategy",
        "s_prdt_ali":"BO:BO||CNC:CNC||CO:CO||MIS:MIS||NRML:NRML",
        "Tsym":"NIFTY20NOVFUT",
        "exch":"NFO",
        "Ttranstype":"B",
        "Ret":"DAY",
        "prctyp":"MKT",
        "qty":"75",
        "discqty":"0",
        "MktPro":"NA",
        "Price":"0",
        "TrigPrice":"0",
        "Pcode":"NRML",
        "AMO":"NO"
      }
}

Step to Send the API Request

1)Copy the endpoint for PlaceOrder from the Algomojo Documentation and use the POST request and key in the API endpoint details.

2)Select the Body Tab

3)Select the Raw checkbox

4)select the JSON format from the dropdown

5)Create your API Post request as shown above. Request details can be get from the Algomojo Documentation

6)Press the send Button and in return you will be getting the API response as shown above

Rajandran R Founder of Marketcalls and Co-Founder Algomojo. Full-Time Derivative Trader. Expert in Designing Trading Systems (Amibroker, Ninjatrader, Metatrader, Python, Pinescript). Trading the markets since 2006. Mentoring Traders on Trading System Designing, Market Profile, Orderflow and Trade Automation.

AllinOneAlerts – Amibroker Alerts Module for Algomojo Users

AllinOneAlerts is one of the most important and most requested modules is to bring all sorts of alerts with few lines of coding efforts....
Rajandran R
58 sec read

Algomojo Platform Now Open to Angel Broking Users

We are proud to provide our Algomojo access to Angel Broking users. Now users of Angel Broking can enjoy Free API-based algotrading access. Free...
Rajandran R
4 min read

Algomojo Trading Platform Fee Reduced for Existing Brokers Clients

Algomojo strives to bring low-cost Algo trading services with a better user experience. We are always looking for new ways to improve our services and...
Rajandran R
50 sec read

Leave a Reply

Get Notifications, Alerts on Market Updates, Trading Tools, Automation & More