STEX API v3 implements the openapi 3.0 standard. Its documentation is located at https://apidocs.stex.com/
This is Swagger UI that allows to test API endpoints along with providing its description.
Modern STEX API (v3) uses OAuth 2 to authenticate users for private endpoints.
In order to start using the API you have to create API client in your profile settings located at https://app.stex.com/en/profile/settings
You’ll find a button allowing you to create the new API 3 client:
Click it to open the form asking you to provide information required to create the new client:
Please fill any meaningful value for “Client Name” like “My STEX API 3 client”, put https://apidocs.stex.com/oauth2-redirect.html as a value for Redirect URLs. Note, you can pass several URLs separated by comma here.
Hit the “Save” button. Now you have to see your client in the clients list area of the profile settings like this:
So, you’re ready to open Swagger UI, obtain the access token and try the new API.
Swagger UI is located at https://apidocs.stex.com/. Open this url. You will see the following:
Click the “Authorize” button
The form will open, fill it similar to the following screenshot:
Fill in the values.
Client ID: the Client ID value that is shown in your profile settings API3 client
Client Secret: the value shown in your profile settings API3 client
!Please be careful with the next parameter. Consider using different access tokens for different scopes, especially for withdrawals. Better to have different tokens for different scopes - this is more secure!
Scopes: choose at least one of trade | profile | reports | push | withdrawal. This parameter determines the scope(s) the obtained access token will have access to.
Check the form, be careful to fill everything correct. After that click “Authorize”
The OAuth authentication flow will run as usual - the Swagger UI will open the browser window, ask you to login then to enter your two factor code:
Do this as usual. After successful login you’ll be prompted to authorize the Swagger’s request for access token:
This window will list all the scopes descriptions you requested. Hit the green Authorize button to proceed.
You should see the following window:
Now just click the “Close” button and you’re ready to use the Swagger UI to try making requests to STEX Api v3
Click the “Try it now” button.
Then fill in the parameters if needed and click “Execute”:
The results will look like this:
AND AGAIN: Please be careful with requesting scopes. Consider using different access tokens for different scopes, especially for withdrawals.