Paper Trading

Get a paper trading portfolio

GET
/apps/{appId}/paper-trading/accounts/{accountId}/portfolio

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

Response Body

200

application/json
  1. response
account*
cashBalanceRaw*string
cashBalance*number
marketValueRaw*string
marketValue*number
equityRaw*string
equity*number
realizedPnlRaw*string
realizedPnl*number
unrealizedPnlRaw*string
unrealizedPnl*number
liquidationValueRaw*string
liquidationValue*number
liquidationEquityRaw*string
liquidationEquity*number
liquidationPnlRaw*string
liquidationPnl*number
positions*array<>
Example Request
curl -X GET 'https://api.t.sufwankhalid.com/apps/string/paper-trading/accounts/string/portfolio'
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"  },  "cashBalanceRaw": "string",  "cashBalance": 0,  "marketValueRaw": "string",  "marketValue": 0,  "equityRaw": "string",  "equity": 0,  "realizedPnlRaw": "string",  "realizedPnl": 0,  "unrealizedPnlRaw": "string",  "unrealizedPnl": 0,  "liquidationValueRaw": "string",  "liquidationValue": 0,  "liquidationEquityRaw": "string",  "liquidationEquity": 0,  "liquidationPnlRaw": "string",  "liquidationPnl": 0,  "positions": [    {      "id": "string",      "accountId": "string",      "venue": "string",      "venueMarketId": "string",      "venueMarketOutcomeId": "string",      "marketQuestion": "string",      "outcomeLabel": "string",      "winner": true,      "size": 0,      "avgEntryPrice": 0,      "markPrice": 0,      "markSource": "orderbook_midpoint",      "markTimestamp": 0,      "bestBidPrice": 0,      "bestAskPrice": 0,      "midpoint": 0,      "spread": 0,      "marketValueRaw": "string",      "marketValue": 0,      "unrealizedPnlRaw": "string",      "unrealizedPnl": 0,      "liquidationPrice": 0,      "liquidationValueRaw": "string",      "liquidationValue": 0,      "liquidationPnlRaw": "string",      "liquidationPnl": 0,      "liquidityShares": 0,      "liquidityStatus": "full",      "realizedPnlRaw": "string",      "realizedPnl": 0,      "createdAt": "string",      "updatedAt": "string"    }  ]}