Metadata-Version: 2.4
Name: tradestation_client
Version: 1.0.1
Author-email: TradeStation API Team <ClientExperience@tradestation.com>
License: NoLicense
Project-URL: Repository, https://github.com/GIT_USER_ID/GIT_REPO_ID
Keywords: OpenAPI,OpenAPI-Generator
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: urllib3<3.0.0,>=1.25.3
Requires-Dist: python-dateutil>=2.8.2
Requires-Dist: pydantic>=2
Requires-Dist: typing-extensions>=4.7.1
Provides-Extra: dev
Requires-Dist: pytest>=7.2.1; extra == "dev"
Requires-Dist: pytest-cov>=2.8.1; extra == "dev"
Requires-Dist: tox>=3.9.0; extra == "dev"
Requires-Dist: flake8>=4.0.0; extra == "dev"
Requires-Dist: types-python-dateutil>=2.8.19.14; extra == "dev"
Requires-Dist: mypy>=1.5; extra == "dev"

# tradestation_client

# Authentication

For more information on authorization and gaining an access/refresh token, please
visit: [Authentication](/docs/fundamentals/authentication/auth-overview).
<SecurityDefinitions />

This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) 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](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:

```sh
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:

```python
import tradestation_client
```

### Setuptools

Install via [Setuptools](http://pypi.python.org/pypi/setuptools).

```sh
python setup.py install --user
```

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

Then import the package:

```python
import tradestation_client
```

### Tests

Execute `pytest` to run the tests.

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```python

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

## Documentation For Models

- [Account](docs/Account.md)
- [AccountDetail](docs/AccountDetail.md)
- [Accounts](docs/Accounts.md)
- [ActivationTrigger](docs/ActivationTrigger.md)
- [ActivationTriggers](docs/ActivationTriggers.md)
- [AdvancedOptions](docs/AdvancedOptions.md)
- [AdvancedOptionsDefinition](docs/AdvancedOptionsDefinition.md)
- [AdvancedOptionsReplace](docs/AdvancedOptionsReplace.md)
- [AdvancedOrderType](docs/AdvancedOrderType.md)
- [AggregatedAsk](docs/AggregatedAsk.md)
- [AggregatedBid](docs/AggregatedBid.md)
- [AskQuote](docs/AskQuote.md)
- [AssetType](docs/AssetType.md)
- [BODBalance](docs/BODBalance.md)
- [BODBalanceDetail](docs/BODBalanceDetail.md)
- [BODCurrencyDetail](docs/BODCurrencyDetail.md)
- [Balance](docs/Balance.md)
- [BalanceDetail](docs/BalanceDetail.md)
- [BalanceDetail1](docs/BalanceDetail1.md)
- [BalanceError](docs/BalanceError.md)
- [Balances](docs/Balances.md)
- [BalancesBOD](docs/BalancesBOD.md)
- [Bar](docs/Bar.md)
- [Bars](docs/Bars.md)
- [BidQuote](docs/BidQuote.md)
- [CurrencyDetail](docs/CurrencyDetail.md)
- [Error](docs/Error.md)
- [ErrorResponse](docs/ErrorResponse.md)
- [ErrorResponse1](docs/ErrorResponse1.md)
- [Expiration1](docs/Expiration1.md)
- [Expirations](docs/Expirations.md)
- [GetQuoteChangeStream200Response](docs/GetQuoteChangeStream200Response.md)
- [GroupOrderRequest](docs/GroupOrderRequest.md)
- [Heartbeat](docs/Heartbeat.md)
- [Heartbeat1](docs/Heartbeat1.md)
- [Heartbeat2](docs/Heartbeat2.md)
- [Heartbeat3](docs/Heartbeat3.md)
- [HistoricalOrder](docs/HistoricalOrder.md)
- [HistoricalOrders](docs/HistoricalOrders.md)
- [HistoricalOrdersById](docs/HistoricalOrdersById.md)
- [HistoricalStatus](docs/HistoricalStatus.md)
- [IncrementScheduleRow](docs/IncrementScheduleRow.md)
- [MarketActivationRuleDefinition](docs/MarketActivationRuleDefinition.md)
- [MarketActivationRules](docs/MarketActivationRules.md)
- [MarketActivationRules1](docs/MarketActivationRules1.md)
- [MarketActivationRulesReplace](docs/MarketActivationRulesReplace.md)
- [MarketDepthAggregate](docs/MarketDepthAggregate.md)
- [MarketDepthQuote](docs/MarketDepthQuote.md)
- [MarketFlags](docs/MarketFlags.md)
- [Order](docs/Order.md)
- [Order1](docs/Order1.md)
- [OrderBase](docs/OrderBase.md)
- [OrderByIDError](docs/OrderByIDError.md)
- [OrderConfirmRequestDefinition](docs/OrderConfirmRequestDefinition.md)
- [OrderConfirmRequestDefinitionLegsInner](docs/OrderConfirmRequestDefinitionLegsInner.md)
- [OrderConfirmRequestDefinitionOSOsInner](docs/OrderConfirmRequestDefinitionOSOsInner.md)
- [OrderConfirmResponse](docs/OrderConfirmResponse.md)
- [OrderConfirmResponseLeg](docs/OrderConfirmResponseLeg.md)
- [OrderConfirmResponseTimeInForce](docs/OrderConfirmResponseTimeInForce.md)
- [OrderConfirmResponses](docs/OrderConfirmResponses.md)
- [OrderError](docs/OrderError.md)
- [OrderLeg](docs/OrderLeg.md)
- [OrderLeg1](docs/OrderLeg1.md)
- [OrderRelationship](docs/OrderRelationship.md)
- [OrderRelationship1](docs/OrderRelationship1.md)
- [OrderReplaceRequest](docs/OrderReplaceRequest.md)
- [OrderRequest](docs/OrderRequest.md)
- [OrderRequestDefinition](docs/OrderRequestDefinition.md)
- [OrderRequestDefinitionOSOsInner](docs/OrderRequestDefinitionOSOsInner.md)
- [OrderRequestLegs](docs/OrderRequestLegs.md)
- [OrderRequestOSO](docs/OrderRequestOSO.md)
- [OrderResponse](docs/OrderResponse.md)
- [OrderResponses](docs/OrderResponses.md)
- [OrderType](docs/OrderType.md)
- [OrderType1](docs/OrderType1.md)
- [Orders](docs/Orders.md)
- [OrdersById](docs/OrdersById.md)
- [Position](docs/Position.md)
- [PositionDirection](docs/PositionDirection.md)
- [PositionDirection1](docs/PositionDirection1.md)
- [PositionError](docs/PositionError.md)
- [PositionResponse](docs/PositionResponse.md)
- [Positions](docs/Positions.md)
- [PriceFormat](docs/PriceFormat.md)
- [QuantityFormat](docs/QuantityFormat.md)
- [Quote](docs/Quote.md)
- [QuoteError](docs/QuoteError.md)
- [QuoteSnapshot](docs/QuoteSnapshot.md)
- [QuoteStream](docs/QuoteStream.md)
- [RiskRewardAnalysisInput](docs/RiskRewardAnalysisInput.md)
- [RiskRewardAnalysisInputLeg](docs/RiskRewardAnalysisInputLeg.md)
- [RiskRewardAnalysisResult](docs/RiskRewardAnalysisResult.md)
- [Routes](docs/Routes.md)
- [Spread](docs/Spread.md)
- [SpreadLeg](docs/SpreadLeg.md)
- [SpreadType](docs/SpreadType.md)
- [SpreadTypes](docs/SpreadTypes.md)
- [Status](docs/Status.md)
- [Status1](docs/Status1.md)
- [StatusDefinition](docs/StatusDefinition.md)
- [StreamBalance](docs/StreamBalance.md)
- [StreamBalancesErrorResponse](docs/StreamBalancesErrorResponse.md)
- [StreamBars200Response](docs/StreamBars200Response.md)
- [StreamErrorResponse](docs/StreamErrorResponse.md)
- [StreamMarketDepthAggregates200Response](docs/StreamMarketDepthAggregates200Response.md)
- [StreamMarketDepthQuotes200Response](docs/StreamMarketDepthQuotes200Response.md)
- [StreamOrderByOrderIdErrorResponse](docs/StreamOrderByOrderIdErrorResponse.md)
- [StreamOrderErrorResponse](docs/StreamOrderErrorResponse.md)
- [StreamOrders200Response](docs/StreamOrders200Response.md)
- [StreamOrdersByOrderId200Response](docs/StreamOrdersByOrderId200Response.md)
- [StreamPositions200Response](docs/StreamPositions200Response.md)
- [StreamPositionsErrorResponse](docs/StreamPositionsErrorResponse.md)
- [StreamStatus](docs/StreamStatus.md)
- [Strikes](docs/Strikes.md)
- [SymbolDetail](docs/SymbolDetail.md)
- [SymbolDetailsErrorResponse](docs/SymbolDetailsErrorResponse.md)
- [SymbolDetailsResponse](docs/SymbolDetailsResponse.md)
- [SymbolNames](docs/SymbolNames.md)
- [SymbolSearchDefinitionInner](docs/SymbolSearchDefinitionInner.md)
- [SymbolSuggestDefinitionInner](docs/SymbolSuggestDefinitionInner.md)
- [TickbarDefinition](docs/TickbarDefinition.md)
- [TimeActivationRuleDefinition](docs/TimeActivationRuleDefinition.md)
- [TimeActivationRules](docs/TimeActivationRules.md)
- [TimeActivationRules1](docs/TimeActivationRules1.md)
- [TimeActivationRulesReplace](docs/TimeActivationRulesReplace.md)
- [TimeInForceRequest](docs/TimeInForceRequest.md)
- [TrailingStop](docs/TrailingStop.md)
- [TrailingStop1](docs/TrailingStop1.md)
- [TrailingStopDefinition](docs/TrailingStopDefinition.md)

<a id="documentation-for-authorization"></a>

## Documentation For Authorization

Authentication schemes defined for the API:
<a id="Bearer-Token"></a>

### Bearer-Token

- **Type**: Bearer authentication

## Author

ClientExperience@tradestation.com

