Skip to main content

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')

# 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


Download files

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

Source Distribution

sigmatmpy-0.0.24.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

sigmatmpy-0.0.24-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file sigmatmpy-0.0.24.tar.gz.

File metadata

  • Download URL: sigmatmpy-0.0.24.tar.gz
  • Upload date:
  • Size: 6.8 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

Hashes for sigmatmpy-0.0.24.tar.gz
Algorithm Hash digest
SHA256 89dfd8ab6c6208081d773b5269a78b55a3e0ef644134baa4c3e0ac3eb8b90586
MD5 4f9cfbe8243dcdb3f75630c615ebb8fc
BLAKE2b-256 bcb8c05274daff0bd6314c075da1730aeec5dd6a718c0d2662ae93e3654b6f4d

See more details on using hashes here.

File details

Details for the file sigmatmpy-0.0.24-py3-none-any.whl.

File metadata

  • Download URL: sigmatmpy-0.0.24-py3-none-any.whl
  • Upload date:
  • Size: 9.1 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

Hashes for sigmatmpy-0.0.24-py3-none-any.whl
Algorithm Hash digest
SHA256 be2e23c65e3fc8eee12a55336373018f60f71d8b13681397fdb11a1ae54640bb
MD5 36c236a7cf986a5e6158a80ee1d5081e
BLAKE2b-256 32ec4401ce06e392045a1befbd9cf2f01485f54359511bdc4f36354f5a57a1e0

See more details on using hashes here.

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