Trades
The Trades data will give you details on executed trades for a specific market. The endpoint will return information about the price of the trade, the quantity, and the time at which the trade took place.
You can use the following endpoint to get Trades data:
https://public.coindcx.com/market_data/trade_history/?pair={insert_pair}&limit={insert_limit}
To extract trades data, you have to paas two parameters in the API request:
| Parameter | Required | Description |
|---|---|---|
| pair | Yes | It is a string created by ecode, target_currency_short_name, and base_currency_short name. For example, B-BTC_USDT. |
| limit | No | Input the number of trades that will be returned in the response. The acceptable values for this parameter range from 1 to 100. |
note
If the limit parameter is not passed, the default number of trades returned will be 30.
The CoinDCX Trades API endpoint, gives you the following information:
| Parameter | Description |
|---|---|
| p | Indicates the trade price. |
| q | Indicates the quantity. |
| s | Denotes the name of the market. |
| T | Indicates the time at which the trade took place. |
| m | Indicates if the buyer is a market maker or not. Values for this parameter are:
|