当前位置: 首页>>代码示例>>Python>>正文


Python SoapClient.instrumentKeys方法代码示例

本文整理汇总了Python中pysimplesoap.client.SoapClient.instrumentKeys方法的典型用法代码示例。如果您正苦于以下问题:Python SoapClient.instrumentKeys方法的具体用法?Python SoapClient.instrumentKeys怎么用?Python SoapClient.instrumentKeys使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pysimplesoap.client.SoapClient的用法示例。


在下文中一共展示了SoapClient.instrumentKeys方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: SoapClient

# 需要导入模块: from pysimplesoap.client import SoapClient [as 别名]
# 或者: from pysimplesoap.client.SoapClient import instrumentKeys [as 别名]
from pysimplesoap.client import SoapClient
from datetime import datetime


# instantiate a new client object. 
client = SoapClient(wsdl="http://54.245.112.94:9999/main?WSDL",trace=False,soap_server="oracle", ns=False, namespace=False)

# call the random number method. 
print client.randomNumber()['return']

# add two numbers
print client.add(b=16780, a=20678768)['return']

# some instrument related calls. 
print client.instrumentCount()['return']
print client.instrumentKeys()

#
instId = client.instrumentKeys()[0]['return']
print instId

#
print client.loadInstrument(primaryKey=instId)

#  storing a time series value. format see http://docs.python.org/2/library/datetime.html#strftime-and-strptime-behavior
dt1 = datetime.strptime("20120101", "%Y%m%d")
dt2 = datetime.strptime("20120102", "%Y%m%d")

client.saveTimeSeriesValue("ACCOUNT_0", "RAW", long(dt1.strftime('%s%f')) * 1000, "TOTAL_EQUITY", 10.0)
client.saveTimeSeriesValue("ACCOUNT_0", "RAW", long(dt2.strftime('%s%f')) * 1000, "TOTAL_EQUITY", 12.0)
开发者ID:activequant,项目名称:aq2o,代码行数:32,代码来源:sampleCode.py


注:本文中的pysimplesoap.client.SoapClient.instrumentKeys方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。