Jump to content
Guest andreif

Explanations on AuditId parameter required

Recommended Posts

Guest andreif

Client.Order() and Client.Trade() methods require an AuditId parameter. As I understand, it’s idea is to make sure I make my trade with up-to-date price. Thus, to make a trade I need to subscribe to price ticks stream, wait for the first tick, take AuditId from it and pass this value to the trading method, then unsubscribe stream, am I right? After what period of time this AuditId value will explire?

Share this post


Link to post

When you subscribe to the price stream for a particular market you should assume you will always get a price, with a value populated for the AuditId field (even if the market is stale or outside of trading hours). You don’t need to worry about the AuditId expiring, you should be subscribing to the price stream on initial “startup” of your application.

It’s worth mentioning that we’re looking at moving away from this style of trade requests and introducing a tolerance model.

Share this post


Link to post

Hi there - I ran across this older post as I am learning about various features to this API that's new to me.

 

So it seems like the AuditId is still needed for the trade method and that the tolerance model (something like a certain pip amount +/-) hasn't been implemented yet.

 

Reading through the docs, the following comes to mind: it seems like a somewhat simplified (feel free to call it simplistic :) approach would be to use GetPriceTicks to get the most recent price ticks for the order.  GetPriceTicks returns the date up to the millisecond, but no AuditId ... could this still be used as a substitute for streaming prices? It seems like it should work (I actually used this idea before with different platforms/brokers) and everything could be handled with the REST API.

Share this post


Link to post

Hello,

 

A few queries to address in your post:

 

1) Yes, AuditId is still needed when placing trades/orders, and as mentioned previously you get the AuditId when subscribing to the price stream for the market you want to trade/place an order. 

 

2) The Price Tolerance has been implemented. All markets have a default value of the Price Tolerance and you can find the value for a market using the GetMarketInformation call. You can change the default value on a per market basis by using the SaveMarketInformation call.

 

3) Since the GetPriceTicks call doesn't return the AuditId your suggested idea wouldn't work for placing a trade/order.

 

Kind Regards,

PM!

Share this post


Link to post

Hi,

 

Yes, AuditId is required for entry orders too now - although it wasn't back then in the referred to thread. As it's name implies the AuditId is used for auditing purposes so we can track the price at the time a trade/order was placed. Generally used in case a client has queries about perceived price discrepancies etc.

 

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
×