Cancel a batch job
curl --request DELETE \
--url https://www.sharpe.ai/api/v1/jobs/{job} \
--header 'Authorization: Bearer <token>'const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://www.sharpe.ai/api/v1/jobs/{job}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://www.sharpe.ai/api/v1/jobs/{job}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text){
"data": {
"id": "<string>",
"kind": "wallet_check_batch",
"status": "queued",
"progress": {
"done": 1,
"total": 1
},
"error": {
"code": "<string>",
"message": "<string>"
},
"attempts": 1,
"max_attempts": 2,
"cancel_requested": true,
"created_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"run_after": "2023-11-07T05:31:56Z",
"result": {
"results": [
{
"index": 1,
"id": "<string>",
"status": "queued"
}
]
}
},
"meta": {
"request_id": "req_a1b2c3d4e5f6g7h8i9j0",
"timestamp": "2023-11-07T05:31:56Z",
"elapsed_ms": 1,
"dataset_id": "funding_rates_current",
"as_of": "2023-11-07T05:31:56Z",
"stale_after": "2023-11-07T05:31:56Z",
"freshness_sla_seconds": 123,
"freshness_status": "fresh",
"runtime_status": "ok",
"served_from": "snapshot",
"generated_at": "2023-11-07T05:31:56Z",
"source": [
"<string>"
],
"coverage": {
"expected": 123,
"used": 123,
"dropped": {},
"missing": [
"<string>"
]
},
"warnings": [
"<string>"
],
"truncated": true
}
}Compliance
Cancel a batch job
Cancels a wallet_check_batch job: a queued job is cancelled at once, a running one stops before its next wallet (cancel_requested is true until it does). Wallets it already queued keep their reports and their units. A finished job is answered as it is. Viewers cannot cancel (403 action_forbidden). Needs an organisation key with the compliance scope; an account key answers 403 insufficient_scope.
DELETE
/
v1
/
jobs
/
{job}
Cancel a batch job
curl --request DELETE \
--url https://www.sharpe.ai/api/v1/jobs/{job} \
--header 'Authorization: Bearer <token>'const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://www.sharpe.ai/api/v1/jobs/{job}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://www.sharpe.ai/api/v1/jobs/{job}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text){
"data": {
"id": "<string>",
"kind": "wallet_check_batch",
"status": "queued",
"progress": {
"done": 1,
"total": 1
},
"error": {
"code": "<string>",
"message": "<string>"
},
"attempts": 1,
"max_attempts": 2,
"cancel_requested": true,
"created_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"run_after": "2023-11-07T05:31:56Z",
"result": {
"results": [
{
"index": 1,
"id": "<string>",
"status": "queued"
}
]
}
},
"meta": {
"request_id": "req_a1b2c3d4e5f6g7h8i9j0",
"timestamp": "2023-11-07T05:31:56Z",
"elapsed_ms": 1,
"dataset_id": "funding_rates_current",
"as_of": "2023-11-07T05:31:56Z",
"stale_after": "2023-11-07T05:31:56Z",
"freshness_sla_seconds": 123,
"freshness_status": "fresh",
"runtime_status": "ok",
"served_from": "snapshot",
"generated_at": "2023-11-07T05:31:56Z",
"source": [
"<string>"
],
"coverage": {
"expected": 123,
"used": 123,
"dropped": {},
"missing": [
"<string>"
]
},
"warnings": [
"<string>"
],
"truncated": true
}
}Authorizations
BearerAuthApiKeyAuth

