Jump to content

Search the Community

Showing results for tags 'offerprice'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Gain Capital API FAQ
    • General Questions and Discussion

Found 1 result

  1. I am trying to use the order/newstoplimitorder endpoint of GCAPI and having trouble understanding what OfferPrice is used for in NewStopLimitOrderRequestDTO. It is hard to tell which fields are actually required from the docs, but after some testing, it seems as if I only need at a minimum MarketId, Direction, TriggerPrice, Quantity, and OfferPrice (assuming I am OK with defaults on other fields). Based on some testing, OfferPrice does not seem to matter much, but want to confirm before I use the endpoint with real money. I see no equivalent field in the Web/Desktop platform via the UI, so not really sure what it is needed/used for. Also, it is required for both "Buy" and "Sell" orders, which is confusing since I wouldn't care so much about the OfferPrice when I am buying. For example, the current ASK price of AUD/USD (marketId = 401484317) was 0.7135. All 3 of these request bodies seem to create the same order even though the OfferPrice in the request varies greatly: {"MarketId":401484317,"Direction":"Sell","TriggerPrice":0.7135,"OfferPrice":0.7135,"Quantity":1000} {"MarketId":401484317,"Direction":"Sell","TriggerPrice":0.7135,"OfferPrice":2.7135,"Quantity":1000} {"MarketId":401484317,"Direction":"Sell","TriggerPrice":0.7135,"OfferPrice":0.2135,"Quantity":1000} I can see no reference to the OfferPrice in the API success response, or through the active orders endpoint, or through the web platform UI. Am I missing something, or can I just supply any value for this field? Does the OfferPrice have any effect on the order? My intention is to watch prices via Lightstreamer, do some analysis, and place a limit order with a TriggerPrice within a couple of pips +/- of the price I did analysis on to make sure I am getting a "close" price to what I analyzed. Since the current OfferPrice may be different by the time my analysis is complete and the order is requested, It seems I would be best to just set my Direction/TriggerPrice to where I want in the request, then just make the OfferPrice the last OfferPrice I got, regardless of when I got that price or what the current OfferPrice on the pair actually is, but want to make sure I am supplying this field with an appropriate value.
×