Per-client usage analytics
Core Endpoints
Analytics
Get per-client usage analytics — quotes, deposits, pair breakdowns, and timelines
GET
Per-client usage analytics
GET /leokit/analytics
Returns aggregated analytics for the authenticated client, including quote/deposit counts, top trading pairs, protocol usage, and a time-bucketed activity timeline.Authentication
RequiresApi-Key header (or api_key query parameter).
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
period | string | No | Time window: 1h, 24h (default), 7d, 30d, all |
Response Format
Status Code:200 OK
Fields Reference
Summary
| Field | Description |
|---|---|
total_quotes | Number of quote requests in the period |
total_deposits | Number of deposit (swap initiation) calls |
conversion_rate | Percentage of quotes that converted to deposits |
avg_response_time_ms | Average quote response time in milliseconds |
near_ecosystem_fees_usd | NEAR-ecosystem affiliate fees attributed to your client (USD) |
Top Pairs
Returns up to 20 most-quoted asset pairs, sorted by quote count. Each pair shows how many quotes and deposits it received.Protocols
Shows how many times each protocol returned a quote offer. A single quote request may produce offers from multiple protocols.Timeline
Time-bucketed activity data. Bucket size varies by period:| Period | Bucket Size |
|---|---|
1h | 5 minutes |
24h | 1 hour |
7d | 1 day |
30d | 1 day |
all | 1 day |
Caching
Responses are cached for 30 seconds (Cache-Control: private, max-age=30).
Errors
| Status | Code | Description |
|---|---|---|
401 | INVALID_API_KEY | Missing or invalid Api-Key header |
400 | INVALID_PERIOD | period must be one of 1h, 24h, 7d, 30d, all |
500 | INTERNAL_ERROR | Server-side error while aggregating analytics |
Examples
Get 24-hour analytics (default)
Get 7-day analytics
Get all-time analytics
Authorizations
Demo API-Key (Sandbox): 7037d2b3-9c76-4f62-b730-c544f7570fa4
Query Parameters
Available options:
1h, 24h, 7d, 30d, all