I would like to try REST api (demo account) to my broker but having problems .
Does anybody know how to implement HTTP request with AHK?
On a broker page there is a tutorial for a very simple account info that goes like this:
***************************************************************************************************************************************
Examples
curl: Get Account list for current auth token
Request
Code: Select all
curl \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <AUTHENTICATION TOKEN>" \
"https://api-fxpractice.oanda.com/v3/accounts"
Code: Select all
HTTP/1.1 200 OK
Access-Control-Allow-Headers: Authorization, Content-Type, Accept-Datetime-Format
Content-Encoding: gzip
Transfer-Encoding: chunked
Server: openresty/1.7.0.1
Connection: keep-alive
Date: Wed, 22 Jun 2016 18:32:01 GMT
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: PUT, PATCH, POST, GET, OPTIONS, DELETE
Content-Type: application/json; charset=UTF-8
Response Body
Code: Select all
{
"accounts": [
{
"id": "101-004-7193916-001",
"tags": []
}
]
}
Notice that there are already 3 inputs inserted there :
URL:https://api-fxpractice.oanda.com
Account id: 101-004-7193916-001
Security token:80b44ea9c302237f9178a137d9e86deb-20083fb12d9579469f24afa80816066b
Can anybody make working ahk script out of this, i just need that initial first step
to have any clue how to proceed with more complicated stuff than this.