Working with orders

Moderator: Moderator

Working with orders

Postby JuliaS » Tue Oct 02, 2018 10:49 am

Using ForexConnect API you can create, modify and delete orders, and manage positions.

For detailed step-by-step instructions on how to create and delete orders, see the Creating Order and Deleting Order articles.

For a detailed step-by-step instruction on how to open and close positions, see the Opening/Closing Position article.

The following sample scripts are available at github:

- CreateEntryOrder.py
This sample script shows how to create an entry limit order with specified account ID, instrument, trading direction (buy/sell), rate, and number of lots.

- RemoveOrder.py
This sample script shows how to delete an order by its order ID.

- OpenPosition.py
This sample script shows how to open a position by creating an open market order for specified account ID, instrument, buy/sell, rate, and number of lots.

- ClosePosition.py
This sample script shows how to close a position for a specified instrument by creating a close market order with an opposite direction.
JuliaS
 
Posts: 16
Joined: Wed Jan 25, 2017 11:19 am

Return to ForexConnect-Python API

Who is online

Users browsing this forum: No registered users and 2 guests