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 Items

GET
https://demo-d.tradovateapi.com/v1/position/items
GET
/v1/position/items
1const url = 'https://demo-d.tradovateapi.com/v1/position/items?ids=%5B1%5D';
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 {
3 "accountId": 1,
4 "contractId": 1,
5 "timestamp": "2024-01-15T09:30:00Z",
6 "tradeDate": {
7 "year": 1,
8 "month": 1,
9 "day": 1
10 },
11 "netPos": 1,
12 "bought": 1,
13 "boughtValue": 1.1,
14 "sold": 1,
15 "soldValue": 1.1,
16 "prevPos": 1,
17 "id": 1,
18 "netPrice": 1.1,
19 "prevPrice": 1.1
20 }
21]

Fetches multiple Position entities of id field

Was this page helpful?
Previous

Position L Dependents

Next
Built with

Authentication

AuthorizationBearer

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

Query parameters

idslist of longsRequired

Response

Position
accountIdlong
contractIdlong
timestampdatetime
tradeDateobject
netPosinteger
boughtinteger>=0
boughtValuedouble
soldinteger>=0
soldValuedouble
prevPosinteger
idlong
netPricedouble
prevPricedouble