Skip to main content

5-minute first call

Zero SDK, zero language runtime. Just curl and a terminal. By the end you'll have hit the DataMaxi+ API, confirmed your key works, and pulled real candle data.

1. Get an API key

If you don't already have one, follow How to get an API key. It takes about a minute — sign up, copy the key from your account page.

Export it for the rest of this tutorial:

export DTMX_KEY="your_api_key_here"

The header name is X-DTMX-APIKEY. Don't pass it as a query string — keys belong in headers so they don't end up in server logs.

2. Ping

The cheapest possible request: /api/v1/ping. Returns OK if the API is up and your key is valid.

curl -i -H "X-DTMX-APIKEY: $DTMX_KEY" https://api.datamaxiplus.com/api/v1/ping

Expected response:

HTTP/2 200
content-type: text/plain

OK

If you see 401 Unauthorized, the key is missing, wrong, or you forgot the $. If you see 403 Forbidden, the key exists but isn't entitled to the endpoint — check your plan.

3. Fetch one candle

Now something useful: a 1-hour BTC-USDT candle from Binance.

curl -s \
-H "X-DTMX-APIKEY: $DTMX_KEY" \
"https://api.datamaxiplus.com/api/v1/cex/candle?exchange=binance&symbol=BTC-USDT&interval=1h&limit=1" \
| jq .

You'll get back a small JSON payload with the candle's open/high/low/close/volume and a UTC timestamp.

{
"data": [
["1733616000000", "98421.50", "98750.00", "98300.00", "98612.30", "1234.56"]
],
"next": "..."
}

The array order is [timestamp, open, high, low, close, volume]. The next field is the cursor for pagination — pass it as next=... on the following request to get the previous page of candles.

4. What just happened

Auth. You proved your identity with a single header. Every endpoint takes the same header, so once $DTMX_KEY works for ping it works for everything you're entitled to.

Symbol format. BTC-USDT — base, dash, quote. Same shape across REST and WebSocket. No exchange-specific notation.

Pagination. Most history endpoints return data plus a next cursor. Follow the cursor until it's empty.

Rate limits. You're now consuming quota. See Rate Limits for the table per plan.

Next steps