Every API call must be signed. Sign in with the email or registered mobile of your VistarKriya account and approve the request in your StaqOn app. Your newest active API key, secret and tenant code then load into this page and Try it out signs every call for you. Your sign-in stays active for 24 hours on this device; Sign out ends it. The secret is used only in your browser to sign: only the signature is sent with each call.
Send four headers with every request: X-API-Key, X-Tenant-Code (your 6-digit tenant path code), X-Timestamp (Unix seconds, within 5 minutes of server time) and X-Signature.
X-Signature = hex( HMAC-SHA256( timestamp + METHOD + endpoint + body , api_secret ) )
endpoint is the path exactly as sent, starting at /api/v1/ and including any query string. body is the raw request body, or an empty string for GET. Calls run for real; paid endpoints are charged to your wallet.
API_KEY="your_key"; API_SECRET="your_secret"; TENANT="123456"
TS=$(date +%s); METHOD=GET; EP="/api/v1/wallet/balance"; BODY=""
SIG=$(printf '%s' "$TS$METHOD$EP$BODY" | openssl dgst -sha256 -hmac "$API_SECRET" | awk '{print $NF}')
curl -s "https://vistarkriya.com$EP" \
-H "X-API-Key: $API_KEY" -H "X-Tenant-Code: $TENANT" \
-H "X-Timestamp: $TS" -H "X-Signature: $SIG"
<?php
$key = 'your_key'; $secret = 'your_secret'; $tenant = '123456';
$ts = (string) time(); $method = 'GET'; $ep = '/api/v1/wallet/balance'; $body = '';
$sig = hash_hmac('sha256', $ts . $method . $ep . $body, $secret);
$ch = curl_init('https://vistarkriya.com' . $ep);
curl_setopt_array($ch, [CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => [
"X-API-Key: $key", "X-Tenant-Code: $tenant", "X-Timestamp: $ts", "X-Signature: $sig",
]]);
echo curl_exec($ch);
import hashlib, hmac, time, requests
key, secret, tenant = 'your_key', 'your_secret', '123456'
ts, method, ep, body = str(int(time.time())), 'GET', '/api/v1/wallet/balance', ''
sig = hmac.new(secret.encode(), (ts + method + ep + body).encode(), hashlib.sha256).hexdigest()
r = requests.get('https://vistarkriya.com' + ep, headers={
'X-API-Key': key, 'X-Tenant-Code': tenant, 'X-Timestamp': ts, 'X-Signature': sig})
print(r.status_code, r.text)
const crypto = require('crypto');
const key = 'your_key', secret = 'your_secret', tenant = '123456';
const ts = String(Math.floor(Date.now() / 1000)), method = 'GET', ep = '/api/v1/wallet/balance', body = '';
const sig = crypto.createHmac('sha256', secret).update(ts + method + ep + body).digest('hex');
fetch('https://vistarkriya.com' + ep, { headers: {
'X-API-Key': key, 'X-Tenant-Code': tenant, 'X-Timestamp': ts, 'X-Signature': sig } })
.then(r => r.text()).then(console.log);
Calls that upload a file (multipart) can only be signed from code, because the signature covers the raw body bytes. Use the examples above for those.