Authentication API Reference
Complete reference documentation for authentication endpoints.
New to authentication? Start with the Getting Started Guide for a step-by-step walkthrough.
Authentication Levels
L1 Authentication (EIP-712)
Used for initial authentication and API key generation. Requires wallet signature.
Headers Required:prob_address- EOA address (Externally Owned Account address)prob_signature- EIP-712 signature signed by the EOAprob_timestamp- Unix timestampprob_nonce- Nonce from/public/api/v1/auth/nonce
Important:
prob_addressmust be your EOA address, and the signature must be signed by that EOA.
L2 Authentication (HMAC)
Used for authenticated API requests, including all orderbook write operations. Requires API key and secret.
Headers Required:prob_address- EOA address (same as used in L1 authentication)prob_signature- HMAC signatureprob_timestamp- Unix timestampprob_api_key- API keyprob_passphrase- API passphrase
Important:
prob_addressmust be your EOA address (not proxy wallet address).
Generate Nonce
Get a nonce for L1 authentication.
Endpoint: GET /public/api/v1/auth/nonce
Example Request
curl "https://api.probable.markets/public/api/v1/auth/nonce"Example Response
{
"nonce": "abc123xyz",
"issuedAt": "2025-01-15T10:30:00Z"
}Login
Authenticate a user with wallet signature.
Endpoint: POST /public/api/v1/auth/login
Request Body
{
"identity": {
"account": "0x1234...",
"namespace": "default",
"chainId": "56",
"address": "0x1234..."
},
"message": "Sign in to Prob...",
"signature": "0xabc123...",
"nonce": "abc123xyz",
"issuedAt": "2025-01-15T10:30:00Z",
"domain": "prob.vbgf.cc"
}Parameters
identity(required, object) - User identity informationaccount(required, string) - Account addressnamespace(required, string) - NamespacechainId(required, string) - Chain IDaddress(required, string) - Wallet address
message(required, string) - Login messagesignature(required, string) - Wallet signature (0x-prefixed hex)nonce(required, string) - Nonce from nonce endpointissuedAt(required, string) - ISO timestampdomain(required, string) - Domain name
Example Request
curl -X POST "https://api.probable.markets/public/api/v1/auth/login" \
-H "Content-Type: application/json" \
-d '{
"identity": {
"account": "0x1234...",
"namespace": "default",
"chainId": "56",
"address": "0x1234..."
},
"message": "Sign in to Prob...",
"signature": "0xabc123...",
"nonce": "abc123xyz",
"issuedAt": "2025-01-15T10:30:00Z",
"domain": "prob.vbgf.cc"
}'Logout
Log out the current user.
Endpoint: POST /public/api/v1/auth/logout
Example Request
curl -X POST "https://api.probable.markets/public/api/v1/auth/logout"Example Response
{
"success": true
}Verify L1 Headers
Verify L1 authentication headers (EIP-712 signature).
Endpoint: POST /public/api/v1/auth/verify/l1
Request Body
{
"chainId": 56
}Headers
prob_address- User addressprob_signature- EIP-712 signatureprob_timestamp- Unix timestampprob_nonce- Nonce
Example Response
{
"valid": true,
"address": "0x1234...",
"chainId": 56,
"message": "Verification successful"
}Verify L2 Headers
Verify L2 authentication headers (HMAC signature with API key).
Endpoint: POST /public/api/v1/auth/verify/l2
Request Body
{
"chainId": 56,
"method": "POST",
"path": "/public/api/v1/order/56",
"body": {}
}Headers
prob_address- User addressprob_signature- HMAC signatureprob_timestamp- Unix timestampprob_api_key- API keyprob_passphrase- API passphrase
Example Response
{
"valid": true,
"address": "0x1234...",
"chainId": 56,
"message": "Verification successful"
}