Public API client for working with the Tradernet platform.
Project description
Tradernet API
Public API client for working with the Tradernet platform.
Official API documentation
Installation
Install package
pip install -U tradernet-api
or
poetry add tradernet-api@latest
Getting Started
from tradernet_api.api import API
# Setup client
api_client = API(api_key="YOUR API KEY", secret_key="YOUR SECRET KEY")
# Get only active orders by default
api_client.get_orders()
# Get all orders
api_client.get_orders(active_only=False)
# Get ticker info
api_client.get_ticker_info(ticker="AAPL")
# Send order to the platform
api_client.send_order(ticker="AAPL", action=1, order_type=1, count=1, order_exp=1, limit_price=1, stop_price=1)
# Delete/cancel active order
api_client.delete_order(order_id=123456789)
# Set stop loss and/or take profit
api_client.set_stop_order(ticker="AAPL", stop_loss=1, take_profit=2)
🛡 License
This project is licensed under the terms of the MIT
license. See LICENSE for more details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tradernet_api-1.0.0.tar.gz
(7.8 kB
view details)
Built Distribution
File details
Details for the file tradernet_api-1.0.0.tar.gz
.
File metadata
- Download URL: tradernet_api-1.0.0.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b019749a424b3cb674775aec0106f2e5d5084b0e2b141af08ab5f9a5b96a3b74 |
|
MD5 | 09b36f8b4048ee1c646a0dd3b441a7dd |
|
BLAKE2b-256 | 7b55b99069efdc43d474b85c0b9482dce53ebba53d196559d3512573cc928fc5 |
File details
Details for the file tradernet_api-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: tradernet_api-1.0.0-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59db65340dfbff9cff36f2c5c8da634d6463861924a07d0dd3c253540a89fa30 |
|
MD5 | c39d29c4b2a8b8f920e36d9a00446e75 |
|
BLAKE2b-256 | da6b483b55d39cbe44433d5d8a1e4c4927181cc0f40819f3d9205063bd7b6b83 |