Skip to main content

inquantstudio quant open api

Project description

-- coding: utf-8 --

from iqsopenapi import *

if name == 'main': """测试""" try: api = StgyOpenApi("1",print,print,print,print,"d://logs/IQS.OpenApi.Python/") api.Start()
sub = api.Subscribe([{'symbol':'rb2005','exchange':4,'marketType':'TICK','barType':0},{'symbol':'rb2005','exchange':4,'marketType':'BAR','barType':60}]) unSub = api.Unsubscribe([{'symbol':'rb2005','exchange':4,'marketType':'TICK','barType':60}]) subList = api.GetSubscribeList() lastTick = api.GetLastTick("rb2005",Exchange.SHFE,1) lastBar = api.GetLastBar('rb2005',Exchange.SHFE,5 * 60,1) hisBar = api.GetHisBar('rb2005',Exchange.SHFE,5 * 60,20190101120000,20190101140000) clientOrderId = uuid.uuid4().hex sendOrder = api.SendOrder(clientOrderId,'rb2005',Exchange.SHFE,"B",2400,1,OrderType.MKT,Offset.Open,'测试') cancelOrder = api.CancelOrder("1231231") assetInfo = api.GetAssetInfo() orders = api.GetOrders() order = api.GetOrder(clientOrderId) openOrders = api.GetOpenOrders()
positions = api.GetPositions() contract = api.GetContract('rb2005',Exchange.SHFE) except Exception as e: print(e) pass

Project details


Release history Release notifications

Download files

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

Files for iqsopenapi, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size iqsopenapi-0.0.1-py3-none-any.whl (44.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size iqsopenapi-0.0.1.tar.gz (26.4 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page