Paper Trading

Set a paper trading account cash balance

PATCH
/apps/{appId}/paper-trading/accounts/{accountId}/balance

Authorization

appApiKey
headerx-app-api-key<token>

App-scoped API key. It is the only credential on partner-admin reads, paper-trading admin, and webhook rotate or replay. POST /bot-protection/verify requires it together with x-app-id.

Path Parameters

appId*string
accountId*string

Request Body

application/json
  1. body
balanceRaw?string
Match^[0-9]+$
balance?number
Range0 <= value
reason?string
Lengthlength <= 500

Response Body

200

application/json
  1. response
account*
adjustment*
Example Request
curl -X PATCH 'https://api.t.sufwankhalid.com/apps/string/paper-trading/accounts/string/balance' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "account": {    "id": "string",    "appId": "string",    "name": "string",    "externalId": "string",    "currency": "string",    "startingBalanceRaw": "string",    "startingBalance": 0,    "cashBalanceRaw": "string",    "cashBalance": 0,    "realizedPnlRaw": "string",    "realizedPnl": 0,    "kycStatus": "verified",    "kycVerified": true,    "status": "active",    "createdAt": "string",    "updatedAt": "string"  },  "adjustment": {    "id": "string",    "accountId": "string",    "type": "set_balance",    "amountRaw": "string",    "amount": 0,    "previousCashBalanceRaw": "string",    "previousCashBalance": 0,    "newCashBalanceRaw": "string",    "newCashBalance": 0,    "reason": "string",    "createdAt": "string"  }}