Statement
AccountAuth RequiredGet account statement showing transactions. The loginidparameter removed, transfer-related fields removed, andaction_type validation relaxed.
7 Breaking Changes
The
loginid parameter has been removed. Transfer-related response fields (app_id, fees,from, to, withdrawal_details) are no longer available.Quick comparison
Breaking changes
1. loginid parameter removed
The loginid parameter used for multi-token authorization has been removed from the request.
Required change: Remove loginid from your request payloads. Authenticate with the specific account token instead.
2. Transfer-related fields removed
The following fields are no longer returned in transaction objects:
app_id,fees,from,to,withdrawal_details(removed)
3. action_type enum validation removed
The action_type parameter no longer validates against a fixed enum. The new API accepts any string value.
4. Response fields now required
The response now guarantees certain fields: statement.count, statement.transactions, and for each transaction: action_type, amount, balance_after, transaction_id, and transaction_time.
Request structure
Legacy APIrequest example
{
"statement": 1,
"action_type": "buy",
"limit": 25,
"loginid": "CR123456"
}New APIrequest example
{
"statement": 1,
"action_type": "buy",
"limit": 25
}Response structure
Legacy APIresponse example
{
"statement": {
"count": 100,
"transactions": [
{
"action_type": "buy",
"amount": -10.50,
"app_id": 1234,
"fees": { "amount": 0.5 }
}
]
},
"msg_type": "statement"
}New APIresponse example
{
"statement": {
"count": 100,
"transactions": [
{
"action_type": "buy",
"amount": -10.50,
"balance_after": 989.50,
"transaction_id": 987654321,
"transaction_time": 1234567890
}
]
},
"msg_type": "statement"
}Code examples
async function getStatement(loginid) {
const request = {
statement: 1,
loginid: loginid
};
ws.send(JSON.stringify(request));
ws.onmessage = (event) => {
const response = JSON.parse(event.data);
if (response.msg_type === 'statement') {
response.statement.transactions.forEach(t => {
if (t.fees) console.log('Fee:', t.fees.amount);
});
}
};
}Any other questions? Get in touch