New and existing clients get up to $1,000 bonus at Questrade. New clients use code GET1000. Learn more.

(opens in a new tab)

Documentation

The Questrade API allows developers to create their own fully featured trading and analytical applications through their brokerage account.

GET accounts/:id/positions

Retrieves positions in a specified account.

Request parameters

Request parameters
ParameteridTypeStringDescriptionAccount number. Can occur in the 'location' header only.

Response properties

Response properties
PropertypositionsTypeComplexDescriptionList of account records.
PropertyNested property, level 2. PositionTypeComplexDescription
PropertyNested property, level 3. symbolTypeStringDescriptionPosition symbol.
PropertyNested property, level 3. symbolIdTypeIntegerDescriptionInternal symbol identifier.
PropertyNested property, level 3. openQuantityTypeDoubleDescriptionPosition quantity remaining open.
PropertyNested property, level 3. closedQuantityTypeDoubleDescriptionPortion of the position that was closed today.
PropertyNested property, level 3. currentMarketValueTypeDoubleDescriptionMarket value of the position (quantity x price).
PropertyNested property, level 3. currentPriceTypeDoubleDescriptionCurrent price of the position symbol.
PropertyNested property, level 3. averageEntryPriceTypeDoubleDescriptionAverage price paid for all executions constituting the position.
PropertyNested property, level 3. closedPnLTypeDoubleDescriptionRealized profit/loss on this position.
PropertyNested property, level 3. openPnLTypeDoubleDescriptionUnrealized profit/loss on this position.
PropertyNested property, level 3. totalCostTypeDoubleDescriptionTotal cost of the position.
PropertyNested property, level 3. isRealTimeTypeBooleanDescriptionDesignates whether real-time quote was used to compute PnL.
PropertyNested property, level 3. isUnderReorgTypeBooleanDescriptionDesignates whether a symbol is currently undergoing a reorg.

Sample request

HTTP
GET https://api01.iq.questrade.com/v1/accounts/26598145/positions

Sample JSON response

JSON
{
     "positions": [
           {
                "symbol": "THI.TO",
                "symbolId": 38738,
                "openQuantity": 100,
                "currentMarketValue": 6017,
                "currentPrice": 60.17,
                "averageEntryPrice": 60.23,
                "closedPnl": 0,
                "openPnl": -6,
                "totalCost": false,
                "isRealTime": "Individual",
                "isUnderReorg": false
           }
      ]
 }

Already a Questrade client?

Create your first application using your Questrade account.

Integrate your application with Questrade API

Support

Report an issue

Have questions about Questrade's API? Tell us how we can help, send us an email.

Request a feature

We want your ideas on how we can improve our API. If you have a suggestion for a minor tweak, a major overhaul, or something brand new, please share it with us.

If you are using an api app developed by a third party, you are required to read, understand and accept the end-user license agreement for application program interface. If you are utilizing api access for an api-enabled app you built, you are required to read, understand and accept the Questrade personal application program interface ("api") license agreement ("license agreement"). This agreement can be found below. You may be bound by both agreements.

See All