Get K-line Data
Get K-line Data
Get K-line data for trading products. The return array values are: [timestamp, open price, highest price, lowest price, close price, trading volume (in base currency), trading volume (in quote currency)]
Rate limit: IP
Request frequency limit: 5/1s
Request URL
GET /deepcoin/market/candles
Request Parameters
| Field Name | Required | Type | Description |
|---|---|---|---|
| instId | true | string | Product ID |
| bar | false | string | Time granularity Default: 1m1 minute: 1m5 minutes: 5m15 minutes: 15m30 minutes: 30m1 hour: 1H4 hours: 4H12 hours: 12H1 day: 1D1 week: 1W1 month: 1M1 year: 1Y |
| after | false | integer | Request content before this timestamp (older data), value should be the ts from the response |
| limit | false | integer | Maximum number of results per page is 300Default: 100 |
Response Example
{
"code": "0",
"msg": "",
"data": [
[
"1739157660000", // Timestamp
"95900.5", // Open price
"95932.2", // Highest price
"95850.4", // Lowest price
"95913.4", // Close price
"20084", // Volume (base currency)
"1925967.4841" // Volume (quote currency)
],
[
"1739157600000",
"95963.3",
"95983.2",
"95898.2",
"95900.5",
"5472",
"524979.2415"
]
]
}