Api

get

OpenApi3 schema for this API. Format can be selected via content negotiation.

  • YAML: application/vnd.oai.openapi

  • JSON: application/vnd.oai.openapi+json

Authorizations
Query parameters
formatstring · enumOptionalPossible values:
langstring · enumOptionalPossible values:
Responses
200Success
get
GET /api/schema/ HTTP/1.1
Host: 
Authorization: Bearer JWT
Accept: */*
200Success
{
  "ANY_ADDITIONAL_PROPERTY": "anything"
}
post

Handle POST requests to the Clerk webhook endpoint.

This method is called when Clerk sends a webhook event to this endpoint. It expects the request to contain a valid Svix signature in the headers. The expected headers are:

  • svix-id: The unique identifier for the webhook event.

  • svix-timestamp: The timestamp of the webhook event.

  • svix-signature: The signature to verify the authenticity of the webhook event. The request body should be a JSON payload containing the event data. The expected JSON structure is: { "type": "user.created" | "user.updated" | "user.deleted", "data": { "id": "<clerk_user_id>", ... } } If the signature is valid, the method processes the event and updates the local user database accordingly. It handles the following event types:

  • user.created: Syncs a new user with the Clerk user ID.

  • user.updated: Syncs an updated user with the Clerk user ID.

  • user.deleted: Marks a user as inactive in the local database based on the Clerk user ID. If the signature is invalid or the event type is not handled, it returns an error response. If the signature is valid and the event is processed successfully, it returns a success response. Args: request: The HTTP request object containing the webhook event data. *args: Additional positional arguments. **kwargs: Additional keyword arguments. Returns: JsonResponse: A JSON response indicating the success or failure of the webhook processing. Raises: HttpResponseBadRequest: If the SIGNING_SECRET is not configured or if required headers are missing. JsonResponse: If the request body is invalid or if the webhook verification fails. Raises: Exception: If there is an error processing the webhook event.

Authorizations
Responses
200
No response body
post
POST /api/v1/account/clerk_webhook/ HTTP/1.1
Host: 
Authorization: Bearer JWT
Accept: */*
200

No response body

No content

get

Developer-only GET endpoint.

Args: request: The HTTP request object.

Returns: Response: Greeting message for the developer.

