error field.
Error format
Status codes
| Code | Meaning | When |
|---|---|---|
| 200 | OK | Successful request |
| 201 | Created | API key generated successfully |
| 400 | Bad Request | Invalid parameters (e.g. bad candle resolution, missing q param) |
| 401 | Unauthorized | Missing or malformed API key |
| 403 | Forbidden | API key is invalid or inactive |
| 404 | Not Found | Market, wallet, or token not found |
| 429 | Too Many Requests | Rate limit exceeded |
| 500 | Internal Server Error | Server-side error |
| 503 | Service Unavailable | Service temporarily unavailable |
Common errors
Missing API key
401
x-api-key: pn_live_...) or query parameter (?key=pn_live_...).
Invalid API key
403
Rate limited
429
Market not found
404
/v1/search to find the correct token.
Invalid resolution
400
Missing search query
400
Key generation rate limit
429
WebSocket disconnections
The server may close your WebSocket connection for any of these reasons:| Reason | Trigger | What to do |
|---|---|---|
| Pong timeout | No Pong response for 90 seconds (3 missed Ping frames) | Ensure your read loop is not blocked — standard WS libraries handle Pong automatically |
| Send buffer full | Client is consuming messages too slowly | Increase processing speed or reduce subscription scope with filters |
| Invalid API key | Key rejected during connection upgrade | Verify your pn_live_ key is correct and active |
| Server restart | API binary redeployed or service restarted | Reconnect with exponential backoff (see best practices) |

