Account Summary
The account summary is a quick overview of the account. It shows the account financial and trade transactions in a single view.
import { AccountSummary } from '@tradrapi/trading-sdk';
const summary: AccountSummary = await tradrApi.accounts.getSummary({
from: '2023-01-01T00:00:00Z',
to: '2023-01-31T:23:59:59Z',
accountId: 2,
});
Response
Responds with a paginated list of Account Summary records:
interface AccountSummary {
/**
* The date when the transaction was created. ISO 8601
* @format date-time
*/
createdAt: string;
/**
* The date when the transaction was last updated. ISO 8601
* @format date-time
*/
updatedAt: string;
/** The account id the transaction belongs to */
accountId: number;
/** The server id on which the transaction was effected */
serverId: number;
/** For trade type transactions. The price at which the order was opened */
openPrice: number;
/** For trade type transactions. The price at which the order was closed */
closePrice: number;
/** The IP address from where the transaction was made */
ip: string;
/** For trade type transactions. The symbol on which the trade was made */
symbol: string;
/** For trade type transactions. The stop loss set for the trade */
stopLoss: number;
/** For trade type transactions. The take profit set for the trade */
takeProfit: number;
/** The amount of commission generated by the transaction */
commission: number;
/** The amount of swap generated by the transaction */
swap: number;
/** For trade type transactions. The trader profit made on the transaction */
profit: number;
/** For trades, the trade volume. For financial, the transaction amount */
volume: number;
/** The transaction id at the platform level */
exchangeOperationId: number;
/** The type of transaction */
type: string;
/** The status of the transaction */
status: string;
/**
* For trade type transactions. The date when the trade was opened
* @format date-time
*/
openedAt: string;
/**
* For trade type transactions. The date when the trade was closed
* @format date-time
*/
closedAt: string;
}