API
Note: Check your version of PropReports to make sure a feature is available.
A reference implementation of a client (in PHP) can be downloaded here: apiclient.zip.
To access the API, use the following URL: https://<you>.propreports.com/api.php
.
All requests must be submitted as a POST request via https with parameters encoded as multipart/form-data
or application/x-www-form-urlencoded
.
If there is a problem processing your request, PropReports will return an HTTP status code 500 together with an error message.
Request Limitations
The current request rate is limited to 40 requests every 4 seconds. This equates to 600 requests per minute.
Pagination
The output of some actions is limited: accounts
, adjustments
, fills
, profiles
, and groups
return a maximum of 50,000 records; positions,
10,000 records. To retrieve more data a "page"
parameter is introduced. If specified, the last line of the output (trailer) will indicate total number of pages available (e.g. "Page 1/3
"). To maintain backwards compatibility, if "page"
is not specified, the trailer will be omitted and the results of the first page returned.
On success, this action will return a 32-character token which must be used in all subsequent requests. This token will remain valid for approximately 2 hours from the time it is issued.
Parameters
Name | Description | Example |
---|---|---|
action | login | |
user | User Id or E-Mail of the PropReports user | jdoe |
password | aardvark123 |
Response Example
3ea08bac153a4c572e1d8814878293011e:485
Logout
When you are finished using the API it is a good security practice to expire your token.
Parameters
Name | Example |
---|---|
action | logout |
token | 3ea08bac153a4c572e1d881487829301 |
Response Example
Logged out.
Version
This action returns the server version and date of release. This is useful if you need to know which features are supported by the API.
Parameters
Name | Example |
---|---|
action | version |
token | 3ea08bac153a4c572e1d881487829301 |
Response Example
v1.10.41 [2022-08-15]
Accounts
This action will return a list of all accounts you are permitted to query in CSV format. If any fields contain commas they will be enclosed in double quotes. If an account never traded, First Traded and Last Traded fields will be blank.
Parameters
Name | Description | Example |
---|---|---|
action | accounts | |
page | 1 | |
groupId | (Optional) Use the numeric Group Id returned by the groups action. | -4 |
token | 3ea08bac153a4c572e1d881487829301 |
Response Example
Account Id,Account Name,First Traded,Last Traded,Currency,Cash,Unrealized 1,ACCOUNT1,2011-07-07,2011-07-07,USD,0,0 15,ACCOUNT2,2011-05-03,2011-05-03,USD,0,0 48,ACCOUNT3,,,USD,0,0 Page 1/1
Fills
This will return a list of all fills for the account or group and date range specified in CSV format. If any fields contain commas they will be enclosed in double quotes.
Things to note:
- The number and the names of the fee columns (fields 11 through 17 below) can vary depending on the PropReports instance configuration and/or user.
- Canceled fills are not exported at this time.
- For accounts with a large amount of trading activity, please limit the date range to short intervals.
Please see Generic Execution format for field descriptions.
Parameters
Name | Description | Example |
---|---|---|
action | fills | |
startDate | 2011-07-01 | |
endDate | 2011-07-31 | |
page | 1 | |
groupId | Use the numeric Group Id returned by the groups action. If accountId is specified, this should be omitted. | -4 |
accountId | Use the numeric Account Id returned by the accounts action (see above). If groupId is specified, this should be omitted. You can also specify multiple ids as a comma-separated list (e.g. 12,15,19). | 348 |
token | 3ea08bac153a4c572e1d881487829301 |
Response Example
Date/Time,Account,B/S,Qty,Symbol,Price,Route,Liq,Comm,Ecn Fee,SEC,TAF,NSCC,Clr,Misc,Order Id,Fill Id,Currency,ISIN,CUSIP,Status,PropReports Id 05/03/2011 13:38:26,ACCOUNT1,T,100,QQQ,58.5,NSDQ,A,0,-0.2,0.12,0,0.009,0,0.029,37923317-93,,USD,,,,844489 05/03/2011 13:38:26,ACCOUNT1,T,100,QQQ,58.5,NSDQ,A,0,-0.2,0.12,0,0.009,0,0.029,37923317-93,,USD,,,,1254395 05/03/2011 13:41:59,ACCOUNT1,B,100,QQQ,58.47,NSDQ,A,0,-0.2,0,0,0.009,0,0.029,37924032-93,,USD,,,,844705 05/03/2011 13:41:59,ACCOUNT1,B,100,QQQ,58.47,NSDQ,A,0,-0.2,0,0,0.009,0,0.029,37924032-93,,USD,,,,1254611 05/03/2011 14:16:38,ACCOUNT1,T,100,QQQ,58.42,NSDQ,A,0,-0.2,0.12,0,0.009,0,0.029,37943393-93,,USD,,,,854861 05/03/2011 14:16:38,ACCOUNT1,T,100,QQQ,58.42,NSDQ,A,0,-0.2,0.12,0,0.009,0,0.029,37943393-93,,USD,,,,1264767 05/03/2011 14:23:22,ACCOUNT1,B,100,QQQ,58.39,NSDQ,A,0,-0.2,0,0,0.009,0,0.029,37945092-93,,USD,,,,855805 05/03/2011 11:48:26,ACCOUNT1,B,100,SLV,42.75,NSDQ,A,0,-0.2,0,0,0.009,0,0,37852442-93,,USD,US46428Q1094,46428Q109,,816133 05/03/2011 11:48:26,ACCOUNT1,B,100,SLV,42.75,NSDQ,A,0,-0.2,0,0,0.009,0,0,37852442-93,,USD,US46428Q1094,46428Q109,,1226039 05/03/2011 11:48:56,ACCOUNT1,S,100,SLV,42.67,NSDQ,R,0,0.3,0.09,0,0.009,0,0,37853151-93,,USD,US46428Q1094,46428Q109,,816510 05/03/2011 11:48:56,ACCOUNT1,S,100,SLV,42.67,NSDQ,R,0,0.3,0.09,0,0.009,0,0,37853151-93,,USD,US46428Q1094,46428Q109,,1226416 05/03/2011 12:28:16,ACCOUNT1,T,100,SLV,42.42,NSDQ,A,0,-0.2,0.09,0,0.009,0,0,37877118-93,,USD,US46428Q1094,46428Q109,,825699 05/03/2011 12:28:16,ACCOUNT1,T,100,SLV,42.42,NSDQ,A,0,-0.2,0.09,0,0.009,0,0,37877118-93,,USD,US46428Q1094,46428Q109,,1235605 05/03/2011 12:28:39,ACCOUNT1,B,100,SLV,42.475,NSDQ,R,0,0.3,0,0,0.009,0,0,37877479-93,,USD,US46428Q1094,46428Q109,,825855 05/03/2011 12:28:39,ACCOUNT1,B,100,SLV,42.475,NSDQ,R,0,0.3,0,0,0.009,0,0,37877479-93,,USD,US46428Q1094,46428Q109,,1235761 05/03/2011 13:02:08,ACCOUNT1,T,100,SLV,41.75,NSDQ,A,0,-0.2,0.09,0,0.009,0,0,37900318-93,,USD,US46428Q1094,46428Q109,JOURNAL,834867 Page 1/1
Groups
This action will return a list of all groups you are permitted to query in CSV format. If any fields contain commas they will be enclosed in double quotes.
Parameters
Name | Description | Example |
---|---|---|
action | groups | |
token | 3ea08bac153a4c572e1d881487829301 |
Response Example
Group Id,Group Name 49,Day Traders -4,My Accounts -2,All Accounts
Positions
This will return a list of all positions for an account or group and date range specified in CSV format. If any fields contain commas they will be enclosed in double quotes.
Things to note:
- The number and the names of the fee columns (fields 12 through 18 below) can vary depending on the PropReports instance configuration and/or user.
- If there was no trading activity on a specified date (e.g. weekend or market holiday), no data will be returned.
- Both open and closed positions are returned. Closed positions will have Open Qty set to 0.
- For accounts with a large amount of trading activity, please limit the date range to short intervals.
Parameters
Name | Description | Example |
---|---|---|
action | positions | |
startDate | 2011-07-01 | |
endDate | 2011-07-31 | |
type | Can be one of: all, closed, open, short, long. By default, all positions are returned. | all |
page | 1 | |
groupId | Use the numeric Group Id returned by the groups action. If accountId is specified, this should be omitted. | -4 |
accountId | Use the numeric Account Id returned by the | 348 |
token | 3ea08bac153a4c572e1d881487829301 |
Response Example
Date,Account,Symbol,Open Qty,Avg,Close,Unrealized Delta,Unrealized,Qty Traded,Realized,Comm,Ecn Fee,SEC,TAF,NSCC,Clr,Misc,Currency,Spot Rate 07/01/2011,ACCOUNT1,QQQ,100,58.5,60,150,150,0,0,0,0,0,0,0,0,0,USD,1 Page 1/1
Adjustments
Return a list of all adjustments for the account and date range specified in CSV format. If any fields contain commas they will be enclosed in double quotes.
Please see Uploading an Adjustments File for field descriptions.
Parameters
Name | Description | Example |
---|---|---|
action | adjustments | |
startDate | 2011-07-01 | |
endDate | 2011-07-31 | |
page | 1 | |
groupId | Use the numeric Group Id returned by the groups action. If accountId is specified, this should be omitted. | -4 |
accountId | Use the numeric Account Id returned by the accounts action (see above). If groupId is specified, this should be omitted. | 348 |
token | 3ea08bac153a4c572e1d881487829301 |
Response Example
Date,Account,Category,Amount,Comment 05/03/2011,ACCOUNT1,Fee: Misc,100,Software Fee 05/03/2011,ACCOUNT1,Transfer: Cash In/Out,-1208,Withdrawal Page 1/1
Reports
Version: 1.11.16+
Return a lists of all reports that can be retrieved via the report
action.
Parameters
Name | Description | Example |
---|---|---|
action | reports | |
token | 3ea08bac153a4c572e1d881487829301 |
Response Example
Type,Description,Group/Account,Multi-Currency detailed,Detailed,Account,N trades,Trades,Account,N performance,Trade Performance,Account,N performanceForGroup,Group Trade Performance,Group,Y
Report
Version: 1.11.16+
Run a report for a group or account (use the reports
action to get a list of available reports).
Parameters
Name | Description | Example |
---|---|---|
action | report | |
startDate | 2011-07-01 | |
endDate | 2011-07-31 | |
type | Type of report to run (see reports action for a list of what's available). | detailed |
groupId | For group-based reports, use the numeric Group Id returned by the groups action. For account-based reports, this should be omitted. | -4 |
accountId | For account-based reports, use the numeric Account Id returned by the accounts action. For group-based reports, this should be omitted. | 348 |
mode | For group-based reports (eg. totalsByAccount) that have Inactive accounts, you can use "mode=2" to see individual results for the inactive accounts, rather than the standard one-line summarized results for all "Inactive" accounts. | 2 |
baseCurrency | (Optional) For reports that support multiple currencies, specify the base currency for the report. | USD |
token | 3ea08bac153a4c572e1d881487829301 |
Response Example (Summary by Date Report):
Date,Type,Orders,Fills,Qty,Gross,Comm,Ecn Fee,Access,SEC,ORF,TAF,NFA,CAT,NSCC,Clr,Misc,Trade Fees,Net,Adj Fees,Adj Net,Unrealized Δ,Total Δ,Transfers,Cash,Unrealized,End Balance 11/14/2022,Eq,9,267,17672,83.07,1.59,11.57,0,1.97,0,2.21,0,0,0.02,0,0,17.36,65.71,0,65.71,50,115.71,0,24057.14,-1522,22535.14 11/15/2022,Eq,10,385,27146,-124.28,2.34,16.91,0,3.63,0,3.06,0,0,0.14,0,0,26.08,-150.36,0,-150.36,-52,-202.36,0,23906.78,-1574,22332.78 11/16/2022,Eq,5,975,74152,1.11,6.02,36.44,0,4.04,0,6.59,0,0,0.56,0,0,53.65,-52.54,0,-52.54,-68,-120.54,0,23854.24,-1642,22212.24 11/18/2022,Eq,5,193,15452,74.65,1.21,22.81,0,0.88,0,1.61,0,0,0.15,0,0,26.66,47.99,0,47.99,-132,-84.01,0,23902.23,-1774,22128.23 11/21/2022,Eq,6,475,44608,166.24,4.06,18.39,0,2.43,0,4.63,0,0,0.2,0,0,29.71,136.53,0,136.53,130,266.53,0,24038.76,-1644,22394.76 11/22/2022,Eq,11,257,17228,-47.11,1.48,13.69,0,1.33,0,2.21,0,0,0.05,0,0,18.76,-65.87,0,-65.87,20,-45.87,0,23972.89,-1624,22348.89 Equities,,46,2552,196258,153.68,16.7,119.81,0,14.28,0,20.31,0,0,1.12,0,0,172.22,-18.54,0,-18.54,-52,-70.54,0,23972.89,-1624,22348.89
Locates
Version: 1.9.49+
Return a list of all locates for the account and date range specified
Please see Uploading a Locates File for field descriptions.
Parameters
Name | Description | Example |
---|---|---|
action | locates | |
startDate | 2011-07-01 | |
endDate | 2011-07-31 | |
page | 1 | |
groupId | Use the numeric Group Id returned by the groups action. If accountId is specified, this should be omitted. | -2 |
accountId | Use the numeric Account Id returned by the accounts action (see above). If groupId is specified, this should be omitted. | 348 |
token | 3ea08bac153a4c572e1d881487829301 |
Response Example
Date/Time,Account,Qty,Symbol,Cost,Locate Id 05/03/2020 09:30:15,ACCOUNT1,1000,BAC,10.0,ABC-123 Page 1/1
Instruments
Superusers Only
Return all instruments traded or held overnight for a specified date in CSV format. If any fields contain commas they will be enclosed in double quotes.
Please see Uploading Closing Prices and Spot Rates for field descriptions.
Parameters
Name | Description | Example |
---|---|---|
action | instruments | |
tradeDate | 2011-07-01 | |
token | 3ea08bac153a4c572e1d881487829301 |
Response Example
Date,Symbol,Price,Volume,Currency,Multiplier,ISIN,CUSIP,SEDOL,FIGI,Description,Listing Exchange,Tape,Subtype,Underlying Symbol,Strike Price,Maturity,Coupon 1/10/2017,BAC,22.94,100860600,USD,1.0000,US06051GFH74,06051GFH7,,BBG00717KNY7,BANK OF AMERICA CORP,NYQ,A,,,,,
Profiles (aka Users)
Superusers Only
This command will return a list of all users in the system in CSV format. To get information for a specific user, you can add an optional email
or userid
parameters.
Parameters
Name | Description | Example |
---|---|---|
action | profiles | |
(Optional) Specify to get information for a single user. | jdoe@test.com | |
userid | (Optional) Specify to get information for a single user. | jdoe |
page | 1 | |
token | 3ea08bac153a4c572e1d881487829301 |
Response example
Profile Id,Salutation,First,Last,Title,Company,Street,City,State,Postal Code,Country,Primary E-mail,Secondary E-mail,Evening Phone,Day Phone,Mobile Phone,Fax,User Id,Access 1,Mr.,John,Doe,President,"Widgets, Inc.","1 Main St., Ste 114",New York,NY,10069,US,john@test.com,,555-555-5555,,,,jdoe,User Page 1/1
Sample Curl interaction
# curl -X POST -d "action=login&user=***&password=***" https://demo3.propreports.com/api.php 092f2e908c19b625dd2bca10725af30a:1 # curl -X POST -d "action=version&token=092f2e908c19b625dd2bca10725af30a:1" https://demo3.propreports.com/api.php v1.9.97 [2022-03-29]