Connection guide
Last updated
Last updated
Service name | Endpoint |
---|---|
FCTrading API | https://fc-tradeapi.ssi.com.vn |
FCTrading Streaming | https://fc-tradehub.ssi.com.vn |
After registration, you can create the API connection keys (refer here).
ConsumerID
ConsumerSecrect
PrivateKey: used to create Signature. Refer here for more details.
To secure your account activities, authentication code is required together with ConsumerID and ConsumerSecret when you request access token. Authentication code is dependent on the authentication method you registered:
PIN: Input your PIN code.
SMS OTP: Use function GetOTP to get OTP code. OTP code will be sent to your registered mobile number.
Email OTP: Use function GetOTP to get OTP code. OTP code will be sent to your registered email address.
Smart OTP: Input OTP code from SSI SmartOTP app or iBoard app depending on which app you have activated the service.
We recommend you use SMS OTP or SmartOTP for security enhancement. PIN will soon be out of support.
Regarding query functions, only access token is required for authentication before executing the request.
Regarding functions impacting to cash/securities (place/amend/cancel orders, internal transfer, right subscription, stock transfer, initial margin deposit/withdraw), you will need to sign the data by the Private Key provided. Refer here for details of Signature.
Access token is valid within 8h. You cannot access our service with an expired token. Remember to renew access token before it expires to make sure the availability of your system.
When requesting access token, you can choose to save the effective period of the authentication code.
If you choose to save, you will not need to enter authentication code when executing transactions related to cash/securities.
If you don't choose to save, you will need to enter authentication
To use streaming update, you need to init the connection and bind to subcribe for different type of data.
Notes:
notify_id is the sequential order of the streaming messages. When init connection, you need to set value for notify_id.
notify_id = 0: the system will return all messages from the beginning of the day
notify_id = -1: the system will return update messages after connected.
notify_id = n: the system will return messages from n, with n equal to the sequence number of the last message received before disconnection + 1.
During connected time, you should store this id, which will be used in case of disconnection.
FastConnect system will reset notify_id to 0 at 00:00 daily.
Order update
Derivatives portfolio update