magda 0 Report post Posted September 1, 2020 Hello, I'm trying to send a new order on option instrument via API. I need to set OfferPrice and BidPrice in NewTradeOrderRequest. I usually get it from the GetLatestPriceTicks endpoint, but for options it returns an empty array. How do I get last tick prices for an option instrument? Share this post Link to post
Physicsman 26 Report post Posted September 2, 2020 Hello Magda, Entry orders cannot be placed on option markets. Kind Regards, PM Share this post Link to post
magda 0 Report post Posted September 3, 2020 Hello, I assume that you are saying that I can't place any limit orders on option markets, only a trade (sorry if I misunderstood, my english isn't perfect :)) Could you explain then how can I place a trade on option markets?NewTradeOrderRequestDTO also requires setting OfferPrice and BidPrice, which I can't get from API. Share this post Link to post
Physicsman 26 Report post Posted September 3, 2020 Hi Magda, To receive the current live market prices, subscribe via the Lightstreamer API to the PRICES stream. The application can then read in the latest Bid / Offer prices and supply them in the trade request. The Help page file at: http://docs.labs.gaincapital.com/#Getting Started/CIAPI Arky.htm%3FTocPath%3DGetting%20Started|_____1 explains that there are actually 2 APIs. The REST API for stattic data, which you are already using, and the Streaming API (via the third party Lightstreamer) for streamed data such as live market prices. Kind Regard, PM Share this post Link to post
magda 0 Report post Posted September 7, 2020 Physicsman, thank you for your help. I am already using Streaming API, but after subscribing to prices I have to wait for the next tick to appear to receive any data. Currently I can't even display last tick in my interface and I don't know when the next one will appear - doesn't look very well. I assume that there is no way to get the last tick for an option? Share this post Link to post
Physicsman 26 Report post Posted September 7, 2020 Hi Magda, Yes, the streaming API only streams the latest current live market price - it does not provide historical price ticks. We don't store much/any Option price data so it's a bit more problematic since you are looking into these markets than our standard non-option markets. It's still worth looking to see if you can pull any historical price data for option markets using the Price History service endpoints. You can find those calls in the documentation at: http://docs.labs.gaincapital.com/ Share this post Link to post