Assets

Get an asset's price chart

GEThttps://api.arzdigital.com/v1/assets/{slug}/chart
X-API-Key headerHow credits work

Send either range, or all of from, to and interval. They cannot be combined. With from, to and interval the window can hold at most 1000 points. With range the resolution is chosen for you, and an asset with a short history returns fewer points than the range suggests. Intervals of 1d and above align from to the start of the UTC day.

Credit use: Each successful call costs 1 credit for every 100 points it returns, rounded up. For example, 250 points cost 3 credits.

An empty result and any error cost nothing.

Parameters

  • slugstringPathRequired
    Asset slug, such as bitcoin.
    Example: bitcoin
  • rangestringQuery
    Window ending now. Cannot be combined with from, to or interval.
    1d7d1m3m6m1yall
  • fromintegerQuery
    Window start, in Unix seconds. Requires to and interval.
  • tointegerQuery
    Window end, in Unix seconds. Requires from and interval.
  • intervalstringQuery
    Point spacing. Requires from and to.
    Allowed values (11)
    5m30m2h6h12h1d2d3d7d30d60d

Request headers

  • X-API-KeystringRequired

    Your API key. Send it in this header on every call; it is not accepted in the URL.

Response

Chart points, with the window's highs and lows in meta.
Response fields (27)
  • statusstring
  • metaobject
  • meta.low_usdobject | null
  • meta.low_usd.timeinteger
    Unix seconds.
  • meta.low_usd.price_usdnumber
    Price in USD.
  • meta.low_usd.irt_ratenumber
    Whole Toman per unit of the USD price.
  • meta.low_usd.price_btcnumber
    Price in BTC.
  • meta.high_usdobject | null
  • meta.high_usd.timeinteger
    Unix seconds.
  • meta.high_usd.price_usdnumber
    Price in USD.
  • meta.high_usd.irt_ratenumber
    Whole Toman per unit of the USD price.
  • meta.high_usd.price_btcnumber
    Price in BTC.
  • meta.low_irtobject | null
  • meta.low_irt.timeinteger
    Unix seconds.
  • meta.low_irt.price_usdnumber
    Price in USD.
  • meta.low_irt.irt_ratenumber
    Whole Toman per unit of the USD price.
  • meta.low_irt.price_btcnumber
    Price in BTC.
  • meta.high_irtobject | null
  • meta.high_irt.timeinteger
    Unix seconds.
  • meta.high_irt.price_usdnumber
    Price in USD.
  • meta.high_irt.irt_ratenumber
    Whole Toman per unit of the USD price.
  • meta.high_irt.price_btcnumber
    Price in BTC.
  • dataarray
  • data[].timeinteger
    Unix seconds.
  • data[].price_usdnumber
    Price in USD.
  • data[].irt_ratenumber
    Whole Toman per unit of the USD price.
  • data[].price_btcnumber
    Price in BTC.

Response headers

  • X-Credits-Charged
    Credits this call cost. 0 on every non-200 response.
  • X-Credits-Remaining
    Account balance after this call, not counting what calls still in flight have set aside. Negative only for an account in debt after an adjustment.
  • X-RateLimit-Limit
    Requests per minute allowed for this key.
  • X-RateLimit-Remaining
    Requests left in the current window.
  • X-RateLimit-Reset
    Unix seconds at which the window has room again.

Errors

  • bad_requesterror_code 1001
    A parameter is missing

Errors are never charged. Errors