# Trading Account Open API

[toc]

# Version history

Date Version number Modification description
2020-05-06 1.1 1. Added the Get Margin Shares API(trade-margin-quantity)2. Query asset API(stock-asset) Add marginpurchasePower,mortgageMarketValue,debitBalance,anticipatedInterest,riskStatusCode,riskStatusName,mv,pv,creditAmount field 3. Maximum buy and sell number API (trade-quantity) Add cashEnableAmountcashEnableIntAmount,cashPurchasingPowermaxPurchasingPower,fundAccoutType field
2020-05-08 1.2 1. Query asset API (stock-asset) Add margin call field 2. Add margin-detail, API to get the client margin account details
2020-05-09 1.3 1. Added the Find Account Type by Market API
2020-05-09 1.4 1. Delete 4.2 client cashflow API 2. Add 4.2 get history record API3、 Add 4.3 client withdrawal revocation API
2020-05-12 1.5 1. 4.11 stock-holding Add profit/loss field returned 2. 4.12 stock-asset Add profit/loss field returned 3、 4.13 stock-asset Add profit/loss field returned
2020-05-20 1.6 1. 1.13 get email verification code 2. 1.14 Institutional user email verification code login
2020-06-09 1.7 1. 1.15 Institutional user email activation
2020-06-10 1.8 1. 1.16 Institutional user email verification 2、1.17 Institutional user email verification
2020-06-24 1.9 1. Add 1.13~1.21 institutional client API
2020-07-01 1.10 1. Add 3.7 confirm the cash subscription quantity when the quota is insufficient API
2020-07-06 1.11 1. Delete institutional user login API,available as a separate document
2020-08-04 1.12 1. Add order market distinction, add IPO status
2020-09-21 1.13 1. 2.16 Add the profit/loss of the position
2020-10-21 1.14 1. None
2020-10-27 1.14 1. Add margin section to get equity collateral ratio API
2021-02-25 1.15 1. Add fund account to query margin rate API

# Brief description

  • The open platform can provide API services for individual developers and institutional clients, and investors can make full use of uSMART securities' trading services, quotes services, account services, etc. to achieve their own investment applications.

  • Protocol:

HTTPS

  • X-Sign

The MD5withRSA encryption algorithm is used to encrypt the contents of the Body, and the resulting ciphertext is encoded by safeBase64 as the value of X-Sign and put into the header, and each channel is assigned a public and private key separately.

  • The public key of the checktest:

It needs to be agreed upon by both parties

  • The public key for the private data encryption test:

It needs to be agreed upon by both parties

  • URLSAFE_BASE64 algorithm is defined in RFC4648

The final string is encrypted using the RSA private key, which is then encoded using the RFC4648 algorithm and placed into the request body or form item.

  • Request header X-Request-Id:

The length is 19 digits, which must be ensured to be unique for idempotent weight protection, and it is recommended to use the [distributed Snowflake algorithm]

