Support Board
Date/Time: Sun, 24 Nov 2024 16:29:44 +0000
Sierra Chart API Error
View Count: 432
[2024-05-17 00:01:08] |
TPH_Main - Posts: 13 |
I am receiving "Error: unable to verify the first certificate" when adding/removing users to custom study groups. I am checking now to see if the error is on my end, but I haven't changed anything.
|
[2024-05-17 00:17:01] |
TPH_Main - Posts: 13 |
Same error on local machine trying to make requests as well. Thanks! |
[2024-05-17 05:31:05] |
Sierra_Chart Engineering - Posts: 17156 |
We do not see this ourselves. We did update a security certificate. Try restarting your browser and clearing your browser's cache.
Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |
[2024-05-17 11:47:47] |
TPH_Main - Posts: 13 |
The control panel on Sierra Chart works fine for adding/removing users. The API no longer works. I am still having the same error this morning.
|
[2024-05-17 13:01:08] |
User907968 - Posts: 823 |
The API no longer works. I am still having the same error this morning.
Same problem for me also. |
[2024-05-17 13:39:18] |
Sierra_Chart Engineering - Posts: 17156 |
You are referring to the API itself. Not the webpage. We will check on that.
Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |
[2024-05-17 16:03:52] |
Sierra Chart - Max - Posts: 5730 |
How are you accessing the api?
Sierra Chart Support |
[2024-05-17 16:17:22] |
TPH_Main - Posts: 13 |
I get errors making the request locally on Postman (just a way to send requests) as well as through my automated implementation running on a server.
|
[2024-05-17 16:23:00] |
TPH_Main - Posts: 13 |
obviously changed the variables curl --location --request POST 'https://www.sierrachart.com/API.php?AdminUsername=enterusername&AdminPassword=enterpassword&Service=CustomDLLStudiesManagement&SCDLLName=TPH%20Custom%20Studies&Action=add&UserSCUsername=entergiveusername' |
[2024-05-17 16:48:46] |
Sierra Chart - Max - Posts: 5730 |
We have tested curl, and we do not see the stated issue. Can you confirm that your computer clock is set correctly? curl -I 'https://sierrachart.com/API.php'
HTTP/2 200 content-type: text/html; charset=UTF-8 date: Fri, 17 May 2024 16:44:01 GMT server: Apache x-content-type-options: nosniff x-frame-options: sameorigin x-xss-protection: 1; mode=block curl 'https://sierrachart.com/API.php' ERROR: Call not supported. Contact Sierra Chart support (support@sierrachart.com) for help with this.⏎ curl -V curl 8.4.0 (x86_64-apple-darwin23.0) libcurl/8.4.0 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.12 nghttp2/1.58.0 Release-Date: 2023-10-11 Sierra Chart Support |
[2024-05-17 17:00:35] |
Sierra Chart - Max - Posts: 5730 |
We do see that there was an issue with the following version of curl 7.81.0. So at the moment we have reverted to the older cert which fixes the issue. We will need to see why the new certificate does not work with older version of curl. Sierra Chart Support |
[2024-05-17 17:02:03] |
TPH_Main - Posts: 13 |
Yes it is. - I should clarify that when running curl from terminal the error is actually "ERROR: SCDLLName not set" but it very clearly is set. When i make the request in Postman you can see the certificate error (attached image) which is also what the implementation on the server returns. |
Attachment Deleted. Private File |
[2024-05-17 17:12:21] |
Sierra Chart - Max - Posts: 5730 |
The curl command in post 9 is not setting the SCDLLName properly. Note the the documentation specifies it to be sent as a post, but you are sending it as a get (part of the URL). To send data as a post you need to use -d with curl https://curl.se/docs/manpage.html#-d Sierra Chart Support Date Time Of Last Edit: 2024-05-17 17:22:01
|
[2024-05-17 17:14:18] |
User907968 - Posts: 823 |
We do see that there was an issue with the following version of curl 7.81.0. So at the moment we have reverted to the older cert which fixes the issue. We will need to see why the new certificate does not work with older version of curl. Thank you, working again for me (via curl). |
[2024-05-17 17:20:15] |
TPH_Main - Posts: 13 |
Working for me as well. Thanks
|
[2024-05-17 17:22:23] |
User719512 - Posts: 263 |
To add on here, there are API errors from Python as well where requests does not work, but urllib3 does. requests gives SSL errors unless you turn off verify (strongly discouraged of course!). NOTE: looks like your form/site is trying to make the "CODE" with a Sierra URL into a link. previously worked now broken: with requests.Session() as session: for sierra_dll in sierra_dlls: if True: url = 'https://www.sierrachart.com/API.php' payload = { 'AdminUsername': username, 'AdminPassword': password, 'Service': 'CustomDLLStudiesManagement', 'SCDLLName': sierra_dll, 'Action': 'GetAllUsersForDll' } # Use the post method to send a POST request !!!broken response = session.post(url, data=payload) !!!workaround response = session.post(url, data=payload, verify=False) this code works and must use some different cert chain verification: http = urllib3.PoolManager() resp = http.request( 'POST', 'https://www.sierrachart.com/API.php', fields={ 'AdminUsername' : username, 'AdminPassword' : password, 'Service' : 'CustomDLLStudiesManagement', 'SCDLLName' : sierra_dll, 'Action' : 'GetAllUsersForDll', } ) json_data = json.loads(resp.data) |
To post a message in this thread, you need to log in with your Sierra Chart account: