Skip to main content

5-minute first call

Zero SDK, zero language runtime. Just curl, jq 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 have one yet, sign up at datamaxiplus.com (new accounts get $5 of free credit) and copy your key from My page → API keys (open).

Export it for the rest of this tutorial:

export DATAMAXI_API_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. It is free (never billed) and returns OK if the API is up.

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

Expected response:

HTTP/2 200
content-type: text/plain

OK

Ping doesn't check the key, so the next call is the real test. If it returns 401 Unauthorized, the key is missing, wrong, or you forgot the $. If it returns 402 Payment Required, your prepaid balance is empty or expired: top up from Billing (see Pricing and billing).

3. Fetch a few candles​

Now something useful: the last few 1-hour BTC-USDT candles from Binance spot. from and to are Unix seconds.

to=$(date +%s); from=$((to - 3*3600))
curl -s \
-H "X-DTMX-APIKEY: $DATAMAXI_API_KEY" \
"https://api.datamaxiplus.com/api/v1/cex/candle?exchange=binance&market=spot&symbol=BTC-USDT&interval=1h&from=$from&to=$to" \
| jq .

You'll get back a JSON object with the request echo and one entry per candle:

{
"exchange": "binance",
"market": "spot",
"symbol": "BTC-USDT",
"interval": "1h",
"currency": "USD",
"data": [
{ "d": 1763604000000, "o": 60724.33, "h": 60778.21, "l": 60701.10, "c": 60778.21, "v": 22.94612 }
]
}

d is the candle's open time; o, h, l, c, v are open, high, low, close and base-asset volume. That call is in the History tier: $0.0005.

One call returns up to 1,000 candles (a wider from–to range is rejected) and candle history starts on 2024-01-01. For longer ranges, step from/to forward in windows of at most 1,000 intervals.

4. What just happened​

  • Auth. You proved your identity with a single header. Every endpoint takes the same header, so once $DATAMAXI_API_KEY works for ping it works for every endpoint.

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

  • Rows per call. History endpoints cap what one call returns: 1,000 candles, 100 funding-rate rows, and so on. Walk long ranges with from/to or page. See Rows per call.

  • Pricing and rate limits. Ping is free; data calls draw from your prepaid balance ($0.0001 for Latest, $0.0005 for History, $0.002 for Aggregated). See Pricing and billing for the price table and REST API › Limits for rate limits.

Next steps​