Authorizations
Responses
200Success
application/json
get
GET /api/v1/account/devtest/ HTTP/1.1
Host: 
Authorization: Bearer JWT
Accept: */*
200Success
{
  "org_id": "text",
  "org_name": "text",
  "org_role": "text",
  "org_slug": "text",
  "org_has_image": true,
  "org_image_url": "https://example.com",
  "org_public_metadata": null,
  "org_private_metadata": null,
  "org_unsafe_metadata": null,
  "org_membership_permissions": null
}
post

Developer-only POST endpoint.

Args: request: The HTTP request object.

Returns: Response: Message indicating development-only access.

Authorizations
Body

Serializer for UserOrganisation model data.

org_idstring | nullableOptional
org_namestring | nullableOptional
org_rolestring | nullableOptional
org_slugstring | nullableOptional
org_has_imagebooleanOptional
org_image_urlstring · uri | nullableOptional
org_public_metadataanyOptional
org_private_metadataanyOptional
org_unsafe_metadataanyOptional
org_membership_permissionsanyOptional
Responses
200Success
application/json
post
POST /api/v1/account/devtest/ HTTP/1.1
Host: 
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 246

{
  "org_id": "text",
  "org_name": "text",
  "org_role": "text",
  "org_slug": "text",
  "org_has_image": true,
  "org_image_url": "https://example.com",
  "org_public_metadata": null,
  "org_private_metadata": null,
  "org_unsafe_metadata": null,
  "org_membership_permissions": null
}
200Success
{
  "org_id": "text",
  "org_name": "text",
  "org_role": "text",
  "org_slug": "text",
  "org_has_image": true,
  "org_image_url": "https://example.com",
  "org_public_metadata": null,
  "org_private_metadata": null,
  "org_unsafe_metadata": null,
  "org_membership_permissions": null
}
put

Developer-only PUT endpoint.

Args: request: The HTTP request object.

Returns: Response: Message indicating PUT support for developers.

Authorizations
Body

Serializer for UserOrganisation model data.

org_idstring | nullableOptional
org_namestring | nullableOptional
org_rolestring | nullableOptional
org_slugstring | nullableOptional
org_has_imagebooleanOptional
org_image_urlstring · uri | nullableOptional
org_public_metadataanyOptional
org_private_metadataanyOptional
org_unsafe_metadataanyOptional
org_membership_permissionsanyOptional
Responses
200Success
application/json
put
PUT /api/v1/account/devtest/ HTTP/1.1
Host: 
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 246

{
  "org_id": "text",
  "org_name": "text",
  "org_role": "text",
  "org_slug": "text",
  "org_has_image": true,
  "org_image_url": "https://example.com",
  "org_public_metadata": null,
  "org_private_metadata": null,
  "org_unsafe_metadata": null,
  "org_membership_permissions": null
}
200Success
{
  "org_id": "text",
  "org_name": "text",
  "org_role": "text",
  "org_slug": "text",
  "org_has_image": true,
  "org_image_url": "https://example.com",
  "org_public_metadata": null,
  "org_private_metadata": null,
  "org_unsafe_metadata": null,
  "org_membership_permissions": null
}
delete

Developer-only DELETE endpoint.

Args: request: The HTTP request object.

Returns: Response: Message indicating DELETE support for developers.

Authorizations
Responses
204
No response body
delete
DELETE /api/v1/account/devtest/ HTTP/1.1
Host: 
Authorization: Bearer JWT
Accept: */*
204

No response body

No content

get

Retrieve the current user's basic information.

Args: request: The HTTP request object.

Returns: Response: Serialized User data for the authenticated user.

Authorizations
Responses
200Success
application/json
get
GET /api/v1/account/user/ HTTP/1.1
Host: 
Authorization: Bearer JWT
Accept: */*
200Success
{
  "username": "text",
  "email": "[email protected]",
  "first_name": "text",
  "last_name": "text",
  "last_login": "2025-06-26T04:40:06.855Z",
  "unsafe_metadata": null,
  "created_at": "2025-06-26T04:40:06.855Z",
  "updated_at": "2025-06-26T04:40:06.855Z",
  "last_sign_in_at": "2025-06-26T04:40:06.855Z",
  "email_verified": true,
  "phone_number_verified": true,
  "two_factor_enabled": true,
  "is_active": true,
  "is_staff": true,
  "is_superuser": true,
  "is_developer": true,
  "is_beta_tester": true,
  "subscription_level": 0,
  "session_actor": "text",
  "roles": [
    1
  ],
  "aud": "http://localhost:3000"
}
post

Partially update the current user's basic information.

Args: request: The HTTP request object containing update data.

Returns: Response: Updated serialized User data or validation errors.

Authorizations
Body

Serializer for User including the nested UserProfile.

usernamestring | nullableOptional
first_namestring · max: 30Optional
last_namestring · max: 30Optional
last_loginstring · date-time | nullableOptional
unsafe_metadataanyOptional
last_sign_in_atstring · date-time | nullableOptional
email_verifiedbooleanOptional
phone_number_verifiedbooleanOptional
two_factor_enabledbooleanOptional
is_activebooleanOptional
is_staffbooleanOptional
is_superuserbooleanOptional

Designates that this user has all permissions without explicitly assigning them.

is_developerbooleanOptional
is_beta_testerbooleanOptional
subscription_levelall of · max: 32767Optional
integer · enumOptional
  • 0 - Free
  • 10 - Basic
  • 20 - Essential
  • 30 - Plus
  • 40 - Premium
Possible values:
session_actorstring | nullableOptional
rolesinteger[]Optional
Responses
200Success
application/json
post
POST /api/v1/account/user/ HTTP/1.1
Host: 
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 396

{
  "username": "text",
  "first_name": "text",
  "last_name": "text",
  "last_login": "2025-06-26T04:40:06.855Z",
  "unsafe_metadata": null,
  "last_sign_in_at": "2025-06-26T04:40:06.855Z",
  "email_verified": true,
  "phone_number_verified": true,
  "two_factor_enabled": true,
  "is_active": true,
  "is_staff": true,
  "is_superuser": true,
  "is_developer": true,
  "is_beta_tester": true,
  "subscription_level": 0,
  "session_actor": "text",
  "roles": [
    1
  ]
}
200Success
{
  "username": "text",
  "email": "[email protected]",
  "first_name": "text",
  "last_name": "text",
  "last_login": "2025-06-26T04:40:06.855Z",
  "unsafe_metadata": null,
  "created_at": "2025-06-26T04:40:06.855Z",
  "updated_at": "2025-06-26T04:40:06.855Z",
  "last_sign_in_at": "2025-06-26T04:40:06.855Z",
  "email_verified": true,
  "phone_number_verified": true,
  "two_factor_enabled": true,
  "is_active": true,
  "is_staff": true,
  "is_superuser": true,
  "is_developer": true,
  "is_beta_tester": true,
  "subscription_level": 0,
  "session_actor": "text",
  "roles": [
    1
  ],
  "aud": "http://localhost:3000"
}
get

Retrieve the current user's extended information.

Args: request: The HTTP request object.

Returns: Response: Serialized UserExt data for the authenticated user.

Authorizations
Responses
200Success
application/json
get
GET /api/v1/account/userextension/ HTTP/1.1
Host: 
Authorization: Bearer JWT
Accept: */*
200Success
{
  "address": "text",
  "city": "text",
  "state": "text",
  "country": "text",
  "zip_code": "text",
  "birth_date": "2025-06-26"
}
post