(https://www.cnblogs.com/yanduanduan/p/10038345.html) to generate.

  • Request example:

http header parameter example

Authorization: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uIjoiNGZjYTA1MWNmZjQwNDI4NzlkNGJiYzYzYjFiYWE0MTgiLCJzb3VyY2UiOiJhcHAiLCJ1dWlkIjozMTgxNDA2MTEwNTc1NTc1MDR9.gw4_AKh6NGUxWXWjzHb8G2An3ao0nSuI

Content-Type: application/json; charset=utf-8

X-Dt: 1

X-Lang: 1

X-Request-Id: 92823918712371

X-Type: 1

X-Channel1001

x-Sign:用私钥对body内容加密后的内容
  • http body parameter example:
{
	"entrustAmount": 100,
	"entrustPrice": 330.4,
	"entrustProp": "e",
	"entrustType": 0,
	"exchangeType": 0,
	"stockCode": "00700",
	"stockName": "腾讯控股",
	"conId": 100008234979823
}

Return example:

{
	"code": 0,
	"data": {
		"entrustId": "56765633083899904",
		"status": 0,
		"statusName": "等待提交"
	},
	"msg": ""
}

# 1 Log in, password and user information

# 1.1 Channel password login

  • Mobile + password + channel login:

  • API address /user-server-sg/open-api/login

  • Request method POST

  • consumes ["application/json"]

  • produces ["application/json"]

  • Description of the request parameters:

Parameter name Description Request Type Required Type
X-Lang Language(1-simplified chinese,2-traditional chinese,3-English) header true string
X-Request-Id The requestId message of the header information, 30 bits long, ensures uniqueness and prevents duplicate commits to achieve interface idempotency header true string
X-Channel Channel header true string
X-Time Time stamp header true string
X-Sign Signature header true string
areaCode Area numbers 86 China, 852 Hong Kong, 853 Macau, 886 Taiwan, 65 Singapore body true string
password Password RSA encryption (different key from X-Sign) body true string
phoneNumber Mobile phone number RSA encryption (different key from X-Sign) body true string
  • Request header example
Authorization:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uIjoiMzIyMzM1ZTc1NTZiNDQzMzkyZWNmZWJmYTYzYjZmMzEiLCJzb3VyY2UiOiJhcHAiLCJ1dWlkIjozNDA1MDIxMzExOTM0ODczNjB9.cvuoahb0h_s1rx57iJBwQn7FNcNfFJ6llCTUlqDTFlD

Content-Type: application/json;charset=UTF-8

X-Dt: 1

X-Lang: 1

X-Request-Id: 928239187123721231232

X-Type: 1

X-Channel100082

X-Sign:body 使用RSA私钥加密
  • Request body example
{

	"areaCode": 86,

	"password": "rsa",

	"phoneNumber": "rsa"

}
  • Description:
Parameter name Description Type
areaCode Area Code string
avatar Avatar address string
expiration Expiration time int64
extendStatusBit User extension status int32
firstLogin Whether it is the first time to log in boolean
nickname Nickname string
openedAccount Whether to open an account boolean
phoneNumber Mobile phone number string
thirdBindBit Bind bits Mobile 1<<0 WeChat 1<<1 weibo 1<<2 int32
token Login authentication token string
tradePassword Whether the trading password has been set boolean
unionId The unionId of the WeChat public platform, if any, is displayed. string
uuid uSMART user registration uuid, global unique int64
  • Return example:
{

	"areaCode": 86,

	"avatar": "",

	"expiration": 0,

	"extendStatusBit": "1<<0 登录密码 1<<1 行情权限 1<<2 衍生品",

	"firstLogin": true,

	"nickname": "xxx",

	"openedAccount": true,

	"phoneNumber": "188xxxx9188",

	"thirdBindBit": 1,

	"token": "",

	"tradePassword": true,

	"unionId": "",

	"uuid": 0

}
  • Response status:
Status code Description
0 Successful
200 OK
300100 Illegal Request
300102 Account is frozen, unable to complete the operation, if not the operation, please contact customer service
300103 The user is deleted
300309 Please enter the correct mobile phone number
300701 The phone number is not registered
300702 The account has been locked. Please log in again or retrieve the password after %s minutes
300703 Incorrect password, please re-enter, you can try %s times
300705 No password has been set for the account. Use SMS verification code to log in
300809 The SMS verification code needs to be verified

# 1.2 Get the mobile phone verification code

  • API address /user-server-sg/open-api/send-phone-captcha

  • Request method POST

  • consumes ["application/json"]

  • produces ["application/json"]

  • Description of the request parameters:

Parameter name Description Request type Required Type
X-Lang Language type (1-simplified chinese,2-traditional chinese,3-English) header true string
X-Request-Id The requestId message of the header information, 30 bits long, ensures uniqueness and prevents duplicate commits to achieve interface idempotency header true string
X-Channel Channel header true string
X-Time Time stamp header true string
X-Sign Signature header true string
areaCode Area numbers 86 China, 852 Hong Kong, 853 Macau, 886 Taiwan, 65 Singapore body true string
type Verification code type 101 Registration 102 Reset password 103 Replace mobile phone number 104 Bind mobile phone number 105 New device login Verification 106 SMS login body true string
phoneNumber Mobile phone number RSA encryption (different key from X-Sign) body true string
  • Request header example:
Authorization:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uIjoiMzIyMzM1ZTc1NTZiNDQzMzkyZWNmZWJmYTYzYjZmMzEiLCJzb3VyY2UiOiJhcHAiLCJ1dWlkIjozNDA1MDIxMzExOTM0ODczNjB9.cvuoahb0h_s1rx57iJBwQn7FNcNfFJ6llCTUlqDTFlD

Content-Type: application/json;charset=UTF-8

X-Dt: 1

X-Lang: 1

X-Request-Id: 928239187123721231232

X-Type: 1

X-Channel100082

X-Sign:body 使用RSA私钥加密
  • Request body example:
{

	"areaCode": 86,

	"type": 102,

	"phoneNumber": "rsa"

}
  • Description:
Parameter name Description Type
areaCode Area code string
avatar Avatar address string
expiration Expiration time int64
extendStatusBit User extension status int32
firstLogin Whether it is the first time to log in boolean
invitationCode The invitation code, if any, is displayed. string
languageCn 1 simplified chineses 2 traditional chinese int32
languageHk 1 simplified chineses 2 traditional chinese int32
lineColorHk 1 Red up and green down 2 Green up and red down int32
nickname Nickname string
openedAccount Whether to open an account boolean
phoneNumber Mobile phone number string
thirdBindBit Bind bits Mobile phone1<<0 WeChat 1<<1 Weibo1<<2 int32
token Login authentication token string
tradePassword Whether the trading password has been set boolean
unionId The unionId of the WeChat public platform, if any, is displayed. string
uuid uSMART clients' registration uuid, global unique int64
  • Return example:
{

	"areaCode": 86,

	"avatar": "",

	"expiration": 0,

	"extendStatusBit": "1<<0 登录密码 1<<1 行情权限 1<<2 衍生品",

	"firstLogin": true,

	"invitationCode": 1234,

	"languageCn": 0,

	"languageHk": 0,

	"lineColorHk": 0,

	"nickname": "xxx",

	"openedAccount": true,

	"phoneNumber": "188xxxx9188",

	"thirdBindBit": 1,

	"token": "",

	"tradePassword": true,

	"unionId": "",

	"uuid": 0

}
  • Response status
Status code Description
0 Successful
200 OK
300100 Illegal Request
300102 Account is frozen, unable to complete the operation, if it is not operated by yourself, please contact customer service
300103 The user is deleted
300309 Please enter the correct mobile phone number
300701 The phone number is not registered
300702 The account has been locked. Please log in again or retrieve the password after %s minutes
300703 Incorrect password, please re-enter, you can also try %s times
300705 No password has been set for the account. Use the SMS verification code to log in
300809 The SMS verification code needs to be verified

# 1.3Channel verification code login

  • Mobile+Verification code+Channel login:

  • API address /user-server-sg/open-api/loginCaptcha

  • Request method POST

  • consumes ["application/json"]

  • produces ["application/json"]

  • Description:

Parameter name Description Request type Required Type
X-Lang Language type(1-Simplified Chinese,2-Traditional Chinese,3-English) header true string
X-Request-Id The requestId message of the header information, 30 bits long, ensures uniqueness and prevents duplicate commits to achieve interface idempotency header true string
X-Channel Channel header true string
X-Time Time stamp header true string
X-Sign Signature header true string
areaCode Area code 86China,852 Hongkong,853 Macau,886 Taiwan,65 Singapore body true string
captcha Verification code body true string
phoneNumber Mobile phone number RSA encryption (different key from X-Sign) body true string
  • Request header example
Authorization:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uIjoiMzIyMzM1ZTc1NTZiNDQzMzkyZWNmZWJmYTYzYjZmMzEiLCJzb3VyY2UiOiJhcHAiLCJ1dWlkIjozNDA1MDIxMzExOTM0ODczNjB9.cvuoahb0h_s1rx57iJBwQn7FNcNfFJ6llCTUlqDTFlD

Content-Type: application/json;charset=UTF-8

X-Dt: 1

X-Lang: 1

X-Request-Id: 928239187123721231232

X-Type: 1

X-Channel100082

X-Sign:body 使用RSA私钥加密
  • Request body example:
{

	"areaCode": 86,

	"modifyUserConfigParam": {

		"languageCn": 1,

		"languageHk": 1,

		"lineColorHk": 1

	},

	"captcha": "1234",

	"phoneNumber": "rsa"

}
  • Description:
Parameter name Description Type
areaCode Area code string
avatar Avatar address string
expiration Expiration time int64
extendStatusBit User extension status int32
firstLogin Whether it is the first time to log in boolean
invitationCode The invitation code, if any, is displayed. string
languageCn 1Simplified Chinese 2Traditional Chinese int32
languageHk 1Simplified Chinese 2Traditional Chinese int32
lineColorHk 1Red up and green down 2Green up and red down int32
nickname Nickname string
openedAccount Whether to open an account boolean
phoneNumber Phone number string
thirdBindBit Bind bits Mobile phone1<<0 Wechat 1<<1 Weibo1<<2 int32
token Login authentication token string
tradePassword Whether the trading password has been set boolean
unionId The unionId of the WeChat public platform, if any, is displayed. string
uuid uSMART user registration uuid, global unique int64
  • Return example:
{

	"areaCode": 86,

	"avatar": "",

	"expiration": 0,

	"extendStatusBit": "1<<0 登录密码 1<<1 行情权限 1<<2 衍生品",

	"firstLogin": true,

	"invitationCode": 1234,

	"languageCn": 0,

	"languageHk": 0,

	"lineColorHk": 0,

	"nickname": "xxx",

	"openedAccount": true,

	"phoneNumber": "188xxxx9188",

	"thirdBindBit": 1,

	"token": "",

	"tradePassword": true,

	"unionId": "",

	"uuid": 0

}
  • Response status:
Status Code Description
0 Successful
200 OK
300100 Illegal Request
300102 The account is frozen and cannot be completed, if it is not operated by yourself, please contact customer service
300103 The user is deleted
300309 Please enter the correct mobile phone number
300701 The phone number is not registered
300702 Your account has been locked, please log back in or retrieve your password after %s minutes
300703 Incorrect password, please re-enter, you can try %s times
300705 The account does not have a login password. Please use the SMS verification code to log in
300809 The SMS verification code needs to be verified

# 1.4Setting trading password

  • API address /user-server-sg/open-api/set-trade-password

  • Request method POST

  • consumes ["application/json"]

  • produces ["application/json"]

  • API description The user needs to register with a login state to complete the account opening and has not set the trading password, otherwise it is considered an illegal request

  • Request parameter

Parameter name Description Request type Required Type
Authorization See Overview Authorization Description header true string
X-Lang Language 1Simplified Chinese 2Traditional Chinese header true string
X-Request-Id The requestId message of the header information, 30 bits long, ensures uniqueness and prevents duplicate commits to achieve interface idempotency header true string
X-Channel Channel header true string
X-Time Time stamp header true string
X-Sign Signature header true string
password Trading password Set, modify, reset trading password is required, trading password must be 6-digit pure number RSA encryption (different from X-Sign key) body true string
oldPassword Old trading password, modified trading password is required, the trading password must be 6-digit pure number RSA encryption (different from X-Sign key) body false string
phoneCaptcha Mobile phone verification code, reset the trading password required according to the verification code body false string
  • Request header example
Authorization:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uIjoiMzIyMzM1ZTc1NTZiNDQzMzkyZWNmZWJmYTYzYjZmMzEiLCJzb3VyY2UiOiJhcHAiLCJ1dWlkIjozNDA1MDIxMzExOTM0ODczNjB9.cvuoahb0h_s1rx57iJBwQn7FNcNfFJ6llCTUlqDTFlD

Content-Type: application/json;charset=UTF-8

X-Dt: 1

X-Lang: 1

X-Request-Id: 928239187123721231232

X-Type: 1

X-Channel100082

X-Sign:body 使用RSA私钥加密
  • Request body example
{

  "oldPassword": "",

  "password": "",

  "phoneCaptcha": ""

}
  • Response status
Status code Description schema
0 Successful
200 OK UserResponseEntity
300100 Illegal Request
300101 Illegal TOKEN
301001 The trading password needs to be a 6-digit number, please re-enter it
301003 The trading password is wrong, please re-enter it, you can also try %s times
301004 Trading services abnormal
301005 The account is frozen and cannot be completed, if it is not operated by yourself, please contact customer service
  • Response parameters
Parameter name Description Type schema
code Response code int32
data Response data object
msg Response message string
  • Response exampl
{

  "code": 0,

  "data": {},

  "msg": ""

}

# 1.5Verify the trading password

  • API address /user-server-sg/open-api/check-trade-password

  • Request method POST

  • consumes ["application/json"]

  • produces ["application/json"]

  • API Description Access:Requires Token

  • Request parameter

Parameter name Description Request type 必填 类型
Authorization See Overview Authorization Description header true string
X-Lang Language type

(1-Simlified Chinese, 2-Traditional Chinese, 3-English) | header | true | string | | X-Request-Id | The requestId information of the header information, 19 bits in length | header | true | string | | X-Channel | Channel | header | true | string | | X-Time | Time stamp | header | true | string | | X-Sign | Signature | header | true | string | | password | The trading password must be 6-digit pure digital RSA encryption (different from the X-Sign key) | String | false | string |

  • Request header example
Authorization:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uIjoiMzIyMzM1ZTc1NTZiNDQzMzkyZWNmZWJmYTYzYjZmMzEiLCJzb3VyY2UiOiJhcHAiLCJ1dWlkIjozNDA1MDIxMzExOTM0ODczNjB9.cvuoahb0h_s1rx57iJBwQn7FNcNfFJ6llCTUlqDTFlD

Content-Type: application/json;charset=UTF-8

X-Dt: 1

X-Lang: 1

X-Request-Id: 928239187123721231232

X-Type: 1

X-Channel100082

X-Sign:body 使用RSA私钥加密
  • Request example

/user-server-sg/open-api/check-trade-password?password=123456 RES加密

  • Response status
Status code Description schema
0 Successful
200 OK UserResponseEntity
300100 Illegal Request
300101 Illegal TOKEN
301001 The trading password needs to be a 6-digit number, please re-enter it
301002 Trading password has been locked, please try again or retrieve the password after %s hours
301004 Trading services abnormal
310104 Wrong trading password
310106 The trading password is not set
  • Response parameter
Parameter name Description Type schema
code Response code int32
data Response data object
msg Response message string
  • Response example
{

  "code": 0,

  "data": {},

  "msg": ""

}

# 1.6Reset the login password

  • API address /user-server-sg/open-api/reset-login-password

  • Request method POST

  • consumes ["application/json"]

  • produces ["application/json"]

  • API description Does not require a token

  • Request parameters

Parameter name Description Request type Required Type
Authorization See Overview Authorization Description header true string
X-Lang Language type
(1-Simplifed Chinese,2-Traditional Chinese,3-English) header true string
X-Request-Id The requestId message of the header information, 30 bits long, ensures uniqueness and prevents duplicate commits to achieve interface idempotency header true string
X-Channel Channel header true string
X-Time Time stamp header true string
X-Sign Signature header true string
areaCode Area code

86 China, 852 Hongkong,853 Macau,886 Taiwan, 65 Singapore | body | false | string | | password | New password RSA encryption (different key from X-Sign) | body | false | string | | phoneCaptcha | Mobile phone verification code | body | false | string | | phoneNumber | Mobile phone number RSA encryption (different key from X-Sign) | body | false | string |

  • Request header example
Authorization:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uIjoiMzIyMzM1ZTc1NTZiNDQzMzkyZWNmZWJmYTYzYjZmMzEiLCJzb3VyY2UiOiJhcHAiLCJ1dWlkIjozNDA1MDIxMzExOTM0ODczNjB9.cvuoahb0h_s1rx57iJBwQn7FNcNfFJ6llCTUlqDTFlD

Content-Type: application/json;charset=UTF-8

X-Dt: 1

X-Lang: 1

X-Request-Id: 928239187123721231232

X-Type: 1

X-Channel100082

X-Sign:body 使用RSA私钥加密
  • Request body example
{

	"areaCode": "86",

	"password": "rsa",

	"phoneCaptcha": "1234",

	"phoneNumber": "188********"

}
  • Response status
Status code Description schema
0 Successful
200 OK UserResponseEntity
300100 Illegal Request
300304 Too many validations, please try again later
300305 Sorry, the verification code has expired, please get it again
300701 The phone number is not registered
300707 You have now pre-registered with your Client Manager, please log in via SMS verification code and activate your account.
300800 The SMS verification code is incorrect, please re-enter it
300801 The password length cannot be less than 8 bits
300802 The password length cannot be greater than 24 bits
300803 The password cannot be pure numbers/letters/symbols
300804 Please set the correct password, 8~24 digit/letter/symbol combination
  • Response parameter
Parameter name Description Type schema
code Response code int32
data Response data object
msg Response message string
  • Response example
{

	"code": 0,

	"data": {},

	"msg": ""

}

# 1.7 Unlock transaction

  • API address /user-server-sg/open-api/trade-login

  • Request method POST

  • consumes ["application/json"]

  • produces ["application/json"]

  • API description Requires token

Request parameters

Parameter name Description Request type Required Type
Authorization See Overview Authorization Description header true string
X-Lang Language

(1-Simplified Chinese, 2-Traditional Chinese, 3-English) | header | true | string | | X-Request-Id | The requestId message of the header information, 30 bits long, ensures uniqueness and prevents duplicate commits to achieve interface idempotency | header | true | string | | X-Channel | Channel | header | true | string | | X-Time | Time stamp | header | true | string | | X-Sign | Signature | header | true | string | | password | New password RSA encryption (different key from X-Sign) | body | true | string |

  • Request header example
Authorization:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uIjoiMzIyMzM1ZTc1NTZiNDQzMzkyZWNmZWJmYTYzYjZmMzEiLCJzb3VyY2UiOiJhcHAiLCJ1dWlkIjozNDA1MDIxMzExOTM0ODczNjB9.cvuoahb0h_s1rx57iJBwQn7FNcNfFJ6llCTUlqDTFlD

Content-Type: application/json;charset=UTF-8

X-Dt: 1

X-Lang: 1

X-Request-Id: 928239187123721231232

X-Type: 1

X-Channel100082

X-Sign:body 使用RSA私钥加密
  • Request status
Status code Description schema
0 Successful
200 OK UserResponseEntity
300100 Illegal request
300304 Too many validations, please try again later
300305 Sorry, the verification code has expired, please get it again
300701 The phone number is not registered
300707 You have now pre-registered with your Client Manager, please log in via SMS verification code and activate your account.
300800 The SMS verification code is incorrect, please re-enter it
300801 The password length cannot be less than 8 bits
300802 The password length cannot be greater than 24 bits
300803 The password cannot be numbers/letters/symbols
300804 Please set the correct password, 8~24 digit/letter/symbol combination
  • Response parameters
Parameter name Description Type schema
code Response code int32
data Response data object
msg Response message string
  • Response example
{

  "code": 0,

  "data": ,

  "msg": ""

}

# 1.8Gets the transaction unlock status

  • API address /user-server-sg/open-api/get-trade-status

  • Request method POST

  • consumes ["application/json"]

  • produces ["application/json"]

  • API description Requires token

  • Request parameters

Parameter name Description Request type Required Type
Authorization See Overview Authorization Description header true string
X-Lang Language

(1-Simplified Chinese, 2-Traditional Chinese, 3-English) | header | true | string | | X-Request-Id | The requestId message of the header information, 30 bits long, ensures uniqueness and prevents duplicate commits to achieve interface idempotency | header | true | string | | X-Channel | Channel | header | true | string | | X-Time | Time stamp | header | true | string | | X-Sign | Signature | header | true | string | | password | New password RSA encryption (different key from X-Sign) | body | true | string |

  • Request header example
Authorization:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uIjoiMzIyMzM1ZTc1NTZiNDQzMzkyZWNmZWJmYTYzYjZmMzEiLCJzb3VyY2UiOiJhcHAiLCJ1dWlkIjozNDA1MDIxMzExOTM0ODczNjB9.cvuoahb0h_s1rx57iJBwQn7FNcNfFJ6llCTUlqDTFlD

Content-Type: application/json;charset=UTF-8

X-Dt: 1

X-Lang: 1

X-Request-Id: 928239187123721231232

X-Type: 1

X-Channel100082

X-Sign:body 使用RSA私钥加密
  • Response status
Status code Description schema
0 Successful
200 OK UserResponseEntity
300100 Illegal request
300304 Too many validations, please try again later
300305 Sorry, the verification code has expired, please get it again
300701 The phone number is not registered
300707 You have now pre-registered with your Client Manager, please log in via SMS verification code and activate your account.
300800 The SMS verification code is incorrect, please re-enter it
300801 The password length cannot be less than 8 bits
300802 The password length cannot be greater than 24 bits
300803 Passwords cannot all be numbers/letters/symbols
300804 Please set the correct password, 8~24 digit/letter/symbol combination
  • Response parameters
Parameter name Description Type schema
code Response code int32
data Response data object
status Order status,

0 Not decrypted, 1 Unlocked | int32 | | | msg | Response message | string | |

  • Response example
{
	"code": 0,
	"msg": "成功",
	"data": {
		"status": 0
	}
}

# 1.9Change the trading password

  • API address /user-server-sg/open-api/update-trade-password

  • Request method POST

  • consumes ["application/json"]

  • produces ["application/json"]

  • API description The user needs to register with a login state token to complete the account opening and has not set the trading password, otherwise it is considered an illegal request

  • Request parameters

Parameter name Description Request type Required Type
Authorization See Overview Authorization Description header true string
X-Lang anguage

1 Simplified Chinese 2 Traditional Chinese | header | true | string | | X-Request-Id | The requestId message of the header information, 30 bits long, ensures uniqueness and prevents duplicate commits to achieve interface idempotency | header | true | string | | X-Channel | Channel | header | true | string | | X-Time | Time stamp | header | true | string | | X-Sign | Signature | header | true | string | | password | Trading password Required, and trading password must be 6 digits pure number RSA encryption (different key from X-Sign) | body | true | string | | oldPassword | Old trading password Modified trading password is required, the tradng password must be 6-digit number RSA encryption (different from X-Sign key) | body | false | string | | phoneCaptcha | Mobile phone verification code, reset the trading password required according to the verification code | body | false | string |

  • Request header example
Authorization:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uIjoiMzIyMzM1ZTc1NTZiNDQzMzkyZWNmZWJmYTYzYjZmMzEiLCJzb3VyY2UiOiJhcHAiLCJ1dWlkIjozNDA1MDIxMzExOTM0ODczNjB9.cvuoahb0h_s1rx57iJBwQn7FNcNfFJ6llCTUlqDTFlD

Content-Type: application/json;charset=UTF-8

X-Dt: 1

X-Lang: 1

X-Request-Id: 928239187123721231232

X-Type: 1

X-Channel100082

X-Sign:body 使用RSA私钥加密
  • Request body example
{

  "oldPassword": "",

  "password": "",

  "phoneCaptcha": ""

}
  • Response status
Status code Description schema
0 Successful
200 OK UserResponseEntity
300100 Illegal request
300101 Illegal TOKEN
301001 The trading password needs to be a 6-digit number, please re-enter it
301003 The trading password is wrong, please re-enter it, you can also try %s times
301004 Trading services are unusual
301005 The account is frozen and cannot be completed, if it is not operated by yourself, please contact customer service
  • Response parameters
Parameter name Description Type schema
code Response code int32
data Response data object
msg Response message string
  • Response example
{

  "code": 0,

  "data": {},

  "msg": ""

}

# 1.10 Reset the trading password

  • API addres /user-server-sg/open-api/reset-trade-password

  • Request method POST

  • consumes ["application/json"]

  • produces ["application/json"]

  • API description The user needs to register with a login state token to complete the account opening and has not set the trading password, otherwise it is considered an illegal request

  • Request parameters

Parameter name Description Request type Required Type
Authorization See Overview Authorization Description header true string
X-Lang Language

1 Simplified Chinese 2 Traditional Chinese | header | true | string | | X-Request-Id | The requestId message of the header information, 30 bits long, ensures uniqueness and prevents duplicate commits to achieve interface idempotency | header | true | string | | X-Channel | Channel | header | true | string | | X-Time | Time stamp | header | true | string | | X-Sign | Signature | header | true | string | | password | Trading password Required, and trading password must be 6 digits pure number RSA encryption (different key from X-Sign) | body | true | string | | oldPassword | Old trading password Modified trading password is required, the tradng password must be 6-digit number RSA encryption (different from X-Sign key) | body | false | string | | phoneCaptcha | Mobile phone verification code, reset the trading password required according to the verification code | body | false | string |

  • Request header example
Authorization:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uIjoiMzIyMzM1ZTc1NTZiNDQzMzkyZWNmZWJmYTYzYjZmMzEiLCJzb3VyY2UiOiJhcHAiLCJ1dWlkIjozNDA1MDIxMzExOTM0ODczNjB9.cvuoahb0h_s1rx57iJBwQn7FNcNfFJ6llCTUlqDTFlD

Content-Type: application/json;charset=UTF-8

X-Dt: 1

X-Lang: 1

X-Request-Id: 928239187123721231232

X-Type: 1

X-Channel100082

X-Sign:body 使用RSA私钥加密
  • Request body example
{

  "oldPassword": "",

  "password": "",

  "phoneCaptcha": ""

}
  • Response status
Response status Description schema
0 Successful
200 OK UserResponseEntity
300100 Illegal request
300101 Illegal TOKEN
301001 The trading password needs to be a 6-digit number, please re-enter it
301003 The trading password is wrong, please re-enter it, you can also try %s times
301004 Trading services are unusual
301005 The account is frozen and cannot be completed, if it is not operated by yourself, please contact customer service
  • Response parameters
Parameter name Description Type schema
code Response code int32
data Response data object
msg Response message string
  • Response example
{

  "code": 0,

  "data": {},

  "msg": ""

}

# 1.11Modify the login password

  • API address /user-server-sg/open-api/update-login-password

  • Request method POST

  • consumes ["application/json"]

  • produces ["application/json"]

  • API description Login token is required The user needs to already set a login password, otherwise it is considered an illegal request

  • Request parameters

Parameter name Description Request type Required Type
Authorization See Overview Authorization Description header true string
X-Lang Language

1Simplified Chinese 2Traditional Chinese | header | true | string | | X-Request-Id | The requestId message of the header information, 30 bits long, ensures uniqueness and prevents duplicate commits to achieve interface idempotency | header | true | string | | X-Channel | Channel | header | true | string | | X-Time | Time stamp | header | true | string | | X-Sign | Signature | header | true | string | | password | New login password Required RSA encryption (different key from X-Sign) | body | true | string | | oldPassword | Old Login Password Required RSA Encryption (Different Key from X-Sign) | body | true | string |

  • Request header example
Authorization:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uIjoiMzIyMzM1ZTc1NTZiNDQzMzkyZWNmZWJmYTYzYjZmMzEiLCJzb3VyY2UiOiJhcHAiLCJ1dWlkIjozNDA1MDIxMzExOTM0ODczNjB9.cvuoahb0h_s1rx57iJBwQn7FNcNfFJ6llCTUlqDTFlD

Content-Type: application/json;charset=UTF-8

X-Dt: 1

X-Lang: 1

X-Request-Id: 928239187123721231232

X-Type: 1

X-Channel100082

X-Sign:body 使用RSA私钥加密
  • Request body example
{

  "oldPassword": "",

  "password": "",

}
  • Response status
Status code Description schema
0 Successful
200 OK UserResponseEntity
300100 Illegal request
300101 Illegal TOKEN
300704 The original login password is incorrect
300804 Please set the correct password, 8~24 digit/letter/symbol combination
300810 The new password cannot be less than 8 bits long
300811 The new password cannot be longer than 24 bits
300812 New passwords cannot all be numbers/letters/symbols
  • Response parameters
Parameter name Description Type schema
code Response code int32
data Response data object
msg Response message string
  • Response example
{

  "code": 0,

  "data": {},

  "msg": ""

}

# 1.12 Check the account type by market

  • API address /user-server-sg/open-api/get-user-info-with-market-for-stock/v1

  • Request method POST

  • consumes ["application/json"]

  • produces ["application/json"]

  • API description Get user information based on the market

  • Request parameters

Parameter name Description Request type Required Type
Authorization See Overview Authorization Description header true string
X-Lang Language

1Simplified Chinese 2Traditional Chinese | header | true | string | | X-Request-Id | The requestId message of the header information, 30 bits long, ensures uniqueness and prevents duplicate commits to achieve interface idempotency | header | true | string | | X-Channel | Channel | header | true | string | | X-Time | Time stamp | header | true | string | | X-Sign | Signature | header | true | string | | marketType | Market type(Refer to ExchangeTypeddictionary) | body | true | integer |

  • Request header example
Authorization:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uIjoiMzIyMzM1ZTc1NTZiNDQzMzkyZWNmZWJmYTYzYjZmMzEiLCJzb3VyY2UiOiJhcHAiLCJ1dWlkIjozNDA1MDIxMzExOTM0ODczNjB9.cvuoahb0h_s1rx57iJBwQn7FNcNfFJ6llCTUlqDTFlD

Content-Type: application/json;charset=UTF-8

X-Dt: 1

X-Lang: 1

X-Request-Id: 928239187123721231232

X-Type: 1

X-Channel100082

X-Sign:body 使用RSA私钥加密
  • Request body example
{

  "marketType": 3

}
  • Response status
Status code Description schema
0 Successful
200 OK UserResponseEntity
300100 Illegal request
300101 Illegal TOKEN
  • Response parameters
Parameter name Description Type schema
code Response code int32
data Response data object
msg Response message string
  • Description:
Parameter name Description Type
assetProp Account type. For the specific dictionary, refer to the values of AssetProp below. string
  • Response example
{
	"code": 0,
	"msg": "成功",
	"data": {
		"assetProp": "M"
	}
}

# 1.13 Check the margin rate according to the fund account number

  • API address /user-server-sg/open-api/get-rate-info-by-fund-account/v1

  • Request method POST

  • consumes ["application/json"]

  • produces ["application/json"]

  • API description Get user information based on the market

  • Request parameters

Parameter name Description Request type Required Type
Authorization See Overview Authorization Description header true string
X-Lang Language

1 Simplified Chinese 2 Traditional Chinese | header | true | string | | X-Request-Id | The requestId message of the header information, 30 bits long, ensures uniqueness and prevents duplicate commits to achieve interface idempotency | header | true | string | | X-Channel | Channel | header | true | string | | X-Time | Time stamp | header | true | string | | X-Sign | Signature | header | true | string | | fundAccount | The user's fund account number | body | true | string |

  • Request header example
Authorization:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uIjoiMzIyMzM1ZTc1NTZiNDQzMzkyZWNmZWJmYTYzYjZmMzEiLCJzb3VyY2UiOiJhcHAiLCJ1dWlkIjozNDA1MDIxMzExOTM0ODczNjB9.cvuoahb0h_s1rx57iJBwQn7FNcNfFJ6llCTUlqDTFlD

Content-Type: application/json;charset=UTF-8

X-Dt: 1

X-Lang: 1

X-Request-Id: 928239187123721231232

X-Type: 1

X-Channel100082

X-Sign:body 使用RSA私钥加密
  • Request body example
{
	"fundAccount": "80019641"
}
  • Response status
Status code Description schema
0 Successful
200 OK UserResponseEntity
300100 Illegal request
300101 Illegal TOKEN
  • Response parameters
Parameter name Description Type schema
code Response code int32
data Response data object
msg Response message string
  • Description:
Parameter name Description Type
hkdRateValue HKD margin rate, direct return percentage; For example, 6.6 represents 6.6% number
usdRateValue USD margin rate, as above number
cnyRateValue RMB margin rate, as above number
  • Response example
{
  "code": 0,
  "msg": "成功",
  "data": {
    "hkdRateValue": 6.6,
    "usdRateValue": 4.6,
    "cnyRateValue": 6.6
  }
}

# 2 Trading & Enquiries

# 2.1Place an order

  • API address /order-center-sg/open-api/entrust-order

  • Request method POST

  • consumes ["application/json"]

  • produces ["application/json"]

  • API description Place an order

  • Request parameters

Parameter name Description Request type Required Type
Authorization The token information of the header information header true string
X-Lang Language type (1-Simplified Chinese,2-Traditional Chinese,3-English) header true string
X-Channel Channel ID,distributed by uSMART header true string
X-Time Time stamp header true string
X-Dt Device type(t1-android,t2-ios,t3-others,t4-Windows,t5-Mac) header true string
X-Sign RSA signature header true string
serialNo The serial number, up to 19 bits long, ensures that the only recommended snowflake algorithm is generated body true int64
entrustAmount Entrust number body true number
entrustPrice Entrust Price(At-auction Order price pass 0) body true number
entrustProp Entrust property('0'-U.S. Stock Limit Order/Dark pool entrust limit order,'d'-At-auction Order,'e'-enhanced limit order,'g'-At-auction limit order) HK stock: ('0'-Dark poor entrust/limit order,'d'-At-auction order,'e'-Enhanced limit order,'g'-At-auction limit order,'w'-Market order) U.S. stock: ('0'-Limit order, 'w'-Market order) A-share stock: ('0'-Limit order) body true string
entrustType Entrust type (0-Buy,1-Sell) body true int32
exchangeType Trading type (0-HK stock, 5-U.S. stock, 6-Shanghai-Hong Kong Stock Connect, 7-Shenzhen-Hong Kong Stock Connect) body true int32
stockCode Stock code body true string
password Trading password(RSApublic key cryptography) body false string
stockName Stock name body false string
forceEntrustFlag Whether to force the entrustment identification, more than 9 times 24 files when placing an order, forceEntrustFlag=true can force to place the order, but it may be a void order body false boolean
sessionType Trading session type(0/No Pass - Normal order trading(default),1-Pre-market trading,2-Post market trading,3-Dark pool trading,12-Pre-market and after-hours) body false int32
orderType order type: GTC/GTD/DAY(default value: DAY,Valid on the same day, currently not supported) body false string
validDate term of validity(GTD, format:yyyy-MM-dd,Up to 90 days, currently not supported) body false string
exchange exchange default SMART(SMART,AMEX,ARCA,BATS,BEX,BYX,CBOE,CHX,DRCTEDGE,EDGEA,EDGX,IBKRTS,IEX,ISE,ISLAND,LTSE,MEMX,NYSE,NYSENAT,PEARL,PHLX,PSX) body false string
  • Request header example
Authorization:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uIjoiMzIyMzM1ZTc1NTZiNDQzMzkyZWNmZWJmYTYzYjZmMzEiLCJzb3VyY2UiOiJhcHAiLCJ1dWlkIjozNDA1MDIxMzExOTM0ODczNjB9.cvuoahb0h_s1rx57iJBwQn7FNcNfFJ6llCTUlqDTFlD

Content-Type: application/json;charset=UTF-8

X-Dt: 1

X-Lang: 1

X-Request-Id: 928239187123721231232

X-Type: 1

X-Channel100082

X-Sign:body 使用RSA私钥加密
  • Request body example
{

  "serialNo": "2000000000000000018",

  "entrustAmount": "1000",

  "entrustPrice": "11.0",

  "entrustProp": "e",

  "entrustType": "0",

  "exchangeType": "0",

  "stockCode": "00981",

  "stockName": "00981",

  "forceEntrustFlag": "false",

  "sessionType": "0",

  "password":"Fpocc_11vTS6mS9YKYby6-v2VNujUx_fnnMaGncHPerLh9mCP_vDIhbeE1GLNDU4arl1euay-hiTmqmlwZlwtCMbw3Law7mx9NgVuwGVX3pXPuwYjcqxhaGZIsATHDSywxd4uZZhTCsrRua-Ug8dgJaPDc5os7-A9sFYxbxhI6I="

}
  • Response status
Status code Description schema
0 Successful
200 OK ResponseVO«EntrustOrderResponse»
201 Created
401 Unauthorized
403 Forbidden
404 Not Found
406472 The order cannot contain less than 1 lot of fractions, please trade an integer multiple of 1 lot, or trade fractions through a "fractional order"
410200 Sorry, the order can not contain less than 1 lot of fractional shares, please trade an integer multiple of 1 lot, if you need to trade fractional shares please contact customer service.
  • Response parameters
Parameter name Description Type schema
code Status code int32
data Return data EntrustOrderResponse EntrustOrderResponse
entrustId Order id, can be used to query orders/modify orders/cancel orders string
status Order status int32
statusName Order status name string
·msg Status messag string
  • Response example
{
	"code": 0,
	"msg": "操作成功",
	"data": {
		"entrustId": "1181776863632019456",
		"status": 1,
		"statusName": "等待提交"
	}
}

# 2.2Modify order/cancel order

  • API address /order-center-sg/open-api/modify-order

  • Request method POST

  • consumes ["application/json"]

  • produces ["/"]

  • API description Modify order/Cancel order

  • Request parameters

Parameter name Description Request type Required Type
Authorization The token information of the header information header true string
X-Lang Language (1-Simplified Chinese,

2-Traditional Chinese, 3-English) | header | true | string | | X-Channel | Channel ID,distributed by uSMART | header | true | string | | X-Time | Time stamp | header | true | string | | X-Request-Id | The requestId message of the header information, 30 bits long, ensures uniqueness and prevents duplicate commits to achieve interface idempotency | header | true | string | | X-Sign | RSA signature | header | true | string | | actionType | Operation type(0-Cancel order,1-Modify order) | body | true | int32 | | entrustAmount | Entrust amount,pass 0 when the order is cancelled | body | true | number | | entrustId | Entrust Id | body | true | int64 | | entrustPrice | Entrust price,pass 0 when the order is cancelled | body | true | number | | password | Trading password(RSApublic key cryptography) | body | false | string | | forceEntrustFlag | Whether to force the entrustment identification, more than 9 times 24 files when placing an order, forceEntrustFlag=true can force to place the order, but it may be a void order | body | false | boolean |

  • Request header example
Authorization:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uIjoiMzIyMzM1ZTc1NTZiNDQzMzkyZWNmZWJmYTYzYjZmMzEiLCJzb3VyY2UiOiJhcHAiLCJ1dWlkIjozNDA1MDIxMzExOTM0ODczNjB9.cvuoahb0h_s1rx57iJBwQn7FNcNfFJ6llCTUlqDTFlD

Content-Type: application/json;charset=UTF-8

X-Lang: 1

X-Request-Id: 928239187123721231232

X-Type: 1

X-Channel100082

X-Sign:body 使用RSA私钥加密
  • Request body example
{

	"actionType": 1,

	"entrustAmount": 500,

	"entrustId": 1181776863632019456,

	"entrustPrice": 322.0,

	"forceEntrustFlag": true

}
  • Response status
Status code Description schema
0 Successful
200 OK Object
201 Created
401 Unauthorized
403 Forbidden
404 Not Found
406472 The order cannot contain less than 1 lot of fractions, please trade an integer multiple of 1 lot, or trade fractions through a "fractional order"
410200 Sorry, the order can not contain less than 1 lot of fractional shares, please trade an integer multiple of 1 lot, if you need to trade fractional shares please contact customer service.
  • Response parameters
Parameter name Description Type schema
code Status code int32
data Return data Object
entrustId Entrust ID string
status Status int32
statusName Status name string
msg Status message string
  • Response example
{

	"code": 0,

	"msg": "操作成功",

	"data": {

		"entrustId": "1181776863632019456",

		"status": 5,

		"statusName": "等待改单"

	}

}

# 2.3Modify range

  • API address /order-center-sg/open-api/modified-range

  • Request method POST

  • consumes ["application/json"]

  • produces ["application/json"]

  • API description Modify order display range

  • Request parameters

Parameter name Description Request type Required Type
Authorization Token information of the header information header true string
X-Lang Language (1-Simplified Chinese,

2-Traditional Chinese, 3-English) | header | true | string | | X-Channel | Channel ID,distributed by uSMART | header | true | string | | X-Time | Time stamp | header | true | string | | X-Sign | RSA signature | header | true | string | | entrustId | Entrust Id | body | true | int64 | | newPrice | Latest price-At-auction order also need to pass the latest price | body | true | number |

  • Request header example
Authorization:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uIjoiMzIyMzM1ZTc1NTZiNDQzMzkyZWNmZWJmYTYzYjZmMzEiLCJzb3VyY2UiOiJhcHAiLCJ1dWlkIjozNDA1MDIxMzExOTM0ODczNjB9.cvuoahb0h_s1rx57iJBwQn7FNcNfFJ6llCTUlqDTFlD

Content-Type: application/json;charset=UTF-8

X-Lang: 1

X-Type: 1

X-Channel100082

X-Sign:body 使用RSA私钥加密
  • Request example
{

	"entrustId": 1181776863632019456,

	"newPrice": 323

}
  • Response status
Status code Description schema
0 Successful ResponseVO
200 OK ResponseVO«QueryEntrustInfoResponse»
201 Created
401 Unauthorized
403 Forbidden
404 Not Found
  • Response parameters
Parameter name
Description
Type schema
code Status code int32
data Return data QueryEntrustInfoResponse QueryEntrustInfoResponse
businessAmount Amount of deals number
entrustAmount The amount of the original order number
modifiedUpperAmount The upper limit of modifications that can be modified number
modifiedlowerAmount The lower limit of modifications that can be modified number
cashEnableAmount Maximum amount that cash can buy number
msg Status message string
  • Response status
{

	"code": 0,

	"data": {

		"businessAmount": 0,

		"entrustAmount": 0,

		"modifiedUpperAmount": 0,

		"modifiedlowerAmount": 0

	},

	"msg": ""

}

# 2.4Place an order in fractional shares

  • API address /order-center-sg/open-api/odd-entrust

  • Request method POST

  • consumes ["application/json"]

  • produces ["/"]

  • API description Fractional share trading

  • Request example

{

  "entrustAmount": 1,

  "entrustPrice": 82.1,

  "entrustType": 1,

  "exchangeType": 0,

  "stockCode": "00002"

}
  • Request parameters
Parameter name Description Request type Required Type
Authorization Token information of the header information header true string
X-Lang Language

(1-Simplified Chinese, 2-Traditional Chinese, 3-English) | header | true | string | | X-Channel | Channel ID, distributed by uSMART | header | true | string | | X-Time | Time stamp | header | true | string | | X-Dt | Device type(t1-android,t2-ios,t3-others,t4-Windows,t5-Mac) | header | true | string | | X-Sign | RSA signature | header | true | string | | entrustAmount | Entrust amount | body | true | number | | entrustPrice | Price | body | true | number | | entrustType | Entrust type(1-sell) | body | true | int32 | | exchangeType | Transaction type(0-Hongkong stock,5-U.S stock) | body | true | int32 | | stockCode | Stock code | body | true | string |

  • Response status
Status code Description schema
200 OK
201 Created
401 Unauthorized
403 Forbidden
404 Not Found
  • Response parameters
Parameter name Description Type
code Status code int32
data Return data
oddId Fractional share request record ID string
status Order status int32
statusName Order status name string
msg Status information string
  • Response example
{

  "code": 0,

  "msg": "操作成功",

  "data": {

    "oddId": "1207553433704988672",

    "status": 0,

    "statusName": "待报单"

  }

}

# 2.5Fractional order withdrawal

  • API address /order-center-sg/open-api/odd-modify

  • Request method POST

  • consumes ["application/json"]

  • produces ["/"]

  • API description Fractional share trading

Request example

{

  "actionType": 0,

  "oddId": 1207553433704988672

}
  • Request parameters
Parameter name Description Request type Required Type
Authorization Token information of the header information header true string
X-Lang Language

(1-Simplified Chinese, 2-Traditional Chinese, 3-English) | header | true | string | | X-Channel | Channel ID, distributed by uSMART | header | true | string | | X-Time | Time stamp | header | true | string | | X-Request-Id | The requestId message of the header information, 30 bits long, ensures uniqueness and prevents duplicate commits to achieve interface idempotency | header | true | string | | X-Sign | RSA signature | header | true | string | | actionType | Operation type(0-Withdrawal) | body | true | int32 | | oddId | Entrustment Id of fractional shares | body | true | int64 |

  • Response status
Status code Description
200 OK
201 Created
401 Unauthorized
403 Forbidden
404 Not Found
  • Response parameters
Parameter name Description Type
code Status code int32
oddId Fractional share request record ID string
status Order status int32
statusName Order status name string
msg Status message string
  • Response example
{

  "code": 0,

  "msg": "操作成功",

  "data": {

    "oddId": "1207553433704988672",

    "status": 9,

    "statusName": "已撤单"

  }

}

# 2.6The maximum number of buyable and sellable quantities

  • API address /order-center-sg/open-api/trade-quantity

  • Request method POST

  • consumes ["application/json"]

  • produces ["application/json"]

  • API description Gets the maximum number available

  • Request parameters

Parameter name Description Request type Required Type
Authorization Token information of the header information header true string
X-Lang Language

(1-Simplified Chinese, 2-Traditional Chinese, 3-English) | header | true | string | | X-Channel | Channel ID, distributed by uSMART | header | true | string | | X-Time | Time stamp | header | true | string | | X-Sign | RSA signature | header | true | string | | entrustPrice | Entrust price(Cannot be 0, At-auction orders can be left unfilled.) | body | false | number | | entrustProp | Entrust properties ('0'-U.S stock at-auction order, 'd'-At-auction order, 'e' -Enhanced limit Order, 'g'-At-auction limit order, 'u'-Fractional order) | body | true | string | | exchangeType | Transaction type (0-Hongkong stock, 5-U.S stock, 6-Shanghai-Hong Kong Stock Connect,7-Shenzhen-Hong Kong Stock Connect) | body | true | int32 | | stockCode | Stock code | body | true | string |

  • Request header example
Authorization:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uIjoiMzIyMzM1ZTc1NTZiNDQzMzkyZWNmZWJmYTYzYjZmMzEiLCJzb3VyY2UiOiJhcHAiLCJ1dWlkIjozNDA1MDIxMzExOTM0ODczNjB9.cvuoahb0h_s1rx57iJBwQn7FNcNfFJ6llCTUlqDTFlD

Content-Type: application/json;charset=UTF-8

X-Lang: 1

X-Type: 1

X-Channel:100082

X-Sign:body 使用RSA私钥加密
  • Request body example
{

	"entrustPrice": 234,

	"entrustProp": "e",

	"exchangeType": 0,

	"stockCode": "700"

}
  • Response status
Status code Description schema
0 Successful ResponseVO
200 OK ResponseVO«SaleAndBuyQuantityResponse»
201 Created
401 Unauthorized
403 Forbidden
404 Not Found
  • Response parameters
Parameter name
Description
Type schema
code Status code int32
data Return data SaleAndBuyQuantityResponse SaleAndBuyQuantityResponse
buyEnableAmount Maximum buyable amount(Margin) number
oddEnableAmount Maximum number of fractional share that can be sold number
saleEnableAmount Maximum sellable amount(Cash) number
saleEnableIntAmount The maximum number of integral stocks that can be sold number
handAmount Number of shares per lot number
cashEnableAmount Cash buyable amount - including fractional shares:Query available for buying back number
cashEnableIntAmount Cash can buy the lot size:Query available for buying back number
cashPurchasingPower Cash buying power,query available for buying bac number
maxPurchasingPower Margin buying power,margin account&&query available for buying back number
fundAccoutType Fund account type
(0-Cash account,M-Margin account) string
msg Status message string
  • Response status
{

  "code": 0,

  "msg": "操作成功",

  "data": {

    "saleEnableAmount": 500.00,

    "saleEnableIntAmount": 500.0000,

    "oddEnableAmount": 0.0000,

    "buyEnableAmount": 800.00,

    "handAmount": 100.0000

  }

}

# 2.7Today's order - paging query

  • API address /order-center-sg/open-api/today-entrust

  • Request method POST

  • consumes ["application/json"]

  • produces ["application/json"]

  • API description Fund account number is required

  • Request parameters

Parameter name Description Request type Required Type
Authorization Token information of the header information header true string
X-Lang Language

(1-Simplified Chinese, 2-Traditional Chinese, 3-English) | header | true | string | | X-Channel | Channel ID, distributed by uSMART | header | true | string | | X-Time | Time stamp | header | true | string | | X-Sign | RSA signatur | header | true | string | | exchangeType | Transaction type (0-Hongkong stock, 5-U.S. stock, 67-A-share,100-Query all transaction type) | body | true | int32 | | pageNum | The current page starts at 1, with a default value of 1 | body | false | int32 | | pageSize | Results per page, default value 10 | body | false | int32 | | stockCode | Stock code | body | false | string | | stockName | Stock name | body | false | string |

  • Request header example
Authorization:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uIjoiMzIyMzM1ZTc1NTZiNDQzMzkyZWNmZWJmYTYzYjZmMzEiLCJzb3VyY2UiOiJhcHAiLCJ1dWlkIjozNDA1MDIxMzExOTM0ODczNjB9.cvuoahb0h_s1rx57iJBwQn7FNcNfFJ6llCTUlqDTFlD

Content-Type: application/json;charset=UTF-8

X-Lang: 1

X-Type: 1

X-Channel:100082

X-Sign:body 使用RSA私钥加密
  • Request body example
{

	"exchangeType": 0,

	"pageNum": 1,

	"pageSize": 10,

	"stockCode": "",

	"stockName": ""

}
  • Response status
Status code Description schema
0 Successful ResponseVO
200 OK ResponseVO«PageInfoVO«TodayEntrustByAppResponse»»
201 Created
401 Unauthorized
403 Forbidden
404 Not Found
  • Response parameters
Parameter name
Description
Type schema
code Status code int32
data Return data PageInfoVO«TodayEntrustByAppResponse» PageInfoVO«TodayEntrustByAppResponse»
list The result collection array TodayEntrustByAppResponse
businessAmount Transaction amount number
businessAveragePrice Average price number
serialNo Serial number int64
createTime Entrust time string
entrustAmount Entrust amount number
entrustId Entrust id string
entrustNo Entrust NO. string
entrustPrice Entrust price number
entrustProp Entrust property ('0'-U.S. stock limit order,

'd'-At-auction order, 'e' -Enhanced limit order, 'g'-At-auction limit order, 'h'-Hongkong stock limit order, 'j'-Special limit order) | string | | | entrustType | Direction, entrusty type(0-Buy,1-Sell) | int32 | | | exchangeType | Transaction type,0 Hongkong stock,5 U.S. stock | int32 | | | flag | Order type-Ordinary order 0-Conditional order 1-Fractional order 2-Automatic Investment Plan order | string | | | moneyType | Currency type | int32 | | | sessionType | Trading session sign (0/no pass-normal order trading(default),1-Pre-market trading,2-Post-hours trading,3-Dark pool trading) | int32 | | | status | Entrust status | int32 | | | statusName | Entrust status name | string | | | stockCode | Stock code | string | | | stockName | Stock name | string | | | pageNum | Current page | int32 | | | pageSize | Number per page | int32 | | | total | Total | int64 | | | msg | Status message | string | |

  • Response example
{

	"code": 0,

	"msg": "操作成功",

	"data": {

		"pageNum": 1,

		"pageSize": 0,

		"total": 1,

		"list": [{

			"entrustId": "1181776863632019456",

			"entrustNo": "191",

			"status": 5,

			"statusName": "等待改单",

			"exchangeType": 0,

			"entrustType": 0,

			"entrustProp": "e",

			"entrustAmount": 700,

			"businessAmount": 0,

			"entrustPrice": 210,

			"businessAveragePrice": 0,

			"stockCode": "00700",

			"stockName": "腾讯控股",

			"moneyType": 2,

			"createTime": "11:42:15",

			"flag": "0",

			"serialNo": 1233123554314,

			"sessionType": 0

		}]

	}

}

# 2.8All Orders - Paginated query

  • API address /order-center-sg/open-api/his-entrust

  • Request method POST

  • consumes ["application/json"]

  • produces ["application/json"]

  • API description Requires funding account number

  • Request parameters

Parameter name Description Request type Required Type
Authorization Token information of the header information header true string
X-Lang Language

(1-Simplified Chinese, 2-Traditional Chinese, 3-English) | header | true | string | | X-Channel | Channel ID, distributed by uSMART | header | true | string | | X-Time | Time stamp | header | true | string | | X-Sign | RSA signature | header | true | string | | dateFlag | 1:One-week order,2:One-month order,3: Three months order,4:One-year order,5:This year's order,6:Custom time,7.All | body | true | string | | exchangeType | Transaction type (0-Hongkong stock, 5-U.S. stock, 67-A-share,100-Query all transaction type) | body | true | int32 | | entrustBeginDate | Beginning date, the time defaults from the latest previous day in reverse order. Rules:yyyy-MM-dd | body | false | string | | entrustEndDate | Ending date, the time defaults from the latest previous day in reverse order. Rules:yyyy-MM-dd | body | false | string | | pageNum | Current page, start from ,the default value is 1 | body | false | int32 | | pageSize | Results per page, default value 10 | body | false | int32 | | stockCode | Stock code | body | false | string |

  • Request header example
Authorization:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uIjoiMzIyMzM1ZTc1NTZiNDQzMzkyZWNmZWJmYTYzYjZmMzEiLCJzb3VyY2UiOiJhcHAiLCJ1dWlkIjozNDA1MDIxMzExOTM0ODczNjB9.cvuoahb0h_s1rx57iJBwQn7FNcNfFJ6llCTUlqDTFlD

Content-Type: application/json;charset=UTF-8

X-Lang: 1

X-Type: 1

X-Channel:100082

X-Sign:body 使用RSA私钥加密
  • Request body example
{

	"dateFlag": "1",

	"entrustBeginDate": "",

	"entrustEndDate": "",

	"exchangeType": 0,

	"pageNum": 1,

	"pageSize": 10,

	"stockCode": ""

}
  • Response status
Status code Description schema
0 Successful ResponseVO
200 OK ResponseVO«PageInfoVO«HisEntrustByAppResponse»»
201 Created
401 Unauthorized
403 Forbidden
404 Not Found
  • Response parameters
Parameter name
Description
Type schema
code Status code int32
data Return data PageInfoVO«HisEntrustByAppResponse» PageInfoVO«HisEntrustByAppResponse»
list The result collection array HisEntrustByAppResponse
businessAmount Transaction amount number
businessAveragePrice The average transaction price number
serialNo Serial NO. int64
createDate Entrust date string
createTime Entrust time string
dayEnd Whether the next day, 0 is not the next day, 1 has been the next day int32
entrustAmount Entrust amount number
entrustId Entrust ID string
entrustNo Entrust NO. string
entrustPrice Entrust price number
entrustProp Entrust property

('0'-U.S stock limit order, 'd'-At-auction order, 'e' -Enhanced limit order, 'g'-At-auction limit order, 'h'-Hongkong stock limit order, 'j'-Special limit order) | string | | | entrustType | Direction, entrust type(0-Buy,1-Sell) | int32 | | | exchangeType | Transaction type,0Hongkong stock,5U.S. stock | int32 | | | flag | Order type-Ordinary order1-Conditional order2-Fractional order3-Automatic Investment Plan order4 | string | | | moneyType | Currency type | int32 | | | sessionType | Trading session sign(0/no pass-Normal order trading(Default),1-Pre-marketing trading,2-Post-hours trading,3-Dark pool trading) | int32 | | | status | Entrust status | int32 | | | statusName | Entrust status name | string | | | stockCode | Stock code | string | | | stockName | Simplified Chinese name of stock | string | | | pageNum | Current page | int32 | | | pageSize | Number per page | int32 | | | total | Total | int64 | | | msg | Status message | string | |

  • Response example
{

	"code": 0,

	"msg": "操作成功",

	"data": {

		"pageNum": 1,

		"pageSize": 20,

		"total": 2,

		"list": [{

				"entrustId": "1181776863632019456",

				"entrustNo": "191",

				"status": 5,

				"statusName": "等待改单",

				"exchangeType": 0,

				"entrustType": 0,

				"entrustProp": "e",

				"entrustAmount": 700,

				"businessAmount": 0,

				"entrustPrice": 210,

				"businessAveragePrice": 0,

				"stockCode": "00700",

				"stockName": "腾讯控股",

				"moneyType": 2,

				"createTime": "11:42:15",

				"createDate": "20191009",

				"flag": "0",

				"serialNo": 1233123554314,

				"sessionType": 0

			}

		],

		"nowDate": "20191009"

	}

}

# 2.9Query order details

  • API address /order-center-sg/open-api/order-detail

  • Request method POST

  • consumes ["application/json"]

  • produces ["application/json"]

  • API description Query order details

  • Request pamameters

Parameter name Description Request type Required Type
Authorization Token information of the header information header true string
X-Lang Language (1-Simplified Chinese,

2-Traditional Chinese, 3-English) | header | true | string | | X-Channel | Channel ID,distributed by uSMART | header | true | string | | X-Time | Time stamp | header | true | string | | X-Sign | RSA siganagure | header | true | string | | appEntrustRecordDetailRequest | appEntrustRecordDetailRequest | body | true | AppEntrustRecordDetailRequest | | serialNo | Serial NO.(Entrust ID, serial NO. at least pass one) | body | true | int64 | | entrustId | Serial NO.(Entrust ID, serial NO. at least pass one) | body | true | int64 |

  • Request header example
Authorization:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uIjoiMzIyMzM1ZTc1NTZiNDQzMzkyZWNmZWJmYTYzYjZmMzEiLCJzb3VyY2UiOiJhcHAiLCJ1dWlkIjozNDA1MDIxMzExOTM0ODczNjB9.cvuoahb0h_s1rx57iJBwQn7FNcNfFJ6llCTUlqDTFlD

Content-Type: application/json;charset=UTF-8

X-Lang: 1

X-Type: 1

X-Channel:100082

X-Sign:body 使用RSA私钥加密
  • Request example
{

	"serialNo": 0,

	"entrustId": 0

}
  • Response status
Status code Description schema
0 Successful ResponseVO
200 OK ResponseVO«AppEntrustRecordDetailResponse»
201 Created
401 Unauthorized
403 Forbidden
404 Not Found
  • Response parameters
Parameter name
Description
Type schema
code Return code int32
data Return data AppEntrustRecordDetailResponse AppEntrustRecordDetailResponse
appEntrustRecordDetailInfoList list information array AppEntrustRecordDetailInfo
businessAmount Transaction number number
businessAveragePrice Transaction average price number
businessBalance Transaction amount number
commissionFee HK and U.S market, commission string
createTime Time string
depositStockDay Stock deposit time string
entrustId Entrust ID int64
entrustAmount Entrust number number
entrustBalance Entrust amount number
entrustFee Total fee string
entrustPrice Entrust price number
entrustProp Entrust property

('0'-U.S. stock limit order, 'd'-At-auction order, 'e' -Enhanced limit order, 'g'-At-auction limit order, 'h'-Hongkong stock limit order, 'j'-Special limit order) | string | | | entrustPropName | Entrust property ('0'-U.S stock limit order, 'd'-At-auction order, 'e' -Enhanced limit order, 'g'-At-auction limit order, 'h'-Hongkong stock limit order, 'j'-Special limit ordr) | string | | | moneyType | Currency type | int32 | | | orderStatus | Status | int32 | | | orderStatusName | Status name | string | | | payFee | HK and U.S. stock,pay fee | string | | | platformUseFee | HK and U.S. stock,platform fee | string | | | stampDutyFee | Hongkong stock, stamp duty | string | | | tradingSystemUsage | Hongkong stock, system usage fee | string | | | transactionFee | Hongkong stock:Transaction fee,U.S. stock:SFC fee | string | | | transactionLevyFee | Hongkong stock: transactioin levy fee, U.S. stock:Transaction activity fee | string | | | frcTransactionLevyFee | Hongkong stock: FRC transaction levy fee (Starting from 2022.1.1) | string | | | document | Document | string | | | entrustType | Transaction type | int32 | | | exchangeType | Market type | int32 | | | sessionType | Trading session sign(0/no pass-Ordinary order trading(Default),1-Pre-market trading,2-Post-hours trading,3-Dark pool trading) | int32 | | | status | Entrust status | int32 | | | statusName | Entrust status name | string | | | stockCode | Stock code | string | | | stockName | Stock name | string | | | msg | Status message | string | |

  • Response example
{"code": 0,"msg": "操作成功","data": {"statusName": "全部成交","status": 0,"stockCode": "00700","stockName": "腾讯控股","document": "由于和交易所清算交收,部分数据可能在交易完成的第2天(工作日)展示","appEntrustRecordDetailInfoList": [{"entrustProp": "e","entrustPropName": "增强限价单","entrustAmount": 700,"businessAmount": 700,"entrustPrice": 210,"entrustBalance": 147000,"businessAveragePrice": 322,"businessBalance": 225400,"moneyType": 2,"createTime": "2019-10-09 11:42:15","depositStockDay": null,"commissionFee": null,"platformUseFee": null,"stampDutyFee": null,"payFee": null,"transactionFee": null,"transactionLevyFee": null,"tradingSystemUsage": null,"entrustFee": null,"orderStatus": 11,"orderStatusName": "委托下单"},{"entrustProp": "e","entrustPropName": "增强限价单","entrustAmount": 700,"businessAmount": 700,"entrustPrice": 322,"entrustBalance": 225400,"businessAveragePrice": 322,"businessBalance": 225400,"moneyType": 2,"createTime": "2019-10-09 14:58:03","depositStockDay": null,"commissionFee": null,"platformUseFee": null,"stampDutyFee": null,"payFee": null,"transactionFee": null,"transactionLevyFee": null,"tradingSystemUsage": null,"entrustFee": null,"orderStatus": 21,"orderStatusName": "改单(最新订单)"},{"entrustProp": "e","entrustPropName": "增强限价单","entrustAmount": 700,"businessAmount": 700,"entrustPrice": 322,"entrustBalance": 225400,"businessAveragePrice": 322,"businessBalance": 225400,"moneyType": 2,"createTime": "2019-10-09 15:00:30","depositStockDay": null,"commissionFee": null,"platformUseFee": null,"stampDutyFee": null,"payFee": null,"transactionFee": null,"transactionLevyFee": null,"tradingSystemUsage": null,"entrustFee": null,"orderStatus": 0,"orderStatusName": "全部成交(订单结束)"}],"entrustType": 0,"exchangeType": 0,"finalStateFlag": "1","sessionType": 0,

"entrustId": 1181776863632019500}

}

# 2.10Inquiry of transaction records - pagination query

  • API address /order-center-sg/open-api/stock-record

  • Request method POST

  • consumes ["application/json"]

  • produces ["application/json"]

  • API description Requires funding account number

  • Request parameters

Parameter name Description Request Type Required Type
Authorization Token information of the header information header true string
X-Lang Language (1-Simplified Chinese,

2-Traditional Chinese, 3-English) | header | true | string | | X-Channel | Channel ID,distributed by uSMART | header | true | string | | X-Time | Time stamp | header | true | string | | X-Sign | RSA siganature | header | true | string | | exchangeType | Transaction type(0-Hongkong stock, 5-U.S. stock, 67-A-share,100-Query all transaction type) | body | true | int32 | | stockCode | Stock code | body | false | string | | entrustId | Entrust ID | body | false | int64 | | beginTime | Transaction start time, rule yyyy-MM-dd | body | false | string | | endTime | Transaction ending time, rule yyyy-MM-dd | body | false | string | | pageNum | Current page Starting from 1,the default value is 1 | body | false | int32 | | pageSize | Number of results per page, default value 10 | body | false | int32 |

  • Request header example
Authorization:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uIjoiMzIyMzM1ZTc1NTZiNDQzMzkyZWNmZWJmYTYzYjZmMzEiLCJzb3VyY2UiOiJhcHAiLCJ1dWlkIjozNDA1MDIxMzExOTM0ODczNjB9.cvuoahb0h_s1rx57iJBwQn7FNcNfFJ6llCTUlqDTFlD

Content-Type: application/json;charset=UTF-8

X-Lang: 1

X-Type: 1

X-Channel:100082

X-Sign:body 使用RSA私钥加密
  • Request example
{"beginTime": "2019-10-01","endTime": "2019-10-10","entrustId": 0,"exchangeType": 0,"pageNum": 1,"pageSize": 10,"stockCode": "700"

}
  • Response status
Status code Description schema
0 Successful ResponseVO
200 OK ResponseVO«PageInfoVO«StockRecordResponse»»
201 Created
401 Unauthorized
403 Forbidden
404 Not Found
  • Response parameters
Parameter name
Description
Type schema
code Status code int32
data Return data PageInfoVO«StockRecordResponse» PageInfoVO«StockRecordResponse»
list Result collection array StockRecordResponse
businessAmount Transaction number number
businessBalance Transaction amount number
businessPrice Transaction price number
businessStatus Transaction status(1Successful,2Cancel) int32
businessTime Transaction time date-time
createTime Record creation time date-time
entrustId Entrust ID int64
entrustType Enturst type(''0''-Buy,1-Sell,''2''-Query,''3'-Cancel,''4'-Replenishment,''5''-Modify,6Transfer in,7Transfer out,8Type) int32
exchangeType Transaction type('0'-Hongkong Stock,'1'-Shanghai A-share,'2'-Shanghai B-share,'3'-Shenzhen A-share,'4'-Shenzhen B-share,'5'-U.S stock,'6'-Shanghai-Hongkong Stock Connect,'7'-Shenzhen-Hong Kong Stock Connect) int32
id int64
moneyType Currency type(0-RMB,1-U.S. dollar,2-HKD) int32
recordId Record ID int64
remark Remark string
stockCode Stock code string
stockName Stock name string
updateTime Record of the last update time date-time
userId User id int64
pageNum Current pagev int32
pageSize Number per page int32
total Total number int64
msg Status message string
  • Response example
{"code": 0,"msg": "操作成功","data": {"pageNum": 1,"pageSize": 10,"total": 133,"list": [{"id": 18405,"recordId": 1139100093871222800,"entrustId": 1139096696801153000,"userId": 336547695646785540,"moneyType": 2,"exchangeType": 0,"stockCode": "700","stockName": "腾讯控股","businessStatus": 1,"businessPrice": 334.2,"businessAmount": 10,"businessTime": "2019-06-14T09:12:49.000+0000","createTime": "2019-06-13T09:20:00.000+0000","updateTime": "2019-06-13T09:20:00.000+0000","remark": null,"entrustType": 0,"businessBalance": 3342}]}

}

# 2.11Query positions

  • API address /asset-center-sg/open-api/stock-holding

  • Request method POST

  • consumes ["application/json"]

  • produces ["application/json"]

  • API description Requires funding account number

  • Request parameters

Parameter name Description Request type Required Type
Authorization Token information of the header information header true string
X-Lang Language (1-Simplified Chinese,

2-Traditional Chinese, 3-English) | | header | true | string | | X-Channel | Channel | | header | true | string | | X-Time | Time stamp | | header | true | string | | X-Sign | RSA signature | | header | true | string | | exchangeType | Transaction type(0-Hongkong Stock, 5-U.S. stock, 67-A-share,100-Query all transaction type) | | body | true | int32 |

  • Request header example
Authorization:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uIjoiMzIyMzM1ZTc1NTZiNDQzMzkyZWNmZWJmYTYzYjZmMzEiLCJzb3VyY2UiOiJhcHAiLCJ1dWlkIjozNDA1MDIxMzExOTM0ODczNjB9.cvuoahb0h_s1rx57iJBwQn7FNcNfFJ6llCTUlqDTFlD

Content-Type: application/json;charset=UTF-8

X-Lang: 1

X-Type: 1

X-Channel:100082

X-Sign:body 使用RSA私钥加密
  • Query- request body example
{

  "exchangeType": 0

}
  • Response status
Status code Description schema
0 Successful ResponseVO
200 OK ResponseVO«List«StockHolding»»
201 Created
401 Unauthorized
403 Forbidden
404 Not Found
  • Response parameters
Parameter name Description Type schema
code Status code int32
data Return data array StockHolding
costPriceAccurate Cost price - precise string
currentAmount Position amount string
enableAmount Sellable amount string
frozenAmount Frozen amount string
exchangeType Transaction type int32
oddAmount Fractional amount string
stockCode Stock code string
stockName Stock name string
lastPrice Latest price string
msg Status message string
  • Response example
{"code": 0,"msg": "操作成功","data": [{"exchangeType": 0,"stockCode": "19981","stockName": "国药麦银零四沽A","currentAmount": "157.000000","oddAmount": "157.000000","lastPrice": "0.320000","costPriceAccurate": "0.303000000"}]

}

# 2.12Query asset

  • API address /asstet-center-sg/open-api/stock-asset

  • Request method POST

  • consumes ["application/json"]

  • produces ["application/json"]

  • API description Requires funding account number

  • Request parameters

Parameter name Description Request type Required Type
Authorization Token information of the header information header true string
X-Lang Language (1-Simplified Chinese,2-Traditional Chinese,3-English) header true string
X-Channel Channel header true string
X-Time Time stamp header true string
X-Sign RSA signature header true string
exchangeType Transaction type(0-Hongkong Stock,

5-U.S Stock, 67-A-share) | body | true | int32 |

  • Request header example
Authorization:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uIjoiMzIyMzM1ZTc1NTZiNDQzMzkyZWNmZWJmYTYzYjZmMzEiLCJzb3VyY2UiOiJhcHAiLCJ1dWlkIjozNDA1MDIxMzExOTM0ODczNjB9.cvuoahb0h_s1rx57iJBwQn7FNcNfFJ6llCTUlqDTFlD

Content-Type: application/json;charset=UTF-8

X-Lang: 1

X-Type: 1

X-Channel:100082

X-Sign:body 使用RSA私钥加密
  • Request body example
{

  "exchangeType": 0

}
  • Response status
Status code Description schema
0 Successful ResponseVO
200 OK ResponseVO«StockAssetDTO»
201 Created
401 Unauthorized +
403 Forbidden
404 Not Found
  • Response parameters
Parameter name Description Type schema
code Status code int32
data Return data StockAssetDTO StockAssetDTO
asset Total asset string
enableBalance Available cash string
frozenBalance Frozen amount string
totalDailyBalance Today's profit and loss amount string
totalDailyBalancePercent Today's profit and loss ratio string
totalHoldingBalance The amount of profit or loss on the position string
totalHoldingBalancePercent The proportion of profit and loss of positions string
debitBalance Amount of debt string
anticipatedInterest Estimated interest string
riskStatusCode Risk control status CODE Risk status 1、Safe 2、Warning 3、Danger 4、Force Liquidation string
riskStatusName Risk control status name mv status 1、Safe 2、Warning 3、Danger 4、Force Liquidation string
mv Risk ratio string
pv pv string
creditAmount Credit Limit string
callMarginCall Margin call string
stockHoldingList List of open positions array StockHolding
costPriceAccurate Cost price - precise string
currentAmount The number of open positions string
exchangeType Transaction type int32
oddAmount Number of fractional shares string
stockCode Stock code string
stockName Stock name string
withdrawBalance Withdrawable amount string
msg Status message string
  • Response example
{"code": 0,"msg": "操作成功","data": {"asset": "96117771.040000","marketValue": "3035584.090000","enableBalance": "92906473.37","withdrawBalance": "92906473.37","frozenBalance": "175713.580000","onWayBalance": "0.000000","stockHoldingList": [{"exchangeType": 0,"stockCode": "19981","stockName": "国药麦银零四沽A","currentAmount": "157.000000","oddAmount": "157.000000","lastPrice": "0.320000","marketValue": "50.240000","hisMarketValue": "0.000000","costPrice": "0.303","costPriceAccurate": "0.303000000","dailyBalance": "50.240000","dailyBalancePercent": "1.000000","holdingBalance": "2.669000","holdingBalancePercent": "0.056106","quoteType": "1"}]}

}

# 2.13Client stock asset inquiry-batch

  • API address /order-center-sg/open-api/stock-asset-list

  • Request method POST

  • consumes ["application/json"]

  • produces ["application/json"]

  • API description Requires funding account number

  • Request header example

Authorization:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uIjoiMzIyMzM1ZTc1NTZiNDQzMzkyZWNmZWJmYTYzYjZmMzEiLCJzb3VyY2UiOiJhcHAiLCJ1dWlkIjozNDA1MDIxMzExOTM0ODczNjB9.cvuoahb0h_s1rx57iJBwQn7FNcNfFJ6llCTUlqDTFlD

Content-Type: application/json;charset=UTF-8

X-Lang: 1

X-Type: 1

X-Channel:100082

X-Sign:body 使用RSA私钥加密
  • Request body example
{

  "exchangeType": 100

}
  • Request parameters
Parameter name Descriptio Request type Required Type
Authorization Token information of the header information header true string
X-Channel Channel ID, distributed by uSMART header true string
X-Lang Language (1-Simplified Chinese,2-Traditional Chinese,3-English) header true string
X-Sign RSA siganature header true string
X-Type APP type(1-Mainland China Version,2-Hongkong Version) header true string
exchangeType Transaction type,0 Hongkong Stcok,5 U.S. stock,67 A-share body true int32
  • Response status
Status code Description schema
0 Successful ResponseVO
200 OK ResponseVO«List«StockAssetDTO»»
201 Created
401 Unauthorized
403 Forbidden
404 Not Found
  • Response parameters
Parameter name Description Type
code Status code int32
data Return data array
asset Total asset string
enableBalance Available amount string
frozenBalance Frozen amount string
marketValue Market value of stock string
onWayBalance Funds in transit string
stockHoldingList List of open positions array
costPrice Cost price string
costPriceAccurate Cost price - precise string
currentAmount Number of open positions string
dailyBalance The amount of profit and loss for the day string
dailyBalancePercent The proportion of profit and loss on the day string
enableAmount Sellable quantity number
exchangeType Transaction type int32
frozenAmount Frozen quantity number
hisMarketValue Yesterday's market value string
holdingBalance The amount of profit or loss on the position string
holdingBalancePercent The proportion of profit and loss of positions string
lastPrice Latest price string
marketValue Market value string
oddAmount Number of fractional shares string
quoteType Quotes type 0:Delayed quotes

1:bmp quotes 2:level1 quotes 3:level2 quotes | string | | stockCode | Stock code | string | | stockName | Stock name | string | | stockOnWayBalanceDTOList | List of funds in transit | array | | applyType | Business type IpoApplyTypeEnum | int32 | | applyTypeName | Business type IpoApplyTypeEnum | string | | exchangeType | Market | int32 | | moneyType | Currency | int32 | | onWayBalance | Cash in transit | number | | stockCode | Stock code | string | | stockName | Stock name | string | | totalDailyBalance | Today's profit and loss amount | string | | totalDailyBalancePercent | Today's profit and loss ratio | string | | totalHoldingBalance | The amount of profit or loss on the position | string | | totalHoldingBalancePercent | The proportion of profit and loss of positions | string | | withdrawBalance | Withdrawable amount | string | | msg | Status message | string |

  • Response example
{

  "code": 0,

  "data": [

    {

      "asset": "",

      "enableBalance": "",

      "frozenBalance": "",

      "marketValue": "",

      "onWayBalance": "",

      "stockHoldingList": [

        {

          "costPrice": "",

          "costPriceAccurate": "",

          "currentAmount": "",

          "dailyBalance": "",

          "dailyBalancePercent": "",

          "enableAmount": 0,

          "exchangeType": 0,

          "frozenAmount": 0,

          "hisMarketValue": "",

          "holdingBalance": "",

          "holdingBalancePercent": "",

          "lastPrice": "",

          "marketValue": "",

          "oddAmount": "",

          "quoteType": "",

          "stockCode": "",

          "stockName": ""

        }

      ],

      "stockOnWayBalanceDTOList": [

        {

          "applyType": 0,

          "applyTypeName": "",

          "exchangeType": 0,

          "moneyType": 0,

          "onWayBalance": 0,

          "stockCode": "",

          "stockName": ""

        }

      ],

      "totalDailyBalance": "",

      "totalDailyBalancePercent": "",

      "totalHoldingBalance": "",

      "totalHoldingBalancePercent": "",

      "withdrawBalance": ""

    }

  ],

  "msg": ""

}

# 2.14Query aggregated asset information

  • API address /aggregation-server-sg/open-api/user-asset-aggregation/v1

  • Request method POST

  • consumes ["application/json"]

  • produces ["application/json"]

  • API description Requires token

  • Request parameters

Parameter name Description Request type Required Type
Authorization Token information of the header information header true string
X-Lang Language (1-Simplified Chinese,
2-Traditional Chinese,3-English) header true string
X-Channel Channel ID, distributed by uSMART header true string
X-Time Time stamp header true string
X-Request-Id The requestId information of the header information ensures uniqueness and prevents duplicate submissions to implement the interface idempotently header true string
X-Sign RSA signature header true string
exchangeType Transaction type,0-Hongkong Stock,5-U.S. stock,67-A-share body true int32
  • Request header example
Authorization: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uIjoiOTMyYmFjY2U3MGU3NDgwM2JmNjYxODk0OTM3ZDlkN2QiLCJzb3VyY2UiOiJ3ZWIiLCJ1dWlkIjozNDMwMjExNDU2ODI4NjIwODB9.XiF0eWAmeL-pthTg--5SLObnscJcDYHaJTJZTHAucwQ

Content-Type: application/json;charset=UTF-8

X-Lang: 1

X-Channel:100082

X-Request-Id: 928239187123721231232

X-Sign:body 使用RSA私钥加密
  • Resnponse status
Status code Description schema
0 Successful ResponseVO
200 OK ResponseVO«OpenHoldAsset»
108008 User service is not available
108011 The user information query API is abnormal
108027 stock-order service is not available
108028 Get the customer stock asset query API is abnormal
108029 finance-server service is not available
108030 Get Current Client Fund Position List API is abnormal
108031 Get Current Client Bond Position List API is abnormal
  • Response parameters
Parameter name Description Type schema
Code Response code 0-The request was successful int32
Data Response data object OpenHoldAsset
asset Total asset string
bondMarketValue Bond market value string
enableBalance Available amount string
frozenBalance Frozen amount string
fundMarketValue Market value of fund string
onWayBalance Funds in transit string
stockMarketValue Market value of stock string
withdrawBalance Withdrawable amount string
totalHoldingBalance The amount of profit or loss on the position string
msg Response message string
  • Response example
{

 "code": 0,

 "msg": "请求成功",

 "data": {

  "asset": "997457.66",

  "stockMarketValue": "88165.000000",

  "bondMarketValue": "0.00",

  "fundMarketValue": "0.00",

  "enableBalance": "908484.60",

  "withdrawBalance": "908484.60",

  "frozenBalance": "808.060000",

"onWayBalance": "0.00",

"totalHoldingBalance": "-2510.00"

 }

}

# 2.15Get the number of margin shares

  • API address /order-center-sg/open-api/trade-margin-quantity

  • Request method POST

  • consumes ["application/json"]

  • produces ["application/json"]

  • API description Get the number of margin shares

  • Request example

{

  "entrustAmount": 1,

  "entrustId": 1,

  "entrustPrice": 1,

  "entrustProp": "",

  "entrustType": 1,

  "exchangeType": 1,

  "stockCode": ""

}
  • Request parameters
Parameter name Description Request type Required Type
Authorization Token information of the header information header true string
X-Lang Language (1-Simplified Chinese,

2-Traditional Chinese, 3-English) | header | true | string | | X-Channel | Channel ID,distributed by uSMART | header | true | string | | X-Time | Time stamp | header | true | string | | X-Sign | RSA signature | header | true | string | | entrustAmount | Entrust amount | body | true | number | | entrustProp | Entrust property('0'-U.S stock limit order, 'd'-At-auction order, 'e' -enhanced limit order, 'g'-At-auction limit order, 'u'-Fractional order) | body | true | string | | exchangeType | Transaction type(0-Hongkong stock,5-U.S. stock,6-Shanghai-Hong Kong Stock Connect,7-Shenzhen-Hong Kong Stock Connect) | body | true | int32 | | stockCode | Stock code | body | true | string | | entrustId | Entrust Id-If entrystType is modify order, it is required | body | false | int64 | | entrustPrice | Entrust price(Can not be 0, at-auction order can be left unfilled) | body | false | number | | entrustType | Query entrust type(0-Buy,5-modify order) | body | false | int32 |

  • Response status
Status code Description
0 成功
200 OK
201 Created
401 Unauthorized
403 Forbidden
404 Not Found
  • Response parameters:
Parameter name Description Type
code Status code integer(int32)
data Return data
cashEnableAmount The amount of cash available for this order number
cashEnableBalance Buyable cash is used for this order number
cashMaxEnableAmount Maximum amount of cash that can be used to buy number
marginAmount Number of margin shares number
marginBalance Amount of margin number
msg Status message string
  • Response example
{

 "code": 0,

 "msg": "操作成功",

 "data": {

   "saleEnableAmount": 0.00,

   "saleEnableIntAmount": 0.0000,

   "oddEnableAmount": 0.0000,

   "buyEnableAmount": 6000.00,

   "handAmount": 100.0000,

   "cashEnableAmount": 2931,

   "cashEnableIntAmount": 2900.0000,

   "cashPurchasingPower": 983164.00,

   "maxPurchasingPower": 2026893.26,

   "fundAccoutType": "M"

 }

}

# 2.16Client margin account details

  • API address /order-center-sg/open-api/margin-detail

  • Request method POST

  • consumes ["application/json"]

  • produces ["application/json"]

  • API description Requires funding account number

  • Request example

{

  "exchangeType": 0,

}
  • Request parameters
Parameter name Description Type Required Type
Authorization Token information of the header information header true string
X-Channel Channel ID,distributed by uSMART header true string
X-Lang Language (1-Simplified Chinese,

2-Traditional Chinese, 3-English) | header | true | string | | X-Request-Id | The requestId information for the header information | header | true | string | | X-Sign | RSA siganature | header | true | string | | X-Type | APP type(1-Mainland China version,2-Hongkong version) | header | true | string | | exchangeType | Transaction type,0 Hongkong stock,5 U.S. stock | body | true | int32 |

  • Response status
Status code Desccription
0 Successful
200 OK
201 Created
401 Unauthorized
403 Forbidden
404 Not Found
  • Response parameters
Parameter name Description Type
code Status code integer(int32)
data Return data MarginDetailResponse
anticipatedInterest Estemated interest number
asset Net asset number
callMarginCall Margin call number
creditAmount credit limit number
creditRatio Credit ratio number
debitBalance Amount of liabilities number
enableBalance Available amount number
frozenBalance Frozen amount number
marginRatioDay Daily margin ratio string
marginRatioYear Yearly margin ratio string
marketValue Market value of stock number
fundBondMarketValue Market value of funds number
mortgageMarketValue Mortgage market cap number
mv mv% number
onWayBalance IPO fund in transit number
purchasePower Buying power number
riskStatusCode Risk level CODE integer(int32)
riskStatusName Risk level name string
withdrawBalance Withdrawable cash number
totalHoldingBalance The amount of profit or loss on the position number
msg
  • Response example
{

  "code": 0,

  "msg": "操作成功",

  "data": {

    "asset": "1021464.00",

    "enableBalance": "983164.00",

    "purchasePower": "2026893.26",

    "withdrawBalance": "983164.00",

    "frozenBalance": "0.00",

    "onWayBalance": "0.00",

    "marketValue": "28300.00",

    "mv": "0.0000",

    "riskStatusCode": 1,

    "riskStatusName": "安全",

    "debitBalance": "0.00",

    "callMarginCall": "0.00",

    "anticipatedInterest": "913.65",

    "mortgageMarketValue": "13584.00",

    "creditAmount": "1043729.26",

    "creditRatio": "0.80",

    "marginRatioYear": "6.60%",

    "marginRatioDay": null,

		" totalHoldingBalance": 100

  }

}

# 3 IPO subscription

# 3.1Get IPO list - paginated query

  • API address /order-center-sg/open-api/ipo-list

  • Request method POST

  • consumes ["application/json"]

  • produces ["/"]

  • API description Get IPO list (no login required)

  • Request parameters

Parameter name Description Type Required Type
Authorization Token information of the header information header true string
X-Lang Language (1-Simplified Chinese,

2-Traditional Chinese, 3-English) | header | true | string | | X-Channel | Channel | header | true | string | | X-Time | Time stamp | header | true | string | | X-Sign | RSA signature | header | true | string | | status | The tab page category(0-Subscribed,1-To be listed) | body | true | int32 | | pageNum | The current page starts at 1, with a default value of 1 | body | false | int32 | | pageSize | Number of results per page, default value 10 | body | false | int32 |

  • Request header example
Authorization:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uIjoiMzIyMzM1ZTc1NTZiNDQzMzkyZWNmZWJmYTYzYjZmMzEiLCJzb3VyY2UiOiJhcHAiLCJ1dWlkIjozNDA1MDIxMzExOTM0ODczNjB9.cvuoahb0h_s1rx57iJBwQn7FNcNfFJ6llCTUlqDTFlD

Content-Type: application/json;charset=UTF-8

X-Lang: 1

X-Type: 1

X-Channel:100082

X-Sign:body 使用RSA私钥加密
  • Request body example
{

	"pageNum": 1,

	"pageSize": 10,

	"status": 1

}
  • Response status
Status code Description schema
200 OK ResponseVO«PageInfoVO«AppGetIpoListResponse»»
201 Created
401 Unauthorized
403 Forbidden
404 Not Found
  • Response parameters
Parameter name
Description
Type schema
code Status code int32
data Response data PageInfoVO«OpenApiGetIpoListResponse» PageInfoVO«OpenApiGetIpoListResponse»
list The result collection array OpenApiGetIpoListResponse
bookingRatio Subscription multiples number
endTime Cash subscription end time yyyy-MM-dd HH:mm:ss string
englishName The English name of the IPO string
exchangeType Market type(0-Hongkong stock) int32
financingEndTime Margin subscription end time string
financingMultiple Margin multiples int32
ipoId IPO id string
labelStatus Tag status(0-Subscribed,1-Selected,2-Not selected) int32
latestEndtime Latest subscription deadline(The latest deadline for international subscriptions, margin subscriptions and cash subscriptions) string
leastAmount Minimum amount number
listingPrice Final listing price number
listingTime Listing time string
moneyType Currency type(0-RMB,1-U.S. dollars,2-HKD) int32
priceMax Highest offer price number
priceMin Lowest offer price number
publishTime Announcement date string
remainingTime Remaining time(S) int64
serverTime Server time string
status IPO status(0-To be subscribed,1-Subscribed,2-To be deducted,3-To be confirmed,4-Confirmed pending publication,5-To be listing,6-Listed,7-Cancel listing,8-Suspension of listing,9-Delayed listing) int32
statusName Chinese status name string
stockCode Code of IPO string
stockName Name of IPO string
subscribeWay Subscription methods, multiple subscriptions use , to seperate, such as 0,1 support cash and financing(1-Public cash subscription,2-Public Margin Subscription,3-International Placement)-This field determines whether the margin subscription is supported string
successRate Winning rate number
pageNum Current type int32
pageSize Number per page int32
total Total number int64
msg Status message
  • Response example
{

	"code": 0,

	"msg": "操作成功",

	"data": {

		"pageNum": 1,

		"pageSize": 20,

		"total": 2,

		"list": [{

				"ipoId": "1143834475048767488",

				"stockCode": "02099",

				"exchangeType": 0,

				"status": 1,

				"statusName": "认购中",

				"stockName": "中国黄金国际",

				"englishName": "CHINAGOLDINTL",

				"leastAmount": null,

				"priceMin": 7,

				"priceMax": 11,

				"listingPrice": 10,

				"endTime": "2019-06-27",

				"financingEndTime": null,

				"latestEndtime": "2019-06-27",

				"remainingTime": -1,

				"labelStatus": null,

				"successRate": null,

				"bookingRatio": null,

				"publishTime": "2019-07-01",

				"listingTime": "2019-07-02",

				"moneyType": 2,

				"serverTime": "2019-10-09 21:08:21",

				"subscribeWay": "1",

				"financingMultiple": 3

			},

			{

				"ipoId": "1133576191818039296",

				"stockCode": "00994",

				"exchangeType": 0,

				"status": 1,

				"statusName": "认购中",

				"stockName": "中天宏信",

				"englishName": "CT VISION",

				"leastAmount": null,

				"priceMin": 7,

				"priceMax": 10,

				"listingPrice": 9,

				"endTime": "2019-07-29",

				"financingEndTime": null,

				"latestEndtime": "2019-07-29",

				"remainingTime": -1,

				"labelStatus": null,

				"successRate": null,

				"bookingRatio": 0,

				"publishTime": "2019-07-30",

				"listingTime": "2019-07-31",

				"moneyType": 2,

				"serverTime": "2019-10-09 21:08:21",

				"subscribeWay": "1",

				"financingMultiple": 1
			}

		]

	}

}

# 3.2Get IPO details

  • API address /order-center-sg/open-api/ipo-info

  • Request method POST

  • consumes ["application/json"]

  • produces ["/"]

  • API description Get IPO details

  • Request parameters

Parameter name Description Request type Required Type
Authorization Token information of the header information header true string
X-Lang Language (1-Simplified Chinese,

2-Traditional Chinese, 3-English) | header | true | string | | X-Channel | Channel ID,distributed by uSMART | header | true | string | | X-Time | Time stamp | header | true | string | | X-Sign | RSA signature | header | true | string | | exchangeType | Market type(0-HK,5-US). If ipoId is not transmitted, this field must be transmitted | body | false | int32 | | ipoId | IPO id [(stockCode & ExchangeType cannot be empty at the same time)]. When ipoId has a value and the ipoId query is preferred, the stockCode &ExchangeType condition does not take effect | body | false | int64 | | stockCode | Stock code, if ipoId is not transmitted, this field must be transmitted | body | false | string |

  • Response status
Status code Description schema
200 OK ResponseVO«appIpoInfoResponse»
201 Created
401 Unauthorized
403 Forbidden
404 Not Found
  • Request header example
Authorization:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uIjoiMzIyMzM1ZTc1NTZiNDQzMzkyZWNmZWJmYTYzYjZmMzEiLCJzb3VyY2UiOiJhcHAiLCJ1dWlkIjozNDA1MDIxMzExOTM0ODczNjB9.cvuoahb0h_s1rx57iJBwQn7FNcNfFJ6llCTUlqDTFlD

Content-Type: application/json;charset=UTF-8

X-Dt: 1

X-Lang: 1

X-Request-Id: 928239187123721231232

X-Type: 1

X-Channel:100082

X-Sign:body 使用RSA私钥加密
  • Request body example
{

	"ipoId": 1133576191528632320

}
  • Response parameters
Parameter name Description Type schema
code Status code int32
data Return data appIpoInfoResponse appIpoInfoResponse
applied Whether the user has subscribed or not boolean
beginTime Cash subscription start time string
bookingFee Cash subscription fee number
bookingRatio Subscription multiples number
compFinancingSurplus Net balance of the company's margin amount number
depositRate Margin rate number
ecmEndTime International subscription deadline date-time
ecmStatus ecm IPO status

(0-To be subscribed, 1-Subscribed,2-To be deducted,3-Pending deductions [not all deductions successful],4-To be submitted,5-To be assigned,6-To be refunds,7-To be refunds [Not all refunds successful], 8-To be coupons,9-To be coupons [not all coupons successful],10-To be confirmed by CCASS,11-To be listed,12-Listed,13-Suspension of subscription) | int32 | | | endTime | Cash subscription end time | string | | | englishName | English name of IPO | string | | | exchangeType | Transaction type(0-HK,5-US) | int32 | | | exchangeTypeName | Name of transaction type | string | | | financingEndTime | Margin subscription deadline | date-time | | | financingFee | Margin fees | number | | | financingMultiple | Margin multiples | int32 | | | financingTips | Tips for margin subscription | string | | | greyFlag | Whether dark pool are supported(0-Not support,1-support) | int32 | | | greyTimeBegin | Dark pool trading time starts, format HH:mm:ss | string | | | greyTimeEnd | Dark pool trading time ends, formatHH:mm:ss | string | | | greyTradeDate | Dark pool trading date, format yyyy-MM-dd | string | | | handAmount | Number of shares per lot | number | | | interestBeginDate | Margin subscription/interest calculation start time | date-time | | | interestDay | The number of interest-bearing days | int32 | | | interestEndDate | End time of margin interest accrual | date-time | | | interestRate | Default margin interest | number | | | ipoFinancingRatios | Tiered margin interest rate (json array:[{"financing_amount_begin":Initial subscription amount,"financing_amount_end":Ending subscription amount,"interest_rate":Interest,"exchange_type":Market type,"stock_code":"IPO code"}]) | array | IpoFinancingRatio | | exchange_type | Market type | int32 | | | financing_amount_begin | Initial subscription amount | number | | | financing_amount_end | Ending subscription amount | number | | | interest_rate | Interest rate | number | | | stock_code | IPO code | string | | | ipoId | IPO id | string | | | latestEndtime | Subscription deadline (latest deadline for international, margin and cash subscriptions) | string | | | leastAmount | Minimum purchase amount (1 lot subscription amount) | number | | | listingPrice | Final listing price | number | | | listingTime | Listing time | string | | | marketValueMax | Maximum market value | number | | | marketValueMin | Minimum market value | number | | | moneyType | Currency type(0-RMB,1-U.S. dollar,2-HKD) | int32 | | | officialBegin | Official IPO start time | string | | | officialEnd | Official IPO closing time | string | | | priceMax | Highest offer price | number | | | priceMin | Lowest offer price | number | | | prospectusLink | Prospectus links | string | | | publishQuantity | Issue of share capital | number | | | publishTime | Announcement of winning date | string | | | qtyAndCharges | Gear information(json array:[{"allotted_amount":The amount of the winning lot,"applied_amount":Subscription amount,"exchange_type":Market type,"shared_applied":Subscription quantity,"stock_code":"IPO amount"," leastCash ":The minimum use of cash corresponding to the gear}]) | array | IpoQtyAndCharges | | allotted_amount | Allotted amount | number | | | applied_amount | Subscription amount | number | | | exchange_type | Market type | int32 | | | leastCash | The minimum use of cash corresponding to the gear | int32 | | | shared_applied | Subscription quantity | number | | | stock_code | IPO code | string | | | remainingTime | Time remaining in subscription (seconds) | int64 | | | serverTime | Server time | string | | | sponsor | Sponsor | string | | | status | IPO status(0-To be subscribed,1-Subscribed,2-To be deducted,3-To be confirmed,4-To be announced,5-To be listed,6-listed,7-Cancel listing,8-Suspension of listing,9-Delayed listing) | int32 | | | statusName | Chinese status name | string | | | stockCode | IPO code | string | | | stockIntroduction | Introduction of stock | string | | | stockName | IPO name | string | | | subscribeWay | Subscription methods, multiple subscriptions use, separated. For example, 1,2 supports cash and margin (1 - public cash subscription, 2 - public margin subscription, 3 - international placement) - this field can determine whether financing subscription is supported | string | | | successRate | Winning rate | number | | | tips | Tips for cash subscription | string | | | totalQuantity | Total share capital | number | | | updateTime | Update time | string | | | msg | Status message | string | |

  • Response example
{

	"code": 0,

	"msg": "操作成功",

	"data": {

		"ipoId": "1143834475048767488",

		"stockCode": "02099",

		"stockName": "中国黄金国际",

		"status": 1,

		"exchangeType": 0,

		"moneyType": 2,

		"handAmount": null,

		"bookingFee": 10,

		"beginTime": "2019-06-25 09:00:00",

		"endTime": "2019-06-27 12:00:00",

		"publishTime": "2019-07-01 00:00:00",

		"listingTime": "2019-07-02 00:00:00",

		"listingPrice": null,

		"priceMin": null,

		"priceMax": 11,

		"financingEndTime": null,

		"interestBeginDate": null,

		"interestEndDate": null,

		"officialBegin": "2019-06-25 09:00:00",

		"officialEnd": "2019-06-28 12:00:00",

		"leastAmount": null,

		"successRate": null,

		"bookingRatio": null,

		"sponsor": "",

		"publishQuantity": null,

		"totalQuantity": null,

		"marketValueMin": null,

		"marketValueMax": null,

		"prospectusLink": "Http://",

		"qtyAndCharges": [{

			"stock_code": "2099",

			"exchange_type": 0,

			"shared_applied": 100,

			"applied_amount": 1111.09,

			"allotted_amount": 0

		}],

		"ipoFinancingRatios": [{

				"stock_code": "2099",

				"exchange_type": 0,

				"financing_amount_begin": 1000,

				"financing_amount_end": 10000,

				"interest_rate": 0.5

			},

			{

				"stock_code": "2099",

				"exchange_type": 0,

				"financing_amount_begin": 10001,

				"financing_amount_end": 20000,

				"interest_rate": 0.7

			}

		],

		"financingMultiple": 3,

		"depositRate": 0.7,

		"financingFee": null,

		"interestDay": 0,

		"interestRate": null,

		"compFinancingSurplus": null,

		"subscribeWay": "1"

	}

}

# 3.3IPO subscription

  • API address /order-center-sg/open-api/apply-ipo

  • Request method POST

  • consumes ["application/json"]

  • produces ["/"]

  • API description ipo subscription

  • Request parameters

Parameter name Description Request type Required Type
Authorization Token information of the header information header true string
X-Lang Language

(1-Simplified Chinese, 2-Traditional Chinese,3-English) | header | true | string | | X-Dt | Device type(t1-android,t2-ios,t3-others,t4-Windows,t5-Mac) | header | true | string | | X-Channel | Channel | header | true | string | | X-Time | Time stamp | header | true | string | | X-Sign | RSA signature | header | true | string | | applyQuantity | Number of subscriptions | body | true | number | | applyType | Subscription type(1-Cash,2-Margin) | body | true | int32 | | ipoId | The unique number of the IPO trading system | body | true | int64 | | serialNo | Serial number, up to 19 digits, ensures that the only recommended snowflake algorithm is generated | body | true | int64 | | cash | Cash subscription (required when margin subscription) | body | false | number |

  • Request header example
Authorization:eyJ0eXAiOiJKV1Qi LCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uIjoiMzIyMzM1ZTc1NTZiNDQzMzkyZWNmZWJmYTYzYjZmMzEiLCJzb3VyY2UiOiJhcHAiLCJ1dWlkIjozNDA1MDIxMzExOTM0ODczNjB9.cvuoahb0h_s1rx57iJBwQn7FNcNfFJ6llCTUlqDTFlD

Content-Type: application/json;charset=UTF-8

X-Dt: 1

X-Lang: 1

X-Request-Id: 928239187123721231232

X-Type: 1

X-Channel:100082

X-Sign:body 使用RSA私钥加密’;
  • Request body example
{

	"applyQuantity": 100,

	"applyType": 1,

	"cash": 0,

	"ipoId": 1133576191818039296,

    "serialNo": 1182189250463484234

}
  • Response status
Status code Description schema
200 OK ResponseVO«IpoApplyResponse»
201 Created
401 Unauthorized
403 Forbidden
404 Not Found
  • Response parameters
Parameter name Description Type schema
code Status code int32
data Return data IpoApplyResponse IpoApplyResponse
applyId apply id string
status Status (0-Submitted,1-Subscribed,2-Wait for modify, 3-Wait for cancel,4-Cancelled,5-Deducted,6-To be announced,7-Selected,8-Partially selected,9-Not selected,10-Subscription failed) int32
msg Status messsage string
  • Response example
{

	"code": 0,

	"msg": "操作成功",

	"data": {

		"applyId": "1182192040986583040",

		"status": 1

	}

}

# 3.4ipo Modify order/Cancel order

  • API address /order-center-sg/open-api/modify-ipo

  • Request mothod POST

  • consumes ["application/json"]

  • produces ["/"]

  • API description ipo modify order/cancel order

  • Request parameters

Parameter name Description Request type Required Type
Authorization Token information of the header information header true string
X-Lang Language (1-Simplified Chinese,

2-Traditional Chinese, 3-English) | header | true | string | | X-Request-Id | The requestId message of the header message, which is 30 bits in length, ensures uniqueness and prevents duplicate submissions to implement the interface power | header | true | string | | X-Channel | Channel | header | true | string | | X-Time | Time stamp | header | true | string | | X-Sign | RSA Signature | header | true | string | | actionType | Operation type 0-Modify,1-Cancel | body | true | int32 | | applyId | Subscription record Id | body | true | int64 | | applyQuantity | Number of subscriptions | body | true | number | | cash | Cash subscription (Change the margin subscription, required) | body | false | number |

  • Request header example
Authorization:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uIjoiMzIyMzM1ZTc1NTZiNDQzMzkyZWNmZWJmYTYzYjZmMzEiLCJzb3VyY2UiOiJhcHAiLCJ1dWlkIjozNDA1MDIxMzExOTM0ODczNjB9.cvuoahb0h_s1rx57iJBwQn7FNcNfFJ6llCTUlqDTFlD

Content-Type: application/json;charset=UTF-8

X-Lang: 1

X-Request-Id: 928239187123721231232

X-Type: 1

X-Channel:100082

X-Sign:body 使用RSA私钥加密
  • Request body example
{

	"actionType": 1,

	"applyId": 1182192040986583040,

	"applyQuantity": 0,

	"cash": 0

}
  • Response status
Status code Description schema
200 OK ResponseVO«IpoApplyResponse»
201 Created
401 Unauthorized
403 Forbidden
404 Not Found
  • Response parameters
Parameter name Description Type schema
code Status code int32
data Return data IpoApplyResponse IpoApplyResponse
applyId Subscription ID string
status Subscription status(0-Submitted,1-Subscribed,2-To be modify, 3-To be cancel,4Cancelled,5-Deducted,6-To be announced,7-All selected,8-Partially selected,9-Not selected,10-Subscription failed) int32
msg Status message string
  • Response example
{

	"code": 0,

	"msg": "操作成功",

	"data": {

		"applyId": "1182192040986583040",

		"status": 4

	}

}

# 3.5Get customer IPO subscription list - paginated query

  • API address /order-center-sg/open-api/ipo-record-list

  • Request method POST

  • consumes ["application/json"]

  • produces ["/"]

  • API description Get customer IPO subscription list

  • Request parameters

Parameter name Description Request type Required Type
Authorization Token information of the header information header true string
X-Lang Language type(1-Simplified Chinese,
2-Traditional Chinese,3-English) header true string
X-Channel Channel header true string
X-Time Time stamp header true string
X-Sign RSA signature header true string
applyTimeMin Subscription start time, format:yyyy-MM-dd HH:mm:ss body false string
applyTimeMax Subscription ending time, format:yyyy-MM-dd HH:mm:ss body false string
pageNum The current page starts at 1 and default value is 1 body false int32
pageSize Number of results per page, default value 10 body false int32
  • Request header example
Authorization:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uIjoiMzIyMzM1ZTc1NTZiNDQzMzkyZWNmZWJmYTYzYjZmMzEiLCJzb3VyY2UiOiJhcHAiLCJ1dWlkIjozNDA1MDIxMzExOTM0ODczNjB9.cvuoahb0h_s1rx57iJBwQn7FNcNfFJ6llCTUlqDTFlD

Content-Type: application/json;charset=UTF-8

X-Lang: 1

X-Type: 1

X-Channel:100082

X-Sign:body 使用RSA私钥加密
  • Requst example
{

	"pageNum": 1,

	"pageSize": 10,

	"applyTimeMin": "2019-10-12 00:00:00",

	"applyTimeMax": "2020-01-30 00:00:00"

}
  • Response status
Status code Description schema
200 OK ResponseVO«PageInfoVO«IpoRecordListResponse»»
201 Created
401 Unauthorized
403 Forbidden
404 Not Found
  • Response parameters
Parameter name
Description
Type schema
code Status code int32
data Return data PageInfoVO«IpoRecordListResponse» PageInfoVO«IpoRecordListResponse»
list Result collection array IpoRecordListResponse
allottedQuantity Allotted quantity number
applyAmount Total subscription amount (including handling fee, excluding interest) number
applyId Application number string
applyQuantity Number of shares subscribed number
applyType Subscription type(1-Cash,2-Margin) int32
applyTypeName Subscription type(1-Cash subscription,2-Margin subscription) string
priceMax Highest offer price number
priceMin Lowest offer price number
listingPrice Final listing price number
cash Cash number
exchangeType Market type(0-HK,5-US) int32
financingAmount Margin interest number
financingBalance Margin amount number
interestRate Margin rate number
labelCode Status label code(0-Pending system confirmation,1-Confirmed,4-Cancelled,6-To be announced,7-Selected,9-Not selceted,10-Subscription failed) int32
moneyType Currendcy type(0-RMB,1-USD,2-HKD) int32
publishTime Announcement date string
listingTime Listing hours(YYYY-MM-DD)
serverTime Server time string
status Subscription status(0-Submitted,1-Subscribed,2-, 3-Pending cancel,4-Cancelled,5-Deducted,6-To be announced,7-Selected,8-Partially selceted,9-Not selected,10-Subscription failed) int32
statusName Subscription status name string
stockCode Stock code string
stockName Stock name string
pageNum Current page int32
pageSize Number per page int32
total Total int64
msg Status message string
  • Response example
{

	"code": 0,

	"msg": "操作成功",

	"data": {

		"pageNum": 1,

		"pageSize": 0,

		"total": 34,

		"list": [{

				"applyId": "1147036407112679424",

				"applyType": 2,

				"applyTypeName": "融资认购",

				"stockName": "香港中華煤氣",

				"stockCode": "00003",

				"exchangeType": 0,

				"status": 10,

				"statusName": "认购失败",

				"applyQuantity": 200,

				"applyAmount": 4140.31,

				"cash": null,

				"financingBalance": null,

				"interestRate": null,

				"priceMin": 10,

				"priceMax": 20,

				"listingPrice": 13,

				"financingAmount": 1.75,

				"allottedQuantity": 0,

				"publishTime": "2019-07-05 00:00:00",

				"serverTime": null,

				"moneyType": 2,

				"labelCode": 10

			},

			{

				"applyId": "1147018860570537984",

				"applyType": 2,

				"applyTypeName": "融资认购",

				"stockName": "香港中華煤氣",

				"stockCode": "00003",

				"exchangeType": 0,

				"status": 4,

				"statusName": "已撤销",

				"applyQuantity": 200,

				"applyAmount": 4140.31,

				"cash": null,

				"financingBalance": null,

				"interestRate": null,

				"priceMin": 10,

				"priceMax": 20,

				"listingPrice": 13,

				"financingAmount": 1.75,

				"allottedQuantity": null,

				"publishTime": "2019-07-05 00:00:00",

				"serverTime": null,

				"moneyType": 2,

				"labelCode": 4

			}

		]
	}

}

# 3.6Get customer IPO subscription details

  • API address /order-center-sg/open-api/ipo-record

  • Request method POST

  • consumes ["application/json"]

  • produces ["/"]

  • API description Get customer IPO subscription details

  • Request parameters

Parameter name Description Request type Required Type
Authorization Token information of the header information header true string
X-Lang Language (1-Simplified Chinese,

2-Traditional Chinese, 3-English) | header | true | string | | X-Time | Time stamp| header | true | string | | X-Sign | RSA siganature | header | true | string | | X-Channel | Channel | header | true | string | | applyId | Subscription number (pass one of them) | body | false | int64 | | serialNo | Serial number (pass one of them) | body | false | int64 |

  • Request header example
Authorization:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uIjoiMzIyMzM1ZTc1NTZiNDQzMzkyZWNmZWJmYTYzYjZmMzEiLCJzb3VyY2UiOiJhcHAiLCJ1dWlkIjozNDA1MDIxMzExOTM0ODczNjB9.cvuoahb0h_s1rx57iJBwQn7FNcNfFJ6llCTUlqDTFlD

Content-Type: application/json;charset=UTF-8

X-Lang: 1

X-Type: 1

X-Channel:100082

X-Sign:body 使用RSA私钥加密
  • Request example
{

"applyId": 1147036407112679424,

"serialNo": 1233123554314

}
  • Reponse status
Status code Description schema
200 OK ResponseVO«IpoRecordResponse»
201 Created
401 Unauthorized
403 Forbidden
404 Not Found
  • Response parameters
Parameter name Description Type schema
code Status code int32
data Return data IpoRecordResponse IpoRecordResponse
allottedQuantity Allotted quantity number
applyAmount Total subscription amount (including handling fee, excluding interest) number
applyId Application number string
applyQuantity Number of shares subscribed number
applyType Subscription type(1-Cash,2-Margin) int32
applyTypeName Subscription type(1-Cash subscription,2-Margin subscription) string
cash Cash number
channel Channel type(1-APP submission,2-Middle office submission,99-Others) int32
createTime Subscription submission time string
deductStatus Deduction status(0-Frozen,1-Deducted,2-Unfrozen) int32
deductStatusName Deduction status name string
endTime Current subscription method deadline string
exchangeType Market type(0-HK,5-US) int32
failReason Reason for subscription failure string
financingAmount Margin interest number
financingBalance Margin amount number
handlingFee handle fee number
interestDay The number of interest-bearing days int32
interestRate Margin rate number
ipoId ipo No. string
ipoStatus IPO status(0-To be subscribed,1-Subscribed,2-To be deducted,3-To be confirmed,4-To be announced,5-To be listing,6-Listed,7-Cancel listing,8-Suspension of listing,9-Delayed listing) int32
labelCode Status label code(0-Pending system confirmation,1-Subscribed,4-Cancelled,6-To be announced,7-Selected,9-Not selected,10-Subscription failed) int32
moneyType Currency type(0-RMB,1-USD,2-HKD) int32
publishTime Announcement date yyyy-MM-dd HH:mm:ss string
refundAmount Amount of the refund number
refundFlag Refund status(0-No refund,1-Pending refunds,2-Refunded) int32
serverTime Server time string
status Subscription status(0-Submitted,1-Subscribed,2-To be modified, 3-To be cancelled,4-Cancelled,5-Deducted,6-To be announced,7-All selected,8-Partially selected,9-Not selected,10-Subscription failed,20Quota application) int32
statusName Subscription status name string
stockCode Stock code string
stockName Stock name string
listingTime Listing time yyyy-MM-dd string
accountCanCancel Whether the account is allowed to be revoked in the APP true-allowed,false-not allowed boolean
cancelDeductInterest Whether interest is deducted for margin withdrawal(0-No interest charge for withdrawals,1-Interest is charged for withdrawals,2-Interest on withdrawal orders is being charged,3-Interest is charged for withdrawals) int32
msg Status message string
  • Response example
{

  "code": 0,

  "msg": "操作成功",

  "data": {

    "applyId": "1178190341147189248",

    "applyType": 1,

    "applyTypeName": "现金认购",

    "stockName": "新城市建设发展",

    "stockCode": "00456",

    "exchangeType": 0,

    "status": 4,

    "statusName": "已撤销",

    "applyQuantity": 1900.00,

    "applyAmount": 34544.6300,

    "cash": null,

    "financingBalance": null,

    "interestRate": null,

    "financingAmount": 0.0000,

    "allottedQuantity": null,

    "publishTime": "2019-10-03 00:00:00",

    "serverTime": "2019-11-01 20:33:55",

    "moneyType": 2,

    "labelCode": 4,

    "createTime": "2019-09-29 14:10:42",

    "deductStatus": 2,

    "deductStatusName": "已解冻",

    "refundFlag": 0,

    "refundAmount": null,

    "handlingFee": 0.0000,

    "failReason": null,

    "endTime": "2019-09-30 11:18:00",

    "ipoId": "1178148950262435840",

    "interestDay": 0,

    "channel": 1,

    "listingTime": "2019-10-04",

    "ipoStatus": 6

  }

}

# 3.7Confirm the number of cash subscriptions when the quota is insufficient

  • API address /order-center-sg/open-api/ipo-comfirm-qyt/v1

  • Request method POST

  • consumes ["application/json"]

  • produces ["/"]

  • API description Confirm the number of cash subscriptions when the quota is insufficient

  • Request parameters

Parameter name Description Request type Required Type
Authorization Token information of the header information header true string
X-Lang Language (1-Simplified Chinese,2-Traditional Chinese,3-English) header true string
X-Time Time stamp header true string
X-Sign RSA signature header true string
X-Channel Channel header true string
applyId Subscription No. query true integer
noQuotaCashFlag Whether cash subscription is required(0-No,1-Yes) query true integer
confirmBy Confirm source,1-ipo subscription,2-ipo modify,3-ipo details modify query true integer
noQuotaCashQuantity Subscription quantity,required for noQuotaCashFlag=1 query false number
  • Request example
{

  "applyId": "1249718975670743040",

  "noQuotaCashFlag":0

}
  • Response status
Status code Description
200 OK
201 Created
401 Unauthorized
403 Forbidden
404 Not Found
  • Response parameters
Parameter name Description Type schema
code Status code integer(int32) integer(int32)
msg
  • Response example
{

  "code": 0,

  "msg": "操作成功",

}

# 4 Records of funds

# 4.1Query the exchange rate

  • API address /capital-center-sg/open-api/currency-exchange-info

  • Request method POST

  • consumes ["application/json"]

  • produces ["/"]

  • API description

  • Request header example

Authorization:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uIjoiMzIyMzM1ZTc1NTZiNDQzMzkyZWNmZWJmYTYzYjZmMzEiLCJzb3VyY2UiOiJhcHAiLCJ1dWlkIjozNDA1MDIxMzExOTM0ODczNjB9.cvuoahb0h_s1rx57iJBwQn7FNcNfFJ6llCTUlqDTFlD

Content-Type: application/json;charset=UTF-8

X-Lang: 1

X-Type: 1

X-Channel:100082

X-Sign:body 使用RSA私钥加密
  • Request parameters
Parameter name Description Request type Required Type
Authorization Token information of the header information header true string
X-Lang Language (1-Simplified Chinese,2-Traditional Chinese,3-English) header true string
X-Time Time stamp header true string
X-Sign RSA signature header true string
X-Channel Channel header true string
  • Response status
Status code Description schema
200 OK CapitalResponseVO«FetchExchangeRateResp»
201 Created
401 Unauthorized
403 Forbidden
404 Not Found
  • Response parameters
Parameter name Description Type
code Stauts code int32
data Return data array
baseMoneyType Base currency,0:RMB 1:USD 2:HKD int32
sourceCurrency Source currency,0:RMB 1:USD 2:HKD int32
targetCurrency Target currency,0:RMB 1:USD 2:HKD int32
yxBuyRate uSMART buy exchange rate number
yxSellRate uSMART sell exchange rate number
bocSellRate BOA sell exchange rate number
bocBuyRate BOA buy exchange rate number
msg Status message string
  • Response example
{

 "code": 0,

 "msg": "操作成功",

 "data": [

  {

   "sourceCurrency": 1,

   "targetCurrency": 2,

   "yxSellRate": 7.842,

   "yxBuyRate": 7.8133,

   "bocSellRate": 7.842,

   "bocBuyRate": 7.8133,

   "baseMoneyType": 1

  },

  {

   "sourceCurrency": 0,

   "targetCurrency": 2,

   "yxSellRate": 90.335,

   "yxBuyRate": 91.235,

   "bocSellRate": 90.33,

   "bocBuyRate": 91.24,

   "baseMoneyType": 0

  },

  {

   "sourceCurrency": 1,

   "targetCurrency": 0,

   "yxSellRate": 7.0817,

   "yxBuyRate": 7.0148,

   "bocSellRate": 7.0817,

   "bocBuyRate": 7.0148,

   "baseMoneyType": 1

  }

 ]

}

# 4.2Get the history record

  • API address /capital-center-sg/open-api/business-flow

  • Request method POST

  • consumes ["application/json"]

  • produces ["/"]

  • API description

  • Request example

{

	"dateType": 9,

	"pageNum": 1,

	"pageSize": 10,

	"startTime": "2020-05-09 00:00:00",

	"endTime": "2020-12-24 23:59:59",

	"type": -1

}
  • Request parameters
Parameter name Description Request type Required Type
Authorization Token information of the header information header true string
X-Lang Language (1-Simplified Chinese,

2-Traditional Chinese, 3-English) | header | true | string | | X-Channel | Channel ID,distributed by uSMART | header | true | string | | X-Time | Time stamp | header | true | string | | X-Sign | RSA signature | header | true | string | | dateType | -1,All0,Nearly one months1,Nearly three months2,Nearly a year3,This year9 ,Customize | body | false | int32 | | startTime | Start time,passes when data-9 | body | false | date-time | | endTime | Ending time,passes when data-9 | body | false | date-time | | pageNum | Current page,starts from 1 | body | true | int32 | | pageSize | The number of results per page | body | true | int32 | | type | 0-Deposit,1-Withdrawal,2-Currency exchange. If do not pass, query all | body | false | int32 |

  • Response status
Status code Description
200 OK
201 Created
401 Unauthorized
403 Forbidden
404 Not Found
  • Response parameters
Parameter name Description Type
code Status code int32
list Result collection array
applyTime Occurence time string
businessId Business ID string
businessStatus Business status Deposit:Deposit status 0void ,10Client deposit application,20Pending initial matching,23Initial matching failed,25The final trial was dismissed to Finance,30Pending customer service confirmation,40Pending final review,51Refusal to the customer,52No Pass, No Refund (Final), 60Pending deposit,62Processing, more than 10 minutes of scheduled tasks to make up the results,63The deposit fails and requires manual intervention,64Deposit Successful (Final),70Pending refunds,73The refund failed and required human intervention,74Refund Successful (Final). Status >=40 cannot be cancelled int32
occurBalance The amount of the notification of the deposit, the withdrawal amount of the withdrawal, the exchange amount of the exchange string
postBalance The actual amount of the deposit and the exchange result of the exchange string
reason Reasons for rejection string
statusDesc Description of status 1Successful,2Failed,3Processing,10Pending,11Processing,12Exported,13Withdrawal failed,14Cancelled,15Rejected,20Processing,21Received,22Deposit failed,30Rejected,40Pending refund,41已退款,42 " Refund failed string
statusValue Status value int32
title Title,eg. transferring to Hong Kong dollars, Hong Kong dollars against US dollars string
type Type string
pageNum Current page int32
pageSize Number per page int32
systemDate Current time of the system yyyy-MM-dd string
total Total int32
error Error details string
msg Stauts message string
  • Resnponse example
{

  "code": 0,

  "data": {

    "list": [

      {

        "applyTime": "2020-05-09 16:15:38",

        "businessId": "776607442319044608",

        "businessStatus": null,

        "occurBalance": "1000.00港币",

        "postBalance": "",

        "reason": "",

        "statusDesc": "待处理",

        "statusValue": 10,

        "title": "提取 港币",

        "type": "1"

      },

      {

        "applyTime": "2020-04-16 15:59:15",

        "businessId": "768268401176485888",

        "businessStatus": 23,

        "occurBalance": "20000.00港币",

        "postBalance": "",

        "reason": "",

        "statusDesc": "处理中",

        "statusValue": 20,

        "title": "转入 港币",

        "type": "0"

      }

    ],

    "pageNum": 1,

    "pageSize": 10,

    "systemDate": "2020-05-09",

    "total": 2

  },

  "msg": "成功"

}

# 4.2Client withdrawal cancellation

  • API address /capital-center-sg/open-api/app-cashOut-revoke

  • Request method POST

  • consumes ["application/json"]

  • produces ["/"]

  • API description

  • Request example

{

  "id": 768268401176485888

}
  • Request parameters
Parameter name Description Reuqest type Required Type
Authorization Token information of the header information header true string
X-Lang Language (1-Simplified Chinese,
2-Traditional Chinese,3-English) header true string
X-Channel Channel ID,distributed by uSMART header true string
X-Time Time stamp header true string
X-Sign RSA signature header true string
id id body true int64
  • Response status
Status code Description
200 OK
201 Created
401 Unauthorized
403 Forbidden
404 Not Found
  • Response parameters
Parameter name Description Type
code Status code int32
data Return data
error Error details string
msg Status message string
  • Response example
{

  "code": 0,

  "data": null,

  "msg": "成功"

}

# 5 Data dictionary

# 5.1Order Status(Status)

No. Stauts
-1 failed
0 Filled
1 Submitting
2 Pending
3 Partially filled
4 Cancelling
5 Pending modify
6 Cacelled
7 Partially cancelled
8 Void order

# 5.2Market type(ExchangeType)

No. Market
0 Hongkong stock
1 Shanghai A-share
2 Shanghai B-share
3 Shenzhen A-share
4 Shenzhen B-share
5 U.S. stock
6 Shanghai-Hong Kong Stock Connect
7 Shenzhen-Hong Kong Stock Connect
67 A-share(Used for queries)
100 All market(Used for queries)

# 5.3IPO status(Status)

No. Status
0 To be subscribed
1 Subscribed
2 To be deducted
3 To be confirmed
4 To be announced
5 To be listing
6 Listed
7 Cancel listing
8 Suspension of listing
9 Delayed listing
11 Deleted

# 5.4IPO Subscription status(Status)

No. Status
0 Submitted
1 Subscribed
2 To be modify
3 To be cancel
4 Cancelled
5 Deducted
6 To be announced
7 All selected
8 Partialy selected
9 Not selceted
10 Subscription failed
11 Selected
12 Pending system confirmation
20 Applying for quota

# 5.5Currency type(moneyType)

No. Currency
0 RMB
1 USD
2 HKD

# 5.6Device type(X-Dt)

No. Device type
t1 Android
t2 Ios
t3 Others
t4 Windows
t5 Mac

# 5.7Account type(AssetProp)

No. Account type
0 Cash account
M Margin account

# 6 Margin

# 6.1Get the list of stock margin ratios

  • API address /order-center-sg/open-api/mortgage-list

  • Request method POST

  • consumes ["application/json"]

  • produces ["/"]

  • API description Get the list of stock margin ratios(No login required)

  • Request parameters

Parameter name Description Request type Required Type
Authorization Token information of the header information header true string
X-Lang Language (1-Simplified Chinese,

2-Traditional Chinese, 3-English) | header | true | string | | X-Channel | Channel | header | true | string | | X-Time | Time stamp | header | true | string | | X-Sign | RRSA signature | header | true | string | | exchangeType | Market:0-Hongkong stock,5-U.S. stock,67-A-share,100-all | body | false | int32 | | stockCode | Stock code | body | false | string | | status | Stauts:1-Effective 0-Off shelve, default value is 1 | body | false | int32 | | pageSizeZero | Whether not to page apart, false by default | body | false | boolean | | pageNum | The current page starts at 1, with a default value of 1 | body | false | int32 | | pageSize | Number page, default value 10, maximum 20 | body | false | int32 |

  • Request header example
Authorization:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uIjoiMzIyMzM1ZTc1NTZiNDQzMzkyZWNmZWJmYTYzYjZmMzEiLCJzb3VyY2UiOiJhcHAiLCJ1dWlkIjozNDA1MDIxMzExOTM0ODczNjB9.cvuoahb0h_s1rx57iJBwQn7FNcNfFJ6llCTUlqDTFlD

Content-Type: application/json;charset=UTF-8

X-Lang: 1

X-Type: 1

X-Channel:100082

X-Sign:body 使用RSA私钥加密
  • Request body example
{

	"exchangeType": 0,

	"pageNum": 1,

	"pageSize": 10,

	"stockCode": "",

  "pageSizeZero":true,

  "status":1

}
  • Response status
Status code Description schema
200 OK ResponseVO<PageInfoVO<MortgageOpenApiResp>>
201 Created
401 Unauthorized
403 Forbidden
404 Not Found
  • Response parameters
Parameter name
Description
Type schema
code Status code int32
data Return data ResponseVO<PageInfoVO<MortgageOpenApiResp>> ResponseVO<PageInfoVO<MortgageOpenApiResp>>
list Results collection array MortgageOpenApiResp
beginTime Effective Date string(date-time)
effectiveTime Valid deadlineyyyy-MM-dd HH:mm:ss string(date-time)
exchangeType Market(0-Hongkong Stock 5-U.S. stock 6-Shanghai-Hong Kong Stock Connect 7-Shenzhen-Hong Kong Stock Connect) int32
exchangeTypeName Market name string
mortgageRatio Margin rate string
status Record status 1-In effect 0-Off shelve int32
statusName Record status name string
stockCode Stock code string
stockName Stock name string
pageNum Current page int32
pageSize Number per page int32
total Total int64
msg Status message
  • Response example
{

 "code": 0,

 "msg": "操作成功",

 "data": {

  "pageNum": 1,

  "pageSize": 10,

  "total": 2,

  "list": [

   {

    "exchangeType": 6,

    "exchangeTypeName": "沪港通",

    "stockName": "贵州茅台",

    "stockCode": "600519",

    "mortgageRatio": "60.00%",

    "beginTime": "2020-10-27",

    "effectiveTime": "2099-12-31",

    "status": 1,

    "statusName": "生效中"

   },

   {

    "exchangeType": 6,

    "exchangeTypeName": "沪港通",

    "stockName": "上海临港",

    "stockCode": "600848",

    "mortgageRatio": "10.00%",

    "beginTime": "2020-10-27",

    "effectiveTime": "2099-12-31",

    "status": 1,

    "statusName": "生效中"

   }

  ]

 }

}