SigmaTM manager api for python user
Project description
SIGMATMPY
SIGMATMPY-library is an APIRequest driven trading and monitoring platform. Each functionality (trades, price etc.) is represented by it's own class covering all aspect of that functionality.
Getting Started
Installation
$ pip install sigmatmpy
Basic functions
import sigmatmpy
# initualize APIRequest token
username = 'username'
password = 'password'
API = sigmatmpy.API(username,password)
# open a live order
API.open_order('EURUSD-R', 1, 0.01, 1.18245, 3, 0, 0,'comment')
# open a pending order (limit and stop order)
API.open_order('EURUSD-R', 3, 0.01, 1.18245, 3, 0, 0,'comment')
# modify a order
API.modify_order(2313839, 1.18245, 1.1825, 1.1824, 0)
# check if open order succeed
result = API.open_order('EURUSD', 1, 0.01, 1.18245, 3, 0, 0,'comment')
if result['code'] == 0:
# successful
continue
else:
# unsuccessful
continue
# close a live order
API.close_order(9999999, 0.01, 1.18245)
# delete a pending order
API.close_order(9999999)
# get trades history by datetime
API.trades_history_by_datetime('2021-07-04 000000', '2021-07-16 075150')
# get trades history by unixtime
API.trades_history_by_unixtime(1625991769, 1626423769)
# get live trades
API.live_trades()
# get account information
API.account_info()
# get server time
API.server_time()
Price data
# initialize data streaming for XAUUSD
API.initialize_price_stream('XAUUSD')
# get current price
API.current_price('XAUUSD')
# get XAUUSD 5 min bar chart data
API.bar_chart('XAUUSD', 5)
# check appearance of new bar
API.check_new_bar('XAUUSD', 5)
Error Code
| Code | Description |
|---|---|
| 129 | Invalid price. |
| 130 | Invalid stops. |
| 131 | Invalid trade volume. |
| 134 | Not enough money. |
| 151 | The order you close is not under your account. |
| 153 | The symbol of order you placed is invalid. |
Authors
- SIGMATM - Initial work - [SIGMATM]
Please read contributors for more information.
License
Please read LICENSE.md for more detail.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sigmatmpy-0.0.27.tar.gz.
File metadata
- Download URL: sigmatmpy-0.0.27.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.6.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa7b5c24059fb25ca4c07f3f78cd19319cb35733167f5dfa1343a2be76e6956d
|
|
| MD5 |
a123be67109a912c0b07717446a38db9
|
|
| BLAKE2b-256 |
9f3d1f015945a903850e75a0881c339fb08477e7256489c0b117c79b8aa0dc2c
|
File details
Details for the file sigmatmpy-0.0.27-py3-none-any.whl.
File metadata
- Download URL: sigmatmpy-0.0.27-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.6.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4094f95605767508406a91a903f272e9196b4348dff594a4726733c4dfba944d
|
|
| MD5 |
babe0d93ea360990fb3a183e20846fca
|
|
| BLAKE2b-256 |
08269492395f6a7bfe5ad6c2de2adc6c9d3fc598eadea383f45d1f46cbe2f9b2
|