Partially update the current user's extended information.

Args: request: The HTTP request object containing update data.

Returns: Response: Updated serialized UserExt data or validation errors.

Authorizations
Body

Serializer for UserExt model data.

addressstring | nullableOptional
citystring | nullableOptional
statestring | nullableOptional
countrystring | nullableOptional
zip_codestring | nullableOptional
birth_datestring · date | nullableOptional
Responses
200Success
application/json
post
POST /api/v1/account/userextension/ HTTP/1.1
Host: 
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 108

{
  "address": "text",
  "city": "text",
  "state": "text",
  "country": "text",
  "zip_code": "text",
  "birth_date": "2025-06-26"
}
200Success
{
  "address": "text",
  "city": "text",
  "state": "text",
  "country": "text",
  "zip_code": "text",
  "birth_date": "2025-06-26"
}
get

Retrieve the current user's organisation information.

Args: request: The HTTP request object.

Returns: Response: Serialized organisation data for the authenticated user.

Authorizations
Responses
200Success
application/json
get
GET /api/v1/account/userorganisation/ HTTP/1.1
Host: 
Authorization: Bearer JWT
Accept: */*
200Success
{
  "org_id": "text",
  "org_name": "text",
  "org_role": "text",
  "org_slug": "text",
  "org_has_image": true,
  "org_image_url": "https://example.com",
  "org_public_metadata": null,
  "org_private_metadata": null,
  "org_unsafe_metadata": null,
  "org_membership_permissions": null
}
post

Partially update the current user's organisation information.

Args: request: The HTTP request object containing update data.

Returns: Response: Updated serialized organisation data or validation errors.

Authorizations
Body

Serializer for UserOrganisation model data.

org_idstring | nullableOptional
org_namestring | nullableOptional
org_rolestring | nullableOptional
org_slugstring | nullableOptional
org_has_imagebooleanOptional
org_image_urlstring · uri | nullableOptional
org_public_metadataanyOptional
org_private_metadataanyOptional
org_unsafe_metadataanyOptional
org_membership_permissionsanyOptional
Responses
200Success
application/json
post
POST /api/v1/account/userorganisation/ HTTP/1.1
Host: 
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 246

{
  "org_id": "text",
  "org_name": "text",
  "org_role": "text",
  "org_slug": "text",
  "org_has_image": true,
  "org_image_url": "https://example.com",
  "org_public_metadata": null,
  "org_private_metadata": null,
  "org_unsafe_metadata": null,
  "org_membership_permissions": null
}
200Success
{
  "org_id": "text",
  "org_name": "text",
  "org_role": "text",
  "org_slug": "text",
  "org_has_image": true,
  "org_image_url": "https://example.com",
  "org_public_metadata": null,
  "org_private_metadata": null,
  "org_unsafe_metadata": null,
  "org_membership_permissions": null
}
get

Retrieve the current user's profile data.

Args: request: The HTTP request object.

Returns: Response: Serialized UserProfile data for the authenticated user.

Authorizations
Responses
200Success
application/json
get
GET /api/v1/account/userprofile/ HTTP/1.1
Host: 
Authorization: Bearer JWT
Accept: */*
200Success
{
  "timezone": "text",
  "language": "text",
  "bio": "text",
  "aboutme": "text",
  "facebook": "https://example.com",
  "twitter": "https://example.com",
  "linkedin": "https://example.com",
  "github": "https://example.com",
  "website": "https://example.com",
  "interests": "text",
  "onboarding_tasks": null
}
post

