-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A JSONObject text must begin with '{' at 1 [character 2 line 1] #24
Comments
Full output of api server
|
What a mess, found it, you can't just type in the values, but need to add a lot of \t and \n to the string. |
And no it is actually related to takeProdit and stopLoss values... What exactly are those? Make sure that "takeProfit" and "stopLoss" have valid values. |
Hi,
Check your takeProfit rate. It seemsto be less than btc price, which is more than 30000$ now.
Am 29.01.2021 um 09:29 schrieb Justin Güse <notifications@github.com>:
Hey, when trying out the demo buy I'm getting the error A JSONObject text must begin with '{' at 1 [character 2 line 1]
Command is exactly like in the readme
curl -X POST \ http://localhost:8088/etoro-api/positions/open \ -H 'Content-Type: application/json' \ -H 'mode: Demo' \ -d '{ "name": "btc", "type": "BUY", "amount": 100, "leverage": 1, "takeProfitRate": 13000, "stopLossRate": 1000 }'
Any ideas? Running ubuntu 20.04
openjdk 11.0.9.1 2020-11-04
OpenJDK Runtime Environment (build 11.0.9.1+1-Ubuntu-0ubuntu1.20.04)
OpenJDK 64-Bit Server VM (build 11.0.9.1+1-Ubuntu-0ubuntu1.20.04, mixed mode, sharing)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#24>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADHNNVXSOO4FNIBY7BE6GXLS4JWVLANCNFSM4WYO4QSQ>.
|
It’s not percentage, it’s assets price
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
From: Justin Güse<mailto:notifications@github.com>
Sent: Friday, January 29, 2021 9:48 AM
To: ok24601/etoro-api<mailto:etoro-api@noreply.github.com>
Cc: Subscribed<mailto:subscribed@noreply.github.com>
Subject: Re: [ok24601/etoro-api] A JSONObject text must begin with '{' at 1 [character 2 line 1] (#24)
And no it is actually related to takeProdit and stopLoss values... What exactly are those?
I think the error is thrown if the stopLoss is outside the range of 1-100. Is it the percentage of stop loss?
Like 60 --> Stop loss at 60% of the buy price?
Does the same go for takeProfit?
Make sure that "takeProfit" and "stopLoss" have valid values.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#24 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADHNNVULGD7HMZRIFTOSE5DS4JY7BANCNFSM4WYO4QSQ>.
|
Error! InventarioDAO - findxNombre: org.json.JSONException: A JSONObject text must begin with '{' at 1 [character 2 line 1] can you help me |
Error! InventarioDAO - findxNombre: org.json.JSONException: A JSONObject text must begin with '{' at 1 [character 2 line 1] Error! InventarioDAO - findxNombre: org.json.JSONException: A JSONObject text must begin with '{' at 1 [character 2 line 1] |
Hey, when trying out the demo buy I'm getting the error
A JSONObject text must begin with '{' at 1 [character 2 line 1]
Command is exactly like in the readme
curl -X POST \ http://localhost:8088/etoro-api/positions/open \ -H 'Content-Type: application/json' \ -H 'mode: Demo' \ -d '{ "name": "btc", "type": "BUY", "amount": 100, "leverage": 1, "takeProfitRate": 13000, "stopLossRate": 1000 }'
Any ideas? Running ubuntu 20.04
openjdk 11.0.9.1 2020-11-04
OpenJDK Runtime Environment (build 11.0.9.1+1-Ubuntu-0ubuntu1.20.04)
OpenJDK 64-Bit Server VM (build 11.0.9.1+1-Ubuntu-0ubuntu1.20.04, mixed mode, sharing)
The text was updated successfully, but these errors were encountered: