Jump to content
Kush

StopLimitOrder has no parentOrderId

Recommended Posts

Hi PM,

When making a request to GetChangedOrders the api is returning StopLimitOrder (Type 2/3) without a ParentOrderId.

This seems really odd because the stop order is associated to an open trade, is this expected behaviour? Also when I changed the from value to an older timestamp, it displayed with ParentOrderId 

Request url: https://ciapi.cityindex.com/TradingAPI/order/changedorders?tradingAccountId=****&from=1539734400

The api responded with:

"StopLimitOrder":{
"Guaranteed": false,
"TriggerPrice": 112.25,
"ExpiryDateTimeUTC": null,
"Applicability": "GTC",
"ParentOrderId": null,
"TrailingDistance": null,
"Associated": false,
"TriggerLevelCalculationTypeId": null,
"TriggerLevelCalculationValue": null,
"OrderId": 653909663,
"Reference": null,
"OrderReference": null,
"MarketId": 400617030,
"Direction": "sell",
"Quantity": 0.18,
"OriginalQuantity": 0.18,
"Price": null,
"OriginalPrice": null,
"TradingAccountId": *******,
"CurrencyId": 6,
"StatusId": 2,
"TypeId": 2,
"IfDone":[],
"OcoOrder": null,
"AutoRollover": false,
"LastChangedDateTimeUTC": "/Date(1539755736207)/",
"AllocationProfileId": 0,
"AllocationProfileName": "",
"Source": "G2",
"ExecutedDateTimeUTC": null,
"AssociatedOrders":{
"Stop": null,
"Limit": null
}
}
 
Can you please advise?
 
As the from value should be in seconds and not milliseconds. The latter throws internal 500 error.

Share this post


Link to post

Hello Kush,

The GetChangedOrders call is for users that are connecting with the FIX API, rather than our own proprietary REST API. Are you connecting to our systems using FIX?

Thanks for the note on the API documentation. I'll have it updated now.

Kind Regards, PM  

Share this post


Link to post
16 hours ago, Physicsman said:

Hello Kush,

The GetChangedOrders call is for users that are connecting with the FIX API, rather than our own proprietary REST API. Are you connecting to our systems using FIX?

Thanks for the note on the API documentation. I'll have it updated now.

Kind Regards, PM  

Good morning PM,

Thank you for you prompt reply. I am not using FIX.

I was under the impression this was a HTTP api endpoint (Apologies I missed the first line of description :( ). Is it advisable to continue to use this endpoint? Is there an alternative endpoint I could possibly use? As this endpoint provides good insight to all trade and orders.

Kind regards,

Kush

Share this post


Link to post

Hi,

This particular call is for use by clients that are connecting with the FIX API. I'll have the documentation amended to better highlight the calls that are for FIX users. 

I would suggest using the calls designed for the REST API instead. As an example, if you wish to see the account order history then use ListStopLimitOrderHistory. If you want to see your positions history then that is the ListTradeHistory call etc.

Kind Regards, PM

image.png

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
×