DTN ProphetX® Web Services

Examples

The following are some examples of making requests to PXWeb. Users will need to modify the examples to enter their own user id and password.

Curl

Curl is a common command line utility for making web requests.

curl 'https://pxweb.dtn.com/PXWebSvc/PXServiceWeb.svc/GetQuoteSnap?UserID=userid&Password=pswd&Type=&Symbol=%40C%60%23%23+5%2C+QCL%401&SymbolLimit=&PageToken=&Market=&Vendor=&Format='

Postman

Postman is a popular GUI tool for making web requests and viewing the results. Attached here is a Postman collection file that can be imported into Postman. After importing the file, the user id and password need to be set in the collection variables section.

Python

Sample code has been tested with Python 3.10 from www.python.org.

Most of the examples for Python need the PXWeb.py module, which contains common code to access PXWeb, just download this module at the same location as the example being tested.

Name Description Dependencies
PXWeb.py Common PXWeb access module, most of the Python examples import this module.
GetDailyHistoryCsv.py Retrieve history data for a given list of search patterns and reformat result as CSV.
This example can be easily modified for GetMinuteHistory and GetTickHistory.
PXWeb.py
GetDailyHistoryHtml.py Retrieve history data for a given list of search patterns and reformat result as an HTML table.
This example can be easily modified for GetMinuteHistory and GetTickHistory.
PXWeb.py
GetDailyHistorySvg.py Retrieve history data for a given search pattern and build a SVG chart.
The result SVG file can be viewed on a SVG compatible browser
PXWeb.py
GetDailyHistorySoap.py Retrieve history data via SOAP for a given list of search patterns and write result to an XML file.
This example can be easily modified for GetMinuteHistory and GetTickHistory.

C#

A C# example can be found here

Java

A Java example can be found here

Sample Results

These files where generated by using very open symbol search patterns and they are larger than the average result.

Name Description
GetQuoteSnap.xml Sample result from a GetQuoteSnap request.
GetDailyHistory.xml Sample results from a GetDailyHistory request.