Are aggregate trades all filled?

Hi there,
maybe you can help me out. I have two questions regarding aggregate trades

  • Do you know if aggregate trades are all filled? I assume yes, so that the response coming from GET /api/v3/aggTrades contains only filled trades. Is it so? Please correct me if I’m wrong.

  • is it right to assume that if the two Ids are the same, it is just a single unaggregated order contained in the response we are looking at?

    "f": 27781,         // First tradeId
    "l": 27781,         // Last tradeId

Thanks!

Hi,

The aggTrades endpoints returns a list of aggregate trades which have either been filled or partially filled. And yes, in your example it’s right to assume that in that particular response it is just referring to 1 order.

Thanks for answering. So is there any way to obtain a list of trades that have all been filled in a particular interval?

I assume klines provide trades that all have been filled (please correct me here too if I’m wrong), but they don’t provide a distribution of trades (no statistical distribution analysis is possible) but just a grouped trade information.

I really need to get historical information about just filled trades.

There’s /api/v3/historicalTrades endpoint which you can query by trade ID to get individual trades.

so are historicalTrades all completely filled? and none of them is just partially filled (as the case with aggTrades)?

I’m not sure what do you mean by “filled” when applied to trades. Could you please elaborate?

  • Trades are either executed (in full), or not. There is no middle ground.
  • An order is filled by trades.
  • It may take multiple trades at multiple prices to fill an order.
  • Maker order remains partially filled until filled by all the trades that happen against it.
  • An aggregate trade represents one or more trades at the same price from a single taker order.
  • Taker order can generate multiple aggregate trades, for all the prices at which it takes.

By itself, trades do not indicate whether the taker or the maker orders have been filled in full by them or not. Only the person who placed the order can see that.

Thanks for the input. I still have some questions.

  • based on the answers

and

how can an aggTrade be partially filled (jonte’s quote) if each trade included in it is fully filled (ilammy’s quote)? Or do I misunderstand something?

  • based on the documentation I saw, an aggTrade kicks in when there is one taker and many makers. Can both buyer and seller be makers of a trade? If so, no taker is involved → the resulting trade will not show up as an aggTrade. True?

  • I’m looking at the endpoint GET /api/v3/trades. Are all trades cointained in the response have been executed? If no, how can I get past EXECUTED trades over some period of time(without knowing their ids)? Of all the questions I asked, this is actually the most important one.