docs
Chips

Get your chip balance

GET
/v1/chips

Returns your balance, the lots it is made of with their expiry dates, and the history of changes. Free.

Authorization

bearerAuth
headerAuthorizationBearer <API key>

Create a key in the app under Developers. Keys start with dcd_live_.

Query Parameters

cursor?string

Cursor from the previous page's next_cursor.

limit?integer

Items per page, 1 to 100. Defaults to 25.

Range1 <= value <= 100
Default25

Response Body

Success.

application/json
  1. response

Your chip balance, where it comes from, and what changed it.

balance*integer

Chips available to spend right now.

Range0 <= value <= 9007199254740991
lots*array<>

Chip lots that still have chips in them.

ledger*

History of balance changes, newest first. Page with ?cursor= and ?limit=.

request_id*string

Id of the request that produced this response. A replayed idempotent response keeps the original id.

Example Request
curl -X GET 'https://api.diced.si/v1/chips' \  -H 'Authorization: Bearer dcd_live_your_key'
Example Response
{  "balance": 0,  "lots": [    {      "id": "string",      "source": "pack",      "amount": 0,      "remaining": 0,      "expires_at": "2019-08-24T14:15:22Z"    }  ],  "ledger": {    "data": [      {        "id": "string",        "delta": -9007199254740991,        "balance_after": 0,        "reason": "purchase",        "ref_type": "string",        "ref_id": "string",        "created_at": "2019-08-24T14:15:22Z"      }    ],    "next_cursor": "string"  },  "request_id": "string"}