Skip to main content

No project description provided

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tradestation_client-1.0.1.tar.gz (138.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tradestation_client-1.0.1-py3-none-any.whl (295.0 kB view details)

Uploaded Python 3

File details

Details for the file tradestation_client-1.0.1.tar.gz.

File metadata

  • Download URL: tradestation_client-1.0.1.tar.gz
  • Upload date:
  • Size: 138.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tradestation_client-1.0.1.tar.gz
Algorithm Hash digest
SHA256 b44edf8b6a49ac56bc3fb1b11d4405a37ef62ae3c8ba2ed9e96c9b9c66116ab6
MD5 ab7a91a971d81b5f1c9c0cc318e25a4b
BLAKE2b-256 2e07f2b5f8a259451ac0d912081973f3c1eec5aa74347ddb2cfbb852fc30d70f

See more details on using hashes here.

File details

Details for the file tradestation_client-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for tradestation_client-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a07cadfd04993dc79473ff7d46eae03e5b9f54380f5132c08e0d7b324490737f
MD5 34e940f7cc59725703c2709d870815bd
BLAKE2b-256 cd2a9e772bc9756fe59283a59713a12b9986bb96bc941faffc42a9d695da7b7b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page