Partially update the current user's profile data.

Args: request: The HTTP request object containing update data.

Returns: Response: Updated serialized UserProfile data or validation errors.

Authorizations
Body

Serializer for UserProfile model data.

timezonestring | nullableOptional
languagestring | nullableOptional
biostringOptional
aboutmestringOptional
facebookstring · uri | nullableOptional
twitterstring · uri | nullableOptional
linkedinstring · uri | nullableOptional
githubstring · uri | nullableOptional
websitestring · uri | nullableOptional
interestsstring | nullableOptional
onboarding_tasksanyOptional
Responses
200Success
application/json
post
POST /api/v1/account/userprofile/ HTTP/1.1
Host: 
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 271

{
  "timezone": "text",
  "language": "text",
  "bio": "text",
  "aboutme": "text",
  "facebook": "https://example.com",
  "twitter": "https://example.com",
  "linkedin": "https://example.com",
  "github": "https://example.com",
  "website": "https://example.com",
  "interests": "text",
  "onboarding_tasks": null
}
200Success
{
  "timezone": "text",
  "language": "text",
  "bio": "text",
  "aboutme": "text",
  "facebook": "https://example.com",
  "twitter": "https://example.com",
  "linkedin": "https://example.com",
  "github": "https://example.com",
  "website": "https://example.com",
  "interests": "text",
  "onboarding_tasks": null
}
get

Retrieve the current user's subscription data.

Args: request: The HTTP request object.

Returns: Response: Serialized UserSubscription data or empty dict if not found.

