PredictAsiaX Subaccounts API

Subaccounts + on_behalf_of delegation

GitHub OpenAPI

Operations 15

GET /v1/subaccounts List subaccounts #
POST /v1/subaccounts Create subaccount #
GET /v1/subaccounts/{id} Get subaccount detail #
DELETE /v1/subaccounts/{id} Close (soft-delete) a subaccount #
POST /v1/subaccounts/transfer Internal transfer between subaccounts #
GET /v1/subaccounts/{id}/grants List delegation grants on this subaccount #
DELETE /v1/subaccounts/{id}/grants/{grn_id} Revoke a delegation grant #
GET /v1/subaccounts/{id}/positions Open positions scoped to subaccount #
GET /v1/subaccounts/balances Aggregated balances across subaccounts #
GET /v1/subaccounts/transfers Internal transfer history #
PUT /v1/subaccounts/{slot}/netting Toggle margin netting on subaccount #
GET /v1/delegations List delegations issued by caller #
POST /v1/delegations Issue a new delegation #
GET /v1/delegations/received List delegations received by caller #
DELETE /v1/delegations/{delegation_id} Revoke a delegation #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/predictasiax-com:predictasiax-com-subaccounts-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

predictasiax-com-subaccounts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: PredictAsiaX Network Subaccounts API
  version: v1
  description: 'The canonical REST surface for the PredictAsiaX Network. Most /v1/*

    response is wrapped in an envelope `{ data, meta: { ts_ms, trace_id, is_simulated? } }`.

    All timestamps are `*_at_ms` integer milliseconds; all money is decimal string.'
  contact:
    email: support@predictasiax.com
  license:
    name: PredictAsiaX Builder License
    url: https://docs.predictasiax.com/legal/builder-license
servers:
- url: https://api.predictasiax.com
  description: Production
security:
- bearerAuth: []
tags:
- name: Subaccounts
  description: Subaccounts + on_behalf_of delegation
