Skip to main content
PATCH
/
apps
/
{appId}
/
paper-trading
/
accounts
/
{accountId}
/
balance
Set a paper trading account cash balance
curl --request PATCH \
  --url https://api.agg.market/apps/{appId}/paper-trading/accounts/{accountId}/balance \
  --header 'Content-Type: application/json' \
  --header 'x-app-api-key: <api-key>' \
  --data '
{
  "balanceRaw": "<string>",
  "balance": 1,
  "reason": "<string>"
}
'
{
  "account": {
    "id": "<string>",
    "appId": "<string>",
    "name": "<string>",
    "externalId": "<string>",
    "currency": "<string>",
    "startingBalanceRaw": "<string>",
    "startingBalance": 123,
    "cashBalanceRaw": "<string>",
    "cashBalance": 123,
    "realizedPnlRaw": "<string>",
    "realizedPnl": 123,
    "kycStatus": "verified",
    "kycVerified": true,
    "createdAt": "<string>",
    "updatedAt": "<string>"
  },
  "adjustment": {
    "id": "<string>",
    "accountId": "<string>",
    "amountRaw": "<string>",
    "amount": 123,
    "previousCashBalanceRaw": "<string>",
    "previousCashBalance": 123,
    "newCashBalanceRaw": "<string>",
    "newCashBalance": 123,
    "reason": "<string>",
    "createdAt": "<string>"
  }
}

Authorizations

x-app-api-key
string
header
required

App-scoped API key for programmatic app management.

Path Parameters

appId
string
required
accountId
string
required

Body

application/json
balanceRaw
string
Pattern: ^[0-9]+$
balance
number
Required range: x >= 0
reason
string
Maximum string length: 500

Response

200

account
object
required
adjustment
object
required