This project provides restful API access to manage tradingview script access management. This is intended to be used by vendors along with appropriate security and other workflow management tools for automation of access management.
- username - Your tradingview username
- password - Your tradingview password
https://Tradingview-Access-Management.[YOUR_REPL_ACCOUN].repl.coOnce up and running, you will be able to use following calls to manage Tradingview access. Can be used to validate username. This can be handy operation to execute before trying to execute access management for the user. If user is not valid, we can stop the workflow then and there.
- Payload - None
- Headers - None
- Returns - JSON output with following information:
- validUser - Can be true or false. Tells whether username passed is valid or not.
- verifiedUserName - returns the exact username as in Tradingview records (along with matching case). If validUser is false, this field will also have blank value.
{ "validuser": true, "verifiedUserName": "Trendoscope" }This method can be used to get the current access level of user for particular publications identified by pine_ids
- Payload - Json Payload containing list of pine ids
- pine_ids - Array of pine ids. Pine ids are backend unique ids for each script. We can get these ids from browser developer console when script is loaded or when access methods are performed on the tradingview UI. Please note, only Pine Ids for scripts which belong to your account will work in this way. You will not be able to control the access to scripts which are not yours.
- Headers - None
- Returns - JSON output array with following information:
- pine_id - Pine publication id which is sent as input to the API request
- username - Username against which the operation is performed.
- hasAccess - true if user already has access to script. false otherwise
- noExpiration - true if user has non expiring access to script. false otherwise
- currentExpiration - applicable only if hasAccess is true and noExpiration is false. Ignore otherwise.
{ "pine_ids" : ["PUB;3be120ba74944ca7b32ad644f40aaff2", "PUB;2cb3ba84ce4443049f21659a3b492779"] }
[ { "pine_id": "PUB;3be120ba74944ca7b32ad644f40aaff2", "username": "trendoscope", "hasAccess": false, "noExpiration": false, "currentExpiration": "2022-08-17 06:27:49.067935+00:00" }, { "pine_id": "PUB;2cb3ba84ce4443049f21659a3b492779", "username": "trendoscope", "hasAccess": false, "noExpiration": false, "currentExpiration": "2022-08-17 06:27:49.196514+00:00" } ]This method can be used to remove the current access level of user for particular publications identified by pine_ids
- Payload - Json Payload containing list of pine ids
- pine_ids - Array of pine ids. Pine ids are backend unique ids for each script. We can get these ids from browser developer console when script is loaded or when access methods are performed on the tradingview UI. Please note, only Pine Ids for scripts which belong to your account will work in this way. You will not be able to control the access to scripts which are not yours.
- Headers - None
- Returns - JSON output array with following information:
- pine_id - Pine publication id which is sent as input to the API request
- username - Username against which the operation is performed.
- hasAccess - true if user had access to script before removing access. false otherwise
- noExpiration - true if user had non expiring access to script before removing access. false otherwise
- status - Status of the remove operation
{ "pine_ids" : ["PUB;3be120ba74944ca7b32ad644f40aaff2", "PUB;2cb3ba84ce4443049f21659a3b492779"] }
[ { "pine_id": "PUB;3be120ba74944ca7b32ad644f40aaff2", "username": "trendoscope", "hasAccess": true, "noExpiration": true, "currentExpiration": "2022-08-17 06:28:49.655286+00:00", "status": "Success" }, { "pine_id": "PUB;2cb3ba84ce4443049f21659a3b492779", "username": "trendoscope", "hasAccess": true, "noExpiration": true, "currentExpiration": "2022-08-17 06:28:49.923866+00:00", "status": "Success" } ]This method can be used to add/update current access level of user for particular publications identified by pine_ids.
- Payload - Json Payload containing list of pine ids
- pine_ids - Array of pine ids. Pine ids are backend unique ids for each script. We can get these ids from browser developer console when script is loaded or when access methods are performed on the tradingview UI. Please note, only Pine Ids for scripts which belong to your account will work in this way. You will not be able to control the access to scripts which are not yours.
- duration - String representing duration. Example, "7D" = 7 days, "2M" = 2 months, "1L" = Lifetime etc
- Headers - None
- Returns - JSON output array with following information:
- pine_id - Pine publication id which is sent as input to the API request
- username - Username against which the operation is performed.
- hasAccess - true if user already has access to script. false otherwise
- noExpiration - true if user has non expiring access to script. false otherwise
- currentExpiration - applicable only if hasAccess is true and noExpiration is false. Ignore otherwise.
- expiration - New expiration applied after applying access update.
- status - Status can be Success, Failure, or Not Applied. Not Applied will be returned if user already has lifetime access to given script and no further addition is possible.
{ "pine_ids" : ["PUB;3be120ba74944ca7b32ad644f40aaff2", "PUB;2cb3ba84ce4443049f21659a3b492779"], "duration" : "7D" }
[ { "pine_id": "PUB;3be120ba74944ca7b32ad644f40aaff2", "username": "trendoscope", "hasAccess": true, "noExpiration": true, "currentExpiration": "2022-09-17T06:28:25.933303+00:00", "expiration": "2022-09-17T06:28:25.933303+00:00", "status": "Success" }, { "pine_id": "PUB;2cb3ba84ce4443049f21659a3b492779", "username": "trendoscope", "hasAccess": true, "noExpiration": true, "currentExpiration": "2022-09-17T06:28:26.191805+00:00", "expiration": "2022-09-17T06:28:26.191805+00:00", "status": "Success" } ]
If you found this project interesting or useful, create accounts with my referral links: