Buy or Sell
-
- Posts: 552
- Joined: Mon Jul 09, 2018 11:18 am
- Has thanked: 25 times
- Been thanked: 86 times
Re: Buy or Sell
Hi, if your question has to do with Bookmap API and MBO data, you can use MarketByOrderDepthDataListener in Simplified API which has isBid flag in its `send` method.
If not, please give more details about your case.
If not, please give more details about your case.
Re: Buy or Sell
Hi Andy,
Yes, I want to know about Bookmap API and MBO.
In this case, in the onTrade(double price, int size, TradeInfo tradeInfo) event, how can I know if a certain trader is Buying or Selling?
I found "tradeInfo.isBidAggressor", but I don't know exactly what that field means.
In this event onTrade(), are all displayed orders "market executed" or do "pending orders" also go through here?
Yes, I want to know about Bookmap API and MBO.
In this case, in the onTrade(double price, int size, TradeInfo tradeInfo) event, how can I know if a certain trader is Buying or Selling?
I found "tradeInfo.isBidAggressor", but I don't know exactly what that field means.
In this event onTrade(), are all displayed orders "market executed" or do "pending orders" also go through here?
-
- Posts: 552
- Joined: Mon Jul 09, 2018 11:18 am
- Has thanked: 25 times
- Been thanked: 86 times
Re: Buy or Sell
`tradeInfo.isBidAggressor`
a bid is a buyer, an ask is a seller. An aggressor here is a (typically) market order that gets executed against a limit order.
So if tradeInfo.isBidAggressor == true , it means a market buy order has been executed to a limit sell order.
onTrade gets triggered with trades (execution) events.
Please clarify what you mean by pending orders.
a bid is a buyer, an ask is a seller. An aggressor here is a (typically) market order that gets executed against a limit order.
So if tradeInfo.isBidAggressor == true , it means a market buy order has been executed to a limit sell order.
onTrade gets triggered with trades (execution) events.
Please clarify what you mean by pending orders.
Re: Buy or Sell
Hi Andry, thank you for your response.
What I called pending orders are limit sell order or limit buy order.
From what I read, the onDepth() event only deals with buy or sell limit orders, is that correct?
But when these orders limit sell or buy are launched, they go through the onTrade() event too?
What I called pending orders are limit sell order or limit buy order.
From what I read, the onDepth() event only deals with buy or sell limit orders, is that correct?
But when these orders limit sell or buy are launched, they go through the onTrade() event too?
-
- Posts: 552
- Joined: Mon Jul 09, 2018 11:18 am
- Has thanked: 25 times
- Been thanked: 86 times
Re: Buy or Sell
For non-MBO data, DepthDataListener#onDepth deals with limit orders, right. But it does show changes to price levels volume rather than individual orders.
For MBO data you may use MboDataListener which deals with each order individually.
For MBO data you may use MboDataListener which deals with each order individually.
YesBut when these orders limit sell or buy are launched, they go through the onTrade() event too?
Re: Buy or Sell
So, in the onTrade() event, how do I identify when an order is limit or when it is a direct market order?
-
- Posts: 552
- Joined: Mon Jul 09, 2018 11:18 am
- Has thanked: 25 times
- Been thanked: 86 times
Re: Buy or Sell
TradeInfo#passiveOrderId is a limit order's id.
TradeInfo#aggressorOrderId is a market order's id.
These values will be null if the data is not MBO.
TradeInfo#aggressorOrderId is a market order's id.
These values will be null if the data is not MBO.
Re: Buy or Sell
What is MBO, what is the concept of it and what other types of data exist on the platform?