How to hit the Kraken (public market data) API

Kraken's public REST endpoints at https://api.kraken.com/0/public serve market data. Responses always have error and result; a non-empty error means failure.

Authentication

None — no key, no signup. Every example runs as-is.

Full reference: https://docs.kraken.com/api/docs/rest-api/get-ticker-information

Ticker

Kraken calls Bitcoin XBT.

curl "https://api.kraken.com/0/public/Ticker?pair=XBTUSD"
Run in PostTaco
Example response (trimmed)
{
  "error": [],
  "result": {
    "XXBTZUSD": {
      "a": [
        "84327.60000",
        "2"
      ],
      "b": [
        "84327.50000",
        "1"
      ],
      "c": [
        "84327.50000",
        "0.00055530"
      ],
      "v": [
        "3300.95805382",
        "3503.48795599"
      ],
      "p": [
        "85156.02107",
        "85218.76037"
      ],
      "t": [
        134557,
        146754
      ],
      "l": [
        "83501.00000",
        "83501.00000"
      ],
      "h": [
        "87274.40000",
        "87274.40000"
      ],
      "o": "86199.40000"
    }
  }
}

Order book

curl "https://api.kraken.com/0/public/Depth?pair=ETHUSD&count=2"
Run in PostTaco
Example response (trimmed)
{
  "error": [],
  "result": {
    "XETHZUSD": {
      "asks": [
        [
          "2671.63000",
          "0.749"
        ],
        [
          "2671.83000",
          "0.561"
        ]
      ],
      "bids": [
        [
          "2671.62000",
          "0.851"
        ],
        [
          "2671.61000",
          "1.872"
        ]
      ]
    }
  }
}