Skip to main content

Create API key for User

HTTP Request

POST /v1/api-key/create

Authorization: Bearer {access_token}

Request Parameters

NameTypeMandatoryDescription
apiNameSTRINGYEScustom api name, can be repeated
enableTradeBOOLEANYEStrue or false
enableFutureTradeBOOLEANYEStrue or false
enableMarginBOOLEANNOtrue or false. If it's not sent or the user doesn't have Margin account, it will be false by default.
enableEuropeanOptionsBOOLEANNOtrue or false. If it's not sent or the user doesn't have Options account, it will be false by default.
statusENUMNO1 or null = Access IP unrestricted, 2 = Trusted IPs only, 3 = Trusted Third Party IPs only. If you want to enable any Trade permission(including Spot, Margin or Futures), you must restrict the IP access.
ipAddressSTRINGNOTrusted IPs. Can be added in batches, separated by commas. Max 30 for an API key
thirdPartyNameSTRINGNOThird party name must match the name in the server side.
publicKeySTRINGYESYour custom public key. The server side will use it to encrypt the apikey, and client decrypts with a private key. Use RSA algorithm, the keysize is customized with client, usually 1024 or 2048 (Reference).

Response Example

{
"code": "000000",
"message": null,
"data": {
"apiKey": "ZN02rGiWOE6*****yjOZg==",
"apiName": "testoauth1",
"secretKey": "rH1cO1374UhZXfn2*********3EJjg/JT6gg==",
"enableTrade": true,
"enableFutureTrade": true,
"enableMargin": false,
"enableEuropeanOptions": true,
"createTime": 1717746281067
},
"success": true
}