Sandbox playground Read-only sandbox request asOf Optional · query from Optional · query to Optional · query format Optional · query section Optional · query limit Optional · query Sandbox API key Your key stays in this page’s memory.
https://mystocks.africa/api/sandbox/v1/partner/report/reconciliation Send{
"oneOf": [
{
"type": "object",
"properties": {
"partnerKey": {
"type": "string"
},
"period": {
"type": "object",
"properties": {
"from": {
"type": "string",
"format": "date"
},
"to": {
"type": "string",
"format": "date"
}
}
},
"generatedAt": {
"type": "string",
"format": "date-time"
},
"exportManifest": {
"type": "object",
"description": "Pointers to the JSON and per-section CSV variants of this report.",
"properties": {
"api": {
"type": "string",
"example": "/api/v1/partner/report/reconciliation"
},
"csv": {
"type": "string",
"example": "/api/v1/partner/report/reconciliation?format=csv§ion={cash|securities|unsettled|fees|dividends|corporate_actions|custody_positions}"
},
"sftpEligible": {
"type": "boolean"
}
}
},
"summary": {
"type": "object",
"properties": {
"accountCount": {
"type": "integer"
},
"closingCashBalance": {
"type": "number"
},
"closingSecuritiesValue": {
"type": "number"
},
"unsettledTradeCount": {
"type": "integer"
},
"unsettledBuyAmount": {
"type": "number"
},
"unsettledSellAmount": {
"type": "number"
},
"totalFees": {
"type": "number"
},
"totalDividends": {
"type": "number"
},
"custodyPositionCount": {
"type": "integer"
},
"corporateActionCount": {
"type": "integer"
},
"reconciliationStatus": {
"type": "string",
"enum": [
"BALANCED",
"EXCEPTIONS",
"INCOMPLETE"
]
},
"custodyExceptionCount": {
"type": "integer"
}
}
},
"proof": {
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"BALANCED",
"EXCEPTIONS",
"INCOMPLETE"
]
},
"cashRollForward": {
"type": "object",
"properties": {
"closingCashBalance": {
"type": "number"
},
"completedCredits": {
"type": "number"
},
"completedDebits": {
"type": "number"
},
"netMovement": {
"type": "number"
},
"derivedOpeningCashBalance": {
"type": "number"
},
"equation": {
"type": "string"
}
}
},
"custody": {
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"BALANCED",
"EXCEPTIONS",
"INCOMPLETE"
]
},
"comparedInstrumentCount": {
"type": "integer"
},
"beneficialUnits": {
"type": "number"
},
"custodyUnits": {
"type": "number"
},
"exceptions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"instrumentId": {
"type": "string"
},
"beneficialUnits": {
"type": "number"
},
"custodyUnits": {
"type": "number"
},
"differenceUnits": {
"type": "number"
}
}
}
}
}
},
"notes": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"accounts": {
"type": "array",
"items": {
"type": "object",
"description": "One account (master or sub-account) covered by the reconciliation report.",
"properties": {
"userId": {
"type": "string"
},
"accountType": {
"type": "string",
"enum": [
"MASTER",
"SUBACCOUNT"
]
},
"externalId": {
"type": [
"string",
"null"
],
"description": "Your identifier for the sub-account, if set. Null for the master account."
},
"displayName": {
"type": [
"string",
"null"
]
}
}
}
},
"cashLedger": {
"type": "array",
"items": {
"type": "object",
"description": "One wallet transaction in the reconciliation period. The fees and dividends arrays reuse this shape (filtered to type FEE and DISTRIBUTION/DIVIDEND respectively).",
"properties": {
"userId": {
"type": "string"
},
"accountType": {
"type": "string",
"enum": [
"MASTER",
"SUBACCOUNT"
]
},
"externalId": {
"type": [
"string",
"null"
]
},
"transactionId": {
"type": "string"
},
"type": {
"type": [
"string",
"null"
],
"description": "Transaction type, e.g. DEPOSIT, WITHDRAWAL, INVEST, FEE, DISTRIBUTION."
},
"status": {
"type": [
"string",
"null"
]
},
"direction": {
"type": [
"string",
"null"
],
"description": "CREDIT or DEBIT where recorded."
},
"amount": {
"type": "number"
},
"currency": {
"type": "string",
"example": "USD"
},
"reference": {
"type": [
"string",
"null"
]
},
"sourceId": {
"type": [
"string",
"null"
]
},
"sourceType": {
"type": [
"string",
"null"
]
},
"createdAt": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"settledAt": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"description": {
"type": [
"string",
"null"
]
}
}
}
},
"securitiesLedger": {
"type": "array",
"items": {
"type": "object",
"description": "One holding row in the securities ledger, valued in USD.",
"properties": {
"userId": {
"type": "string"
},
"accountType": {
"type": "string",
"enum": [
"MASTER",
"SUBACCOUNT"
]
},
"externalId": {
"type": [
"string",
"null"
]
},
"symbol": {
"type": "string",
"example": "SCOM.KE"
},
"name": {
"type": [
"string",
"null"
]
},
"exchange": {
"type": [
"string",
"null"
]
},
"sourceType": {
"type": "string",
"example": "LISTED_STOCK"
},
"sourceId": {
"type": "string"
},
"units": {
"type": "number"
},
"reservedUnits": {
"type": "number",
"description": "Units locked by open SELL orders."
},
"costBasis": {
"type": [
"number",
"null"
]
},
"amountInvested": {
"type": "number"
},
"currentValue": {
"type": "number"
},
"currency": {
"type": "string",
"example": "USD"
},
"localCurrency": {
"type": [
"string",
"null"
]
},
"updatedAt": {
"type": [
"string",
"null"
],
"format": "date-time"
}
}
}
},
"unsettledTrades": {
"type": "array",
"items": {
"type": "object",
"description": "One open (PENDING/PROCESSING) trade order awaiting settlement.",
"properties": {
"userId": {
"type": "string"
},
"accountType": {
"type": "string",
"enum": [
"MASTER",
"SUBACCOUNT"
]
},
"externalId": {
"type": [
"string",
"null"
]
},
"orderId": {
"type": "string"
},
"clientOrderId": {
"type": [
"string",
"null"
]
},
"quoteId": {
"type": [
"string",
"null"
]
},
"type": {
"type": [
"string",
"null"
],
"enum": [
"BUY",
"SELL",
null
]
},
"symbol": {
"type": "string"
},
"exchange": {
"type": [
"string",
"null"
]
},
"status": {
"type": "string",
"example": "PENDING"
},
"quantity": {
"type": "number"
},
"filledQuantity": {
"type": "number"
},
"remainingQuantity": {
"type": "number"
},
"totalAmount": {
"type": "number"
},
"feeAmount": {
"type": "number"
},
"settlementUsdPrice": {
"type": [
"number",
"null"
]
},
"createdAt": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"settledAt": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"omsStatus": {
"type": [
"string",
"null"
]
}
}
}
},
"fees": {
"type": "array",
"description": "Cash-ledger entries with type FEE.",
"items": {
"type": "object",
"description": "One wallet transaction in the reconciliation period. The fees and dividends arrays reuse this shape (filtered to type FEE and DISTRIBUTION/DIVIDEND respectively).",
"properties": {
"userId": {
"type": "string"
},
"accountType": {
"type": "string",
"enum": [
"MASTER",
"SUBACCOUNT"
]
},
"externalId": {
"type": [
"string",
"null"
]
},
"transactionId": {
"type": "string"
},
"type": {
"type": [
"string",
"null"
],
"description": "Transaction type, e.g. DEPOSIT, WITHDRAWAL, INVEST, FEE, DISTRIBUTION."
},
"status": {
"type": [
"string",
"null"
]
},
"direction": {
"type": [
"string",
"null"
],
"description": "CREDIT or DEBIT where recorded."
},
"amount": {
"type": "number"
},
"currency": {
"type": "string",
"example": "USD"
},
"reference": {
"type": [
"string",
"null"
]
},
"sourceId": {
"type": [
"string",
"null"
]
},
"sourceType": {
"type": [
"string",
"null"
]
},
"createdAt": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"settledAt": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"description": {
"type": [
"string",
"null"
]
}
}
}
},
"dividends": {
"type": "array",
"description": "Cash-ledger entries with type DISTRIBUTION or DIVIDEND.",
"items": {
"type": "object",
"description": "One wallet transaction in the reconciliation period. The fees and dividends arrays reuse this shape (filtered to type FEE and DISTRIBUTION/DIVIDEND respectively).",
"properties": {
"userId": {
"type": "string"
},
"accountType": {
"type": "string",
"enum": [
"MASTER",
"SUBACCOUNT"
]
},
"externalId": {
"type": [
"string",
"null"
]
},
"transactionId": {
"type": "string"
},
"type": {
"type": [
"string",
"null"
],
"description": "Transaction type, e.g. DEPOSIT, WITHDRAWAL, INVEST, FEE, DISTRIBUTION."
},
"status": {
"type": [
"string",
"null"
]
},
"direction": {
"type": [
"string",
"null"
],
"description": "CREDIT or DEBIT where recorded."
},
"amount": {
"type": "number"
},
"currency": {
"type": "string",
"example": "USD"
},
"reference": {
"type": [
"string",
"null"
]
},
"sourceId": {
"type": [
"string",
"null"
]
},
"sourceType": {
"type": [
"string",
"null"
]
},
"createdAt": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"settledAt": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"description": {
"type": [
"string",
"null"
]
}
}
}
},
"corporateActions": {
"type": "array",
"items": {
"type": "object",
"description": "Corporate action affecting a symbol held by a reported account in the period.",
"properties": {
"id": {
"type": "string"
},
"symbol": {
"type": "string"
},
"type": {
"type": [
"string",
"null"
],
"example": "SPLIT"
},
"title": {
"type": [
"string",
"null"
]
},
"description": {
"type": [
"string",
"null"
]
},
"exDate": {
"type": [
"string",
"null"
]
},
"recordDate": {
"type": [
"string",
"null"
]
},
"payDate": {
"type": [
"string",
"null"
]
},
"amount": {
"type": [
"number",
"null"
]
},
"currency": {
"type": [
"string",
"null"
]
},
"createdAt": {
"type": [
"string",
"null"
],
"format": "date-time"
}
}
}
},
"custodyPositions": {
"type": "array",
"items": {
"type": "object",
"description": "Custody register entry for an account's beneficially-owned position.",
"properties": {
"positionId": {
"type": "string"
},
"userId": {
"type": "string"
},
"accountType": {
"type": "string",
"enum": [
"MASTER",
"SUBACCOUNT"
]
},
"externalId": {
"type": [
"string",
"null"
]
},
"instrumentId": {
"type": [
"string",
"null"
]
},
"legalHolder": {
"type": [
"string",
"null"
]
},
"beneficialOwner": {
"type": [
"string",
"null"
]
},
"unitsHeld": {
"type": "number"
},
"averageCost": {
"type": [
"number",
"null"
]
},
"currency": {
"type": [
"string",
"null"
]
},
"accruedInterest": {
"type": [
"number",
"null"
]
},
"status": {
"type": [
"string",
"null"
]
},
"updatedAt": {
"type": [
"string",
"null"
],
"format": "date-time"
}
}
}
}
},
"required": [
"partnerKey",
"period",
"summary",
"proof"
]
},
{
"type": "object",
"required": [
"reconciliationId",
"asOf",
"generatedAt",
"status",
"cash",
"positions",
"accounts",
"accountCount",
"valuationBasis",
"exceptions",
"fixture",
"sandbox",
"note"
],
"properties": {
"reconciliationId": {
"type": "string"
},
"asOf": {
"type": "string"
},
"generatedAt": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"INCOMPLETE"
]
},
"cash": {
"type": "object",
"required": [
"ledgerUsd",
"custodyUsd",
"differenceUsd"
],
"properties": {
"ledgerUsd": {
"type": "number"
},
"custodyUsd": {
"type": "null"
},
"differenceUsd": {
"type": "null"
}
}
},
"positions": {
"type": "object",
"required": [
"ledgerMarketValueUsd",
"custodyMarketValueUsd",
"differenceUsd"
],
"properties": {
"ledgerMarketValueUsd": {
"type": "number"
},
"custodyMarketValueUsd": {
"type": "null"
},
"differenceUsd": {
"type": "null"
}
}
},
"accounts": {
"type": "array",
"items": {
"type": "object",
"required": [
"accountId",
"accountType",
"cashBalance",
"positions"
],
"properties": {
"accountId": {
"type": "string"
},
"accountType": {
"type": "string",
"enum": [
"MASTER",
"SUBACCOUNT"
]
},
"cashBalance": {
"type": "number"
},
"positions": {
"type": "array",
"items": {
"type": "object",
"required": [
"symbol",
"units",
"valueUsd"
],
"properties": {
"symbol": {
"type": "string"
},
"units": {
"type": "number"
},
"valueUsd": {
"type": "number"
}
}
}
}
}
}
},
"accountCount": {
"type": "integer"
},
"valuationBasis": {
"type": "string",
"enum": [
"current_virtual_wallets_and_holdings"
]
},
"exceptions": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
},
"fixture": {
"type": "boolean",
"enum": [
false
]
},
"sandbox": {
"type": "boolean",
"enum": [
true
]
},
"note": {
"type": "string"
}
}
}
]
}cURL JavaScript Python
Copycurl -X GET 'https://mystocks.africa/api/sandbox/v1/partner/report/reconciliation' \
-H "Authorization: Bearer $MYSTOCKS_SANDBOX_API_KEY"