You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Thank you for your attention I think I did it did you mean that ?
I checked from online json validator It says valid
It's maybe valid but you will not be able to parse it as you like, because this is monolithic.
"BITSTAMP:{{USDJPY}}, Price = {{buy}}, Volume = {{144.7899}}"
Look at Lorentzos example above.
Okay can you explain more detail? how can I parse as I want? what is the monolithic?
For instance , how did you code the symbol return in the trading view alert ?
If you can remove the brackets , that would be the first step as it is my understanding that the symbol is "BITSTAMP:USDJPY"
i'll explain it a bit better
"content" is an object that contains
BITSTAMP:{{USDJPY}}, Price = 30278, Volume = {{144.7899}}
you will be able to ask for ["content"] but you wont be able to ask for ["content"]["price"] or ["content"]["volume"] this way.
You would need to do additional ninja stuff but if you format it right from the beggining you are good to go
Okay can you explain more detail? how can I parse as I want? what is the monolithic?
You need a valid JSON and a "field" for each value.
"BITSTAMP:{{USDJPY}}, Price = {{buy}}, Volume = {{144.7899}}"
Monolithic means a parser will consider this as 1 value due to the quotessurrounded the whole, and will not parse what is inside.
Please learn about JSON, Lorentzos gave you the link. It's beyond the purpose of this forum to explain that in details here.
This line should simply be something like :
i'll explain it a bit better
"content" is an object that contains
you will be able to ask for ["content"] but you wont be able to ask for ["content"]["price"] or ["content"]["volume"] this way.
You would need to do additional ninja stuff but if you format it right from the beggining you are good to go
He needs to understand to JSON format to start with, otherwise it's waste of time. I will let you continue if you like.
Yeah , he kinda does because the {{USDJPY}} indicates he is trying to alter the alert from trading view , if i'm not mistaken .
It could also be the bitstamp api though .As Alain said your format must be something like this :
The content sent by trading view ,you will also need the direction of the signal to be sent.
This may also help
https://www.w3schools.com/js/js_json_intro.asp
hey guys as you told I solved the content part in the json is there anything wrong? Let it check please.