KO-9 / node-trading212

NodeJS Trading212 Unofficial API
19 stars 3 forks source link

Market Buys not supported #12

Open dakkusingh opened 1 year ago

dakkusingh commented 1 year ago

for example

curl 'https://demo.trading212.com/rest/v1/equity/value-order' \
  -H 'Accept: application/json' \
  -H 'Accept-Language: en-US,en;q=0.9,pa;q=0.8' \
  -H 'Cache-Control: no-cache' \
  -H 'Connection: keep-alive' \
  -H 'Content-Type: application/json' \
  -H 'Cookie: ' \
  -H 'DNT: 1' \
  -H 'Origin: https://demo.trading212.com' \
  -H 'Pragma: no-cache' \
  -H 'Referer: https://demo.trading212.com/' \
  -H 'Sec-Fetch-Dest: empty' \
  -H 'Sec-Fetch-Mode: cors' \
  -H 'Sec-Fetch-Site: same-origin' \
  -H 'User-Agent: ' \
  -H 'X-Trader-Client: ' \
  -H 'X-Trader-Id: ' \
  -H 'X-Trader-SeqId: 29' \
  -H 'sec-ch-ua: "Google Chrome";v="111", "Not(A:Brand";v="8", "Chromium";v="111"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "macOS"' \
  -H 'sec-gpc: 1' \
  --data-raw '{"instrumentCode":"SCYX_US_EQ","orderType":"MARKET","value":200}' \
  --compressed