It looks like you're new here. If you want to get involved, click one of these buttons!
CLOSE TABLES
USE tkns
ZAP
Append From "c:/xampp/htdocs/dashboard/tkns.txt" Type Sdf
GOTO 1
mapi=ALLTRIM(api) &&api_key
ms=ALLTRIM(s) && secrete
mr=ALLTRIM(r) &&request token
ma=ALLTRIM(a) && access token
mp=ALLTRIM(p) &&public token
ODR_HTTP =Createobject( "Msxml2.XMLHTTP.6.0" )
ord_var="api_key="+mapi+"&access_token="+ma+"&tradingsymbol=ACC&exchange=NSE&transaction_type=BUY&order_type=LIMIT&quantity=1&price=2400&product=CNC"
mURL_order = "https://api.kite.trade/orders/regular/"
ODR_HTTP.Open("POST",mURL_order,.T.) && .t. stands true
ODR_HTTP.setRequestHeader("Content-Type","application/json")
ODR_HTTP.setRequestHeader("x-kite-version",3)
ODR_HTTP.setRequestHeader("Authorization","token "+mapi+":"+ma)
ODR_HTTP.Send(ord_var)
?ord_var
WAIT TIMEOUT 3
?ODR_HTTP.RESPONSETEXT