Jump to content
Cinemizer

Meaning of BidPrice and OfferPrice at placing a trade

Recommended Posts

Hi,

Please describe me, what is the meaning of bidprice and offerprice in the POST:

https://ciapi.cityindex.com/TradingAPI/order/newtradeorder

What shall I setup for them, if I want to place immediatelly a buy trade order at actual price ?

I mean, if I want to set a buy trade position at current price, which price shall I define for bidprice and offerprice ?

It seems to work, if
bidprice = last tick price * 10
offerprice = last tick price * 10

But I do not believe, that this is the right setting.

THX !

 

Share this post


Link to post

Hello,

The Bid price is the Sell price for a market and the Offer price is the Buy price.

When sending a new trade request, read in from the live price stream the current Bid / Offer price and fill in the BidPrice & OfferPrice fields with those values. 

image.png

 

Kind Regards, PM

Share this post


Link to post

It is fine, but if I get from live price stream the bid and offer prices and sending my trade request with them, it can be, that in the mean time, this values will be changed, so my trade request will be not placed and I get an error return message.
For this is real better to set the trade with

bidprice = last tick price * 10
offerprice = last tick price * 10

?

Which way is the best to set bidprice and offerprice if I accept any current price ?

THX!

Share this post


Link to post

Hello,

If you are reading the Bid/Offer prices from the live price stream using an automated process and not manually, in normal markets that should be enough time to reach our servers and fill the trade without error. Only during volatile "fast" markets would there be a chance of the trade request being rejected due to "Price Tolerance" reasons.

The Price Tolerance specifies the amount of slippage you are willing to take in order to get a trade done. It is set at 2 by default for all markets.

You can override this PriceTolerance value in your trade request call. There is a PriceTolerance field you can set in the newtradeorder call. If you set it to a larger value, such as 100, that should be more than sufficient to have your trade filled even if the market price moves. The markets would have to be extremely volatile to move >100 pips in a second or two for the trade to be rejected.

Kind Regards, PM

Share this post


Link to post

Hi,

Thx, I understand.

If I overide the PriceTolerance i.e. with 200, what kind of "BidPrice" and "OfferPrice" shall I set in the http call ?

I mean does overriding the PriceTolerance affect on the "BidPrice" and "OfferPrice" I must to set in the http call ?

Or shall I even set them ?

My problem is, that:
If I get the last bid and ask prices and I want to place a trade at any price,
till I send the http request, the bid and ask prices can rapidly change,
so my set "BidPrice" and "OfferPrice" are no more valid and I get an error message.

THX !

 

 

 

 

 

Share this post


Link to post

Hi,

You should always use the current Bid/Offer price at the time you senfd the trade request. The system is designed and expecting to receive the current prices.

The price tolerance setting such as 200 in yoru example, means it allows upto 200 pips of slippage so you will almost always be filled on the trade. It is extremely rare for a market to move >200 Pips in less than 1 second, so it is unlikely the trade will be rejected due to the price moving too far away from the bid/offer price at the time you sent the trade.

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
×