Skip to main content
GET
/
v1
/
kline_history
Get Kline History
curl --request GET \
  --url https://api.orderly.org/v1/kline_history \
  --header 'orderly-account-id: <orderly-account-id>' \
  --header 'orderly-key: <orderly-key>' \
  --header 'orderly-signature: <orderly-signature>' \
  --header 'orderly-timestamp: <orderly-timestamp>'
{
  "success": true,
  "timestamp": 1702989203989,
  "data": {
    "rows": [
      {
        "open": 66166.23,
        "close": 66124.56,
        "low": 66038.06,
        "high": 66176.97,
        "volume": 23.45528526,
        "amount": 1550436.21725288,
        "symbol": "PERP_BTC_USDC",
        "type": "1m",
        "start_timestamp": 1636388220000,
        "end_timestamp": 1636388280000
      }
    ]
  }
}

Headers

orderly-timestamp
string
required
orderly-account-id
string
required
orderly-key
string
required
orderly-signature
string
required

Query Parameters

symbol
string
required
type
string
required

1m/5m/15m/30m/1h/4h/12h/1d/1w/1mon/1y

before
string

The start timestamp cursor for fetching the previous page of results, excluding the kline associated with the cursor itself. Either before or after can be specified. If both are provided, before takes precedence. If neither is passed, the results default to starting from the most recent kline.

after
string

The start timestamp cursor for fetching the next page of results, excluding the kline associated with the cursor itself. Either before or after can be specified. If both are provided, before takes precedence. If neither is passed, the results default to starting from the most recent kline.

limit
number

Numbers of klines. Maximum of 1000 klines. Default is 100.

Response

200 - application/json

OK

success
boolean
required
Example:

true

data
object
required
timestamp
integer
Example:

1702989203989