Skip to main content

tradestation_client

Authentication

For more information on authorization and gaining an access/refresh token, please visit: Authentication.

This Python package is automatically generated by the OpenAPI Generator project:

  • API version:
  • Package version: 1.0.0
  • Generator version: 7.9.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://developer.tradestation.com/webapi

Requirements.

Python 3.7+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

import tradestation_client

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import tradestation_client

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import tradestation_client
from tradestation_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.tradestation.com
# See configuration.py for a list of all supported configuration parameters.
configuration = tradestation_client.Configuration(
    host="https://api.tradestation.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: Bearer-Token
configuration = tradestation_client.Configuration(
    access_token=os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with tradestation_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = tradestation_client.BrokerageApi(api_client)

    try:
        # Get Accounts
        api_response = api_instance.get_accounts()
        print("The response of BrokerageApi->get_accounts:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling BrokerageApi->get_accounts: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://api.tradestation.com

Class Method HTTP request Description
BrokerageApi get_accounts GET /v3/brokerage/accounts Get Accounts
BrokerageApi get_balances GET /v3/brokerage/accounts/{accounts}/balances Get Balances
BrokerageApi get_balances_bod GET /v3/brokerage/accounts/{accounts}/bodbalances Get Balances BOD
BrokerageApi get_historical_orders GET /v3/brokerage/accounts/{accounts}/historicalorders Get Historical Orders
BrokerageApi get_historical_orders_by_order_id GET /v3/brokerage/accounts/{accounts}/historicalorders/{orderIds} Get Historical Orders By Order ID
BrokerageApi get_orders GET /v3/brokerage/accounts/{accounts}/orders Get Orders
BrokerageApi get_orders_by_order_id GET /v3/brokerage/accounts/{accounts}/orders/{orderIds} Get Orders By Order ID
BrokerageApi get_positions GET /v3/brokerage/accounts/{accounts}/positions Get Positions
BrokerageApi stream_orders GET /v3/brokerage/stream/accounts/{accounts}/orders Stream Orders
BrokerageApi stream_orders_by_order_id GET /v3/brokerage/stream/accounts/{accounts}/orders/{ordersIds} Stream Orders by Order Id
BrokerageApi stream_positions GET /v3/brokerage/stream/accounts/{accounts}/positions Stream Positions
MarketDataApi get_bars GET /v3/marketdata/barcharts/{symbol} Get Bars
MarketDataApi get_crypto_symbol_names GET /v3/marketdata/symbollists/cryptopairs/symbolnames Get Crypto Symbol Names
MarketDataApi get_option_chain GET /v3/marketdata/stream/options/chains/{underlying} Stream Option Chain
MarketDataApi get_option_expirations GET /v3/marketdata/options/expirations/{underlying} Get Option Expirations
MarketDataApi get_option_quotes GET /v3/marketdata/stream/options/quotes Stream Option Quotes
MarketDataApi get_option_risk_reward POST /v3/marketdata/options/riskreward Get Option Risk Reward
MarketDataApi get_option_spread_types GET /v3/marketdata/options/spreadtypes Get Option Spread Types
MarketDataApi get_option_strikes GET /v3/marketdata/options/strikes/{underlying} Get Option Strikes
MarketDataApi get_quote_change_stream GET /v3/marketdata/stream/quotes/{symbols} Stream Quotes
MarketDataApi get_quote_snapshots GET /v3/marketdata/quotes/{symbols} Get Quote Snapshots
MarketDataApi get_symbol_details GET /v3/marketdata/symbols/{symbols} Get Symbol Details
MarketDataApi stream_bars GET /v3/marketdata/stream/barcharts/{symbol} Stream Bars
MarketDataApi stream_market_depth_aggregates GET /v3/marketdata/stream/marketdepth/aggregates/{symbol} Stream Market Depth Aggregates
MarketDataApi stream_market_depth_quotes GET /v3/marketdata/stream/marketdepth/quotes/{symbol} Stream Market Depth Quotes
OrderExecutionApi cancel_order DELETE /v3/orderexecution/orders/{orderID} Cancel Order
OrderExecutionApi confirm_group_order POST /v3/orderexecution/ordergroupconfirm Confirm Group Order
OrderExecutionApi confirm_order POST /v3/orderexecution/orderconfirm Confirm Order
OrderExecutionApi get_activation_triggers GET /v3/orderexecution/activationtriggers Get Activation Triggers
OrderExecutionApi place_group_order POST /v3/orderexecution/ordergroups Place Group Order
OrderExecutionApi place_order POST /v3/orderexecution/orders Place Order
OrderExecutionApi replace_order PUT /v3/orderexecution/orders/{orderID} Replace Order
OrderExecutionApi routes GET /v3/orderexecution/routes Get Routes
MarketdataApi search_symbols GET /v2/data/symbols/search/{criteria} Search for Symbols
MarketdataApi stream_tick_bars GET /v2/stream/tickbars/{symbol}/{interval}/{barsBack} Stream Tick Bars
MarketdataApi suggestsymbols GET /v2/data/symbols/suggest/{text} Suggest Symbols

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

Bearer-Token

  • Type: Bearer authentication

Author

ClientExperience@tradestation.com

Metadata

Release files for tradestation-client 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tradestation-client 1.0.1
File Size Uploaded Provenance Actions
tradestation_client-1.0.1.tar.gz 138.6 kB Without provenance Details for tradestation_client-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tradestation-client 1.0.1
File Interpreter ABI Platform Actions
tradestation_client-1.0.1-py3-none-any.whl Python 3 none any Details for tradestation_client-1.0.1-py3-none-any.whl

Total release size: 433.6 kB

Release files / tradestation_client-1.0.1.tar.gz

Download URL tradestation_client-1.0.1.tar.gz
Size 138.6 kB
Tags Source
SHA-256 checksum
How to use checksums
b44edf8b6a49ac56bc3fb1b11d4405a37ef62ae3c8ba2ed9e96c9b9c66116ab6
BLAKE2b-256 checksum
How to use checksums
2e07f2b5f8a259451ac0d912081973f3c1eec5aa74347ddb2cfbb852fc30d70f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / tradestation_client-1.0.1-py3-none-any.whl

Download URL tradestation_client-1.0.1-py3-none-any.whl
Size 295.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a07cadfd04993dc79473ff7d46eae03e5b9f54380f5132c08e0d7b324490737f
BLAKE2b-256 checksum
How to use checksums
cd2a9e772bc9756fe59283a59713a12b9986bb96bc941faffc42a9d695da7b7b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Security for tradestation-client 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page