Token APIs
Get usage
curl -X GET 'https://api.blocksdk.com/v2/token/usage?start_date=2021-01-11&end_date=2021-01-12' \
    -H 'Content-Type: application/json' \
    -H 'X-API-Token: my-api-token'
$usages = $tokenClient->getUsages([
    "start_date" => "2021-01-11",
    "end_date" => "2021-01-12"
]);
var usages = tokenClient.getUsages({
    "start_date" : "2021-01-11",
    "end_date" : "2021-01-12"
})
usages = tokenClient.getUsages({
    "start_date" => "2021-01-11",
    "end_date" => "2021-01-12"
})
usages = tokenClient.getUsages({
    "start_date" : "2021-01-11",
    "end_date" : "2021-01-12"
})
usages := tokenClient.GetUsages(map[string]interface{}{
    "start_date" : "2021-01-11",
    "end_date" : "2021-01-12"
})
Response Body
{
    "payload": [
        {
            "api_count": 72187,
            "callback_count": 0,
            "datetime": "2021-01-11T00:00:00+00:00",
            "timestamp": 1610323200
        },
        {
            "api_count": 18136,
            "callback_count": 0,
            "datetime": "2021-01-12T00:00:00+00:00",
            "timestamp": 1610409600
        }
    ],
    "state": {
        "code": 200,
        "success": true
    }
}
Info
Returns the number of daily calls and callback calls of the API token.
HTTP Request
GET https://api.blocksdk.com/v2/token/usage
Query Parameters
| Parameter | Type | Default | Description | 
|---|---|---|---|
| stat_date | string | 7 days before the current time | Start of date range | 
| end_date | string | Today | End of date range | 
Response
| Variable | Type | Description | 
|---|---|---|
| api_count | int | API call count | 
| callback_count | int | Number of times the webhook callback was called | 
 
      