Skip to main content

jdcpy模块,吉富数据中心的python接口

Project description

# JDC_SDK使用说明

## 登录

login(‘用户名’, ‘密码’)

用户名或密码错误,会抛出异常.

`python import jdcsdk jsdk = jdcsdk.jdcsdk() jsdk.login('用户名','密码') `

## 返回ID映射表

### read_id

read_id(sourceName, idlist)

第一个参数为一个字符串,数据源,可为”blp”, “ft”, “wind”.

第二个参数为一个元组,由各ID组成,None表示所有ID.

返回值类型是DataFrame.

例:

jsdk.read_id(“tw”, (“TEMAMAI LX Equity”, “270042.OF”))

## 读数据

### read

read(sourceName, assetType, dataType, columnSet, idSet, startDate=None, endDate=None)

第一个参数为一个字符串,数据源,可为”blp”, “ft”, “wind”.

第二个参数为一个字符串,资产类型,可为”fund”, “index”, “economic”.

第三个参数为一个字符串,数据类型,可为”nav”, “info”, “performance”.

第四个参数为一个无组,由列名组成,不可省略.如果有ID,应放在第一个,如果有date,应放在第二个.

第五个参数为一个元组,由各ID组成,None表示所有ID.

六七个参数是datetime格式,是开始和结束时间.可为None,表示不限时间.

返回值类型是DataFrame.

jsdk.read_nav(“blp”, “fund”, ‘nav’, (“TEMAMAI LX Equity”, “270042.OF”), (‘bloomberg_ticker’,’nav_date’,’av’, ‘div’, ‘split’, ‘split_factor’, ‘av_p’, ‘div_p’, ‘nav_cal’), start_date, end_date)

## 更新数据

### update

update(sourceName, assetType, dataType, data)

第一个参数为一个字符串,数据源,可为”blp”, “ft”, “wind”.

第二个参数为一个字符串,资产类型,可为”fund”, “index”, “economic”.

第三个参数为一个字符串,数据类型,可为”nav”, “info”, “performance”.

第四个参数为一个DataFrame,要上传的数据表.

返回值为一个字符串,表示taskId.

jsdk.update(‘blp’, ‘fund’, ‘nav’, data)

## 回滚

### rollback

rollback(taskId)

第一个参数为一个字符串,要回滚的taskId.

此函数待完善.

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

jdcpy-1.2.1.tar.gz (5.4 kB view details)

Uploaded Source

File details

Details for the file jdcpy-1.2.1.tar.gz.

File metadata

  • Download URL: jdcpy-1.2.1.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.7

File hashes

Hashes for jdcpy-1.2.1.tar.gz
Algorithm Hash digest
SHA256 252efc4b5bc8ffc861868ad14b0394051f1b7b6b2eb12ad04afc99613588bdb6
MD5 1391de1dd10f3f3068feb60a99e0edf8
BLAKE2b-256 1e958baa66ddd60bc01d25218ea8b674deba4cb587bcea6e0b57dc91f477cb11

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