Skip to main content

TxTrader Securities Trading API Client

Project description

txtrader-client

This module is a minimum dependency client for the txtrader trading api manager

Installation

pip install txtrader-client

Configuration

The following configuration variables are required:

TXTRADER_HOST
TXTRADER_USERNAME
TXTRADER_PASSWORD
TXTRADER_HTTP_PORT
TXTRADER_API_ACCOUNT

There are 2 ways to provide the variables:

passed as a python dict into the constructor API(config={'TXTRADER_HOST': 'localhost', ...})

set as environment variables

Basic Usage:

from txtrader_client import API

api = API()

print(api.status())

api.add_symbol('TSLA')

order = api.market_order('TSLA', 100)

print(api.query_positions())

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

txtrader-client-1.4.0.tar.gz (8.4 kB view hashes)

Uploaded Source

Built Distribution

txtrader_client-1.4.0-py2.py3-none-any.whl (11.1 kB view hashes)

Uploaded Python 2 Python 3

Supported by

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