Authorizations
Responses
200Success
application/json
get
GET /api/v1/account/usersubscription/ HTTP/1.1
Host: 
Authorization: Bearer JWT
Accept: */*
200Success
{
  "subscription_id": "text",
  "subscription_name": "text",
  "subscription_level": 0,
  "subscription_status": "active",
  "subscription_start_date": "2025-06-26T04:40:06.855Z",
  "subscription_end_date": "2025-06-26T04:40:06.855Z",
  "subscription_trial_end_date": "2025-06-26T04:40:06.855Z",
  "subscription_cancelled_date": "2025-06-26T04:40:06.855Z",
  "subscription_suspended_date": "2025-06-26T04:40:06.855Z",
  "subscription_metadata": null
}
post

Partially update the current user's subscription data.

Args: request: The HTTP request object containing update data.

Returns: Response: Updated serialized UserSubscription data or validation errors.

Authorizations
Body

Serializer for User subscription data.

subscription_idstring | nullableOptional
subscription_namestring | nullableOptional
subscription_levelall of · max: 32767Optional
integer · enumOptional
  • 0 - Free
  • 10 - Basic
  • 20 - Essential
  • 30 - Plus
  • 40 - Premium
Possible values:
subscription_statusstring · enumOptional
  • active - Active
  • inactive - Inactive
  • cancelled - Cancelled
  • suspended - Suspended
Possible values:
subscription_start_datestring · date-time | nullableOptional
subscription_end_datestring · date-time | nullableOptional
subscription_trial_end_datestring · date-time | nullableOptional
subscription_cancelled_datestring · date-time | nullableOptional
subscription_suspended_datestring · date-time | nullableOptional
subscription_metadataanyOptional
Responses
200Success
application/json
post
POST /api/v1/account/usersubscription/ HTTP/1.1
Host: 
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 411

{
  "subscription_id": "text",
  "subscription_name": "text",
  "subscription_level": 0,
  "subscription_status": "active",
  "subscription_start_date": "2025-06-26T04:40:06.855Z",
  "subscription_end_date": "2025-06-26T04:40:06.855Z",
  "subscription_trial_end_date": "2025-06-26T04:40:06.855Z",
  "subscription_cancelled_date": "2025-06-26T04:40:06.855Z",
  "subscription_suspended_date": "2025-06-26T04:40:06.855Z",
  "subscription_metadata": null
}
200Success
{
  "subscription_id": "text",
  "subscription_name": "text",
  "subscription_level": 0,
  "subscription_status": "active",
  "subscription_start_date": "2025-06-26T04:40:06.855Z",
  "subscription_end_date": "2025-06-26T04:40:06.855Z",
  "subscription_trial_end_date": "2025-06-26T04:40:06.855Z",
  "subscription_cancelled_date": "2025-06-26T04:40:06.855Z",
  "subscription_suspended_date": "2025-06-26T04:40:06.855Z",
  "subscription_metadata": null
}
get

List all TradeHistory entries.

Authorizations
Responses
200Success
application/json
get
GET /api/v1/ibkr/tradehistory/ HTTP/1.1
Host: 
Authorization: Bearer JWT
Accept: */*
200Success
[
  {
    "id": 1,
    "created_at": "2025-06-26T04:40:06.855Z",
    "update_at": "2025-06-26T04:40:06.855Z",
    "version": 1,
    "symbol": "text",
    "side": "text",
    "type": "text",
    "qty": 1,
    "trade_price": 1,
    "close_price": 1,
    "open_time": "2025-06-26T04:40:06.855Z",
    "close_time": "2025-06-26T04:40:06.855Z",
    "duration": "text",
    "commission_fee": 1,
    "order_id": "text",
    "trade_id": "text",
    "client_account_id": "text",
    "account_alias": "text",
    "user": "123e4567-e89b-12d3-a456-426614174000"
  }
]
get

List all TradeHistory entries.

Authorizations
Responses
200Success
application/json
get
GET /api/v1/ibkr/trades/ HTTP/1.1
Host: 
Authorization: Bearer JWT
Accept: */*
200Success
[
  {
    "id": 1,
    "created_at": "2025-06-26T04:40:06.855Z",
    "update_at": "2025-06-26T04:40:06.855Z",
    "version": 1,
    "symbol": "text",
    "side": "text",
    "type": "text",
    "qty": 1,
    "trade_price": 1,
    "close_price": 1,
    "open_time": "2025-06-26T04:40:06.855Z",
    "close_time": "2025-06-26T04:40:06.855Z",
    "duration": "text",
    "commission_fee": 1,
    "order_id": "text",
    "trade_id": "text",
    "client_account_id": "text",
    "account_alias": "text",
    "user": "123e4567-e89b-12d3-a456-426614174000"
  }
]
get

List method for ServerListViewSet class.

Authorizations
Responses
200
No response body
get
GET /api/v1/server/select/ HTTP/1.1
Host: 
Authorization: Bearer JWT
Accept: */*
200

No response body

No content