Submit a batch job
curl --request POST \
--url https://www.sharpe.ai/api/v1/jobs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"kind": "wallet_check_batch",
"input": {
"wallets": [
{
"address": "<string>"
}
]
},
"idempotency_key": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
kind: 'wallet_check_batch',
input: {wallets: [{address: '<string>'}]},
idempotency_key: '<string>'
})
};
fetch('https://www.sharpe.ai/api/v1/jobs', 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"
payload = {
"kind": "wallet_check_batch",
"input": { "wallets": [{ "address": "<string>" }] },
"idempotency_key": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, 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
Submit a batch job
Queues a wallet_check_batch job: up to 500 wallets, one report each, every report queued as its own check. Answers 202 with the job; poll GET /v1/jobs/, whose result lists each wallet’s report id (or why it was not queued). Each wallet takes one unit of the organisation’s Wallet Check allowance when it is queued, given back if its check fails; a wallet past the allowance is listed with its code. The same idempotency_key (body) or Idempotency-Key (header) answers the same job. Needs an organisation key with the compliance scope; an account key answers 403 insufficient_scope.
POST
/
v1
/
jobs
Submit a batch job
curl --request POST \
--url https://www.sharpe.ai/api/v1/jobs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"kind": "wallet_check_batch",
"input": {
"wallets": [
{
"address": "<string>"
}
]
},
"idempotency_key": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
kind: 'wallet_check_batch',
input: {wallets: [{address: '<string>'}]},
idempotency_key: '<string>'
})
};
fetch('https://www.sharpe.ai/api/v1/jobs', 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"
payload = {
"kind": "wallet_check_batch",
"input": { "wallets": [{ "address": "<string>" }] },
"idempotency_key": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, 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
Body
application/json

