Skip to main content

No project description provided

Reason this release was yanked:

“metadata/classifier error, replaced with 1.0.1”

Project description

EZX API

EZX Api Network Client, messages and library functions for sending and receiving orders to the EZX iServer.

Installing

    pip install ezx-pyapi
    

Usage

The iServer API is not really designed to be run interactively, although it is possible to do it, as shown below. The easiest way to familiarize yourself with the API is to download and run the sample API app, ezx-sample-py, from Github.

Interactive Mode

	from interactive import * #this creates an interactive connection to the iserver
	
	
	# send an order
	from iserver.msgs.convenience_msgs import *
	order = NewOrder('ZVZZT',1,100,1.25,'SIMU')
	client.send_message(order)
	
	# type: show_help() to display avaialble functions in the interactive environment
	
	Available functions: (type help(function name) to see the parameters for the function.):
	----------------------------------------------------------------------------------------
	connect - Connect to the iserver.
	stop - Disconnect from the iserver.  You will need to call the connect method again to reconnect.
	status - Indicates connection status. if connected=True, then the client is logged in to the iserver.
	show_help - Displays information about available functions.
	----------------------------------------------------------------------------------------
	
	 status()
	 iserver client connected=True. company=EROOM, user=test1
	 
	 # Replace an order
	 client.send_message(ReplaceOrder(551, -1.24, 60))
	 
	 # Cancel an order
	 client.send_message(CancelOrder(551))
	 
	 # disconnect
	 stop()
	 
	

More...

The default message handler just prints the responses from the server. You can set your own handler as follows:

	from iserver.msgs.OrderResponse import OrderResponse
	
	responses = []
	import iserver.net
	def my_msg_handler(msg_subtype: int, msg: EzxMsg):
		iserver.net.empty_msg_handler(msg_subtype, msg) # print the message
		# write your handling logic here.
		responses.append(msg)
		
	client._msg_handler = my_msg_handler  # normally this is set in the ApiClient constructor
	
	client.send_message(order)
			

Also see the EZX API Quick Start Guide for more details on the API.

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

ezx_pyapi-1.0.0.tar.gz (58.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ezx_pyapi-1.0.0-py3-none-any.whl (109.4 kB view details)

Uploaded Python 3

File details

Details for the file ezx_pyapi-1.0.0.tar.gz.

File metadata

  • Download URL: ezx_pyapi-1.0.0.tar.gz
  • Upload date:
  • Size: 58.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.3

File hashes

Hashes for ezx_pyapi-1.0.0.tar.gz
Algorithm Hash digest
SHA256 8492c8a9797a2e72cc64f13bf708447b8ddd02ef3493d89702bde1f700d06573
MD5 fd40d1b09d658eb7aed6fd8c78102f9c
BLAKE2b-256 04fb0bc998da85dcba31904552bdf1387e5f2dd8864612e155b90511cbf5cdd6

See more details on using hashes here.

File details

Details for the file ezx_pyapi-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: ezx_pyapi-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 109.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.3

File hashes

Hashes for ezx_pyapi-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1974c0a52909af1c1713cb2cc1fbc61f790d6a7a3056d006ea15c6b86c6b2d09
MD5 b7b6b16760d86d9c60ee0329467aa2a9
BLAKE2b-256 97a8deed81a95072018baa8656010c68147dcec4f98970e49c43e22a215e8db5

See more details on using hashes here.

Supported by

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