API Reference
Complete API documentation for Veyra platform integration.
Base URL
Production: https://api.veyramarket.com
Development: https://veyramarket.com/apiAuthentication
Wallet-Based Auth
// 1. Get challenge message
GET /api/auth/challenge?wallet={address}
Response:
{
"challenge": "Sign this message to authenticate: {random_nonce}",
"timestamp": 1699564800
}
// 2. Sign message with wallet
const signature = await signMessage(challenge);
// 3. Verify signature
POST /api/auth/verify
Body: {
"wallet": "5yyuoTxxLj36pm3oEm4eYB...",
"signature": "3Xk8j9mN...",
"message": "Sign this message..."
}
Response:
{
"success": true,
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expires": 1699651200
}Using Auth Token
Response Format
Success Response
Error Response
Error Codes
Markets API
List Markets
Get Market by ID
Search Markets
Trading API
Execute Trade
Get Trade History
Portfolio API
Get Portfolio
Get Position Details
Solana Integration API
Get Treasury Wallet
Verify Transaction
Get Transaction Status
WebSocket API
Real-Time Market Updates
Portfolio Updates
Rate Limiting
Limits
Headers
Rate Limit Error
SDK Examples
JavaScript/TypeScript
Python
Webhooks
Register Webhook
Webhook Payload
Last updated
