Get All Accounts
GET
Auth required
Get all Options trading accounts
Endpoint
GET
/trading/v1/options/accountsBase URL: https://api.derivws.com
Request & Response
Status Codes
200
OK - Successfully retrieved all accounts
400
Bad request - Invalid request parameters
401
Unauthorized - Invalid or missing authentication
403
Forbidden - Access denied
404
Not found - Resource not found
504
Gateway timeout - Upstream service timeout
Error Responses
The API returns structured error responses with detailed information about what went wrong.
400
Bad request{
"errors": [
{
"status": 400,
"code": "ValidationError",
"message": "Invalid request parameters"
}
],
"meta": {
"endpoint": "/accounts",
"method": "GET",
"timing": 45
}
}401
Unauthorized{
"errors": [
{
"status": 401,
"code": "Unauthorized",
"message": "Invalid or missing authentication credentials"
}
],
"meta": {
"endpoint": "/accounts",
"method": "GET",
"timing": 12
}
}403
Forbidden{
"errors": [
{
"status": 403,
"code": "AccessDenied",
"message": "You do not have permission to access this resource"
}
],
"meta": {
"endpoint": "/accounts",
"method": "GET",
"timing": 15
}
}404
Not found{
"errors": [
{
"status": 404,
"code": "AccountNotFound",
"message": "Resource not found"
}
],
"meta": {
"endpoint": "/accounts",
"method": "GET",
"timing": 32
}
}Authentication Required
This endpoint requires the Deriv-App-ID header to identify your application.
OAuth2 Scope: trade
About get_accounts
The get_accounts endpoint get all options trading accounts
Account Information
This endpoint returns all Options trading accounts associated with your authentication credentials, including both demo and real accounts.