- Tradernet API
- TN API news
-
List of fixes and updates
- Login
-
Login/Password
-
API key
-
Initial user data
-
User’s current session information
-
Public API client
-
Tradernet Python SDK
- of a security session
-
Get a list of open security sessions and subscribe for changes.
-
Open a security session with SMS
-
Open security session with Web Token
-
Open a security session with EDS
- Quotes and tickers
-
Receiving the lists of securities
-
Adding the list of securities
-
Changing the list of securities
-
Deleting the saved list of securities
-
Setting the selected list of securities
-
Adding the ticker to the list
-
Deleting the ticker from the list
-
Get updates on market status
-
Get stock ticker data
-
Options demonstration
-
Getting the most traded securities
-
Subscribe to stock quotes updates
-
Get a quote
-
Subscribe to market depth data
-
Get quote historical data (candlesticks)
-
Get trades
-
Retrieving trades history
-
Stock ticker search
-
News on securities
-
Directory of securities
-
Checking the instruments allowed for trading
- Portfolio
-
Getting information on a portfolio and subscribing for changes
- Orders
-
Receive orders in the current period and subscribe for changes.
-
Get orders list for the period
-
Sending of order for execution
-
Sending Stop Loss and Take Profit losses
-
Cancel the order
- Price alerts
-
Get current price alerts
-
Add price alert
-
Delete price alert
- Requests
-
Receiving clients' requests history
-
Receiving order files
-
Feedback order
- Broker report
-
Receiving broker report
-
Getting the broker's report via a direct link
-
Obtain a depository report
-
Obtain a depository report via direct link
-
Money funds movement
- Currencies
-
Exchange rate by date
-
List of currencies
- Websocket. Real-time data
-
Connecting to a websocket server
-
Subscribe to stock quotes updates
-
Subscribe to market depth data
-
Subscribing to changes in security sessions
-
Subscribe to portfolio updates
-
Subscribe to orders updates
-
Subscribing to changes in market statuses
- Various
-
List of existing offices
-
Name list of the system files
-
Trading platforms
-
Instruments details
-
List of request types
-
A list of the user's profile fields
-
Types of documents for the application
-
A list of the codes and errors
-
Orders statuses
-
Security
-
Types of valid codes
Options demonstration
Description of server request parameters and a sample response:
Attention: All examples in the documents contain the data not carrying any actual information!
This methods allows receiving data on options.
Limit on inquiries per minute: Unlimited
HTTPS GET
Request:
{
"cmd" (string) : "getOptionsByMktNameAndBaseAsset",
"params" (array) : {
"ltr" (string) : "FIX",
"base_contract_code" (string) : "T.US"
}
}
Base parameter | Parameter | Type | Description |
cmd | string | Request execution command | |
params | array | Request execution parameters | |
params | ltr | string | Market name |
params | base_contract_code | string | Underlying contract code |
Response:
Getting a response if successful.
[
{
"ticker": "+T^D1K40.US",
"base_contract_code": "T.US",
"last_trade_date": "2023-01-20",
"expire_date": "2023-01-20",
"strike_price": "10",
"option_type": "CALL"
},
{
"ticker": "+T^C5K14.5.US",
"base_contract_code": "T.US",
"last_trade_date": "2022-05-20",
"expire_date": "2022-05-20",
"strike_price": "4.5",
"option_type": "CALL"
},
...
]
We get an answer in case of failure
// Common error
{
"errMsg" : "Bad json",
"code" : 2
}
Base parameter | Parameter | Type | Description |
code | int | Code error. The meaning of the codes can be viewed on the page "A list of the codes and errors" | |
errMsg | string | A description of general error. The meaning of the errors can be viewed on the page "A list of the codes and errors" | |
error | string | Error description |
Examples of using
This example was made using open source library jQuery
-
JS (jQuery)
/** * @type {getOptionsByMktNameAndBaseAsset} */ var exampleParams = { "cmd": "getOptionsByMktNameAndBaseAsset", "params": { "ltr": "FIX", "base_contract_code": "T.US" } }; function getOptionsByMktNameAndBaseAsset(callback) { $.getJSON("https://tradernet.com/api/", {q: JSON.stringify(exampleParams)}, callback); } /** * Get the object **/ getOptionsByMktNameAndBaseAsset(function(json){ console.log(json); });