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.

Amibroker Execution Module – Hedged Index Futures for Directional…

In the last tutorial, we learn the importance of Hedging Futures Position with OTM Options for Reduced Margin. This tutorial focus on how to...
Rajandran R
14 min read

Multi Legged Options Execution – Amibroker Module – Button…

This tutorial provides you a basic framework for sending multi-legged options module and how to exit the multi-legged option module using a simple button...
Rajandran R
8 min read

Sending Option Orders and Exiting Option Orders in Algomojo…

This tutorial helps you to understand the options trading module and the requirements to set up and send and exit option orders from Amibroker...
Rajandran R
5 min read

Leave a Reply

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