paths:
  /v1/subaccounts:
    get:
      tags:
      - Subaccounts
      summary: List subaccounts
      responses:
        '200':
          description: OK
      operationId: getV1Subaccounts
      x-operation-id-source: derived
    post:
      tags:
      - Subaccounts
      summary: Create subaccount
      parameters:
      - name: Idempotency-Key
        in: header
        required: false
        schema:
          type: string
          pattern: ^[A-Za-z0-9_\-]{8,128}$
        description: 'Optional. Backend accepts POST without this header for this endpoint (only POST /v1/orders and POST /v1/orders/batch strictly enforce). Portal SDKs auto-inject a UUID for safe retry. Format: [A-Za-z0-9_\-]{8,128}.'
      responses:
        '200':
          description: OK
      operationId: postV1Subaccounts
      x-operation-id-source: derived
  /v1/subaccounts/{id}:
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: string
        pattern: ^sub_[0-9a-zA-Z]{6,20}$
    get:
      tags:
      - Subaccounts
      summary: Get subaccount detail
      description: 'Returns subaccount config + balance + risk limits (joined from subaccount_balances + subaccount_risk_limits). Scope: portfolio:read. Only the parent user can read.'
      responses:
        '200':
          description: Subaccount detail
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      subaccount:
                        type: object
                        properties:
                          id:
                            type: string
                          parent_user_id:
                            type: string
                          label:
                            type: string
                          kind:
                            type: string
                            enum:
                            - default
                            - strategy
                            - delegated
                          status:
                            type: string
                            enum:
                            - active
                            - frozen
                            - closed
                          currency:
                            type: string
                            example: USDT
                          created_at_ms:
                            type: integer
                            format: int64
                          updated_at_ms:
                            type: integer
                            format: int64
                          frozen_at_ms:
                            type:
                            - integer
                            - 'null'
                            format: int64
                          frozen_reason:
                            type:
                            - string
                            - 'null'
                          closed_at_ms:
                            type:
                            - integer
                            - 'null'
                            format: int64
                          balance_free:
                            type:
                            - string
                            - 'null'
                            description: Free balance as decimal string.
                          balance_reserved:
                            type:
                            - string
                            - 'null'
                          max_open_notional_usdt:
                            type:
                            - string
                            - 'null'
                          max_daily_notional_usdt:
                            type:
                            - string
                            - 'null'
                          max_order_size_usdt:
                            type:
                            - string
                            - 'null'
                          daily_notional_used:
                            type:
                            - string
                            - 'null'
                  meta:
                    type: object
                    properties:
                      ts_ms:
                        type: integer
                        format: int64
                      trace_id:
                        type: string
        '404':
          description: subaccount not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        example: NOT_FOUND
                      message:
                        type: string
                      trace_id:
                        type: string
        '403':
          description: subaccount belongs to a different user
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        example: SCOPE_MISSING
                      message:
                        type: string
                      trace_id:
                        type: string
      operationId: getV1SubaccountsById
      x-operation-id-source: derived
    delete:
      tags:
      - Subaccounts
      summary: Close (soft-delete) a subaccount
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
      security:
      - BearerAuth:
        - subaccounts:manage
      - ApiKeyAuth:
        - subaccounts:manage
      operationId: deleteV1SubaccountsById
      x-operation-id-source: derived
  /v1/subaccounts/transfer:
    post:
      tags:
      - Subaccounts
      summary: Internal transfer between subaccounts
      requestBody:
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          description: OK
      operationId: postV1SubaccountsTransfer
      x-operation-id-source: derived
  /v1/subaccounts/{id}/grants:
    get:
      tags:
      - Subaccounts
      summary: List delegation grants on this subaccount
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
      security:
      - BearerAuth:
        - subaccounts:read
      - ApiKeyAuth:
        - subaccounts:read
      operationId: getV1SubaccountsByIdGrants
      x-operation-id-source: derived
  /v1/subaccounts/{id}/grants/{grn_id}:
    delete:
      tags:
      - Subaccounts
      summary: Revoke a delegation grant
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      - name: grn_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
      security:
      - BearerAuth:
        - subaccounts:manage
      - ApiKeyAuth:
        - subaccounts:manage
      operationId: deleteV1SubaccountsByIdGrantsByGrnId
      x-operation-id-source: derived
  /v1/subaccounts/{id}/positions:
    get:
      tags:
      - Subaccounts
      summary: Open positions scoped to subaccount
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
      security:
      - BearerAuth:
        - portfolio:read
      - ApiKeyAuth:
        - portfolio:read
      operationId: getV1SubaccountsByIdPositions
      x-operation-id-source: derived
  /v1/subaccounts/balances:
    get:
      tags:
      - Subaccounts
      summary: Aggregated balances across subaccounts
      responses:
        '200':
          description: OK
      security:
      - BearerAuth:
        - portfolio:read
      - ApiKeyAuth:
        - portfolio:read
      operationId: getV1SubaccountsBalances
      x-operation-id-source: derived
  /v1/subaccounts/transfers:
    get:
      tags:
      - Subaccounts
      summary: Internal transfer history
      responses:
        '200':
          description: OK
      security:
      - BearerAuth:
        - portfolio:read
      - ApiKeyAuth:
        - portfolio:read
      operationId: getV1SubaccountsTransfers
      x-operation-id-source: derived
  /v1/subaccounts/{slot}/netting:
    put:
      tags:
      - Subaccounts
      summary: Toggle margin netting on subaccount
      parameters:
      - name: slot
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          description: OK
      security:
      - BearerAuth:
        - subaccounts:manage
      - ApiKeyAuth:
        - subaccounts:manage
      operationId: putV1SubaccountsBySlotNetting
      x-operation-id-source: derived
  /v1/delegations:
    get:
      tags:
      - Subaccounts
      summary: List delegations issued by caller
      responses:
        '200':
          description: OK
      security:
      - BearerAuth:
        - subaccounts:read
      - ApiKeyAuth:
        - subaccounts:read
      operationId: getV1Delegations
      x-operation-id-source: derived
    post:
      tags:
      - Subaccounts
      summary: Issue a new delegation
      description: 'Delegable scopes are trade, close_only and read_positions. withdraw cannot be delegated (400 SCOPE_NOT_DELEGABLE): withdrawals are owner-only and require 2FA.'
      requestBody:
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          description: OK
      security:
      - BearerAuth:
        - subaccounts:manage
      - ApiKeyAuth:
        - subaccounts:manage
      operationId: postV1Delegations
      x-operation-id-source: derived
  /v1/delegations/received:
    get:
      tags:
      - Subaccounts
      summary: List delegations received by caller
      responses:
        '200':
          description: OK
      security:
      - BearerAuth:
        - subaccounts:read
      - ApiKeyAuth:
        - subaccounts:read
      operationId: getV1DelegationsReceived
      x-operation-id-source: derived
  /v1/delegations/{delegation_id}:
    delete:
      tags:
      - Subaccounts
      summary: Revoke a delegation
      parameters:
      - name: delegation_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
      security:
      - BearerAuth:
        - subaccounts:manage
      - ApiKeyAuth:
        - subaccounts:manage
      operationId: deleteV1DelegationsByDelegationId
      x-operation-id-source: derived
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Send `Authorization: Bearer sk_live_*` or an OAuth 2.1 access token. `sk_live_` and OAuth tokens go through the same authenticator; capability is differentiated by tier (`sandbox` / `self_serve` / `read_live` / `trade_capped` / `trade_full` / `genesis` / `partner`). Sandbox and production share the same host and key prefix — the tier flag caps sandbox at $10/order + $100/day.'
    oracleApiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: 'Oracle api-key minted via POST /v1/provider/keys. Equivalently sent as `Authorization: Bearer <api-key>`. Write endpoints additionally require the `oracle:write` scope.'
    platformSession:
      type: apiKey
      in: header
      name: X-PAX-Session
      description: 'Platform login session (consumer app) or builder-portal OAuth token. Equivalently sent as `Authorization: Bearer <token>`. Used only by the /v1/provider/keys endpoints to mint, list, or revoke oracle api-keys.'