Restful API access for managing tradingview indicator access. Follow below steps to install and run the API service Only environment variables to be updated are:
- username - Your tradingview username
- password - Your tradingview password
- 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": "ApolloAlgo" }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;0fc414298ba34d61866a7817b6eec7b4", "PUB;b48044bbad454132bbcd3aa51807da96"] }
[ { "pine_id": "PUB;0fc414298ba34d61866a7817b6eec7b4", "username": apolloalgo", "hasAccess": false, "noExpiration": false, "currentExpiration": "2023-07-17 06:27:49.067935+00:00" }, { "pine_id": "PUB;b48044bbad454132bbcd3aa51807da96", "username": "apolloalgo", "hasAccess": false, "noExpiration": false, "currentExpiration": "2023-07-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;0fc414298ba34d61866a7817b6eec7b4", "PUB;b48044bbad454132bbcd3aa51807da96"] }
[ { "pine_id": "PUB;0fc414298ba34d61866a7817b6eec7b4", "username": "apolloalgo", "hasAccess": true, "noExpiration": true, "currentExpiration": "2023-07-17 06:28:49.655286+00:00", "status": "Success" }, { "pine_id": "PUB;b48044bbad454132bbcd3aa51807da96", "username": "apolloalgo", "hasAccess": true, "noExpiration": true, "currentExpiration": "2023-07-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.
- 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;0fc414298ba34d61866a7817b6eec7b4", "PUB;b48044bbad454132bbcd3aa51807da96"] }
[ { "pine_id": "PUB;0fc414298ba34d61866a7817b6eec7b4", "username": "apolloalgo", "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;b48044bbad454132bbcd3aa51807da96", "username": "apolloalgo", "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: