Deriv API
Documentation
Trading Operations

Bulk Purchase

PostAuth requiredBeta

Buy the same options contract for multiple end-user accounts in a single call. This is the V2 successor to the legacy buy_contract_for_multiple_accounts flow used by copy-trading platforms. Authentication is per-account: each entry in accounts pairs an end-user personal access token carrying the trade scope with the account it owns, so no separate OAuth token is needed for the call itself. You send one set of contract parameters with a list of accounts to buy for, and the same parameters apply to every account. Up to 100 accounts are accepted per request. Each account_type path accepts only its own account type — a demo account submitted to the real path (or vice versa) is reported as a per-account failure, not a request-level error. Any entry that fails token, ownership, or account-type validation is reported on its own, without affecting the others, but the request is rejected if none of the entries pass validation.

Endpoint

Post/trading/v1/options/contracts/bulk-purchase/{account_type}

Base URL: https://api.derivws.com

Status Codes

200OK - The trading backend processed the request. Each entry in the transactions array reports either the purchased contract details or a per-account error.
400Bad request - Invalid request body, or no token/account pair passed validation.
401Unauthorized - Invalid or missing authentication.
502Bad gateway - An upstream dependency (token verification, account lookup, or the trading backend) was unavailable.

Error Responses

400Bad request - Invalid request body, or no token/account pair passed validation
{
  "errors": [
    {
      "status": 400,
      "code": "ValidationError",
      "message": "No token/account pair passed validation",
      "field": "accounts.0.token"
    }
  ],
  "meta": {
    "endpoint": "/contracts/bulk-purchase/real",
    "method": "POST",
    "timing": 28
  }
}
401Unauthorized
{
  "errors": [
    {
      "status": 401,
      "code": "Unauthorized",
      "message": "Invalid or missing authentication credentials"
    }
  ],
  "meta": {
    "endpoint": "/contracts/bulk-purchase/real",
    "method": "POST",
    "timing": 12
  }
}
502Bad gateway
{
  "errors": [
    {
      "status": 502,
      "code": "InternalServerError",
      "message": "An upstream dependency was unavailable. Please retry."
    }
  ],
  "meta": {
    "endpoint": "/contracts/bulk-purchase/real",
    "method": "POST",
    "timing": 61
  }
}

About Bulk Purchase

The POST /trading/v1/options/contracts/bulk-purchase/{account_type} endpoint: Buy the same options contract for multiple end-user accounts in a single call. This is the V2 successor to the legacy buy_contract_for_multiple_accounts flow used by copy-trading platforms. Authentication is per-account: each entry in accounts pairs an end-user personal access token carrying the trade scope with the account it owns, so no separate OAuth token is needed for the call itself. You send one set of contract parameters with a list of accounts to buy for, and the same parameters apply to every account. Up to 100 accounts are accepted per request. Each account_type path accepts only its own account type — a demo account submitted to the real path (or vice versa) is reported as a per-account failure, not a request-level error. Any entry that fails token, ownership, or account-type validation is reported on its own, without affecting the others, but the request is rejected if none of the entries pass validation.

Endpoint Variants

There are two account-type-specific endpoints. Replace {account_type} with real for real-money accounts or demo for demo accounts:

  • POST /trading/v1/options/contracts/bulk-purchase/real
  • POST /trading/v1/options/contracts/bulk-purchase/demo

The two endpoints behave identically apart from the account type they accept. Passing a demo account to the /real path (or vice versa) is reported as a per-account error.

Authentication

No OAuth access token is required for this endpoint. Authentication is by your application's Deriv-App-ID header together with the per-account Personal Access Tokens (PATs) supplied in the request body. Each PAT must carry the trade scope and own the account it is paired with.

Any other questions? Get in touch

Click to open live chat support. Get instant help from our support team.