BTCMarkets / API

API
119 stars 30 forks source link

Capture orderbook and/or trades #116

Closed sasswah closed 6 years ago

sasswah commented 6 years ago

Hi

I would like to capture all orderbook and/or trades to get a reading of the buy / sell trend for the day. If I was to poll every minute, which would give me a better understanding of the market activity?

If I was to use trades API, with the values returned, how to I distinguish between a buy or a sell?

If I was to user the orderbook API, how much data (time wise) does each API request return (eg 1 minutes worth of orders)?

Thanks, Gary

justin-ngin commented 6 years ago

Hi Gary,

The v1 trades endpoint provides the last 500 trades. There is no buy or sell side as the trades are a matched buy and sell order.

The orderbook endpoint provides 200 orders that are closest to matching on both sides of the orderbook. Orderbook activity has no real direct relationship to time.

I hope this helps answer your question.

Regards, Justin