For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Support Center
OverviewAPIResources
OverviewAPIResources
  • REST API Endpoints
    • GETGet Timestamp
    • GETO IDC User Info
      • GETFill Pair Dependents
      • GETFill Pair Item
      • GETFill Pair Items
      • GETFill Pair L Dependents
      • GETFill Pair List
      • GETPosition Dependents
      • GETPosition Find
      • GETPosition Item
      • GETPosition Items
      • GETPosition L Dependents
      • GETPosition List
      • GETPosition Log Dependents
      • GETPosition Log Item
      • GETPosition Log Items
      • GETPosition Log L Dependents
Support Center
LogoLogo
REST API EndpointsPositions

Position Log Item

GET
https://demo-d.tradovateapi.com/v1/positionLog/item
GET
/v1/positionLog/item
1const url = 'https://demo-d.tradovateapi.com/v1/positionLog/item?id=1';
2const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
3
4try {
5 const response = await fetch(url, options);
6 const data = await response.json();
7 console.log(data);
8} catch (error) {
9 console.error(error);
10}
200Retrieved
1{
2 "accountId": 1,
3 "contractId": 1,
4 "timestamp": "2024-01-15T09:30:00Z",
5 "tradeDate": {
6 "year": 1,
7 "month": 1,
8 "day": 1
9 },
10 "netPos": 1,
11 "bought": 1,
12 "boughtValue": 1.1,
13 "sold": 1,
14 "soldValue": 1.1,
15 "positionChangeType": "CancelledTrade",
16 "id": 1,
17 "netPrice": 1.1,
18 "fillId": 1
19}

Fetches PositionLog entity by id field

Was this page helpful?
Previous

Position Log Items

Next
Built with

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Query parameters

idlongRequired

Response

PositionLog
accountIdlong
contractIdlong
timestampdatetime
tradeDateobject
netPosinteger
boughtinteger>=0
boughtValuedouble
soldinteger>=0
soldValuedouble
positionChangeTypeenum
CancelledTrade, NewSession, PriceAdjustment, Reconciliation, Trade
Allowed values:
idlong
netPricedouble
fillIdlong