Jump to content

Recommended Posts

Hello,

When you subscribe to a realtime live price stream of market prices, each incoming price tick has an AuditID. This is a unique identifier for each price tick.

Kind Regards, PM

 

Share this post


Link to post

Hello,

When sending your trade or entry order request, the AuditId is one of the parameters in the request you send. This enables us to identify exactly the price you "saw" (had available) at the time your trade/order request was sent. 

Kind Regards, PM

Share this post


Link to post

Hi PM,

I am basing my trades on the historical daily data, so I do not have the AuditId. Will this prevent me from executing trade or entry order requests? Is there an API endpoint for getting the current price with the AuditID?

Thank you!

Share this post


Link to post

Hello Forexphile,

The expected workflow is that the user subscribes via the Lightstreamer API to live streaming market prices for the market they want to trade. The live prices stream contains the AuditID information for each incoming price tick. 

It isn't usual to trade on historical daily data because you cannot see the live market price at the time of placing the trade.  

You can find introductory material by reading the "Streaming API" section of the following page: https://docs.labs.gaincapital.com/#Getting Started/CIAPI Arky.htm%3FTocPath%3DGetting%20Started|_____1

Kind Regards, PM

Share this post


Link to post

Hello,

The normal workflow is/should be the same for trading on any timeframe. 

Roughly:

  1. Login/authenticate to the REST API
  2. Subscribe (via Lightstreamer API) to PRICES stream for markets you are interested in trading to receive live streaming prices.
  3. Optionally subscribe to the TRADEMARGIN and CLIENTACCOUNTMARGIN streams to see live updating data such as open trade equity, current trade margin requirements, Cash balance, net equity etc. 
  4. Subscribe to ORDERS stream to monitor any entry / closing orders and updates to those orders
  5. Send trade/order requests via REST API 

 

We currently do not have volume data for markets so this cannot be requested through the API.

Kind Regards, PM 

 

Share this post


Link to post

Hi PM,

I do not see a way to specify the timeframe with Lightstreamer, so basically, I should write code to create the daily bars, right? That is not a problem, I just want to make sure I'm using the streaming data correctly.

Thank you!

Share this post


Link to post

Hello,

To provide the best answer it will be helpful if you could provide some background context. From your question, are you trying to build your own charting application?

You may with to use the charting application we already offer on our Web or mobile App trading platforms. That way, you don't have to write your own charting program. Should you still want to create your own charting program:

Make a historical price data call to retrieve daily historical price data upto the current day. The current day since it is still unfinished at the time you make the call is returned as a partial bar. You can then use the Lightstreamer subscription to update the partial bar with each incoming price tick during the day. 

Kind Regards, PM

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×